Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR servicefabricmesh/resource-manager] Swagger specification and examples for Service Fabric Mesh 2018-09-01-preview release. #3914

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/services/serviceFabricMeshManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ npm install azure-arm-servicefabricmesh

## How to use

### Authentication, client creation and get application as an example.
### Authentication, client creation and list operations as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const ServiceFabricMeshManagementClient = require("azure-arm-servicefabricmesh");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new ServiceFabricMeshManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const applicationName = "testapplicationName";
return client.application.get(resourceGroupName, applicationName).then((result) => {
return client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

const models = require('./index');

/**
* Describes the horizontal auto scaling mechanism that adds or removes
* replicas (containers or container groups).
*
* @extends models['AutoScalingMechanism']
*/
class AddRemoveReplicaScalingMechanism extends models['AutoScalingMechanism'] {
/**
* Create a AddRemoveReplicaScalingMechanism.
* @member {number} minCount Minimum number of containers (scale down won't
* be performed below this number).
* @member {number} maxCount Maximum number of containers (scale up won't be
* performed above this number).
* @member {number} scaleIncrement Each time auto scaling is performed, this
* number of containers will be added or removed.
*/
constructor() {
super();
}

/**
* Defines the metadata of AddRemoveReplicaScalingMechanism
*
* @returns {object} metadata of AddRemoveReplicaScalingMechanism
*
*/
mapper() {
return {
required: false,
serializedName: 'AddRemoveReplica',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'kind',
clientName: 'kind'
},
uberParent: 'AutoScalingMechanism',
className: 'AddRemoveReplicaScalingMechanism',
modelProperties: {
kind: {
required: true,
serializedName: 'kind',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
minCount: {
required: true,
serializedName: 'minCount',
type: {
name: 'Number'
}
},
maxCount: {
required: true,
serializedName: 'maxCount',
type: {
name: 'Number'
}
},
scaleIncrement: {
required: true,
serializedName: 'scaleIncrement',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = AddRemoveReplicaScalingMechanism;
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,18 @@
'use strict';

/**
* This type describes properties of an application resource.
* Describes properties of a application resource.
*
*/
class ApplicationProperties {
/**
* Create a ApplicationProperties.
* @member {string} [description] User readable description of the
* application.
* @member {string} [debugParams] Internal use.
* @member {array} [services] describes the services in the application.
* @member {string} [healthState] Describes the health state of an
* application resource. Possible values include: 'Invalid', 'Ok', 'Warning',
* 'Error', 'Unknown'
* @member {string} [unhealthyEvaluation] When the application's health state
* is not 'Ok', this additional details from service fabric Health Manager
* for the user to know why the application is marked unhealthy.
* @member {string} [status] Status of the application resource. Possible
* values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting',
* 'Failed'
* @member {string} [statusDetails] Gives additional information about the
* current status of the application deployment.
* @member {array} [serviceNames] Names of the services in the application.
* @member {array} [services] Describes the services in the application. This
* property is used to create or modify services of the application. On get
* only the name of the service is returned. The service description can be
* obtained by querying for the service resource.
* @member {object} [diagnostics] Describes the diagnostics definition and
* usage for an application resource.
* @member {array} [diagnostics.sinks] List of supported sinks that can be
Expand All @@ -42,6 +32,19 @@ class ApplicationProperties {
* @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if
* diagnostics is enabled. Sink choices can be overridden at the service and
* code package level.
* @member {string} [debugParams] Internal - used by Visual Studio to setup
* the debugging session on the local development environment.
* @member {array} [serviceNames] Names of the services in the application.
* @member {string} [status] Status of the application. Possible values
* include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
* @member {string} [statusDetails] Gives additional information about the
* current status of the application.
* @member {string} [healthState] Describes the health state of an
* application resource. Possible values include: 'Invalid', 'Ok', 'Warning',
* 'Error', 'Unknown'
* @member {string} [unhealthyEvaluation] When the application's health state
* is not 'Ok', this additional details from service fabric Health Manager
* for the user to know why the application is marked unhealthy.
*/
constructor() {
}
Expand All @@ -67,13 +70,6 @@ class ApplicationProperties {
name: 'String'
}
},
debugParams: {
required: false,
serializedName: 'debugParams',
type: {
name: 'String'
}
},
services: {
required: false,
serializedName: 'services',
Expand All @@ -89,20 +85,34 @@ class ApplicationProperties {
}
}
},
healthState: {
diagnostics: {
required: false,
readOnly: true,
serializedName: 'healthState',
serializedName: 'diagnostics',
type: {
name: 'Composite',
className: 'DiagnosticsDescription'
}
},
debugParams: {
required: false,
serializedName: 'debugParams',
type: {
name: 'String'
}
},
unhealthyEvaluation: {
serviceNames: {
required: false,
readOnly: true,
serializedName: 'unhealthyEvaluation',
serializedName: 'serviceNames',
type: {
name: 'String'
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
status: {
Expand All @@ -121,27 +131,20 @@ class ApplicationProperties {
name: 'String'
}
},
serviceNames: {
healthState: {
required: false,
readOnly: true,
serializedName: 'serviceNames',
serializedName: 'healthState',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
name: 'String'
}
},
diagnostics: {
unhealthyEvaluation: {
required: false,
serializedName: 'diagnostics',
readOnly: true,
serializedName: 'unhealthyEvaluation',
type: {
name: 'Composite',
className: 'DiagnosticsDescription'
name: 'String'
}
}
}
Expand Down
Loading