Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
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
42 changes: 21 additions & 21 deletions lib/services/serviceFabricManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
79 changes: 42 additions & 37 deletions lib/services/serviceFabricManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
# Microsoft Azure SDK for Node.js - ServiceFabricManagement

This project provides a Node.js package that makes it easy to manage Microsoft Azure ServiceFabric.
## Minimum node.js version >= 6.x.x

## How to Install

```bash
npm install azure-arm-servicefabric
```

## How to Use

### Authentication, client creation and listing clusters as an example

```javascript
const msRestAzure = require('ms-rest-azure');
const ServiceFabricManagement = require("azure-arm-servicefabric");

// Interactive Login
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful,
// the user will get a DeviceTokenCredentials object.
msRestAzure.interactiveLogin().then((credentials) => {
let client = new ServiceFabricManagement(credentials, 'your-subscription-id');
return client.clusters.list();
}).then((clusters) => {
console.log('List of clusters:');
console.dir(clusters, {depth: null, colors: true});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
```

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
---
uid: azure-arm-servicefabric
summary: *content

---
# Microsoft Azure SDK for Node.js - ServiceFabricManagementClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

## Features


## How to Install

```bash
npm install azure-arm-servicefabric
```

## How to use

### Authentication, client creation and get clusters as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const ServiceFabricManagementClient = require("azure-arm-servicefabric");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new ServiceFabricManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const clusterName = "testclusterName";
return client.clusters.get(resourceGroupName, clusterName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* 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');

/**
* Defines a delta health policy used to evaluate the health of an application
* or one of its child entities when upgrading the cluster.
*
*
*/
class ApplicationDeltaHealthPolicy {
/**
* Create a ApplicationDeltaHealthPolicy.
* @member {object} [defaultServiceTypeDeltaHealthPolicy] The delta health
* policy used by default to evaluate the health of a service type when
* upgrading the cluster.
* @member {number}
* [defaultServiceTypeDeltaHealthPolicy.maxPercentDeltaUnhealthyServices] The
* maximum allowed percentage of services health degradation allowed during
* cluster upgrades.
* The delta is measured between the state of the services at the beginning
* of upgrade and the state of the services at the time of the health
* evaluation.
* The check is performed after every upgrade domain upgrade completion to
* make sure the global state of the cluster is within tolerated limits.
* @member {object} [serviceTypeDeltaHealthPolicies] The map with service
* type delta health policy per service type name. The map is empty by
* default.
*/
constructor() {
}

/**
* Defines the metadata of ApplicationDeltaHealthPolicy
*
* @returns {object} metadata of ApplicationDeltaHealthPolicy
*
*/
mapper() {
return {
required: false,
serializedName: 'ApplicationDeltaHealthPolicy',
type: {
name: 'Composite',
className: 'ApplicationDeltaHealthPolicy',
modelProperties: {
defaultServiceTypeDeltaHealthPolicy: {
required: false,
serializedName: 'defaultServiceTypeDeltaHealthPolicy',
type: {
name: 'Composite',
className: 'ServiceTypeDeltaHealthPolicy'
}
},
serviceTypeDeltaHealthPolicies: {
required: false,
serializedName: 'serviceTypeDeltaHealthPolicies',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ServiceTypeDeltaHealthPolicyElementType',
type: {
name: 'Composite',
className: 'ServiceTypeDeltaHealthPolicy'
}
}
}
}
}
}
};
}
}

module.exports = ApplicationDeltaHealthPolicy;
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ const models = require('./index');
class ApplicationHealthPolicy {
/**
* Create a ApplicationHealthPolicy.
* @member {object} [defaultServiceTypeHealthPolicy] The health policy used
* by default to evaluate the health of a service type.
* @member {number}
* [defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] The maximum
* percentage of services allowed to be unhealthy before your application is
* considered in error.
* @member {object} [serviceTypeHealthPolicies] The map with service type
* health policy per service type name. The map is empty by default.
* @member {boolean} [considerWarningAsError] Indicates whether warnings are
* treated with the same severity as errors. Default value: false .
* @member {number} [maxPercentUnhealthyDeployedApplications] The maximum
Expand All @@ -35,48 +43,14 @@ class ApplicationHealthPolicy {
* The computation rounds up to tolerate one failure on small numbers of
* nodes. Default percentage is zero.
* . Default value: 0 .
* @member {object} [defaultServiceTypeHealthPolicy]
* @member {number}
* [defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService]
* The maximum allowed percentage of unhealthy partitions per service.
* Allowed values are Byte values from zero to 100
*
* The percentage represents the maximum tolerated percentage of partitions
* that can be unhealthy before the service is considered in error.
* If the percentage is respected but there is at least one unhealthy
* partition, the health is evaluated as Warning.
* The percentage is calculated by dividing the number of unhealthy
* partitions over the total number of partitions in the service.
* The computation rounds up to tolerate one failure on small numbers of
* partitions. Default percentage is zero.
* @member {number}
* [defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition]
* The maximum allowed percentage of unhealthy replicas per partition.
* Allowed values are Byte values from zero to 100.
*
* The percentage represents the maximum tolerated percentage of replicas
* that can be unhealthy before the partition is considered in error.
* If the percentage is respected but there is at least one unhealthy
* replica, the health is evaluated as Warning.
* The percentage is calculated by dividing the number of unhealthy replicas
* over the total number of replicas in the partition.
* The computation rounds up to tolerate one failure on small numbers of
* replicas. Default percentage is zero.
* @member {object} [defaultServiceTypeHealthPolicy1] The health policy used
* by default to evaluate the health of a service type.
* @member {number}
* [defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] The maximum
* maximum allowed percentage of unhealthy services. Allowed values are Byte
* values from zero to 100.
*
* The percentage represents the maximum tolerated percentage of services
* that can be unhealthy before the application is considered in error.
* If the percentage is respected but there is at least one unhealthy
* service, the health is evaluated as Warning.
* This is calculated by dividing the number of unhealthy services of the
* specific service type over the total number of services of the specific
* service type.
* The computation rounds up to tolerate one failure on small numbers of
* services. Default percentage is zero.
* @member {array} [serviceTypeHealthPolicyMap]
* [defaultServiceTypeHealthPolicy1.maxPercentUnhealthyServices] The maximum
* percentage of services allowed to be unhealthy before your application is
* considered in error.
* @member {object} [serviceTypeHealthPolicyMap] The map with service type
* health policy per service type name. The map is empty by default.
*/
constructor() {
}
Expand All @@ -95,6 +69,29 @@ class ApplicationHealthPolicy {
name: 'Composite',
className: 'ApplicationHealthPolicy',
modelProperties: {
defaultServiceTypeHealthPolicy: {
required: false,
serializedName: 'defaultServiceTypeHealthPolicy',
type: {
name: 'Composite',
className: 'ServiceTypeHealthPolicy'
}
},
serviceTypeHealthPolicies: {
required: false,
serializedName: 'serviceTypeHealthPolicies',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ServiceTypeHealthPolicyElementType',
type: {
name: 'Composite',
className: 'ServiceTypeHealthPolicy'
}
}
}
},
considerWarningAsError: {
required: false,
serializedName: 'ConsiderWarningAsError',
Expand All @@ -111,7 +108,7 @@ class ApplicationHealthPolicy {
name: 'Number'
}
},
defaultServiceTypeHealthPolicy: {
defaultServiceTypeHealthPolicy1: {
required: false,
serializedName: 'DefaultServiceTypeHealthPolicy',
type: {
Expand All @@ -123,13 +120,13 @@ class ApplicationHealthPolicy {
required: false,
serializedName: 'ServiceTypeHealthPolicyMap',
type: {
name: 'Sequence',
element: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ServiceTypeHealthPolicyMapItemElementType',
serializedName: 'ServiceTypeHealthPolicyElementType',
type: {
name: 'Composite',
className: 'ServiceTypeHealthPolicyMapItem'
className: 'ServiceTypeHealthPolicy'
}
}
}
Expand Down
Loading