Skip to content
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
57 changes: 38 additions & 19 deletions packages/@azure/arm-network/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Azure NetworkManagementClient SDK for JavaScript
## Azure NetworkManagementClient SDK for JavaScript

This package contains an isomorphic SDK for NetworkManagementClient.

## Currently supported environments
### Currently supported environments

- Node.js version 6.x.x or higher
- Browser JavaScript

## How to Install
```
### How to Install

```bash
npm install @azure/arm-network
```

### How to use

## How to use
#### nodejs - Authentication, client creation and get applicationGateways as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

```bash
npm install @azure/ms-rest-nodeauth
```

### nodejs - Authentication, client creation and get applicationGateways as an example written in TypeScript.
##### Sample code

```ts
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { NetworkManagementClient, NetworkManagementModels, NetworkManagementMappers } from "@azure/arm-network";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

Expand All @@ -35,7 +45,16 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

### browser - Authentication, client creation and get applicationGateways as an example written in JavaScript.
#### browser - Authentication, client creation and get applicationGateways as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

```bash
npm install @azure/ms-rest-browserauth
```

##### Sample code

See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.

- index.html
Expand All @@ -44,11 +63,11 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
<html lang="en">
<head>
<title>@azure/arm-network sample</title>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-network/dist/arm-network.js"></script>
<script>
<script type="text/javascript">
const subscriptionId = "<Subscription_Id>";
const authManager = new msAuth.AuthManager({
clientId: "<client id for your Azure AD app>",
Expand All @@ -72,10 +91,10 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
});
</script>
</head>
<body>
</body>
<body></body>
</html>
```

# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
## Related projects

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
66 changes: 35 additions & 31 deletions packages/@azure/arm-network/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js";
import * as msRest from "ms-rest-js";
import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";

export { BaseResource, CloudError };

Expand Down Expand Up @@ -156,21 +156,22 @@ export interface SecurityRule extends SubResource {
protocol: SecurityRuleProtocol;
/**
* @member {string} [sourcePortRange] The source port or range. Integer or
* range between 0 and 65535. Asterix '*' can also be used to match all
* range between 0 and 65535. Asterisks '*' can also be used to match all
* ports.
*/
sourcePortRange?: string;
/**
* @member {string} [destinationPortRange] The destination port or range.
* Integer or range between 0 and 65535. Asterix '*' can also be used to
* Integer or range between 0 and 65535. Asterisks '*' can also be used to
* match all ports.
*/
destinationPortRange?: string;
/**
* @member {string} [sourceAddressPrefix] The CIDR or source IP range.
* Asterix '*' can also be used to match all source IPs. Default tags such as
* 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If
* this is an ingress rule, specifies where network traffic originates from.
* Asterisks '*' can also be used to match all source IPs. Default tags such
* as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
* If this is an ingress rule, specifies where network traffic originates
* from.
*/
sourceAddressPrefix?: string;
/**
Expand All @@ -184,7 +185,7 @@ export interface SecurityRule extends SubResource {
sourceApplicationSecurityGroups?: ApplicationSecurityGroup[];
/**
* @member {string} [destinationAddressPrefix] The destination address
* prefix. CIDR or destination IP range. Asterix '*' can also be used to
* prefix. CIDR or destination IP range. Asterisks '*' can also be used to
* match all source IPs. Default tags such as 'VirtualNetwork',
* 'AzureLoadBalancer' and 'Internet' can also be used.
*/
Expand Down Expand Up @@ -223,7 +224,7 @@ export interface SecurityRule extends SubResource {
priority?: number;
/**
* @member {SecurityRuleDirection} direction The direction of the rule. The
* direction specifies if rule will be evaluated on incoming or outcoming
* direction specifies if rule will be evaluated on incoming or outgoing
* traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values
* include: 'Inbound', 'Outbound'
*/
Expand Down Expand Up @@ -892,7 +893,7 @@ export interface IPConfiguration extends SubResource {
export interface IPConfigurationProfile extends SubResource {
/**
* @member {Subnet} [subnet] The reference of the subnet resource to create a
* contatainer network interface ip configruation.
* container network interface ip configuration.
*/
subnet?: Subnet;
/**
Expand Down Expand Up @@ -2616,16 +2617,16 @@ export interface ApplicationGatewayWebApplicationFirewallConfiguration {
*/
requestBodyCheck?: boolean;
/**
* @member {number} [maxRequestBodySize] Maxium request body size for WAF.
* @member {number} [maxRequestBodySize] Maximum request body size for WAF.
*/
maxRequestBodySize?: number;
/**
* @member {number} [maxRequestBodySizeInKb] Maxium request body size in Kb
* @member {number} [maxRequestBodySizeInKb] Maximum request body size in Kb
* for WAF.
*/
maxRequestBodySizeInKb?: number;
/**
* @member {number} [fileUploadLimitInMb] Maxium file upload size in Mb for
* @member {number} [fileUploadLimitInMb] Maximum file upload size in Mb for
* WAF.
*/
fileUploadLimitInMb?: number;
Expand All @@ -2645,9 +2646,14 @@ export interface ApplicationGatewayWebApplicationFirewallConfiguration {
export interface ApplicationGatewayAutoscaleConfiguration {
/**
* @member {number} minCapacity Lower bound on number of Application Gateway
* instances
* capacity
*/
minCapacity: number;
/**
* @member {number} [maxCapacity] Upper bound on number of Application
* Gateway capacity
*/
maxCapacity?: number;
}

/**
Expand Down Expand Up @@ -3788,7 +3794,7 @@ export interface ExpressRouteCircuitPeeringConfig {
advertisedPublicPrefixes?: string[];
/**
* @member {string[]} [advertisedCommunities] The communities of bgp peering.
* Spepcified for microsoft peering
* Specified for microsoft peering
*/
advertisedCommunities?: string[];
/**
Expand Down Expand Up @@ -3937,7 +3943,7 @@ export interface ExpressRouteCircuitConnection extends SubResource {
readonly circuitConnectionStatus?: CircuitConnectionStatus;
/**
* @member {string} [provisioningState] Provisioning state of the circuit
* connection resource. Possible values are: 'Succeded', 'Updating',
* connection resource. Possible values are: 'Succeeded', 'Updating',
* 'Deleting', and 'Failed'.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
Expand Down Expand Up @@ -5030,7 +5036,7 @@ export interface ExpressRoutePort extends Resource {
*/
encapsulation?: ExpressRoutePortsEncapsulation;
/**
* @member {string} [etherType] Ethertype of the physical port.
* @member {string} [etherType] Ether type of the physical port.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
Expand Down Expand Up @@ -5529,13 +5535,13 @@ export interface EffectiveNetworkSecurityRule {
/**
* @member {string[]} [sourcePortRanges] The source port ranges. Expected
* values include a single integer between 0 and 65535, a range using '-' as
* seperator (e.g. 100-400), or an asterix (*)
* separator (e.g. 100-400), or an asterisk (*)
*/
sourcePortRanges?: string[];
/**
* @member {string[]} [destinationPortRanges] The destination port ranges.
* Expected values include a single integer between 0 and 65535, a range
* using '-' as seperator (e.g. 100-400), or an asterix (*)
* using '-' as separator (e.g. 100-400), or an asterisk (*)
*/
destinationPortRanges?: string[];
/**
Expand All @@ -5550,14 +5556,14 @@ export interface EffectiveNetworkSecurityRule {
/**
* @member {string[]} [sourceAddressPrefixes] The source address prefixes.
* Expected values include CIDR IP ranges, Default Tags (VirtualNetwork,
* AureLoadBalancer, Internet), System Tags, and the asterix (*).
* AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
*/
sourceAddressPrefixes?: string[];
/**
* @member {string[]} [destinationAddressPrefixes] The destination address
* prefixes. Expected values include CIDR IP ranges, Default Tags
* (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix
* (*).
* (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the
* asterisk (*).
*/
destinationAddressPrefixes?: string[];
/**
Expand Down Expand Up @@ -5704,7 +5710,7 @@ export interface EffectiveRouteListResult {
/**
* @interface
* An interface representing ContainerNetworkInterfaceConfiguration.
* Container network interface configruation child resource.
* Container network interface configuration child resource.
*
* @extends SubResource
*/
Expand Down Expand Up @@ -5802,7 +5808,7 @@ export interface ContainerNetworkInterface extends SubResource {
*/
containerNetworkInterfaceConfiguration?: ContainerNetworkInterfaceConfiguration;
/**
* @member {Container} [container] Reference to the conatinaer to which this
* @member {Container} [container] Reference to the container to which this
* container network interface is attached.
*/
container?: Container;
Expand Down Expand Up @@ -7463,7 +7469,7 @@ export interface ConnectionStateSnapshot {
/**
* @interface
* An interface representing ConnectionMonitorQueryResult.
* List of connection states snaphots.
* List of connection states snapshots.
*
*/
export interface ConnectionMonitorQueryResult {
Expand Down Expand Up @@ -7509,9 +7515,8 @@ export interface NetworkConfigurationDiagnosticProfile {
*/
destination: string;
/**
* @member {string} destinationPort Traffice destination port. Accepted
* values are '*', port (for example, 3389) and port range (for example,
* 80-100).
* @member {string} destinationPort Traffic destination port. Accepted values
* are '*', port (for example, 3389) and port range (for example, 80-100).
*/
destinationPort: string;
}
Expand Down Expand Up @@ -9552,8 +9557,7 @@ export interface P2SVpnServerConfiguration extends SubResource {
radiusServerAddress?: string;
/**
* @member {string} [radiusServerSecret] The radius secret property of the
* P2SVpnServerConfiguration resource for for point to site client
* connection.
* P2SVpnServerConfiguration resource for point to site client connection.
*/
radiusServerSecret?: string;
/**
Expand Down Expand Up @@ -10129,7 +10133,7 @@ export interface P2SVpnGateway extends Resource {
vpnClientAddressPool?: AddressSpace;
/**
* @member {VpnClientConnectionHealth} [vpnClientConnectionHealth] All P2S
* vpnclients' connection health status.
* VPN clients' connection health status.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
Expand Down
13 changes: 11 additions & 2 deletions packages/@azure/arm-network/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js";
import * as msRest from "ms-rest-js";
import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";

export const CloudError = CloudErrorMapper;
export const BaseResource = BaseResourceMapper;
Expand Down Expand Up @@ -3492,6 +3492,15 @@ export const ApplicationGatewayAutoscaleConfiguration: msRest.CompositeMapper =
minCapacity: {
required: true,
serializedName: "minCapacity",
constraints: {
InclusiveMinimum: 0
},
type: {
name: "Number"
}
},
maxCapacity: {
serializedName: "maxCapacity",
constraints: {
InclusiveMinimum: 2
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-network/lib/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";

export const acceptLanguage: msRest.OperationParameter = {
parameterPath: "acceptLanguage",
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-network/lib/networkManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as Parameters from "./models/parameters";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/

import * as Models from "./models";
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/arm-network";
const packageVersion = "0.2.0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as Models from "../models";
import * as Mappers from "../models/applicationGatewaysMappers";
import * as Parameters from "../models/parameters";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as Models from "../models";
import * as Mappers from "../models/applicationSecurityGroupsMappers";
import * as Parameters from "../models/parameters";
Expand Down
Loading