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

[AutoPR servicefabric/resource-manager] Add version 2018-02-01 Microsoft.ServiceFabric specification #2713

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.
80 changes: 43 additions & 37 deletions lib/services/serviceFabricManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
# 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";
const subscriptionId = "testsubscriptionId";
return client.clusters.get(resourceGroupName, clusterName, subscriptionId).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,85 @@
/*
* 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 {array} [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: 'Sequence',
element: {
required: false,
serializedName: 'ServiceTypeDeltaHealthPolicyMapItemElementType',
type: {
name: 'Composite',
className: 'ServiceTypeDeltaHealthPolicyMapItem'
}
}
}
}
}
}
};
}
}

module.exports = ApplicationDeltaHealthPolicy;
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* 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 an item in ApplicationDeltaHealthPolicyMap.
*
*
*/
class ApplicationDeltaHealthPolicyMapItem {
/**
* Create a ApplicationDeltaHealthPolicyMapItem.
* @member {string} key The key of the application delta health policy map
* item. This is the name of the application.
* @member {object} value The value of the application delta health policy
* map item. This is the ApplicationDeltaHealthPolicy for this application.
* @member {object} [value.defaultServiceTypeDeltaHealthPolicy] The delta
* health policy used by default to evaluate the health of a service type
* when upgrading the cluster.
* @member {number}
* [value.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 {array} [value.serviceTypeDeltaHealthPolicies] The map with
* service type delta health policy per service type name. The map is empty
* by default.
*/
constructor() {
}

/**
* Defines the metadata of ApplicationDeltaHealthPolicyMapItem
*
* @returns {object} metadata of ApplicationDeltaHealthPolicyMapItem
*
*/
mapper() {
return {
required: false,
serializedName: 'ApplicationDeltaHealthPolicyMapItem',
type: {
name: 'Composite',
className: 'ApplicationDeltaHealthPolicyMapItem',
modelProperties: {
key: {
required: true,
serializedName: 'key',
type: {
name: 'String'
}
},
value: {
required: true,
serializedName: 'value',
type: {
name: 'Composite',
className: 'ApplicationDeltaHealthPolicy'
}
}
}
}
};
}
}

module.exports = ApplicationDeltaHealthPolicyMapItem;
Loading