Skip to content

Commit

Permalink
Merge pull request Azure#3347 from JasonYang-MSFT/vnetacl
Browse files Browse the repository at this point in the history
[Storage] Supported vnetacl
  • Loading branch information
cormacpayne authored Jun 19, 2017
2 parents 93c8e2e + 151c120 commit 4951f8f
Show file tree
Hide file tree
Showing 46 changed files with 2,842 additions and 1,797 deletions.
29 changes: 29 additions & 0 deletions src/SDKs/Storage/Management.Storage/Generated/Models/Action.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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 1.0.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Storage.Models
{
using Azure;
using Management;
using Storage;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
using System.Runtime.Serialization;

/// <summary>
/// Defines values for Action.
/// </summary>
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum Action
{
[EnumMember(Value = "Allow")]
Allow
}
}

26 changes: 26 additions & 0 deletions src/SDKs/Storage/Management.Storage/Generated/Models/Bypass.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 1.0.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Storage.Models
{
using Azure;
using Management;
using Storage;

/// <summary>
/// Defines values for Bypass.
/// </summary>
public static class Bypass
{
public const string None = "None";
public const string Logging = "Logging";
public const string Metrics = "Metrics";
public const string AzureServices = "AzureServices";
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 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 1.0.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Storage.Models
{
using Azure;
using Management;
using Storage;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
using System.Runtime.Serialization;

/// <summary>
/// Defines values for DefaultAction.
/// </summary>
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum DefaultAction
{
[EnumMember(Value = "Allow")]
Allow,
[EnumMember(Value = "Deny")]
Deny
}
}

70 changes: 70 additions & 0 deletions src/SDKs/Storage/Management.Storage/Generated/Models/IpRule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// 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 1.0.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Storage.Models
{
using Azure;
using Management;
using Storage;
using Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// IP rule with specific IP or IP range in CIDR format.
/// </summary>
public partial class IPRule
{
/// <summary>
/// Initializes a new instance of the IPRule class.
/// </summary>
public IPRule() { }

/// <summary>
/// Initializes a new instance of the IPRule class.
/// </summary>
/// <param name="iPAddressOrRange">Specifies the IP or IP range in CIDR
/// format. Only IPV4 address is allowed.</param>
/// <param name="action">The action of IP ACL rule. Possible values
/// include: 'Allow'</param>
public IPRule(string iPAddressOrRange, Action? action = default(Action?))
{
IPAddressOrRange = iPAddressOrRange;
Action = action;
}

/// <summary>
/// Gets or sets specifies the IP or IP range in CIDR format. Only IPV4
/// address is allowed.
/// </summary>
[JsonProperty(PropertyName = "value")]
public string IPAddressOrRange { get; set; }

/// <summary>
/// Gets or sets the action of IP ACL rule. Possible values include:
/// 'Allow'
/// </summary>
[JsonProperty(PropertyName = "action")]
public Action? Action { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (IPAddressOrRange == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "IPAddressOrRange");
}
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public Operation() { }
/// <param name="display">Display metadata associated with the
/// operation.</param>
/// <param name="origin">The origin of operations.</param>
/// <param name="serviceSpecification">One property of operation,
/// include metric specifications.</param>
public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay), string origin = default(string), ServiceSpecification serviceSpecification = default(ServiceSpecification))
{
Name = name;
Expand Down Expand Up @@ -62,6 +64,8 @@ public Operation() { }
public string Origin { get; set; }

/// <summary>
/// Gets or sets one property of operation, include metric
/// specifications.
/// </summary>
[JsonProperty(PropertyName = "properties.serviceSpecification")]
public ServiceSpecification ServiceSpecification { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// 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 1.0.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Storage.Models
{
using Azure;
using Management;
using Storage;

/// <summary>
/// Defines values for SignedResourceTypes.
/// </summary>
public static class SignedResourceTypes
{
public const string S = "s";
public const string C = "c";
public const string O = "o";
}
}

37 changes: 37 additions & 0 deletions src/SDKs/Storage/Management.Storage/Generated/Models/State.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// 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 1.0.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Storage.Models
{
using Azure;
using Management;
using Storage;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
using System.Runtime.Serialization;

/// <summary>
/// Defines values for State.
/// </summary>
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum State
{
[EnumMember(Value = "provisioning")]
Provisioning,
[EnumMember(Value = "deprovisioning")]
Deprovisioning,
[EnumMember(Value = "succeeded")]
Succeeded,
[EnumMember(Value = "failed")]
Failed,
[EnumMember(Value = "networkSourceDeleted")]
NetworkSourceDeleted
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public StorageAccount()
/// include: 'Hot', 'Cool'</param>
/// <param name="enableHttpsTrafficOnly">Allows https traffic only to
/// storage service if sets to true.</param>
public StorageAccount(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), Sku sku = default(Sku), Kind? kind = default(Kind?), Identity identity = default(Identity), ProvisioningState? provisioningState = default(ProvisioningState?), Endpoints primaryEndpoints = default(Endpoints), string primaryLocation = default(string), AccountStatus? statusOfPrimary = default(AccountStatus?), System.DateTime? lastGeoFailoverTime = default(System.DateTime?), string secondaryLocation = default(string), AccountStatus? statusOfSecondary = default(AccountStatus?), System.DateTime? creationTime = default(System.DateTime?), CustomDomain customDomain = default(CustomDomain), Endpoints secondaryEndpoints = default(Endpoints), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), bool? enableHttpsTrafficOnly = default(bool?))
/// <param name="networkAcls">Network ACL</param>
public StorageAccount(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), Sku sku = default(Sku), Kind? kind = default(Kind?), Identity identity = default(Identity), ProvisioningState? provisioningState = default(ProvisioningState?), Endpoints primaryEndpoints = default(Endpoints), string primaryLocation = default(string), AccountStatus? statusOfPrimary = default(AccountStatus?), System.DateTime? lastGeoFailoverTime = default(System.DateTime?), string secondaryLocation = default(string), AccountStatus? statusOfSecondary = default(AccountStatus?), System.DateTime? creationTime = default(System.DateTime?), CustomDomain customDomain = default(CustomDomain), Endpoints secondaryEndpoints = default(Endpoints), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), bool? enableHttpsTrafficOnly = default(bool?), StorageNetworkAcls networkAcls = default(StorageNetworkAcls))
: base(id, name, type, location, tags)
{
Sku = sku;
Expand All @@ -104,6 +105,7 @@ public StorageAccount()
Encryption = encryption;
AccessTier = accessTier;
EnableHttpsTrafficOnly = enableHttpsTrafficOnly;
NetworkAcls = networkAcls;
}

/// <summary>
Expand Down Expand Up @@ -224,6 +226,12 @@ public StorageAccount()
[JsonProperty(PropertyName = "properties.supportsHttpsTrafficOnly")]
public bool? EnableHttpsTrafficOnly { get; set; }

/// <summary>
/// Gets network ACL
/// </summary>
[JsonProperty(PropertyName = "properties.networkAcls")]
public StorageNetworkAcls NetworkAcls { get; protected set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand All @@ -244,6 +252,10 @@ public virtual void Validate()
{
Encryption.Validate();
}
if (NetworkAcls != null)
{
NetworkAcls.Validate();
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ public StorageAccountCreateParameters()
/// <param name="encryption">Provides the encryption settings on the
/// account. If left unspecified the account encryption settings will
/// remain the same. The default setting is unencrypted.</param>
/// <param name="networkAcls">Network ACL</param>
/// <param name="accessTier">Required for storage accounts where kind =
/// BlobStorage. The access tier used for billing. Possible values
/// include: 'Hot', 'Cool'</param>
/// <param name="enableHttpsTrafficOnly">Allows https traffic only to
/// storage service if sets to true.</param>
public StorageAccountCreateParameters(Sku sku, Kind kind, string location, IDictionary<string, string> tags = default(IDictionary<string, string>), Identity identity = default(Identity), CustomDomain customDomain = default(CustomDomain), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), bool? enableHttpsTrafficOnly = default(bool?))
public StorageAccountCreateParameters(Sku sku, Kind kind, string location, IDictionary<string, string> tags = default(IDictionary<string, string>), Identity identity = default(Identity), CustomDomain customDomain = default(CustomDomain), Encryption encryption = default(Encryption), StorageNetworkAcls networkAcls = default(StorageNetworkAcls), AccessTier? accessTier = default(AccessTier?), bool? enableHttpsTrafficOnly = default(bool?))
{
Sku = sku;
Kind = kind;
Expand All @@ -74,6 +75,7 @@ public StorageAccountCreateParameters()
Identity = identity;
CustomDomain = customDomain;
Encryption = encryption;
NetworkAcls = networkAcls;
AccessTier = accessTier;
EnableHttpsTrafficOnly = enableHttpsTrafficOnly;
}
Expand Down Expand Up @@ -135,6 +137,12 @@ public StorageAccountCreateParameters()
[JsonProperty(PropertyName = "properties.encryption")]
public Encryption Encryption { get; set; }

/// <summary>
/// Gets or sets network ACL
/// </summary>
[JsonProperty(PropertyName = "properties.networkAcls")]
public StorageNetworkAcls NetworkAcls { get; set; }

/// <summary>
/// Gets or sets required for storage accounts where kind =
/// BlobStorage. The access tier used for billing. Possible values
Expand Down Expand Up @@ -178,6 +186,10 @@ public virtual void Validate()
{
Encryption.Validate();
}
if (NetworkAcls != null)
{
NetworkAcls.Validate();
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public StorageAccountUpdateParameters()
/// include: 'Hot', 'Cool'</param>
/// <param name="enableHttpsTrafficOnly">Allows https traffic only to
/// storage service if sets to true.</param>
public StorageAccountUpdateParameters(Sku sku = default(Sku), IDictionary<string, string> tags = default(IDictionary<string, string>), Identity identity = default(Identity), CustomDomain customDomain = default(CustomDomain), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), bool? enableHttpsTrafficOnly = default(bool?))
/// <param name="networkAcls">Network ACL</param>
public StorageAccountUpdateParameters(Sku sku = default(Sku), IDictionary<string, string> tags = default(IDictionary<string, string>), Identity identity = default(Identity), CustomDomain customDomain = default(CustomDomain), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), bool? enableHttpsTrafficOnly = default(bool?), StorageNetworkAcls networkAcls = default(StorageNetworkAcls))
{
Sku = sku;
Tags = tags;
Expand All @@ -68,6 +69,7 @@ public StorageAccountUpdateParameters()
Encryption = encryption;
AccessTier = accessTier;
EnableHttpsTrafficOnly = enableHttpsTrafficOnly;
NetworkAcls = networkAcls;
}

/// <summary>
Expand Down Expand Up @@ -125,6 +127,12 @@ public StorageAccountUpdateParameters()
[JsonProperty(PropertyName = "properties.supportsHttpsTrafficOnly")]
public bool? EnableHttpsTrafficOnly { get; set; }

/// <summary>
/// Gets or sets network ACL
/// </summary>
[JsonProperty(PropertyName = "properties.networkAcls")]
public StorageNetworkAcls NetworkAcls { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand All @@ -145,6 +153,10 @@ public virtual void Validate()
{
Encryption.Validate();
}
if (NetworkAcls != null)
{
NetworkAcls.Validate();
}
}
}
}
Expand Down
Loading

0 comments on commit 4951f8f

Please sign in to comment.