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

[AutoPR] trafficmanager/resource-manager #2829

Merged
7 commits merged into from
Aug 30, 2018
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
42 changes: 21 additions & 21 deletions lib/services/trafficManagerManagement2/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
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.
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.
88 changes: 44 additions & 44 deletions lib/services/trafficManagerManagement2/README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
---
uid: azure-arm-trafficmanager
summary: *content

---
# Microsoft Azure SDK for Node.js - TrafficManagerManagementClient
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-trafficmanager
```

## How to use

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

```javascript
const msRestAzure = require("ms-rest-azure");
const TrafficManagerManagementClient = require("azure-arm-trafficmanager");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new TrafficManagerManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const profileName = "testprofileName";
const endpointType = "testendpointType";
const endpointName = "testendpointName";
return client.endpoints.get(resourceGroupName, profileName, endpointType, endpointName).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)
---
uid: azure-arm-trafficmanager
summary: *content
---
# Microsoft Azure SDK for Node.js - TrafficManagerManagementClient
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-trafficmanager
```
## How to use
### Authentication, client creation and get endpoints as an example.
```javascript
const msRestAzure = require("ms-rest-azure");
const TrafficManagerManagementClient = require("azure-arm-trafficmanager");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new TrafficManagerManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const profileName = "testprofileName";
const endpointType = "testendpointType";
const endpointName = "testendpointName";
return client.endpoints.get(resourceGroupName, profileName, endpointType, endpointName).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)
47 changes: 41 additions & 6 deletions lib/services/trafficManagerManagement2/lib/models/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ class Endpoint extends models['ProxyResource'] {
* Create a Endpoint.
* @member {string} [targetResourceId] The Azure Resource URI of the of the
* endpoint. Not applicable to endpoints of type 'ExternalEndpoints'.
* @member {string} [target] The fully-qualified DNS name of the endpoint.
* Traffic Manager returns this value in DNS responses to direct traffic to
* this endpoint.
* @member {string} [target] The fully-qualified DNS name or IP address of
* the endpoint. Traffic Manager returns this value in DNS responses to
* direct traffic to this endpoint.
* @member {string} [endpointStatus] The status of the endpoint. If the
* endpoint is Enabled, it is probed for endpoint health and is included in
* the traffic routing method. Possible values include: 'Enabled', 'Disabled'
* @member {number} [weight] The weight of this endpoint when using the
* 'Weighted' traffic routing method. Possible values are from 1 to 1000.
* @member {number} [priority] The priority of this endpoint when using the
* Priority traffic routing method. Possible values are from 1 to 1000,
* 'Priority' traffic routing method. Possible values are from 1 to 1000,
* lower values represent higher priority. This is an optional parameter. If
* specified, it must be specified on all endpoints, and no two endpoints can
* share the same priority value.
* @member {string} [endpointLocation] Specifies the location of the external
* or nested endpoints when using the Performance traffic routing method.
* or nested endpoints when using the 'Performance' traffic routing method.
* @member {string} [endpointMonitorStatus] The monitoring status of the
* endpoint. Possible values include: 'CheckingEndpoint', 'Online',
* 'Degraded', 'Disabled', 'Inactive', 'Stopped'
Expand All @@ -45,9 +45,14 @@ class Endpoint extends models['ProxyResource'] {
* be considered available. Only applicable to endpoint of type
* 'NestedEndpoints'.
* @member {array} [geoMapping] The list of countries/regions mapped to this
* endpoint when using the Geographic traffic routing method. Please
* endpoint when using the 'Geographic' traffic routing method. Please
* consult Traffic Manager Geographic documentation for a full list of
* accepted values.
* @member {array} [subnets] The list of subnets, IP addresses, and/or
* address ranges mapped to this endpoint when using the 'Subnet' traffic
* routing method. An empty list will match all ranges not covered by other
* endpoints.
* @member {array} [customHeaders] List of custom headers.
*/
constructor() {
super();
Expand Down Expand Up @@ -160,6 +165,36 @@ class Endpoint extends models['ProxyResource'] {
}
}
}
},
subnets: {
required: false,
serializedName: 'properties.subnets',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'EndpointPropertiesSubnetsItemElementType',
type: {
name: 'Composite',
className: 'EndpointPropertiesSubnetsItem'
}
}
}
},
customHeaders: {
required: false,
serializedName: 'properties.customHeaders',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'EndpointPropertiesCustomHeadersItemElementType',
type: {
name: 'Composite',
className: 'EndpointPropertiesCustomHeadersItem'
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* 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';

/**
* Custom header name and value.
*
*/
class EndpointPropertiesCustomHeadersItem {
/**
* Create a EndpointPropertiesCustomHeadersItem.
* @member {string} [name] Header name.
* @member {string} [value] Header value.
*/
constructor() {
}

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

module.exports = EndpointPropertiesCustomHeadersItem;
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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';

/**
* Subnet first address, scope, and/or last address.
*
*/
class EndpointPropertiesSubnetsItem {
/**
* Create a EndpointPropertiesSubnetsItem.
* @member {string} [first] First address in the subnet.
* @member {string} [last] Last address in the subnet.
* @member {number} [scope] Block size (number of leading bits in the subnet
* mask).
*/
constructor() {
}

/**
* Defines the metadata of EndpointPropertiesSubnetsItem
*
* @returns {object} metadata of EndpointPropertiesSubnetsItem
*
*/
mapper() {
return {
required: false,
serializedName: 'EndpointProperties_subnetsItem',
type: {
name: 'Composite',
className: 'EndpointPropertiesSubnetsItem',
modelProperties: {
first: {
required: false,
serializedName: 'first',
type: {
name: 'String'
}
},
last: {
required: false,
serializedName: 'last',
type: {
name: 'String'
}
},
scope: {
required: false,
serializedName: 'scope',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = EndpointPropertiesSubnetsItem;
Loading