azure_mgmt_cognitive_services 0.18.2 → 0.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/2016-02-01-preview/generated/azure_mgmt_cognitive_services/cognitive_services_accounts.rb +18 -0
- 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 +42 -13
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/accounts.rb +178 -110
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb +235 -7
- 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/check_domain_availability_parameter.rb +57 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/check_domain_availability_result.rb +79 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb +21 -43
- 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/identity_type.rb +17 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/ip_rule.rb +49 -0
- 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_action.rb +16 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_set.rb +89 -0
- 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/models/virtual_network_rule.rb +69 -0
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/operations.rb +5 -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 +6 -0
- data/lib/azure_mgmt_cognitive_services.rb +1 -1
- data/lib/profiles/latest/modules/cognitiveservices_profile_module.rb +153 -39
- data/lib/version.rb +1 -1
- metadata +37 -8
- data/lib/2017-04-18/generated/azure_mgmt_cognitive_services/check_sku_availability.rb +0 -138
- 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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3fa23d83dc63bc9f08371f8316084be3b9855bfd89bab3ae53e04c2c1760ef26
|
4
|
+
data.tar.gz: 113a5eccdc5889b7492a6e3d9ae0fe04c0b2d8539b46d4207741c3a514cf4033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed5c31df8fffe74fb4f36040027ef76cd2feb34457111614aa99a1710913f08fb17334fdc8d5a8bc02df38938d7572277ca9315b2039272376675959c1ea9f70
|
7
|
+
data.tar.gz: c21ba6230683733c7a81026c4df88ba4070603c8dca6dd786e64f2546239d90fdf3649ba1d3af86700f0f415415ba83a399fd7701c09462e4e49a9c859d9d8d5
|
data/lib/2016-02-01-preview/generated/azure_mgmt_cognitive_services/cognitive_services_accounts.rb
CHANGED
@@ -131,6 +131,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
131
131
|
end
|
132
132
|
|
133
133
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
134
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
135
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
134
136
|
# Deserialize Response
|
135
137
|
if status_code == 200
|
136
138
|
begin
|
@@ -278,6 +280,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
278
280
|
end
|
279
281
|
|
280
282
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
283
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
284
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
281
285
|
# Deserialize Response
|
282
286
|
if status_code == 200
|
283
287
|
begin
|
@@ -384,6 +388,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
384
388
|
end
|
385
389
|
|
386
390
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
391
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
392
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
387
393
|
|
388
394
|
result
|
389
395
|
end
|
@@ -481,6 +487,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
481
487
|
end
|
482
488
|
|
483
489
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
490
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
491
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
484
492
|
# Deserialize Response
|
485
493
|
if status_code == 200
|
486
494
|
begin
|
@@ -572,6 +580,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
572
580
|
end
|
573
581
|
|
574
582
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
583
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
584
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
575
585
|
# Deserialize Response
|
576
586
|
if status_code == 200
|
577
587
|
begin
|
@@ -656,6 +666,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
656
666
|
end
|
657
667
|
|
658
668
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
669
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
670
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
659
671
|
# Deserialize Response
|
660
672
|
if status_code == 200
|
661
673
|
begin
|
@@ -763,6 +775,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
763
775
|
end
|
764
776
|
|
765
777
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
778
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
779
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
766
780
|
# Deserialize Response
|
767
781
|
if status_code == 200
|
768
782
|
begin
|
@@ -890,6 +904,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
890
904
|
end
|
891
905
|
|
892
906
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
907
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
908
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
893
909
|
# Deserialize Response
|
894
910
|
if status_code == 200
|
895
911
|
begin
|
@@ -997,6 +1013,8 @@ module Azure::CognitiveServices::Mgmt::V2016_02_01_preview
|
|
997
1013
|
end
|
998
1014
|
|
999
1015
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1016
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1017
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1000
1018
|
# Deserialize Response
|
1001
1019
|
if status_code == 200
|
1002
1020
|
begin
|
@@ -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.3"
|
129
129
|
add_user_agent_information(sdk_information)
|
130
130
|
end
|
131
131
|
end
|
@@ -23,36 +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'
|
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'
|
30
34
|
autoload :ErrorBody, '2017-04-18/generated/azure_mgmt_cognitive_services/models/error_body.rb'
|
31
|
-
autoload :
|
35
|
+
autoload :VirtualNetworkRule, '2017-04-18/generated/azure_mgmt_cognitive_services/models/virtual_network_rule.rb'
|
32
36
|
autoload :Error, '2017-04-18/generated/azure_mgmt_cognitive_services/models/error.rb'
|
33
|
-
autoload :
|
37
|
+
autoload :KeyVaultProperties, '2017-04-18/generated/azure_mgmt_cognitive_services/models/key_vault_properties.rb'
|
34
38
|
autoload :OperationDisplayInfo, '2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_display_info.rb'
|
35
|
-
autoload :
|
39
|
+
autoload :UserOwnedStorage, '2017-04-18/generated/azure_mgmt_cognitive_services/models/user_owned_storage.rb'
|
36
40
|
autoload :OperationEntity, '2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_entity.rb'
|
37
|
-
autoload :
|
41
|
+
autoload :PrivateLinkServiceConnectionState, '2017-04-18/generated/azure_mgmt_cognitive_services/models/private_link_service_connection_state.rb'
|
38
42
|
autoload :OperationEntityListResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_entity_list_result.rb'
|
39
|
-
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'
|
40
48
|
autoload :CheckSkuAvailabilityParameter, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_parameter.rb'
|
41
|
-
autoload :
|
49
|
+
autoload :CognitiveServicesAccountKeys, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb'
|
42
50
|
autoload :CheckSkuAvailabilityResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result.rb'
|
43
|
-
autoload :
|
51
|
+
autoload :CognitiveServicesResourceAndSku, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_resource_and_sku.rb'
|
44
52
|
autoload :CheckSkuAvailabilityResultList, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result_list.rb'
|
45
|
-
autoload :CognitiveServicesAccountKeys, '2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb'
|
46
|
-
autoload :ResourceSkuRestrictionInfo, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_sku_restriction_info.rb'
|
47
53
|
autoload :MetricName, '2017-04-18/generated/azure_mgmt_cognitive_services/models/metric_name.rb'
|
54
|
+
autoload :CheckDomainAvailabilityParameter, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_domain_availability_parameter.rb'
|
55
|
+
autoload :IpRule, '2017-04-18/generated/azure_mgmt_cognitive_services/models/ip_rule.rb'
|
56
|
+
autoload :CheckDomainAvailabilityResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/check_domain_availability_result.rb'
|
57
|
+
autoload :Encryption, '2017-04-18/generated/azure_mgmt_cognitive_services/models/encryption.rb'
|
58
|
+
autoload :ResourceSkuRestrictionInfo, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_sku_restriction_info.rb'
|
59
|
+
autoload :Identity, '2017-04-18/generated/azure_mgmt_cognitive_services/models/identity.rb'
|
48
60
|
autoload :ResourceSkuRestrictions, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_sku_restrictions.rb'
|
49
|
-
autoload :
|
61
|
+
autoload :RegenerateKeyParameters, '2017-04-18/generated/azure_mgmt_cognitive_services/models/regenerate_key_parameters.rb'
|
50
62
|
autoload :ResourceSku, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_sku.rb'
|
51
|
-
autoload :
|
63
|
+
autoload :Sku, '2017-04-18/generated/azure_mgmt_cognitive_services/models/sku.rb'
|
52
64
|
autoload :ResourceSkusResult, '2017-04-18/generated/azure_mgmt_cognitive_services/models/resource_skus_result.rb'
|
53
|
-
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'
|
54
78
|
autoload :SkuTier, '2017-04-18/generated/azure_mgmt_cognitive_services/models/sku_tier.rb'
|
55
79
|
autoload :ProvisioningState, '2017-04-18/generated/azure_mgmt_cognitive_services/models/provisioning_state.rb'
|
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'
|
56
85
|
autoload :KeyName, '2017-04-18/generated/azure_mgmt_cognitive_services/models/key_name.rb'
|
57
86
|
autoload :UnitType, '2017-04-18/generated/azure_mgmt_cognitive_services/models/unit_type.rb'
|
58
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,12 +121,14 @@ 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
|
123
128
|
|
124
129
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
130
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
131
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
125
132
|
# Deserialize Response
|
126
133
|
if status_code == 200
|
127
134
|
begin
|
@@ -142,6 +149,16 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
142
149
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
143
150
|
end
|
144
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
|
145
162
|
|
146
163
|
result
|
147
164
|
end
|
@@ -152,84 +169,66 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
152
169
|
#
|
153
170
|
# Updates a Cognitive Services account
|
154
171
|
#
|
155
|
-
# @param resource_group_name [String] The name of the resource group
|
156
|
-
#
|
172
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
173
|
+
# is case insensitive.
|
157
174
|
# @param account_name [String] The name of Cognitive Services account.
|
158
|
-
# @param
|
159
|
-
#
|
160
|
-
# that describe the resource. These tags can be used in viewing and grouping
|
161
|
-
# this resource (across resource groups). A maximum of 15 tags can be provided
|
162
|
-
# for a resource. Each tag must have a key no greater than 128 characters and
|
163
|
-
# value no greater than 256 characters.
|
164
|
-
# @param properties Additional properties for Account. Only provided fields
|
165
|
-
# will be updated.
|
175
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
176
|
+
# created account.
|
166
177
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
167
178
|
# will be added to the HTTP request.
|
168
179
|
#
|
169
180
|
# @return [CognitiveServicesAccount] operation results.
|
170
181
|
#
|
171
|
-
def update(resource_group_name, account_name,
|
172
|
-
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!
|
173
184
|
response.body unless response.nil?
|
174
185
|
end
|
175
186
|
|
176
187
|
#
|
177
188
|
# Updates a Cognitive Services account
|
178
189
|
#
|
179
|
-
# @param resource_group_name [String] The name of the resource group
|
180
|
-
#
|
190
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
191
|
+
# is case insensitive.
|
181
192
|
# @param account_name [String] The name of Cognitive Services account.
|
182
|
-
# @param
|
183
|
-
#
|
184
|
-
# that describe the resource. These tags can be used in viewing and grouping
|
185
|
-
# this resource (across resource groups). A maximum of 15 tags can be provided
|
186
|
-
# for a resource. Each tag must have a key no greater than 128 characters and
|
187
|
-
# value no greater than 256 characters.
|
188
|
-
# @param properties Additional properties for Account. Only provided fields
|
189
|
-
# will be updated.
|
193
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
194
|
+
# created account.
|
190
195
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
191
196
|
# will be added to the HTTP request.
|
192
197
|
#
|
193
198
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
194
199
|
#
|
195
|
-
def update_with_http_info(resource_group_name, account_name,
|
196
|
-
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!
|
197
202
|
end
|
198
203
|
|
199
204
|
#
|
200
205
|
# Updates a Cognitive Services account
|
201
206
|
#
|
202
|
-
# @param resource_group_name [String] The name of the resource group
|
203
|
-
#
|
207
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
208
|
+
# is case insensitive.
|
204
209
|
# @param account_name [String] The name of Cognitive Services account.
|
205
|
-
# @param
|
206
|
-
#
|
207
|
-
# that describe the resource. These tags can be used in viewing and grouping
|
208
|
-
# this resource (across resource groups). A maximum of 15 tags can be provided
|
209
|
-
# for a resource. Each tag must have a key no greater than 128 characters and
|
210
|
-
# value no greater than 256 characters.
|
211
|
-
# @param properties Additional properties for Account. Only provided fields
|
212
|
-
# will be updated.
|
210
|
+
# @param account [CognitiveServicesAccount] The parameters to provide for the
|
211
|
+
# created account.
|
213
212
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
214
213
|
# to the HTTP request.
|
215
214
|
#
|
216
215
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
217
216
|
#
|
218
|
-
def update_async(resource_group_name, account_name,
|
217
|
+
def update_async(resource_group_name, account_name, account, custom_headers:nil)
|
219
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?
|
220
222
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
221
223
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
222
224
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
223
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?
|
224
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
|
225
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
|
226
231
|
|
227
|
-
parameters = CognitiveServicesAccountUpdateParameters.new
|
228
|
-
unless sku.nil? && tags.nil? && properties.nil?
|
229
|
-
parameters.sku = sku
|
230
|
-
parameters.tags = tags
|
231
|
-
parameters.properties = properties
|
232
|
-
end
|
233
232
|
|
234
233
|
request_headers = {}
|
235
234
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -239,8 +238,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
239
238
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
240
239
|
|
241
240
|
# Serialize Request
|
242
|
-
request_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::
|
243
|
-
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)
|
244
243
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
245
244
|
|
246
245
|
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'
|
@@ -261,12 +260,14 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
261
260
|
http_response = result.response
|
262
261
|
status_code = http_response.status
|
263
262
|
response_content = http_response.body
|
264
|
-
unless status_code == 200
|
263
|
+
unless status_code == 200 || status_code == 202
|
265
264
|
error_model = JSON.load(response_content)
|
266
265
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
267
266
|
end
|
268
267
|
|
269
268
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
269
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
270
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
270
271
|
# Deserialize Response
|
271
272
|
if status_code == 200
|
272
273
|
begin
|
@@ -277,6 +278,16 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
277
278
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
278
279
|
end
|
279
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
|
280
291
|
|
281
292
|
result
|
282
293
|
end
|
@@ -287,8 +298,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
287
298
|
#
|
288
299
|
# Deletes a Cognitive Services account from the resource group.
|
289
300
|
#
|
290
|
-
# @param resource_group_name [String] The name of the resource group
|
291
|
-
#
|
301
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
302
|
+
# is case insensitive.
|
292
303
|
# @param account_name [String] The name of Cognitive Services account.
|
293
304
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
294
305
|
# will be added to the HTTP request.
|
@@ -302,8 +313,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
302
313
|
#
|
303
314
|
# Deletes a Cognitive Services account from the resource group.
|
304
315
|
#
|
305
|
-
# @param resource_group_name [String] The name of the resource group
|
306
|
-
#
|
316
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
317
|
+
# is case insensitive.
|
307
318
|
# @param account_name [String] The name of Cognitive Services account.
|
308
319
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
309
320
|
# will be added to the HTTP request.
|
@@ -317,8 +328,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
317
328
|
#
|
318
329
|
# Deletes a Cognitive Services account from the resource group.
|
319
330
|
#
|
320
|
-
# @param resource_group_name [String] The name of the resource group
|
321
|
-
#
|
331
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
332
|
+
# is case insensitive.
|
322
333
|
# @param account_name [String] The name of Cognitive Services account.
|
323
334
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
324
335
|
# to the HTTP request.
|
@@ -327,12 +338,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
327
338
|
#
|
328
339
|
def delete_async(resource_group_name, account_name, custom_headers:nil)
|
329
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?
|
330
344
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
331
345
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
332
346
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
333
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?
|
334
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
|
335
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
|
336
352
|
|
337
353
|
|
338
354
|
request_headers = {}
|
@@ -358,12 +374,14 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
358
374
|
http_response = result.response
|
359
375
|
status_code = http_response.status
|
360
376
|
response_content = http_response.body
|
361
|
-
unless status_code == 200 || status_code == 204
|
377
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
362
378
|
error_model = JSON.load(response_content)
|
363
379
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
364
380
|
end
|
365
381
|
|
366
382
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
383
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
384
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
367
385
|
|
368
386
|
result
|
369
387
|
end
|
@@ -374,8 +392,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
374
392
|
#
|
375
393
|
# Returns a Cognitive Services account specified by the parameters.
|
376
394
|
#
|
377
|
-
# @param resource_group_name [String] The name of the resource group
|
378
|
-
#
|
395
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
396
|
+
# is case insensitive.
|
379
397
|
# @param account_name [String] The name of Cognitive Services account.
|
380
398
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
381
399
|
# will be added to the HTTP request.
|
@@ -390,8 +408,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
390
408
|
#
|
391
409
|
# Returns a Cognitive Services account specified by the parameters.
|
392
410
|
#
|
393
|
-
# @param resource_group_name [String] The name of the resource group
|
394
|
-
#
|
411
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
412
|
+
# is case insensitive.
|
395
413
|
# @param account_name [String] The name of Cognitive Services account.
|
396
414
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
397
415
|
# will be added to the HTTP request.
|
@@ -405,8 +423,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
405
423
|
#
|
406
424
|
# Returns a Cognitive Services account specified by the parameters.
|
407
425
|
#
|
408
|
-
# @param resource_group_name [String] The name of the resource group
|
409
|
-
#
|
426
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
427
|
+
# is case insensitive.
|
410
428
|
# @param account_name [String] The name of Cognitive Services account.
|
411
429
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
412
430
|
# to the HTTP request.
|
@@ -415,12 +433,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
415
433
|
#
|
416
434
|
def get_properties_async(resource_group_name, account_name, custom_headers:nil)
|
417
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?
|
418
439
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
419
440
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
420
441
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
421
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?
|
422
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
|
423
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
|
424
447
|
|
425
448
|
|
426
449
|
request_headers = {}
|
@@ -452,6 +475,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
452
475
|
end
|
453
476
|
|
454
477
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
478
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
479
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
455
480
|
# Deserialize Response
|
456
481
|
if status_code == 200
|
457
482
|
begin
|
@@ -472,8 +497,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
472
497
|
#
|
473
498
|
# Returns all the resources of a particular type belonging to a resource group
|
474
499
|
#
|
475
|
-
# @param resource_group_name [String] The name of the resource group
|
476
|
-
#
|
500
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
501
|
+
# is case insensitive.
|
477
502
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
478
503
|
# will be added to the HTTP request.
|
479
504
|
#
|
@@ -487,8 +512,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
487
512
|
#
|
488
513
|
# Returns all the resources of a particular type belonging to a resource group
|
489
514
|
#
|
490
|
-
# @param resource_group_name [String] The name of the resource group
|
491
|
-
#
|
515
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
516
|
+
# is case insensitive.
|
492
517
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
493
518
|
# will be added to the HTTP request.
|
494
519
|
#
|
@@ -501,8 +526,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
501
526
|
#
|
502
527
|
# Returns all the resources of a particular type belonging to a resource group
|
503
528
|
#
|
504
|
-
# @param resource_group_name [String] The name of the resource group
|
505
|
-
#
|
529
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
530
|
+
# is case insensitive.
|
506
531
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
507
532
|
# to the HTTP request.
|
508
533
|
#
|
@@ -510,8 +535,13 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
510
535
|
#
|
511
536
|
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
512
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?
|
513
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
|
514
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
|
515
545
|
|
516
546
|
|
517
547
|
request_headers = {}
|
@@ -543,6 +573,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
543
573
|
end
|
544
574
|
|
545
575
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
576
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
577
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
546
578
|
# Deserialize Response
|
547
579
|
if status_code == 200
|
548
580
|
begin
|
@@ -595,7 +627,9 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
595
627
|
#
|
596
628
|
def list_async(custom_headers:nil)
|
597
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
|
598
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
|
599
633
|
|
600
634
|
|
601
635
|
request_headers = {}
|
@@ -627,6 +661,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
627
661
|
end
|
628
662
|
|
629
663
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
664
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
665
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
630
666
|
# Deserialize Response
|
631
667
|
if status_code == 200
|
632
668
|
begin
|
@@ -647,8 +683,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
647
683
|
#
|
648
684
|
# Lists the account keys for the specified Cognitive Services account.
|
649
685
|
#
|
650
|
-
# @param resource_group_name [String] The name of the resource group
|
651
|
-
#
|
686
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
687
|
+
# is case insensitive.
|
652
688
|
# @param account_name [String] The name of Cognitive Services account.
|
653
689
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
654
690
|
# will be added to the HTTP request.
|
@@ -663,8 +699,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
663
699
|
#
|
664
700
|
# Lists the account keys for the specified Cognitive Services account.
|
665
701
|
#
|
666
|
-
# @param resource_group_name [String] The name of the resource group
|
667
|
-
#
|
702
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
703
|
+
# is case insensitive.
|
668
704
|
# @param account_name [String] The name of Cognitive Services account.
|
669
705
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
670
706
|
# will be added to the HTTP request.
|
@@ -678,8 +714,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
678
714
|
#
|
679
715
|
# Lists the account keys for the specified Cognitive Services account.
|
680
716
|
#
|
681
|
-
# @param resource_group_name [String] The name of the resource group
|
682
|
-
#
|
717
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
718
|
+
# is case insensitive.
|
683
719
|
# @param account_name [String] The name of Cognitive Services account.
|
684
720
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
685
721
|
# to the HTTP request.
|
@@ -688,12 +724,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
688
724
|
#
|
689
725
|
def list_keys_async(resource_group_name, account_name, custom_headers:nil)
|
690
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?
|
691
730
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
692
731
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
693
732
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
694
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?
|
695
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
|
696
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
|
697
738
|
|
698
739
|
|
699
740
|
request_headers = {}
|
@@ -725,6 +766,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
725
766
|
end
|
726
767
|
|
727
768
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
769
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
770
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
728
771
|
# Deserialize Response
|
729
772
|
if status_code == 200
|
730
773
|
begin
|
@@ -746,8 +789,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
746
789
|
# Regenerates the specified account key for the specified Cognitive Services
|
747
790
|
# account.
|
748
791
|
#
|
749
|
-
# @param resource_group_name [String] The name of the resource group
|
750
|
-
#
|
792
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
793
|
+
# is case insensitive.
|
751
794
|
# @param account_name [String] The name of Cognitive Services account.
|
752
795
|
# @param key_name [KeyName] key name to generate (Key1|Key2). Possible values
|
753
796
|
# include: 'Key1', 'Key2'
|
@@ -765,8 +808,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
765
808
|
# Regenerates the specified account key for the specified Cognitive Services
|
766
809
|
# account.
|
767
810
|
#
|
768
|
-
# @param resource_group_name [String] The name of the resource group
|
769
|
-
#
|
811
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
812
|
+
# is case insensitive.
|
770
813
|
# @param account_name [String] The name of Cognitive Services account.
|
771
814
|
# @param key_name [KeyName] key name to generate (Key1|Key2). Possible values
|
772
815
|
# include: 'Key1', 'Key2'
|
@@ -783,8 +826,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
783
826
|
# Regenerates the specified account key for the specified Cognitive Services
|
784
827
|
# account.
|
785
828
|
#
|
786
|
-
# @param resource_group_name [String] The name of the resource group
|
787
|
-
#
|
829
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
830
|
+
# is case insensitive.
|
788
831
|
# @param account_name [String] The name of Cognitive Services account.
|
789
832
|
# @param key_name [KeyName] key name to generate (Key1|Key2). Possible values
|
790
833
|
# include: 'Key1', 'Key2'
|
@@ -795,12 +838,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
795
838
|
#
|
796
839
|
def regenerate_key_async(resource_group_name, account_name, key_name, custom_headers:nil)
|
797
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?
|
798
844
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
799
845
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
800
846
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
801
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?
|
802
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
|
803
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
|
804
852
|
fail ArgumentError, 'key_name is nil' if key_name.nil?
|
805
853
|
|
806
854
|
parameters = RegenerateKeyParameters.new
|
@@ -844,6 +892,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
844
892
|
end
|
845
893
|
|
846
894
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
895
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
896
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
847
897
|
# Deserialize Response
|
848
898
|
if status_code == 200
|
849
899
|
begin
|
@@ -864,8 +914,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
864
914
|
#
|
865
915
|
# List available SKUs for the requested Cognitive Services account
|
866
916
|
#
|
867
|
-
# @param resource_group_name [String] The name of the resource group
|
868
|
-
#
|
917
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
918
|
+
# is case insensitive.
|
869
919
|
# @param account_name [String] The name of Cognitive Services account.
|
870
920
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
871
921
|
# will be added to the HTTP request.
|
@@ -880,8 +930,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
880
930
|
#
|
881
931
|
# List available SKUs for the requested Cognitive Services account
|
882
932
|
#
|
883
|
-
# @param resource_group_name [String] The name of the resource group
|
884
|
-
#
|
933
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
934
|
+
# is case insensitive.
|
885
935
|
# @param account_name [String] The name of Cognitive Services account.
|
886
936
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
887
937
|
# will be added to the HTTP request.
|
@@ -895,8 +945,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
895
945
|
#
|
896
946
|
# List available SKUs for the requested Cognitive Services account
|
897
947
|
#
|
898
|
-
# @param resource_group_name [String] The name of the resource group
|
899
|
-
#
|
948
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
949
|
+
# is case insensitive.
|
900
950
|
# @param account_name [String] The name of Cognitive Services account.
|
901
951
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
902
952
|
# to the HTTP request.
|
@@ -905,12 +955,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
905
955
|
#
|
906
956
|
def list_skus_async(resource_group_name, account_name, custom_headers:nil)
|
907
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?
|
908
961
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
909
962
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
910
963
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
911
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?
|
912
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
|
913
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
|
914
969
|
|
915
970
|
|
916
971
|
request_headers = {}
|
@@ -942,6 +997,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
942
997
|
end
|
943
998
|
|
944
999
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1000
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1001
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
945
1002
|
# Deserialize Response
|
946
1003
|
if status_code == 200
|
947
1004
|
begin
|
@@ -962,8 +1019,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
962
1019
|
#
|
963
1020
|
# Get usages for the requested Cognitive Services account
|
964
1021
|
#
|
965
|
-
# @param resource_group_name [String] The name of the resource group
|
966
|
-
#
|
1022
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1023
|
+
# is case insensitive.
|
967
1024
|
# @param account_name [String] The name of Cognitive Services account.
|
968
1025
|
# @param filter [String] An OData filter expression that describes a subset of
|
969
1026
|
# usages to return. The supported parameter is name.value (name of the metric,
|
@@ -981,8 +1038,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
981
1038
|
#
|
982
1039
|
# Get usages for the requested Cognitive Services account
|
983
1040
|
#
|
984
|
-
# @param resource_group_name [String] The name of the resource group
|
985
|
-
#
|
1041
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1042
|
+
# is case insensitive.
|
986
1043
|
# @param account_name [String] The name of Cognitive Services account.
|
987
1044
|
# @param filter [String] An OData filter expression that describes a subset of
|
988
1045
|
# usages to return. The supported parameter is name.value (name of the metric,
|
@@ -999,8 +1056,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
999
1056
|
#
|
1000
1057
|
# Get usages for the requested Cognitive Services account
|
1001
1058
|
#
|
1002
|
-
# @param resource_group_name [String] The name of the resource group
|
1003
|
-
#
|
1059
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1060
|
+
# is case insensitive.
|
1004
1061
|
# @param account_name [String] The name of Cognitive Services account.
|
1005
1062
|
# @param filter [String] An OData filter expression that describes a subset of
|
1006
1063
|
# usages to return. The supported parameter is name.value (name of the metric,
|
@@ -1012,12 +1069,17 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1012
1069
|
#
|
1013
1070
|
def get_usages_async(resource_group_name, account_name, filter:nil, custom_headers:nil)
|
1014
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?
|
1015
1075
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1016
1076
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '64'" if !account_name.nil? && account_name.length > 64
|
1017
1077
|
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '2'" if !account_name.nil? && account_name.length < 2
|
1018
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?
|
1019
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
|
1020
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
|
1021
1083
|
|
1022
1084
|
|
1023
1085
|
request_headers = {}
|
@@ -1049,6 +1111,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1049
1111
|
end
|
1050
1112
|
|
1051
1113
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1114
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1115
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1052
1116
|
# Deserialize Response
|
1053
1117
|
if status_code == 200
|
1054
1118
|
begin
|
@@ -1137,6 +1201,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1137
1201
|
end
|
1138
1202
|
|
1139
1203
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1204
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1205
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1140
1206
|
# Deserialize Response
|
1141
1207
|
if status_code == 200
|
1142
1208
|
begin
|
@@ -1225,6 +1291,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1225
1291
|
end
|
1226
1292
|
|
1227
1293
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1294
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1295
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1228
1296
|
# Deserialize Response
|
1229
1297
|
if status_code == 200
|
1230
1298
|
begin
|
@@ -1245,8 +1313,8 @@ module Azure::CognitiveServices::Mgmt::V2017_04_18
|
|
1245
1313
|
#
|
1246
1314
|
# Returns all the resources of a particular type belonging to a resource group
|
1247
1315
|
#
|
1248
|
-
# @param resource_group_name [String] The name of the resource group
|
1249
|
-
#
|
1316
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1317
|
+
# is case insensitive.
|
1250
1318
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1251
1319
|
# will be added to the HTTP request.
|
1252
1320
|
#
|