azure_mgmt_reservations 0.19.0 → 0.19.1
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 +4 -4
- data/lib/2017-11-01/generated/azure_mgmt_reservations/reservations_management_client.rb +1 -1
- data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +1 -1
- data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +1 -1
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations.rb +58 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/auto_quota_increase.rb +241 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/aqi_settings.rb +46 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/auto_quota_increase_detail.rb +119 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/create_generic_quota_request_parameters.rb +55 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit.rb +144 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit_base.rb +120 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit_base_name.rb +59 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/email_action.rb +46 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/email_actions.rb +56 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/exception_response.rb +47 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure.rb +61 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure_email_actions.rb +55 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure_phone_actions.rb +55 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/phone_action.rb +57 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_limits.rb +99 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_limits_response.rb +68 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_details.rb +128 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_details_list.rb +99 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_one_resource_submit_response.rb +194 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_properties.rb +92 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_submit_response.rb +83 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_submit_response201.rb +96 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/service_error.rb +78 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/service_error_detail.rb +59 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/sub_request.rb +118 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/sub_request_name.rb +59 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/support_request_action.rb +153 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/module_definition.rb +9 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota.rb +144 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota_request.rb +519 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota_requests.rb +441 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quotas.rb +269 -0
- data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +144 -0
- data/lib/azure_mgmt_reservations.rb +1 -0
- data/lib/profiles/latest/modules/reservations_profile_module.rb +124 -2
- data/lib/version.rb +1 -1
- metadata +36 -2
data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/support_request_action.rb
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Reservations::Mgmt::V2019_07_19_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The SupportRequest action.
|
10
|
+
#
|
11
|
+
class SupportRequestAction
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return Is support request action enabled.
|
16
|
+
attr_accessor :auto_quota_increase_state
|
17
|
+
|
18
|
+
# @return The support request severity.
|
19
|
+
attr_accessor :severity
|
20
|
+
|
21
|
+
# @return [String] The first name of the recipient.
|
22
|
+
attr_accessor :first_name
|
23
|
+
|
24
|
+
# @return [String] The last name of the recipient.
|
25
|
+
attr_accessor :last_name
|
26
|
+
|
27
|
+
# @return [String] The country of the recipient.
|
28
|
+
attr_accessor :country
|
29
|
+
|
30
|
+
# @return [String] The phone number of the recipient.
|
31
|
+
attr_accessor :phone_number
|
32
|
+
|
33
|
+
# @return [String] The primary email addresses of the recipients.
|
34
|
+
attr_accessor :primary_email_address
|
35
|
+
|
36
|
+
# @return [String] The support language.
|
37
|
+
attr_accessor :support_language
|
38
|
+
|
39
|
+
# @return The preferred communication channel.
|
40
|
+
attr_accessor :preferred_contact_method
|
41
|
+
|
42
|
+
# @return [Array<String>] The alternate email address of the recipient.
|
43
|
+
attr_accessor :alternate_email_addresses
|
44
|
+
|
45
|
+
|
46
|
+
#
|
47
|
+
# Mapper for SupportRequestAction class as Ruby Hash.
|
48
|
+
# This will be used for serialization/deserialization.
|
49
|
+
#
|
50
|
+
def self.mapper()
|
51
|
+
{
|
52
|
+
client_side_validation: true,
|
53
|
+
required: false,
|
54
|
+
serialized_name: 'SupportRequestAction',
|
55
|
+
type: {
|
56
|
+
name: 'Composite',
|
57
|
+
class_name: 'SupportRequestAction',
|
58
|
+
model_properties: {
|
59
|
+
auto_quota_increase_state: {
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
serialized_name: 'autoQuotaIncreaseState',
|
63
|
+
type: {
|
64
|
+
name: 'Object'
|
65
|
+
}
|
66
|
+
},
|
67
|
+
severity: {
|
68
|
+
client_side_validation: true,
|
69
|
+
required: false,
|
70
|
+
serialized_name: 'severity',
|
71
|
+
type: {
|
72
|
+
name: 'Object'
|
73
|
+
}
|
74
|
+
},
|
75
|
+
first_name: {
|
76
|
+
client_side_validation: true,
|
77
|
+
required: false,
|
78
|
+
serialized_name: 'firstName',
|
79
|
+
type: {
|
80
|
+
name: 'String'
|
81
|
+
}
|
82
|
+
},
|
83
|
+
last_name: {
|
84
|
+
client_side_validation: true,
|
85
|
+
required: false,
|
86
|
+
serialized_name: 'lastName',
|
87
|
+
type: {
|
88
|
+
name: 'String'
|
89
|
+
}
|
90
|
+
},
|
91
|
+
country: {
|
92
|
+
client_side_validation: true,
|
93
|
+
required: false,
|
94
|
+
serialized_name: 'country',
|
95
|
+
type: {
|
96
|
+
name: 'String'
|
97
|
+
}
|
98
|
+
},
|
99
|
+
phone_number: {
|
100
|
+
client_side_validation: true,
|
101
|
+
required: false,
|
102
|
+
serialized_name: 'phoneNumber',
|
103
|
+
type: {
|
104
|
+
name: 'String'
|
105
|
+
}
|
106
|
+
},
|
107
|
+
primary_email_address: {
|
108
|
+
client_side_validation: true,
|
109
|
+
required: false,
|
110
|
+
serialized_name: 'primaryEmailAddress',
|
111
|
+
type: {
|
112
|
+
name: 'String'
|
113
|
+
}
|
114
|
+
},
|
115
|
+
support_language: {
|
116
|
+
client_side_validation: true,
|
117
|
+
required: false,
|
118
|
+
serialized_name: 'supportLanguage',
|
119
|
+
type: {
|
120
|
+
name: 'String'
|
121
|
+
}
|
122
|
+
},
|
123
|
+
preferred_contact_method: {
|
124
|
+
client_side_validation: true,
|
125
|
+
required: false,
|
126
|
+
serialized_name: 'preferredContactMethod',
|
127
|
+
type: {
|
128
|
+
name: 'Object'
|
129
|
+
}
|
130
|
+
},
|
131
|
+
alternate_email_addresses: {
|
132
|
+
client_side_validation: true,
|
133
|
+
required: false,
|
134
|
+
serialized_name: 'alternateEmailAddresses',
|
135
|
+
type: {
|
136
|
+
name: 'Sequence',
|
137
|
+
element: {
|
138
|
+
client_side_validation: true,
|
139
|
+
required: false,
|
140
|
+
serialized_name: 'StringElementType',
|
141
|
+
type: {
|
142
|
+
name: 'String'
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure end
|
7
|
+
module Azure::Reservations end
|
8
|
+
module Azure::Reservations::Mgmt end
|
9
|
+
module Azure::Reservations::Mgmt::V2019_07_19_preview end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Reservations::Mgmt::V2019_07_19_preview
|
7
|
+
#
|
8
|
+
# Microsoft Azure Quota Resource Provider.
|
9
|
+
#
|
10
|
+
class Quota
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Quota class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ReservationsManagementClient] reference to the ReservationsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets the current quota limit and usages for the resource provider for the
|
26
|
+
# specified location for the specific resource in the parameter.
|
27
|
+
#
|
28
|
+
# This API gets the current quota limit and usages for the specific resource
|
29
|
+
# for resource provider for the specified location. This response can be used
|
30
|
+
# to submit quotaRequests.
|
31
|
+
#
|
32
|
+
# @param subscription_id [String] Azure subscription id.
|
33
|
+
# @param provider_id [String] Azure resource Provider id.
|
34
|
+
# @param location [String] Azure region.
|
35
|
+
# @param resource_name [String] The Resource name for the specific resource
|
36
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
37
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
38
|
+
# will be added to the HTTP request.
|
39
|
+
#
|
40
|
+
# @return [CurrentQuotaLimitBase] operation results.
|
41
|
+
#
|
42
|
+
def list_status(subscription_id, provider_id, location, resource_name, custom_headers:nil)
|
43
|
+
response = list_status_async(subscription_id, provider_id, location, resource_name, custom_headers:custom_headers).value!
|
44
|
+
response.body unless response.nil?
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Gets the current quota limit and usages for the resource provider for the
|
49
|
+
# specified location for the specific resource in the parameter.
|
50
|
+
#
|
51
|
+
# This API gets the current quota limit and usages for the specific resource
|
52
|
+
# for resource provider for the specified location. This response can be used
|
53
|
+
# to submit quotaRequests.
|
54
|
+
#
|
55
|
+
# @param subscription_id [String] Azure subscription id.
|
56
|
+
# @param provider_id [String] Azure resource Provider id.
|
57
|
+
# @param location [String] Azure region.
|
58
|
+
# @param resource_name [String] The Resource name for the specific resource
|
59
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
60
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
61
|
+
# will be added to the HTTP request.
|
62
|
+
#
|
63
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
64
|
+
#
|
65
|
+
def list_status_with_http_info(subscription_id, provider_id, location, resource_name, custom_headers:nil)
|
66
|
+
list_status_async(subscription_id, provider_id, location, resource_name, custom_headers:custom_headers).value!
|
67
|
+
end
|
68
|
+
|
69
|
+
#
|
70
|
+
# Gets the current quota limit and usages for the resource provider for the
|
71
|
+
# specified location for the specific resource in the parameter.
|
72
|
+
#
|
73
|
+
# This API gets the current quota limit and usages for the specific resource
|
74
|
+
# for resource provider for the specified location. This response can be used
|
75
|
+
# to submit quotaRequests.
|
76
|
+
#
|
77
|
+
# @param subscription_id [String] Azure subscription id.
|
78
|
+
# @param provider_id [String] Azure resource Provider id.
|
79
|
+
# @param location [String] Azure region.
|
80
|
+
# @param resource_name [String] The Resource name for the specific resource
|
81
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
82
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
83
|
+
# to the HTTP request.
|
84
|
+
#
|
85
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
86
|
+
#
|
87
|
+
def list_status_async(subscription_id, provider_id, location, resource_name, custom_headers:nil)
|
88
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
89
|
+
fail ArgumentError, 'provider_id is nil' if provider_id.nil?
|
90
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
91
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
92
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
93
|
+
|
94
|
+
|
95
|
+
request_headers = {}
|
96
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
97
|
+
|
98
|
+
# Set Headers
|
99
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
100
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
101
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}'
|
102
|
+
|
103
|
+
request_url = @base_url || @client.base_url
|
104
|
+
|
105
|
+
options = {
|
106
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
107
|
+
path_params: {'subscriptionId' => subscription_id,'providerId' => provider_id,'location' => location,'resourceName' => resource_name},
|
108
|
+
query_params: {'api-version' => @client.api_version},
|
109
|
+
headers: request_headers.merge(custom_headers || {}),
|
110
|
+
base_url: request_url
|
111
|
+
}
|
112
|
+
promise = @client.make_request_async(:get, path_template, options)
|
113
|
+
|
114
|
+
promise = promise.then do |result|
|
115
|
+
http_response = result.response
|
116
|
+
status_code = http_response.status
|
117
|
+
response_content = http_response.body
|
118
|
+
unless status_code == 200
|
119
|
+
error_model = JSON.load(response_content)
|
120
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
121
|
+
end
|
122
|
+
|
123
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
124
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
125
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
126
|
+
# Deserialize Response
|
127
|
+
if status_code == 200
|
128
|
+
begin
|
129
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
130
|
+
result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::CurrentQuotaLimitBase.mapper()
|
131
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
132
|
+
rescue Exception => e
|
133
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
result
|
138
|
+
end
|
139
|
+
|
140
|
+
promise.execute
|
141
|
+
end
|
142
|
+
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,519 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Reservations::Mgmt::V2019_07_19_preview
|
7
|
+
#
|
8
|
+
# Microsoft Azure Quota Resource Provider.
|
9
|
+
#
|
10
|
+
class QuotaRequest
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the QuotaRequest class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ReservationsManagementClient] reference to the ReservationsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
26
|
+
# the specific resource in the parameter.
|
27
|
+
#
|
28
|
+
# Submits Quota change request for a resource provider for the specified
|
29
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
30
|
+
# request to get quota information. This information consists of a list of
|
31
|
+
# resources and information regarding those resources. For all the resources in
|
32
|
+
# that list which require an update to their quotas, update their limit fields
|
33
|
+
# in the response from the Get request to their new values. Then, submit this
|
34
|
+
# updated JSON object to this quota request API. This will update the quota to
|
35
|
+
# the values specified. The location header in the response will be used to
|
36
|
+
# track the status of the quota request. Please check the provisioningState
|
37
|
+
# field in the response.
|
38
|
+
#
|
39
|
+
# @param subscription_id [String] Azure subscription id.
|
40
|
+
# @param provider_id [String] Azure resource Provider id.
|
41
|
+
# @param location [String] Azure region.
|
42
|
+
# @param resource_name [String] The Resource name for the specific resource
|
43
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
44
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
45
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
46
|
+
# entity state from the header response of the GET request or it should be *
|
47
|
+
# for unconditional update.
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [Object] operation results.
|
52
|
+
#
|
53
|
+
def create(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
54
|
+
response = create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
|
55
|
+
response.body unless response.nil?
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# @param subscription_id [String] Azure subscription id.
|
60
|
+
# @param provider_id [String] Azure resource Provider id.
|
61
|
+
# @param location [String] Azure region.
|
62
|
+
# @param resource_name [String] The Resource name for the specific resource
|
63
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
64
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
65
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
66
|
+
# entity state from the header response of the GET request or it should be *
|
67
|
+
# for unconditional update.
|
68
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
69
|
+
# will be added to the HTTP request.
|
70
|
+
#
|
71
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
72
|
+
# response.
|
73
|
+
#
|
74
|
+
def create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
75
|
+
# Send request
|
76
|
+
promise = begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers)
|
77
|
+
|
78
|
+
promise = promise.then do |response|
|
79
|
+
# Defining deserialization method.
|
80
|
+
deserialize_method = lambda do |parsed_response|
|
81
|
+
result_mapper = {
|
82
|
+
client_side_validation: true,
|
83
|
+
required: false,
|
84
|
+
serialized_name: 'parsed_response',
|
85
|
+
type: {
|
86
|
+
name: 'Object'
|
87
|
+
}
|
88
|
+
}
|
89
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Waiting for response.
|
93
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
94
|
+
end
|
95
|
+
|
96
|
+
promise
|
97
|
+
end
|
98
|
+
|
99
|
+
#
|
100
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
101
|
+
# the specific resource in the parameter.
|
102
|
+
#
|
103
|
+
# Submits Quota change request for a resource provider for the specified
|
104
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
105
|
+
# request to get quota information. This information consists of a list of
|
106
|
+
# resources and information regarding those resources. For all the resources in
|
107
|
+
# that list which require an update to their quotas, update their limit fields
|
108
|
+
# in the response from the Get request to their new values. Then, submit this
|
109
|
+
# updated JSON object to this quota request API. This will update the quota to
|
110
|
+
# the values specified. The location header in the response will be used to
|
111
|
+
# track the status of the quota request. Please check the provisioningState
|
112
|
+
# field in the response.
|
113
|
+
#
|
114
|
+
# @param subscription_id [String] Azure subscription id.
|
115
|
+
# @param provider_id [String] Azure resource Provider id.
|
116
|
+
# @param location [String] Azure region.
|
117
|
+
# @param resource_name [String] The Resource name for the specific resource
|
118
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
119
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
120
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
121
|
+
# entity state from the header response of the GET request or it should be *
|
122
|
+
# for unconditional update.
|
123
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
124
|
+
# will be added to the HTTP request.
|
125
|
+
#
|
126
|
+
# @return [Object] operation results.
|
127
|
+
#
|
128
|
+
def update(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
129
|
+
response = update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
|
130
|
+
response.body unless response.nil?
|
131
|
+
end
|
132
|
+
|
133
|
+
#
|
134
|
+
# @param subscription_id [String] Azure subscription id.
|
135
|
+
# @param provider_id [String] Azure resource Provider id.
|
136
|
+
# @param location [String] Azure region.
|
137
|
+
# @param resource_name [String] The Resource name for the specific resource
|
138
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
139
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
140
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
141
|
+
# entity state from the header response of the GET request or it should be *
|
142
|
+
# for unconditional update.
|
143
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
144
|
+
# will be added to the HTTP request.
|
145
|
+
#
|
146
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
147
|
+
# response.
|
148
|
+
#
|
149
|
+
def update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
150
|
+
# Send request
|
151
|
+
promise = begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers)
|
152
|
+
|
153
|
+
promise = promise.then do |response|
|
154
|
+
# Defining deserialization method.
|
155
|
+
deserialize_method = lambda do |parsed_response|
|
156
|
+
result_mapper = {
|
157
|
+
client_side_validation: true,
|
158
|
+
required: false,
|
159
|
+
serialized_name: 'parsed_response',
|
160
|
+
type: {
|
161
|
+
name: 'Object'
|
162
|
+
}
|
163
|
+
}
|
164
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
165
|
+
end
|
166
|
+
|
167
|
+
# Waiting for response.
|
168
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
169
|
+
end
|
170
|
+
|
171
|
+
promise
|
172
|
+
end
|
173
|
+
|
174
|
+
#
|
175
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
176
|
+
# the specific resource in the parameter.
|
177
|
+
#
|
178
|
+
# Submits Quota change request for a resource provider for the specified
|
179
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
180
|
+
# request to get quota information. This information consists of a list of
|
181
|
+
# resources and information regarding those resources. For all the resources in
|
182
|
+
# that list which require an update to their quotas, update their limit fields
|
183
|
+
# in the response from the Get request to their new values. Then, submit this
|
184
|
+
# updated JSON object to this quota request API. This will update the quota to
|
185
|
+
# the values specified. The location header in the response will be used to
|
186
|
+
# track the status of the quota request. Please check the provisioningState
|
187
|
+
# field in the response.
|
188
|
+
#
|
189
|
+
# @param subscription_id [String] Azure subscription id.
|
190
|
+
# @param provider_id [String] Azure resource Provider id.
|
191
|
+
# @param location [String] Azure region.
|
192
|
+
# @param resource_name [String] The Resource name for the specific resource
|
193
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
194
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
195
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
196
|
+
# entity state from the header response of the GET request or it should be *
|
197
|
+
# for unconditional update.
|
198
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
199
|
+
# will be added to the HTTP request.
|
200
|
+
#
|
201
|
+
# @return [Object] operation results.
|
202
|
+
#
|
203
|
+
def begin_create(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
204
|
+
response = begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
|
205
|
+
response.body unless response.nil?
|
206
|
+
end
|
207
|
+
|
208
|
+
#
|
209
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
210
|
+
# the specific resource in the parameter.
|
211
|
+
#
|
212
|
+
# Submits Quota change request for a resource provider for the specified
|
213
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
214
|
+
# request to get quota information. This information consists of a list of
|
215
|
+
# resources and information regarding those resources. For all the resources in
|
216
|
+
# that list which require an update to their quotas, update their limit fields
|
217
|
+
# in the response from the Get request to their new values. Then, submit this
|
218
|
+
# updated JSON object to this quota request API. This will update the quota to
|
219
|
+
# the values specified. The location header in the response will be used to
|
220
|
+
# track the status of the quota request. Please check the provisioningState
|
221
|
+
# field in the response.
|
222
|
+
#
|
223
|
+
# @param subscription_id [String] Azure subscription id.
|
224
|
+
# @param provider_id [String] Azure resource Provider id.
|
225
|
+
# @param location [String] Azure region.
|
226
|
+
# @param resource_name [String] The Resource name for the specific resource
|
227
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
228
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
229
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
230
|
+
# entity state from the header response of the GET request or it should be *
|
231
|
+
# for unconditional update.
|
232
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
233
|
+
# will be added to the HTTP request.
|
234
|
+
#
|
235
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
236
|
+
#
|
237
|
+
def begin_create_with_http_info(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
238
|
+
begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
|
239
|
+
end
|
240
|
+
|
241
|
+
#
|
242
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
243
|
+
# the specific resource in the parameter.
|
244
|
+
#
|
245
|
+
# Submits Quota change request for a resource provider for the specified
|
246
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
247
|
+
# request to get quota information. This information consists of a list of
|
248
|
+
# resources and information regarding those resources. For all the resources in
|
249
|
+
# that list which require an update to their quotas, update their limit fields
|
250
|
+
# in the response from the Get request to their new values. Then, submit this
|
251
|
+
# updated JSON object to this quota request API. This will update the quota to
|
252
|
+
# the values specified. The location header in the response will be used to
|
253
|
+
# track the status of the quota request. Please check the provisioningState
|
254
|
+
# field in the response.
|
255
|
+
#
|
256
|
+
# @param subscription_id [String] Azure subscription id.
|
257
|
+
# @param provider_id [String] Azure resource Provider id.
|
258
|
+
# @param location [String] Azure region.
|
259
|
+
# @param resource_name [String] The Resource name for the specific resource
|
260
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
261
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
262
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
263
|
+
# entity state from the header response of the GET request or it should be *
|
264
|
+
# for unconditional update.
|
265
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
266
|
+
# to the HTTP request.
|
267
|
+
#
|
268
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
269
|
+
#
|
270
|
+
def begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
271
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
272
|
+
fail ArgumentError, 'provider_id is nil' if provider_id.nil?
|
273
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
274
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
275
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
276
|
+
fail ArgumentError, 'create_quota_request is nil' if create_quota_request.nil?
|
277
|
+
fail ArgumentError, 'if_match is nil' if if_match.nil?
|
278
|
+
|
279
|
+
|
280
|
+
request_headers = {}
|
281
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
282
|
+
|
283
|
+
# Set Headers
|
284
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
285
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
286
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
287
|
+
|
288
|
+
# Serialize Request
|
289
|
+
request_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::CurrentQuotaLimitBase.mapper()
|
290
|
+
request_content = @client.serialize(request_mapper, create_quota_request)
|
291
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
292
|
+
|
293
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}'
|
294
|
+
|
295
|
+
request_url = @base_url || @client.base_url
|
296
|
+
|
297
|
+
options = {
|
298
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
299
|
+
path_params: {'subscriptionId' => subscription_id,'providerId' => provider_id,'location' => location,'resourceName' => resource_name},
|
300
|
+
query_params: {'api-version' => @client.api_version},
|
301
|
+
body: request_content,
|
302
|
+
headers: request_headers.merge(custom_headers || {}),
|
303
|
+
base_url: request_url
|
304
|
+
}
|
305
|
+
promise = @client.make_request_async(:put, path_template, options)
|
306
|
+
|
307
|
+
promise = promise.then do |result|
|
308
|
+
http_response = result.response
|
309
|
+
status_code = http_response.status
|
310
|
+
response_content = http_response.body
|
311
|
+
unless status_code == 200 || status_code == 201
|
312
|
+
error_model = JSON.load(response_content)
|
313
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
314
|
+
end
|
315
|
+
|
316
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
317
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
318
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
319
|
+
# Deserialize Response
|
320
|
+
if status_code == 200
|
321
|
+
begin
|
322
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
323
|
+
result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestOneResourceSubmitResponse.mapper()
|
324
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
325
|
+
rescue Exception => e
|
326
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
327
|
+
end
|
328
|
+
end
|
329
|
+
# Deserialize Response
|
330
|
+
if status_code == 201
|
331
|
+
begin
|
332
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
333
|
+
result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestSubmitResponse201.mapper()
|
334
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
335
|
+
rescue Exception => e
|
336
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
337
|
+
end
|
338
|
+
end
|
339
|
+
|
340
|
+
result
|
341
|
+
end
|
342
|
+
|
343
|
+
promise.execute
|
344
|
+
end
|
345
|
+
|
346
|
+
#
|
347
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
348
|
+
# the specific resource in the parameter.
|
349
|
+
#
|
350
|
+
# Submits Quota change request for a resource provider for the specified
|
351
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
352
|
+
# request to get quota information. This information consists of a list of
|
353
|
+
# resources and information regarding those resources. For all the resources in
|
354
|
+
# that list which require an update to their quotas, update their limit fields
|
355
|
+
# in the response from the Get request to their new values. Then, submit this
|
356
|
+
# updated JSON object to this quota request API. This will update the quota to
|
357
|
+
# the values specified. The location header in the response will be used to
|
358
|
+
# track the status of the quota request. Please check the provisioningState
|
359
|
+
# field in the response.
|
360
|
+
#
|
361
|
+
# @param subscription_id [String] Azure subscription id.
|
362
|
+
# @param provider_id [String] Azure resource Provider id.
|
363
|
+
# @param location [String] Azure region.
|
364
|
+
# @param resource_name [String] The Resource name for the specific resource
|
365
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
366
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
367
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
368
|
+
# entity state from the header response of the GET request or it should be *
|
369
|
+
# for unconditional update.
|
370
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
371
|
+
# will be added to the HTTP request.
|
372
|
+
#
|
373
|
+
# @return [Object] operation results.
|
374
|
+
#
|
375
|
+
def begin_update(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
376
|
+
response = begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
|
377
|
+
response.body unless response.nil?
|
378
|
+
end
|
379
|
+
|
380
|
+
#
|
381
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
382
|
+
# the specific resource in the parameter.
|
383
|
+
#
|
384
|
+
# Submits Quota change request for a resource provider for the specified
|
385
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
386
|
+
# request to get quota information. This information consists of a list of
|
387
|
+
# resources and information regarding those resources. For all the resources in
|
388
|
+
# that list which require an update to their quotas, update their limit fields
|
389
|
+
# in the response from the Get request to their new values. Then, submit this
|
390
|
+
# updated JSON object to this quota request API. This will update the quota to
|
391
|
+
# the values specified. The location header in the response will be used to
|
392
|
+
# track the status of the quota request. Please check the provisioningState
|
393
|
+
# field in the response.
|
394
|
+
#
|
395
|
+
# @param subscription_id [String] Azure subscription id.
|
396
|
+
# @param provider_id [String] Azure resource Provider id.
|
397
|
+
# @param location [String] Azure region.
|
398
|
+
# @param resource_name [String] The Resource name for the specific resource
|
399
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
400
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
401
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
402
|
+
# entity state from the header response of the GET request or it should be *
|
403
|
+
# for unconditional update.
|
404
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
405
|
+
# will be added to the HTTP request.
|
406
|
+
#
|
407
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
408
|
+
#
|
409
|
+
def begin_update_with_http_info(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
410
|
+
begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
|
411
|
+
end
|
412
|
+
|
413
|
+
#
|
414
|
+
# Submits a Quota Request for a resource provider at the specified location for
|
415
|
+
# the specific resource in the parameter.
|
416
|
+
#
|
417
|
+
# Submits Quota change request for a resource provider for the specified
|
418
|
+
# location for the specific resource in the parameter. To use, first make a Get
|
419
|
+
# request to get quota information. This information consists of a list of
|
420
|
+
# resources and information regarding those resources. For all the resources in
|
421
|
+
# that list which require an update to their quotas, update their limit fields
|
422
|
+
# in the response from the Get request to their new values. Then, submit this
|
423
|
+
# updated JSON object to this quota request API. This will update the quota to
|
424
|
+
# the values specified. The location header in the response will be used to
|
425
|
+
# track the status of the quota request. Please check the provisioningState
|
426
|
+
# field in the response.
|
427
|
+
#
|
428
|
+
# @param subscription_id [String] Azure subscription id.
|
429
|
+
# @param provider_id [String] Azure resource Provider id.
|
430
|
+
# @param location [String] Azure region.
|
431
|
+
# @param resource_name [String] The Resource name for the specific resource
|
432
|
+
# provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
|
433
|
+
# @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
|
434
|
+
# @param if_match [String] ETag of the Entity. ETag should match the current
|
435
|
+
# entity state from the header response of the GET request or it should be *
|
436
|
+
# for unconditional update.
|
437
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
438
|
+
# to the HTTP request.
|
439
|
+
#
|
440
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
441
|
+
#
|
442
|
+
def begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
|
443
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
444
|
+
fail ArgumentError, 'provider_id is nil' if provider_id.nil?
|
445
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
446
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
447
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
448
|
+
fail ArgumentError, 'create_quota_request is nil' if create_quota_request.nil?
|
449
|
+
fail ArgumentError, 'if_match is nil' if if_match.nil?
|
450
|
+
|
451
|
+
|
452
|
+
request_headers = {}
|
453
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
454
|
+
|
455
|
+
# Set Headers
|
456
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
457
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
458
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
459
|
+
|
460
|
+
# Serialize Request
|
461
|
+
request_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::CurrentQuotaLimitBase.mapper()
|
462
|
+
request_content = @client.serialize(request_mapper, create_quota_request)
|
463
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
464
|
+
|
465
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}'
|
466
|
+
|
467
|
+
request_url = @base_url || @client.base_url
|
468
|
+
|
469
|
+
options = {
|
470
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
471
|
+
path_params: {'subscriptionId' => subscription_id,'providerId' => provider_id,'location' => location,'resourceName' => resource_name},
|
472
|
+
query_params: {'api-version' => @client.api_version},
|
473
|
+
body: request_content,
|
474
|
+
headers: request_headers.merge(custom_headers || {}),
|
475
|
+
base_url: request_url
|
476
|
+
}
|
477
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
478
|
+
|
479
|
+
promise = promise.then do |result|
|
480
|
+
http_response = result.response
|
481
|
+
status_code = http_response.status
|
482
|
+
response_content = http_response.body
|
483
|
+
unless status_code == 200 || status_code == 201
|
484
|
+
error_model = JSON.load(response_content)
|
485
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
486
|
+
end
|
487
|
+
|
488
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
489
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
490
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
491
|
+
# Deserialize Response
|
492
|
+
if status_code == 200
|
493
|
+
begin
|
494
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
495
|
+
result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestOneResourceSubmitResponse.mapper()
|
496
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
497
|
+
rescue Exception => e
|
498
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
499
|
+
end
|
500
|
+
end
|
501
|
+
# Deserialize Response
|
502
|
+
if status_code == 201
|
503
|
+
begin
|
504
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
505
|
+
result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestSubmitResponse201.mapper()
|
506
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
507
|
+
rescue Exception => e
|
508
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
509
|
+
end
|
510
|
+
end
|
511
|
+
|
512
|
+
result
|
513
|
+
end
|
514
|
+
|
515
|
+
promise.execute
|
516
|
+
end
|
517
|
+
|
518
|
+
end
|
519
|
+
end
|