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

[Storage] Updated based newest swagger udpate to support vnet acl #2208

Merged
merged 3 commits into from
Jun 26, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 66 additions & 0 deletions lib/services/storageManagement2/lib/models/iPRule.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* 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';

/**
* @class
* Initializes a new instance of the IPRule class.
* @constructor
* IP rule with specific IP or IP range in CIDR format.
*
* @member {string} iPAddressOrRange Specifies the IP or IP range in CIDR
* format. Only IPV4 address is allowed.
*
* @member {string} [action] The action of IP ACL rule. Possible values
* include: 'Allow'. Default value: 'Allow' .
*
*/
class IPRule {
constructor() {
}

/**
* Defines the metadata of IPRule
*
* @returns {object} metadata of IPRule
*
*/
mapper() {
return {
required: false,
serializedName: 'IPRule',
type: {
name: 'Composite',
className: 'IPRule',
modelProperties: {
iPAddressOrRange: {
required: true,
serializedName: 'value',
type: {
name: 'String'
}
},
action: {
required: false,
serializedName: 'action',
defaultValue: 'Allow',
type: {
name: 'Enum',
allowedValues: [ 'Allow' ]
}
}
}
}
};
}
}

module.exports = IPRule;
126 changes: 125 additions & 1 deletion lib/services/storageManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export interface ServiceSpecification {
*
* @member {string} [origin] The origin of operations.
*
* @member {object} [serviceSpecification]
* @member {object} [serviceSpecification] One property of operation, include
* metric specifications.
*
* @member {array} [serviceSpecification.metricSpecifications] Metric
* specifications of operation.
Expand Down Expand Up @@ -397,6 +398,75 @@ export interface Encryption {
keyVaultProperties?: KeyVaultProperties;
}

/**
* @class
* Initializes a new instance of the VirtualNetworkRule class.
* @constructor
* Virtual Network rule.
*
* @member {string} virtualNetworkResourceId A URL of vnet, subnet, classicVnet
* or classicSubnet.
*
* @member {string} [action] The action of virtual network ACL rule. Possible
* values include: 'Allow'. Default value: 'Allow' .
*
* @member {string} [state] Gets the state of virtual network ACL rule.
* Possible values include: 'provisioning', 'deprovisioning', 'succeeded',
* 'failed', 'networkSourceDeleted'
*
*/
export interface VirtualNetworkRule {
virtualNetworkResourceId: string;
action?: string;
state?: string;
}

/**
* @class
* Initializes a new instance of the IPRule class.
* @constructor
* IP rule with specific IP or IP range in CIDR format.
*
* @member {string} iPAddressOrRange Specifies the IP or IP range in CIDR
* format. Only IPV4 address is allowed.
*
* @member {string} [action] The action of IP ACL rule. Possible values
* include: 'Allow'. Default value: 'Allow' .
*
*/
export interface IPRule {
iPAddressOrRange: string;
action?: string;
}

/**
* @class
* Initializes a new instance of the StorageNetworkAcls class.
* @constructor
* Network ACL
*
* @member {string} [bypass] Specifies whether traffic is bypassed for
* Logging/Metrics/AzureServices. Possible values are any combination of
* Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to
* bypass none of those traffics. Possible values include: 'None', 'Logging',
* 'Metrics', 'AzureServices'. Default value: 'AzureServices' .
*
* @member {array} [virtualNetworkRules] Sets the virtual network ACL rules
*
* @member {array} [ipRules] Sets the IP ACL rules
*
* @member {string} defaultAction Specifies the default action of allow or deny
* when no other rules match. Possible values include: 'Allow', 'Deny'. Default
* value: 'Allow' .
*
*/
export interface StorageNetworkAcls {
bypass?: string;
virtualNetworkRules?: VirtualNetworkRule[];
ipRules?: IPRule[];
defaultAction: string;
}

/**
* @class
* Initializes a new instance of the Identity class.
Expand Down Expand Up @@ -530,6 +600,23 @@ export interface Identity {
* @member {string} [encryption.keyVaultProperties.keyVaultUri] The Uri of
* KeyVault.
*
* @member {object} [networkAcls] Network ACL
*
* @member {string} [networkAcls.bypass] Specifies whether traffic is bypassed
* for Logging/Metrics/AzureServices. Possible values are any combination of
* Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to
* bypass none of those traffics. Possible values include: 'None', 'Logging',
* 'Metrics', 'AzureServices'
*
* @member {array} [networkAcls.virtualNetworkRules] Sets the virtual network
* ACL rules
*
* @member {array} [networkAcls.ipRules] Sets the IP ACL rules
*
* @member {string} [networkAcls.defaultAction] Specifies the default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
*
* @member {string} [accessTier] Required for storage accounts where kind =
* BlobStorage. The access tier used for billing. Possible values include:
* 'Hot', 'Cool'
Expand All @@ -546,6 +633,7 @@ export interface StorageAccountCreateParameters {
identity?: Identity;
customDomain?: CustomDomain;
encryption?: Encryption;
networkAcls?: StorageNetworkAcls;
accessTier?: string;
enableHttpsTrafficOnly?: boolean;
}
Expand Down Expand Up @@ -762,6 +850,23 @@ export interface Resource extends BaseResource {
* @member {boolean} [enableHttpsTrafficOnly] Allows https traffic only to
* storage service if sets to true. Default value: false .
*
* @member {object} [networkAcls] Network ACL
*
* @member {string} [networkAcls.bypass] Specifies whether traffic is bypassed
* for Logging/Metrics/AzureServices. Possible values are any combination of
* Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to
* bypass none of those traffics. Possible values include: 'None', 'Logging',
* 'Metrics', 'AzureServices'
*
* @member {array} [networkAcls.virtualNetworkRules] Sets the virtual network
* ACL rules
*
* @member {array} [networkAcls.ipRules] Sets the IP ACL rules
*
* @member {string} [networkAcls.defaultAction] Specifies the default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
*
*/
export interface StorageAccount extends Resource {
readonly sku?: Sku;
Expand All @@ -780,6 +885,7 @@ export interface StorageAccount extends Resource {
readonly encryption?: Encryption;
readonly accessTier?: string;
enableHttpsTrafficOnly?: boolean;
readonly networkAcls?: StorageNetworkAcls;
}

/**
Expand Down Expand Up @@ -961,6 +1067,23 @@ export interface StorageAccountRegenerateKeyParameters {
* @member {boolean} [enableHttpsTrafficOnly] Allows https traffic only to
* storage service if sets to true. Default value: false .
*
* @member {object} [networkAcls] Network ACL
*
* @member {string} [networkAcls.bypass] Specifies whether traffic is bypassed
* for Logging/Metrics/AzureServices. Possible values are any combination of
* Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to
* bypass none of those traffics. Possible values include: 'None', 'Logging',
* 'Metrics', 'AzureServices'
*
* @member {array} [networkAcls.virtualNetworkRules] Sets the virtual network
* ACL rules
*
* @member {array} [networkAcls.ipRules] Sets the IP ACL rules
*
* @member {string} [networkAcls.defaultAction] Specifies the default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
*
*/
export interface StorageAccountUpdateParameters {
sku?: Sku;
Expand All @@ -970,6 +1093,7 @@ export interface StorageAccountUpdateParameters {
encryption?: Encryption;
accessTier?: string;
enableHttpsTrafficOnly?: boolean;
networkAcls?: StorageNetworkAcls;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions lib/services/storageManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ exports.EncryptionService = require('./encryptionService');
exports.EncryptionServices = require('./encryptionServices');
exports.KeyVaultProperties = require('./keyVaultProperties');
exports.Encryption = require('./encryption');
exports.VirtualNetworkRule = require('./virtualNetworkRule');
exports.IPRule = require('./iPRule');
exports.StorageNetworkAcls = require('./storageNetworkAcls');
exports.Identity = require('./identity');
exports.StorageAccountCreateParameters = require('./storageAccountCreateParameters');
exports.Endpoints = require('./endpoints');
Expand Down
3 changes: 2 additions & 1 deletion lib/services/storageManagement2/lib/models/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const models = require('./index');
*
* @member {string} [origin] The origin of operations.
*
* @member {object} [serviceSpecification]
* @member {object} [serviceSpecification] One property of operation, include
* metric specifications.
*
* @member {array} [serviceSpecification.metricSpecifications] Metric
* specifications of operation.
Expand Down
26 changes: 26 additions & 0 deletions lib/services/storageManagement2/lib/models/storageAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,23 @@ const models = require('./index');
* @member {boolean} [enableHttpsTrafficOnly] Allows https traffic only to
* storage service if sets to true. Default value: false .
*
* @member {object} [networkAcls] Network ACL
*
* @member {string} [networkAcls.bypass] Specifies whether traffic is bypassed
* for Logging/Metrics/AzureServices. Possible values are any combination of
* Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to
* bypass none of those traffics. Possible values include: 'None', 'Logging',
* 'Metrics', 'AzureServices'
*
* @member {array} [networkAcls.virtualNetworkRules] Sets the virtual network
* ACL rules
*
* @member {array} [networkAcls.ipRules] Sets the IP ACL rules
*
* @member {string} [networkAcls.defaultAction] Specifies the default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
*
*/
class StorageAccount extends models['Resource'] {
constructor() {
Expand Down Expand Up @@ -377,6 +394,15 @@ class StorageAccount extends models['Resource'] {
type: {
name: 'Boolean'
}
},
networkAcls: {
required: false,
readOnly: true,
serializedName: 'properties.networkAcls',
type: {
name: 'Composite',
className: 'StorageNetworkAcls'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,23 @@ const models = require('./index');
* @member {string} [encryption.keyVaultProperties.keyVaultUri] The Uri of
* KeyVault.
*
* @member {object} [networkAcls] Network ACL
*
* @member {string} [networkAcls.bypass] Specifies whether traffic is bypassed
* for Logging/Metrics/AzureServices. Possible values are any combination of
* Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to
* bypass none of those traffics. Possible values include: 'None', 'Logging',
* 'Metrics', 'AzureServices'
*
* @member {array} [networkAcls.virtualNetworkRules] Sets the virtual network
* ACL rules
*
* @member {array} [networkAcls.ipRules] Sets the IP ACL rules
*
* @member {string} [networkAcls.defaultAction] Specifies the default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
*
* @member {string} [accessTier] Required for storage accounts where kind =
* BlobStorage. The access tier used for billing. Possible values include:
* 'Hot', 'Cool'
Expand Down Expand Up @@ -216,6 +233,14 @@ class StorageAccountCreateParameters {
className: 'Encryption'
}
},
networkAcls: {
required: false,
serializedName: 'properties.networkAcls',
type: {
name: 'Composite',
className: 'StorageNetworkAcls'
}
},
accessTier: {
required: false,
serializedName: 'properties.accessTier',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,23 @@ const models = require('./index');
* @member {boolean} [enableHttpsTrafficOnly] Allows https traffic only to
* storage service if sets to true. Default value: false .
*
* @member {object} [networkAcls] Network ACL
*
* @member {string} [networkAcls.bypass] Specifies whether traffic is bypassed
* for Logging/Metrics/AzureServices. Possible values are any combination of
* Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to
* bypass none of those traffics. Possible values include: 'None', 'Logging',
* 'Metrics', 'AzureServices'
*
* @member {array} [networkAcls.virtualNetworkRules] Sets the virtual network
* ACL rules
*
* @member {array} [networkAcls.ipRules] Sets the IP ACL rules
*
* @member {string} [networkAcls.defaultAction] Specifies the default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
*
*/
class StorageAccountUpdateParameters {
constructor() {
Expand Down Expand Up @@ -209,6 +226,14 @@ class StorageAccountUpdateParameters {
type: {
name: 'Boolean'
}
},
networkAcls: {
required: false,
serializedName: 'properties.networkAcls',
type: {
name: 'Composite',
className: 'StorageNetworkAcls'
}
}
}
}
Expand Down