diff --git a/profiles/latest/cognitiveservices/mgmt/cognitiveservices/models.go b/profiles/latest/cognitiveservices/mgmt/cognitiveservices/models.go index 4dce131ac4e0..275a0767a85f 100644 --- a/profiles/latest/cognitiveservices/mgmt/cognitiveservices/models.go +++ b/profiles/latest/cognitiveservices/mgmt/cognitiveservices/models.go @@ -36,6 +36,20 @@ const ( Key2 KeyName = original.Key2 ) +type NetworkRuleAction = original.NetworkRuleAction + +const ( + Allow NetworkRuleAction = original.Allow + Deny NetworkRuleAction = original.Deny +) + +type NetworkRuleBypassOptions = original.NetworkRuleBypassOptions + +const ( + AzureServices NetworkRuleBypassOptions = original.AzureServices + None NetworkRuleBypassOptions = original.None +) + type ProvisioningState = original.ProvisioningState const ( @@ -107,7 +121,9 @@ type CheckSkuAvailabilityResult = original.CheckSkuAvailabilityResult type CheckSkuAvailabilityResultList = original.CheckSkuAvailabilityResultList type Error = original.Error type ErrorBody = original.ErrorBody +type IPRule = original.IPRule type MetricName = original.MetricName +type NetworkRuleSet = original.NetworkRuleSet type OperationDisplayInfo = original.OperationDisplayInfo type OperationEntity = original.OperationEntity type OperationEntityListResult = original.OperationEntityListResult @@ -126,6 +142,7 @@ type ResourceSkusResultPage = original.ResourceSkusResultPage type Sku = original.Sku type Usage = original.Usage type UsagesResult = original.UsagesResult +type VirtualNetworkRule = original.VirtualNetworkRule func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -178,6 +195,12 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleKeyNameValues() []KeyName { return original.PossibleKeyNameValues() } +func PossibleNetworkRuleActionValues() []NetworkRuleAction { + return original.PossibleNetworkRuleActionValues() +} +func PossibleNetworkRuleBypassOptionsValues() []NetworkRuleBypassOptions { + return original.PossibleNetworkRuleBypassOptionsValues() +} func PossibleProvisioningStateValues() []ProvisioningState { return original.PossibleProvisioningStateValues() } diff --git a/profiles/preview/cognitiveservices/mgmt/cognitiveservices/models.go b/profiles/preview/cognitiveservices/mgmt/cognitiveservices/models.go index b00164142aeb..2518dbc83292 100644 --- a/profiles/preview/cognitiveservices/mgmt/cognitiveservices/models.go +++ b/profiles/preview/cognitiveservices/mgmt/cognitiveservices/models.go @@ -36,6 +36,20 @@ const ( Key2 KeyName = original.Key2 ) +type NetworkRuleAction = original.NetworkRuleAction + +const ( + Allow NetworkRuleAction = original.Allow + Deny NetworkRuleAction = original.Deny +) + +type NetworkRuleBypassOptions = original.NetworkRuleBypassOptions + +const ( + AzureServices NetworkRuleBypassOptions = original.AzureServices + None NetworkRuleBypassOptions = original.None +) + type ProvisioningState = original.ProvisioningState const ( @@ -107,7 +121,9 @@ type CheckSkuAvailabilityResult = original.CheckSkuAvailabilityResult type CheckSkuAvailabilityResultList = original.CheckSkuAvailabilityResultList type Error = original.Error type ErrorBody = original.ErrorBody +type IPRule = original.IPRule type MetricName = original.MetricName +type NetworkRuleSet = original.NetworkRuleSet type OperationDisplayInfo = original.OperationDisplayInfo type OperationEntity = original.OperationEntity type OperationEntityListResult = original.OperationEntityListResult @@ -126,6 +142,7 @@ type ResourceSkusResultPage = original.ResourceSkusResultPage type Sku = original.Sku type Usage = original.Usage type UsagesResult = original.UsagesResult +type VirtualNetworkRule = original.VirtualNetworkRule func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -178,6 +195,12 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleKeyNameValues() []KeyName { return original.PossibleKeyNameValues() } +func PossibleNetworkRuleActionValues() []NetworkRuleAction { + return original.PossibleNetworkRuleActionValues() +} +func PossibleNetworkRuleBypassOptionsValues() []NetworkRuleBypassOptions { + return original.PossibleNetworkRuleBypassOptionsValues() +} func PossibleProvisioningStateValues() []ProvisioningState { return original.PossibleProvisioningStateValues() } diff --git a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go index c903c6b5d6c6..bf327c8ab036 100644 --- a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go +++ b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go @@ -44,6 +44,36 @@ func PossibleKeyNameValues() []KeyName { return []KeyName{Key1, Key2} } +// NetworkRuleAction enumerates the values for network rule action. +type NetworkRuleAction string + +const ( + // Allow ... + Allow NetworkRuleAction = "Allow" + // Deny ... + Deny NetworkRuleAction = "Deny" +) + +// PossibleNetworkRuleActionValues returns an array of possible values for the NetworkRuleAction const type. +func PossibleNetworkRuleActionValues() []NetworkRuleAction { + return []NetworkRuleAction{Allow, Deny} +} + +// NetworkRuleBypassOptions enumerates the values for network rule bypass options. +type NetworkRuleBypassOptions string + +const ( + // AzureServices ... + AzureServices NetworkRuleBypassOptions = "AzureServices" + // None ... + None NetworkRuleBypassOptions = "None" +) + +// PossibleNetworkRuleBypassOptionsValues returns an array of possible values for the NetworkRuleBypassOptions const type. +func PossibleNetworkRuleBypassOptionsValues() []NetworkRuleBypassOptions { + return []NetworkRuleBypassOptions{AzureServices, None} +} + // ProvisioningState enumerates the values for provisioning state. type ProvisioningState string @@ -509,6 +539,8 @@ type AccountProperties struct { InternalID *string `json:"internalId,omitempty"` // CustomSubDomainName - Optional subdomain name used for token-based authentication. CustomSubDomainName *string `json:"customSubDomainName,omitempty"` + // NetworkAcls - A collection of rules governing the accessibility from specific network locations. + NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"` } // AccountUpdateParameters the parameters to provide for the account. @@ -583,6 +615,12 @@ type ErrorBody struct { Message *string `json:"message,omitempty"` } +// IPRule a rule governing the accessibility from a specific ip address or ip range. +type IPRule struct { + // Value - An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78). + Value *string `json:"value,omitempty"` +} + // MetricName a metric name. type MetricName struct { // Value - READ-ONLY; The name of the metric. @@ -591,6 +629,18 @@ type MetricName struct { LocalizedValue *string `json:"localizedValue,omitempty"` } +// NetworkRuleSet a set of rules governing the network accessibility. +type NetworkRuleSet struct { + // Bypass - Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None' + Bypass NetworkRuleBypassOptions `json:"bypass,omitempty"` + // DefaultAction - The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny' + DefaultAction NetworkRuleAction `json:"defaultAction,omitempty"` + // IPRules - The list of IP address rules. + IPRules *[]IPRule `json:"ipRules,omitempty"` + // VirtualNetworkRules - The list of virtual network rules. + VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` +} + // OperationDisplayInfo the operation supported by Cognitive Services. type OperationDisplayInfo struct { // Description - The description of the operation. @@ -989,3 +1039,13 @@ type UsagesResult struct { // Value - READ-ONLY; The list of usages for Cognitive Service account. Value *[]Usage `json:"value,omitempty"` } + +// VirtualNetworkRule a rule governing the accessibility from a specific virtual network. +type VirtualNetworkRule struct { + // ID - Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + ID *string `json:"id,omitempty"` + // State - Gets the state of virtual network rule. + State *string `json:"state,omitempty"` + // IgnoreMissingVnetServiceEndpoint - Ignore missing vnet service endpoint or not. + IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` +}