azure_mgmt_cognitive_services 0.18.3 → 0.19.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2016-02-01-preview/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb +1 -1
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services.rb +38 -16
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/accounts.rb +155 -111
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb +133 -9
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/azure_entity_resource.rb +75 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb +20 -55
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_api_properties.rb +149 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_properties.rb +201 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/encryption.rb +61 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/identity.rb +95 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/{network_rule_bypass_options.rb → identity_type.rb} +4 -3
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/key_source.rb +16 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/key_vault_properties.rb +68 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_set.rb +0 -14
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint.rb +47 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_connection.rb +74 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_connection_list_result.rb +56 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_connection_properties.rb +80 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_service_connection_status.rb +18 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_resource.rb +74 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_resource_list_result.rb +55 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_resource_properties.rb +100 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_service_connection_state.rb +73 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/proxy_resource.rb +63 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/public_network_access.rb +16 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/resource.rb +83 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/sku_capability.rb +57 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/{cognitive_services_account_update_parameters.rb → tracked_resource.rb} +34 -24
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/user_assigned_identity.rb +58 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/user_owned_storage.rb +46 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/operations.rb +1 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/private_endpoint_connections.rb +481 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/private_link_resources.rb +133 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/resource_skus.rb +2 -0
- data/lib/azure_mgmt_cognitive_services.rb +1 -1
- data/lib/profiles/latest/modules/cognitiveservices_profile_module.rb +135 -49
- data/lib/version.rb +1 -1
- metadata +31 -9
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/check_sku_availability.rb +0 -140
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_create_parameters.rb +0 -108
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63140147a499202f9983e493a13bc6f1731582c205c6e3dc13f8049afe6b6d76
|
4
|
+
data.tar.gz: ac7dcc87a51f35c0e56454317ab8bc87612c1da756e15226c4fbb77489f46928
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7674e8eae351b78a68627ec156a96f6d586caf5a401be25491c7163e010e62d7ec96a5f4e8f0dbe7a90ce4457de74737f910ccad1f00df0a043b255b807ff4a
|
7
|
+
data.tar.gz: 7cf57d5b519d2334ad7359e239f16e5492a740c80a7f9d7f81faff820b58d52524cdd4cc1ce1e4c93e3852bbf33b59e2bfd6aea0f843cd5978d12499063f0d9d
|
@@ -125,7 +125,7 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
125
125
|
#
|
126
126
|
def add_telemetry
|
127
127
|
sdk_information = 'azure_mgmt_cognitive_services'
|
128
|
-
sdk_information = "#{sdk_information}/0.
|
128
|
+
sdk_information = "#{sdk_information}/0.19.4"
|
129
129
|
add_user_agent_information(sdk_information)
|
130
130
|
end
|
131
131
|
end
|
@@ -23,43 +23,65 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
23
23
|
autoload :Accounts, '2017-04-18/generated/azure_mgmt_cognitive_services/accounts.rb'
|
24
24
|
autoload :ResourceSkus, '2017-04-18/generated/azure_mgmt_cognitive_services/resource_skus.rb'
|
25
25
|
autoload :Operations, '2017-04-18/generated/azure_mgmt_cognitive_services/operations.rb'
|
26
|
-
autoload :
|
26
|
+
autoload :PrivateEndpointConnections, '2017-04-18/generated/azure_mgmt_cognitive_services/private_endpoint_connections.rb'
|
27
|
+
autoload :PrivateLinkResources, '2017-04-18/generated/azure_mgmt_cognitive_services/private_link_resources.rb'
|
27
28
|
autoload :CognitiveServicesManagementClient, '2017-04-18/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb'
|
28
29
|
|
29
30
|
module Models
|
31
|
+
autoload :Usage, '2017-04-18/generated/azure_mgmt_cognitive_services/models/usage.rb'
|
30
32
|
autoload :UsagesResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/usages_result.rb'
|
33
|
+
autoload :SkuCapability, '2017-04-18/generated/azure_mgmt_cognitive_services/models/sku_capability.rb'
|
31
34
|
autoload :ErrorBody, '2017-04-18/generated/azure_mgmt_cognitive_services/models/error_body.rb'
|
32
|
-
autoload :
|
35
|
+
autoload :VirtualNetworkRule, '2017-04-18/generated/azure_mgmt_cognitive_services/models/virtual_network_rule.rb'
|
33
36
|
autoload :Error, '2017-04-18/generated/azure_mgmt_cognitive_services/models/error.rb'
|
34
|
-
autoload :
|
37
|
+
autoload :KeyVaultProperties, '2017-04-18/generated/azure_mgmt_cognitive_services/models/key_vault_properties.rb'
|
35
38
|
autoload :OperationDisplayInfo, '2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_display_info.rb'
|
36
|
-
autoload :
|
39
|
+
autoload :UserOwnedStorage, '2017-04-18/generated/azure_mgmt_cognitive_services/models/user_owned_storage.rb'
|
37
40
|
autoload :OperationEntity, '2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_entity.rb'
|
38
|
-
autoload :
|
41
|
+
autoload :PrivateLinkServiceConnectionState, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_service_connection_state.rb'
|
39
42
|
autoload :OperationEntityListResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_entity_list_result.rb'
|
40
|
-
autoload :
|
43
|
+
autoload :PrivateEndpoint, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint.rb'
|
44
|
+
autoload :CognitiveServicesAccountApiProperties, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_api_properties.rb'
|
45
|
+
autoload :PrivateEndpointConnectionProperties, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_connection_properties.rb'
|
46
|
+
autoload :UserAssignedIdentity, '2017-04-18/generated/azure_mgmt_cognitive_services/models/user_assigned_identity.rb'
|
47
|
+
autoload :CognitiveServicesAccount, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb'
|
41
48
|
autoload :CheckSkuAvailabilityParameter, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_parameter.rb'
|
42
|
-
autoload :
|
49
|
+
autoload :CognitiveServicesAccountKeys, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb'
|
43
50
|
autoload :CheckSkuAvailabilityResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result.rb'
|
44
|
-
autoload :
|
51
|
+
autoload :CognitiveServicesResourceAndSku, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_resource_and_sku.rb'
|
45
52
|
autoload :CheckSkuAvailabilityResultList, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result_list.rb'
|
46
|
-
autoload :
|
53
|
+
autoload :MetricName, '2017-04-18/generated/azure_mgmt_cognitive_services/models/metric_name.rb'
|
47
54
|
autoload :CheckDomainAvailabilityParameter, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_domain_availability_parameter.rb'
|
48
|
-
autoload :
|
55
|
+
autoload :IpRule, '2017-04-18/generated/azure_mgmt_cognitive_services/models/ip_rule.rb'
|
49
56
|
autoload :CheckDomainAvailabilityResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_domain_availability_result.rb'
|
50
|
-
autoload :
|
57
|
+
autoload :Encryption, '2017-04-18/generated/azure_mgmt_cognitive_services/models/encryption.rb'
|
51
58
|
autoload :ResourceSkuRestrictionInfo, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_sku_restriction_info.rb'
|
52
|
-
autoload :
|
59
|
+
autoload :Identity, '2017-04-18/generated/azure_mgmt_cognitive_services/models/identity.rb'
|
53
60
|
autoload :ResourceSkuRestrictions, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_sku_restrictions.rb'
|
54
|
-
autoload :
|
61
|
+
autoload :RegenerateKeyParameters, '2017-04-18/generated/azure_mgmt_cognitive_services/models/regenerate_key_parameters.rb'
|
55
62
|
autoload :ResourceSku, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_sku.rb'
|
56
|
-
autoload :
|
63
|
+
autoload :Sku, '2017-04-18/generated/azure_mgmt_cognitive_services/models/sku.rb'
|
57
64
|
autoload :ResourceSkusResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_skus_result.rb'
|
58
|
-
autoload :
|
65
|
+
autoload :CognitiveServicesAccountProperties, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_properties.rb'
|
66
|
+
autoload :PrivateEndpointConnectionListResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_connection_list_result.rb'
|
67
|
+
autoload :CognitiveServicesAccountEnumerateSkusResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_enumerate_skus_result.rb'
|
68
|
+
autoload :PrivateLinkResourceProperties, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_resource_properties.rb'
|
69
|
+
autoload :CognitiveServicesAccountListResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_list_result.rb'
|
70
|
+
autoload :Resource, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource.rb'
|
71
|
+
autoload :NetworkRuleSet, '2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_set.rb'
|
72
|
+
autoload :PrivateLinkResourceListResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_resource_list_result.rb'
|
73
|
+
autoload :PrivateEndpointConnection, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_connection.rb'
|
74
|
+
autoload :PrivateLinkResource, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_resource.rb'
|
75
|
+
autoload :ProxyResource, '2017-04-18/generated/azure_mgmt_cognitive_services/models/proxy_resource.rb'
|
76
|
+
autoload :TrackedResource, '2017-04-18/generated/azure_mgmt_cognitive_services/models/tracked_resource.rb'
|
77
|
+
autoload :AzureEntityResource, '2017-04-18/generated/azure_mgmt_cognitive_services/models/azure_entity_resource.rb'
|
59
78
|
autoload :SkuTier, '2017-04-18/generated/azure_mgmt_cognitive_services/models/sku_tier.rb'
|
60
79
|
autoload :ProvisioningState, '2017-04-18/generated/azure_mgmt_cognitive_services/models/provisioning_state.rb'
|
61
|
-
autoload :NetworkRuleBypassOptions, '2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_bypass_options.rb'
|
62
80
|
autoload :NetworkRuleAction, '2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_action.rb'
|
81
|
+
autoload :KeySource, '2017-04-18/generated/azure_mgmt_cognitive_services/models/key_source.rb'
|
82
|
+
autoload :PrivateEndpointServiceConnectionStatus, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_endpoint_service_connection_status.rb'
|
83
|
+
autoload :PublicNetworkAccess, '2017-04-18/generated/azure_mgmt_cognitive_services/models/public_network_access.rb'
|
84
|
+
autoload :IdentityType, '2017-04-18/generated/azure_mgmt_cognitive_services/models/identity_type.rb'
|
63
85
|
autoload :KeyName, '2017-04-18/generated/azure_mgmt_cognitive_services/models/key_name.rb'
|
64
86
|
autoload :UnitType, '2017-04-18/generated/azure_mgmt_cognitive_services/models/unit_type.rb'
|
65
87
|
autoload :QuotaUsageStatus, '2017-04-18/generated/azure_mgmt_cognitive_services/models/quota_usage_status.rb'
|
@@ -26,18 +26,18 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
26
26
|
# type. It holds the keys for developer to access intelligent APIs. It's also
|
27
27
|
# the resource type for billing.
|
28
28
|
#
|
29
|
-
# @param resource_group_name [String] The name of the resource group
|
30
|
-
#
|
29
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
30
|
+
# is case insensitive.
|
31
31
|
# @param account_name [String] The name of Cognitive Services account.
|
32
|
-
# @param
|
33
|
-
#
|
32
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
33
|
+
# created account.
|
34
34
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
35
35
|
# will be added to the HTTP request.
|
36
36
|
#
|
37
37
|
# @return [CognitiveServicesAccount] operation results.
|
38
38
|
#
|
39
|
-
def create(resource_group_name, account_name,
|
40
|
-
response = create_async(resource_group_name, account_name,
|
39
|
+
def create(resource_group_name, account_name, account, custom_headers:nil)
|
40
|
+
response = create_async(resource_group_name, account_name, account, custom_headers:custom_headers).value!
|
41
41
|
response.body unless response.nil?
|
42
42
|
end
|
43
43
|
|
@@ -46,18 +46,18 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
46
46
|
# type. It holds the keys for developer to access intelligent APIs. It's also
|
47
47
|
# the resource type for billing.
|
48
48
|
#
|
49
|
-
# @param resource_group_name [String] The name of the resource group
|
50
|
-
#
|
49
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
50
|
+
# is case insensitive.
|
51
51
|
# @param account_name [String] The name of Cognitive Services account.
|
52
|
-
# @param
|
53
|
-
#
|
52
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
53
|
+
# created account.
|
54
54
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
55
55
|
# will be added to the HTTP request.
|
56
56
|
#
|
57
57
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
58
58
|
#
|
59
|
-
def create_with_http_info(resource_group_name, account_name,
|
60
|
-
create_async(resource_group_name, account_name,
|
59
|
+
def create_with_http_info(resource_group_name, account_name, account, custom_headers:nil)
|
60
|
+
create_async(resource_group_name, account_name, account, custom_headers:custom_headers).value!
|
61
61
|
end
|
62
62
|
|
63
63
|
#
|
@@ -65,25 +65,30 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
65
65
|
# type. It holds the keys for developer to access intelligent APIs. It's also
|
66
66
|
# the resource type for billing.
|
67
67
|
#
|
68
|
-
# @param resource_group_name [String] The name of the resource group
|
69
|
-
#
|
68
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
69
|
+
# is case insensitive.
|
70
70
|
# @param account_name [String] The name of Cognitive Services account.
|
71
|
-
# @param
|
72
|
-
#
|
71
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
72
|
+
# created account.
|
73
73
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
74
74
|
# to the HTTP request.
|
75
75
|
#
|
76
76
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
77
77
|
#
|
78
|
-
def create_async(resource_group_name, account_name,
|
78
|
+
def create_async(resource_group_name, account_name, account, custom_headers:nil)
|
79
79
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
80
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
81
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
82
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
80
83
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
81
84
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
82
85
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
83
86
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
84
|
-
fail ArgumentError, '
|
87
|
+
fail ArgumentError, 'account is nil' if account.nil?
|
85
88
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
89
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
86
90
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
91
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
87
92
|
|
88
93
|
|
89
94
|
request_headers = {}
|
@@ -94,8 +99,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
94
99
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
95
100
|
|
96
101
|
# Serialize Request
|
97
|
-
request_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::
|
98
|
-
request_content = @client.serialize(request_mapper,
|
102
|
+
request_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccount.mapper()
|
103
|
+
request_content = @client.serialize(request_mapper, account)
|
99
104
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
100
105
|
|
101
106
|
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'
|
@@ -116,7 +121,7 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
116
121
|
http_response = result.response
|
117
122
|
status_code = http_response.status
|
118
123
|
response_content = http_response.body
|
119
|
-
unless status_code == 200 || status_code == 201
|
124
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
120
125
|
error_model = JSON.load(response_content)
|
121
126
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
122
127
|
end
|
@@ -144,6 +149,16 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
144
149
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
145
150
|
end
|
146
151
|
end
|
152
|
+
# Deserialize Response
|
153
|
+
if status_code == 202
|
154
|
+
begin
|
155
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
156
|
+
result_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccount.mapper()
|
157
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
158
|
+
rescue Exception => e
|
159
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
160
|
+
end
|
161
|
+
end
|
147
162
|
|
148
163
|
result
|
149
164
|
end
|
@@ -154,84 +169,66 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
154
169
|
#
|
155
170
|
# Updates a Cognitive Services account
|
156
171
|
#
|
157
|
-
# @param resource_group_name [String] The name of the resource group
|
158
|
-
#
|
172
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
173
|
+
# is case insensitive.
|
159
174
|
# @param account_name [String] The name of Cognitive Services account.
|
160
|
-
# @param
|
161
|
-
#
|
162
|
-
# that describe the resource. These tags can be used in viewing and grouping
|
163
|
-
# this resource (across resource groups). A maximum of 15 tags can be provided
|
164
|
-
# for a resource. Each tag must have a key no greater than 128 characters and
|
165
|
-
# value no greater than 256 characters.
|
166
|
-
# @param properties Additional properties for Account. Only provided fields
|
167
|
-
# will be updated.
|
175
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
176
|
+
# created account.
|
168
177
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
169
178
|
# will be added to the HTTP request.
|
170
179
|
#
|
171
180
|
# @return [CognitiveServicesAccount] operation results.
|
172
181
|
#
|
173
|
-
def update(resource_group_name, account_name,
|
174
|
-
response = update_async(resource_group_name, account_name,
|
182
|
+
def update(resource_group_name, account_name, account, custom_headers:nil)
|
183
|
+
response = update_async(resource_group_name, account_name, account, custom_headers:custom_headers).value!
|
175
184
|
response.body unless response.nil?
|
176
185
|
end
|
177
186
|
|
178
187
|
#
|
179
188
|
# Updates a Cognitive Services account
|
180
189
|
#
|
181
|
-
# @param resource_group_name [String] The name of the resource group
|
182
|
-
#
|
190
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
191
|
+
# is case insensitive.
|
183
192
|
# @param account_name [String] The name of Cognitive Services account.
|
184
|
-
# @param
|
185
|
-
#
|
186
|
-
# that describe the resource. These tags can be used in viewing and grouping
|
187
|
-
# this resource (across resource groups). A maximum of 15 tags can be provided
|
188
|
-
# for a resource. Each tag must have a key no greater than 128 characters and
|
189
|
-
# value no greater than 256 characters.
|
190
|
-
# @param properties Additional properties for Account. Only provided fields
|
191
|
-
# will be updated.
|
193
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
194
|
+
# created account.
|
192
195
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
193
196
|
# will be added to the HTTP request.
|
194
197
|
#
|
195
198
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
196
199
|
#
|
197
|
-
def update_with_http_info(resource_group_name, account_name,
|
198
|
-
update_async(resource_group_name, account_name,
|
200
|
+
def update_with_http_info(resource_group_name, account_name, account, custom_headers:nil)
|
201
|
+
update_async(resource_group_name, account_name, account, custom_headers:custom_headers).value!
|
199
202
|
end
|
200
203
|
|
201
204
|
#
|
202
205
|
# Updates a Cognitive Services account
|
203
206
|
#
|
204
|
-
# @param resource_group_name [String] The name of the resource group
|
205
|
-
#
|
207
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
208
|
+
# is case insensitive.
|
206
209
|
# @param account_name [String] The name of Cognitive Services account.
|
207
|
-
# @param
|
208
|
-
#
|
209
|
-
# that describe the resource. These tags can be used in viewing and grouping
|
210
|
-
# this resource (across resource groups). A maximum of 15 tags can be provided
|
211
|
-
# for a resource. Each tag must have a key no greater than 128 characters and
|
212
|
-
# value no greater than 256 characters.
|
213
|
-
# @param properties Additional properties for Account. Only provided fields
|
214
|
-
# will be updated.
|
210
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
211
|
+
# created account.
|
215
212
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
216
213
|
# to the HTTP request.
|
217
214
|
#
|
218
215
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
219
216
|
#
|
220
|
-
def update_async(resource_group_name, account_name,
|
217
|
+
def update_async(resource_group_name, account_name, account, custom_headers:nil)
|
221
218
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
219
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
220
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
221
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
222
222
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
223
223
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
224
224
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
225
225
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
226
|
+
fail ArgumentError, 'account is nil' if account.nil?
|
226
227
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
228
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
227
229
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
230
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
228
231
|
|
229
|
-
parameters = CognitiveServicesAccountUpdateParameters.new
|
230
|
-
unless sku.nil? && tags.nil? && properties.nil?
|
231
|
-
parameters.sku = sku
|
232
|
-
parameters.tags = tags
|
233
|
-
parameters.properties = properties
|
234
|
-
end
|
235
232
|
|
236
233
|
request_headers = {}
|
237
234
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -241,8 +238,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
241
238
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
242
239
|
|
243
240
|
# Serialize Request
|
244
|
-
request_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::
|
245
|
-
request_content = @client.serialize(request_mapper,
|
241
|
+
request_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccount.mapper()
|
242
|
+
request_content = @client.serialize(request_mapper, account)
|
246
243
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
247
244
|
|
248
245
|
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'
|
@@ -263,7 +260,7 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
263
260
|
http_response = result.response
|
264
261
|
status_code = http_response.status
|
265
262
|
response_content = http_response.body
|
266
|
-
unless status_code == 200
|
263
|
+
unless status_code == 200 || status_code == 202
|
267
264
|
error_model = JSON.load(response_content)
|
268
265
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
269
266
|
end
|
@@ -281,6 +278,16 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
281
278
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
282
279
|
end
|
283
280
|
end
|
281
|
+
# Deserialize Response
|
282
|
+
if status_code == 202
|
283
|
+
begin
|
284
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
285
|
+
result_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CognitiveServicesAccount.mapper()
|
286
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
287
|
+
rescue Exception => e
|
288
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
289
|
+
end
|
290
|
+
end
|
284
291
|
|
285
292
|
result
|
286
293
|
end
|
@@ -291,8 +298,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
291
298
|
#
|
292
299
|
# Deletes a Cognitive Services account from the resource group.
|
293
300
|
#
|
294
|
-
# @param resource_group_name [String] The name of the resource group
|
295
|
-
#
|
301
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
302
|
+
# is case insensitive.
|
296
303
|
# @param account_name [String] The name of Cognitive Services account.
|
297
304
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
298
305
|
# will be added to the HTTP request.
|
@@ -306,8 +313,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
306
313
|
#
|
307
314
|
# Deletes a Cognitive Services account from the resource group.
|
308
315
|
#
|
309
|
-
# @param resource_group_name [String] The name of the resource group
|
310
|
-
#
|
316
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
317
|
+
# is case insensitive.
|
311
318
|
# @param account_name [String] The name of Cognitive Services account.
|
312
319
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
313
320
|
# will be added to the HTTP request.
|
@@ -321,8 +328,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
321
328
|
#
|
322
329
|
# Deletes a Cognitive Services account from the resource group.
|
323
330
|
#
|
324
|
-
# @param resource_group_name [String] The name of the resource group
|
325
|
-
#
|
331
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
332
|
+
# is case insensitive.
|
326
333
|
# @param account_name [String] The name of Cognitive Services account.
|
327
334
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
328
335
|
# to the HTTP request.
|
@@ -331,12 +338,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
331
338
|
#
|
332
339
|
def delete_async(resource_group_name, account_name, custom_headers:nil)
|
333
340
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
341
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
342
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
343
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
334
344
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
335
345
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
336
346
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
337
347
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
338
348
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
349
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
339
350
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
351
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
340
352
|
|
341
353
|
|
342
354
|
request_headers = {}
|
@@ -362,7 +374,7 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
362
374
|
http_response = result.response
|
363
375
|
status_code = http_response.status
|
364
376
|
response_content = http_response.body
|
365
|
-
unless status_code == 200 || status_code == 204
|
377
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
366
378
|
error_model = JSON.load(response_content)
|
367
379
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
368
380
|
end
|
@@ -380,8 +392,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
380
392
|
#
|
381
393
|
# Returns a Cognitive Services account specified by the parameters.
|
382
394
|
#
|
383
|
-
# @param resource_group_name [String] The name of the resource group
|
384
|
-
#
|
395
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
396
|
+
# is case insensitive.
|
385
397
|
# @param account_name [String] The name of Cognitive Services account.
|
386
398
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
387
399
|
# will be added to the HTTP request.
|
@@ -396,8 +408,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
396
408
|
#
|
397
409
|
# Returns a Cognitive Services account specified by the parameters.
|
398
410
|
#
|
399
|
-
# @param resource_group_name [String] The name of the resource group
|
400
|
-
#
|
411
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
412
|
+
# is case insensitive.
|
401
413
|
# @param account_name [String] The name of Cognitive Services account.
|
402
414
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
403
415
|
# will be added to the HTTP request.
|
@@ -411,8 +423,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
411
423
|
#
|
412
424
|
# Returns a Cognitive Services account specified by the parameters.
|
413
425
|
#
|
414
|
-
# @param resource_group_name [String] The name of the resource group
|
415
|
-
#
|
426
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
427
|
+
# is case insensitive.
|
416
428
|
# @param account_name [String] The name of Cognitive Services account.
|
417
429
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
418
430
|
# to the HTTP request.
|
@@ -421,12 +433,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
421
433
|
#
|
422
434
|
def get_properties_async(resource_group_name, account_name, custom_headers:nil)
|
423
435
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
436
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
437
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
438
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
424
439
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
425
440
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
426
441
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
427
442
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
428
443
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
444
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
429
445
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
446
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
430
447
|
|
431
448
|
|
432
449
|
request_headers = {}
|
@@ -480,8 +497,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
480
497
|
#
|
481
498
|
# Returns all the resources of a particular type belonging to a resource group
|
482
499
|
#
|
483
|
-
# @param resource_group_name [String] The name of the resource group
|
484
|
-
#
|
500
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
501
|
+
# is case insensitive.
|
485
502
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
486
503
|
# will be added to the HTTP request.
|
487
504
|
#
|
@@ -495,8 +512,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
495
512
|
#
|
496
513
|
# Returns all the resources of a particular type belonging to a resource group
|
497
514
|
#
|
498
|
-
# @param resource_group_name [String] The name of the resource group
|
499
|
-
#
|
515
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
516
|
+
# is case insensitive.
|
500
517
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
501
518
|
# will be added to the HTTP request.
|
502
519
|
#
|
@@ -509,8 +526,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
509
526
|
#
|
510
527
|
# Returns all the resources of a particular type belonging to a resource group
|
511
528
|
#
|
512
|
-
# @param resource_group_name [String] The name of the resource group
|
513
|
-
#
|
529
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
530
|
+
# is case insensitive.
|
514
531
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
515
532
|
# to the HTTP request.
|
516
533
|
#
|
@@ -518,8 +535,13 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
518
535
|
#
|
519
536
|
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
520
537
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
538
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
539
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
540
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
521
541
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
542
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
522
543
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
544
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
523
545
|
|
524
546
|
|
525
547
|
request_headers = {}
|
@@ -605,7 +627,9 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
605
627
|
#
|
606
628
|
def list_async(custom_headers:nil)
|
607
629
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
630
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
608
631
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
632
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
609
633
|
|
610
634
|
|
611
635
|
request_headers = {}
|
@@ -659,8 +683,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
659
683
|
#
|
660
684
|
# Lists the account keys for the specified Cognitive Services account.
|
661
685
|
#
|
662
|
-
# @param resource_group_name [String] The name of the resource group
|
663
|
-
#
|
686
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
687
|
+
# is case insensitive.
|
664
688
|
# @param account_name [String] The name of Cognitive Services account.
|
665
689
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
666
690
|
# will be added to the HTTP request.
|
@@ -675,8 +699,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
675
699
|
#
|
676
700
|
# Lists the account keys for the specified Cognitive Services account.
|
677
701
|
#
|
678
|
-
# @param resource_group_name [String] The name of the resource group
|
679
|
-
#
|
702
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
703
|
+
# is case insensitive.
|
680
704
|
# @param account_name [String] The name of Cognitive Services account.
|
681
705
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
682
706
|
# will be added to the HTTP request.
|
@@ -690,8 +714,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
690
714
|
#
|
691
715
|
# Lists the account keys for the specified Cognitive Services account.
|
692
716
|
#
|
693
|
-
# @param resource_group_name [String] The name of the resource group
|
694
|
-
#
|
717
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
718
|
+
# is case insensitive.
|
695
719
|
# @param account_name [String] The name of Cognitive Services account.
|
696
720
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
697
721
|
# to the HTTP request.
|
@@ -700,12 +724,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
700
724
|
#
|
701
725
|
def list_keys_async(resource_group_name, account_name, custom_headers:nil)
|
702
726
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
727
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
728
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
729
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
703
730
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
704
731
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
705
732
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
706
733
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
707
734
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
735
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
708
736
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
737
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
709
738
|
|
710
739
|
|
711
740
|
request_headers = {}
|
@@ -760,8 +789,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
760
789
|
# Regenerates the specified account key for the specified Cognitive Services
|
761
790
|
# account.
|
762
791
|
#
|
763
|
-
# @param resource_group_name [String] The name of the resource group
|
764
|
-
#
|
792
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
793
|
+
# is case insensitive.
|
765
794
|
# @param account_name [String] The name of Cognitive Services account.
|
766
795
|
# @param key_name [KeyName] key name to generate (Key1|Key2). Possible values
|
767
796
|
# include: 'Key1', 'Key2'
|
@@ -779,8 +808,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
779
808
|
# Regenerates the specified account key for the specified Cognitive Services
|
780
809
|
# account.
|
781
810
|
#
|
782
|
-
# @param resource_group_name [String] The name of the resource group
|
783
|
-
#
|
811
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
812
|
+
# is case insensitive.
|
784
813
|
# @param account_name [String] The name of Cognitive Services account.
|
785
814
|
# @param key_name [KeyName] key name to generate (Key1|Key2). Possible values
|
786
815
|
# include: 'Key1', 'Key2'
|
@@ -797,8 +826,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
797
826
|
# Regenerates the specified account key for the specified Cognitive Services
|
798
827
|
# account.
|
799
828
|
#
|
800
|
-
# @param resource_group_name [String] The name of the resource group
|
801
|
-
#
|
829
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
830
|
+
# is case insensitive.
|
802
831
|
# @param account_name [String] The name of Cognitive Services account.
|
803
832
|
# @param key_name [KeyName] key name to generate (Key1|Key2). Possible values
|
804
833
|
# include: 'Key1', 'Key2'
|
@@ -809,15 +838,20 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
809
838
|
#
|
810
839
|
def regenerate_key_async(resource_group_name, account_name, key_name, custom_headers:nil)
|
811
840
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
841
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
842
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
843
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
812
844
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
813
845
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
814
846
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
815
847
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
816
848
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
849
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
817
850
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
851
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
818
852
|
fail ArgumentError, 'key_name is nil' if key_name.nil?
|
819
853
|
|
820
|
-
parameters = RegenerateKeyParameters.new
|
854
|
+
parameters = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::RegenerateKeyParameters.new
|
821
855
|
unless key_name.nil?
|
822
856
|
parameters.key_name = key_name
|
823
857
|
end
|
@@ -880,8 +914,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
880
914
|
#
|
881
915
|
# List available SKUs for the requested Cognitive Services account
|
882
916
|
#
|
883
|
-
# @param resource_group_name [String] The name of the resource group
|
884
|
-
#
|
917
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
918
|
+
# is case insensitive.
|
885
919
|
# @param account_name [String] The name of Cognitive Services account.
|
886
920
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
887
921
|
# will be added to the HTTP request.
|
@@ -896,8 +930,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
896
930
|
#
|
897
931
|
# List available SKUs for the requested Cognitive Services account
|
898
932
|
#
|
899
|
-
# @param resource_group_name [String] The name of the resource group
|
900
|
-
#
|
933
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
934
|
+
# is case insensitive.
|
901
935
|
# @param account_name [String] The name of Cognitive Services account.
|
902
936
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
903
937
|
# will be added to the HTTP request.
|
@@ -911,8 +945,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
911
945
|
#
|
912
946
|
# List available SKUs for the requested Cognitive Services account
|
913
947
|
#
|
914
|
-
# @param resource_group_name [String] The name of the resource group
|
915
|
-
#
|
948
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
949
|
+
# is case insensitive.
|
916
950
|
# @param account_name [String] The name of Cognitive Services account.
|
917
951
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
918
952
|
# to the HTTP request.
|
@@ -921,12 +955,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
921
955
|
#
|
922
956
|
def list_skus_async(resource_group_name, account_name, custom_headers:nil)
|
923
957
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
958
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
959
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
960
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
924
961
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
925
962
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
926
963
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
927
964
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
928
965
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
966
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
929
967
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
968
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
930
969
|
|
931
970
|
|
932
971
|
request_headers = {}
|
@@ -980,8 +1019,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
980
1019
|
#
|
981
1020
|
# Get usages for the requested Cognitive Services account
|
982
1021
|
#
|
983
|
-
# @param resource_group_name [String] The name of the resource group
|
984
|
-
#
|
1022
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1023
|
+
# is case insensitive.
|
985
1024
|
# @param account_name [String] The name of Cognitive Services account.
|
986
1025
|
# @param filter [String] An OData filter expression that describes a subset of
|
987
1026
|
# usages to return. The supported parameter is name.value (name of the metric,
|
@@ -999,8 +1038,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
999
1038
|
#
|
1000
1039
|
# Get usages for the requested Cognitive Services account
|
1001
1040
|
#
|
1002
|
-
# @param resource_group_name [String] The name of the resource group
|
1003
|
-
#
|
1041
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1042
|
+
# is case insensitive.
|
1004
1043
|
# @param account_name [String] The name of Cognitive Services account.
|
1005
1044
|
# @param filter [String] An OData filter expression that describes a subset of
|
1006
1045
|
# usages to return. The supported parameter is name.value (name of the metric,
|
@@ -1017,8 +1056,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1017
1056
|
#
|
1018
1057
|
# Get usages for the requested Cognitive Services account
|
1019
1058
|
#
|
1020
|
-
# @param resource_group_name [String] The name of the resource group
|
1021
|
-
#
|
1059
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1060
|
+
# is case insensitive.
|
1022
1061
|
# @param account_name [String] The name of Cognitive Services account.
|
1023
1062
|
# @param filter [String] An OData filter expression that describes a subset of
|
1024
1063
|
# usages to return. The supported parameter is name.value (name of the metric,
|
@@ -1030,12 +1069,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1030
1069
|
#
|
1031
1070
|
def get_usages_async(resource_group_name, account_name, filter:nil, custom_headers:nil)
|
1032
1071
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1072
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1073
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1074
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1033
1075
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1034
1076
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
1035
1077
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
1036
1078
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
1037
1079
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1080
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1038
1081
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1082
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1039
1083
|
|
1040
1084
|
|
1041
1085
|
request_headers = {}
|
@@ -1269,8 +1313,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1269
1313
|
#
|
1270
1314
|
# Returns all the resources of a particular type belonging to a resource group
|
1271
1315
|
#
|
1272
|
-
# @param resource_group_name [String] The name of the resource group
|
1273
|
-
#
|
1316
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1317
|
+
# is case insensitive.
|
1274
1318
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1275
1319
|
# will be added to the HTTP request.
|
1276
1320
|
#
|