Class: Azure::ApiManagement::Mgmt::V2016_07_07::TenantConfiguration
- Inherits:
-
Object
- Object
- Azure::ApiManagement::Mgmt::V2016_07_07::TenantConfiguration
- Includes:
- MsRestAzure
- Defined in:
- lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb
Overview
ApiManagement Client
Instance Attribute Summary collapse
-
#client ⇒ ApiManagementClient
readonly
Reference to the ApiManagementClient.
Instance Method Summary collapse
-
#begin_deploy(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation applies changes from the specified Git branch to the configuration database.
-
#begin_deploy_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
This operation applies changes from the specified Git branch to the configuration database.
-
#begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation applies changes from the specified Git branch to the configuration database.
-
#begin_save(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation creates a commit with the current configuration snapshot to the specified branch in the repository.
-
#begin_save_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
This operation creates a commit with the current configuration snapshot to the specified branch in the repository.
-
#begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation creates a commit with the current configuration snapshot to the specified branch in the repository.
-
#begin_validate(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation validates the changes in the specified Git branch.
-
#begin_validate_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
This operation validates the changes in the specified Git branch.
-
#begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation validates the changes in the specified Git branch.
-
#deploy(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation applies changes from the specified Git branch to the configuration database.
-
#deploy_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
parameters.
-
#initialize(client) ⇒ TenantConfiguration
constructor
Creates and initializes a new instance of the TenantConfiguration class.
-
#save(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation creates a commit with the current configuration snapshot to the specified branch in the repository.
-
#save_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#validate(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation validates the changes in the specified Git branch.
-
#validate_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
parameters.
Constructor Details
#initialize(client) ⇒ TenantConfiguration
Creates and initializes a new instance of the TenantConfiguration class.
17 18 19 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ApiManagementClient (readonly)
Returns reference to the ApiManagementClient.
22 23 24 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 22 def client @client end |
Instance Method Details
#begin_deploy(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.
parameters. will be added to the HTTP request.
179 180 181 182 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 179 def begin_deploy(resource_group_name, service_name, parameters, custom_headers:nil) response = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_deploy_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.
parameters. to the HTTP request.
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 216 def begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::DeployConfigurationParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/deploy' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::OperationResultContract.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.
parameters. will be added to the HTTP request.
198 199 200 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 198 def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! end |
#begin_save(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.
will be added to the HTTP request.
295 296 297 298 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 295 def begin_save(resource_group_name, service_name, parameters, custom_headers:nil) response = begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_save_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.
to the HTTP request.
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 330 def begin_save_async(resource_group_name, service_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::SaveConfigurationParameter.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/save' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::OperationResultContract.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.
will be added to the HTTP request.
313 314 315 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 313 def begin_save_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! end |
#begin_validate(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.
parameters. will be added to the HTTP request.
409 410 411 412 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 409 def begin_validate(resource_group_name, service_name, parameters, custom_headers:nil) response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_validate_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.
parameters. to the HTTP request.
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 444 def begin_validate_async(resource_group_name, service_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::DeployConfigurationParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/validate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::OperationResultContract.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.
parameters. will be added to the HTTP request.
427 428 429 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 427 def begin_validate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil) begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! end |
#deploy(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.
parameters. will be added to the HTTP request.
38 39 40 41 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 38 def deploy(resource_group_name, service_name, parameters, custom_headers:nil) response = deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#deploy_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
parameters. will be added to the HTTP request.
response.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 54 def deploy_async(resource_group_name, service_name, parameters, custom_headers:nil) # Send request promise = begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::OperationResultContract.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#save(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.
will be added to the HTTP request.
85 86 87 88 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 85 def save(resource_group_name, service_name, parameters, custom_headers:nil) response = save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#save_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 100 def save_async(resource_group_name, service_name, parameters, custom_headers:nil) # Send request promise = begin_save_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::OperationResultContract.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#validate(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ OperationResultContract
This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.
parameters. will be added to the HTTP request.
131 132 133 134 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 131 def validate(resource_group_name, service_name, parameters, custom_headers:nil) response = validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#validate_async(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
parameters. will be added to the HTTP request.
response.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb', line 147 def validate_async(resource_group_name, service_name, parameters, custom_headers:nil) # Send request promise = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ApiManagement::Mgmt::V2016_07_07::Models::OperationResultContract.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |