class Azure::Web::Mgmt::V2018_02_01::WebSiteManagementClient
A service client - single point of access to the REST API.
Attributes
@return [String] The preferred language for the response.
@return [String] API Version
@return [AppServiceCertificateOrders] app_service_certificate_orders
@return [AppServiceEnvironments] app_service_environments
@return [AppServicePlans] app_service_plans
@return [String] the base URI of the service.
@return [CertificateRegistrationProvider] certificate_registration_provider
@return [Certificates] certificates
@return Credentials needed for the client to connect to Azure
.
@return [DeletedWebApps] deleted_web_apps
@return [Diagnostics] diagnostics
@return [DomainRegistrationProvider] domain_registration_provider
@return [Domains] domains
@return [Boolean] Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
@return [Integer] The retry timeout in seconds for Long Running Operations. Default value is 30.
@return [Provider] provider
@return [Recommendations] recommendations
@return [ResourceHealthMetadataOperations] resource_health_metadata_operations
@return [String] Your Azure
subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
@return [TopLevelDomains] top_level_domains
@return [WebApps] web_apps
Public Class Methods
Creates initializes a new instance of the WebSiteManagementClient
class. @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @param base_url
[String] the base URI of the service. @param options [Array] filters to be applied to the HTTP requests.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 89 def initialize(credentials = nil, base_url = nil, options = nil) super(credentials, options) @base_url = base_url || 'https://management.azure.com' fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials @app_service_certificate_orders = AppServiceCertificateOrders.new(self) @certificate_registration_provider = CertificateRegistrationProvider.new(self) @domains = Domains.new(self) @top_level_domains = TopLevelDomains.new(self) @domain_registration_provider = DomainRegistrationProvider.new(self) @certificates = Certificates.new(self) @deleted_web_apps = DeletedWebApps.new(self) @diagnostics = Diagnostics.new(self) @provider = Provider.new(self) @recommendations = Recommendations.new(self) @web_apps = WebApps.new(self) @app_service_environments = AppServiceEnvironments.new(self) @app_service_plans = AppServicePlans.new(self) @resource_health_metadata_operations = ResourceHealthMetadataOperations.new(self) @api_version = '2018-02-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true add_telemetry end
Public Instance Methods
Check if a resource name is available.
Check if a resource name is available.
@param name [String] Resource name to verify. @param type [CheckNameResourceTypes] Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' @param is_fqdn [Boolean] Is fully qualified domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceNameAvailability] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 771 def check_name_availability(name, type, is_fqdn:nil, custom_headers:nil) response = check_name_availability_async(name, type, is_fqdn:is_fqdn, custom_headers:custom_headers).value! response.body unless response.nil? end
Check if a resource name is available.
Check if a resource name is available.
@param name [String] Resource name to verify. @param type [CheckNameResourceTypes] Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' @param is_fqdn [Boolean] Is fully qualified domain name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 812 def check_name_availability_async(name, type, is_fqdn:nil, custom_headers:nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'type is nil' if type.nil? request = ResourceNameAvailabilityRequest.new unless name.nil? && type.nil? && is_fqdn.nil? request.name = name request.type = type request.is_fqdn = is_fqdn end 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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceNameAvailabilityRequest.mapper() request_content = self.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::ResourceNameAvailability.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Check if a resource name is available.
Check if a resource name is available.
@param name [String] Resource name to verify. @param type [CheckNameResourceTypes] Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' @param is_fqdn [Boolean] Is fully qualified domain name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 792 def check_name_availability_with_http_info(name, type, is_fqdn:nil, custom_headers:nil) check_name_availability_async(name, type, is_fqdn:is_fqdn, custom_headers:custom_headers).value! end
Gets publishing user
Gets publishing user
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [User] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 185 def get_publishing_user(custom_headers:nil) response = get_publishing_user_async(custom_headers:custom_headers).value! response.body unless response.nil? end
Gets publishing user
Gets publishing user
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 214 def get_publishing_user_async(custom_headers:nil) fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'providers/Microsoft.Web/publishingUsers/web' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::User.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets publishing user
Gets publishing user
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 200 def get_publishing_user_with_http_info(custom_headers:nil) get_publishing_user_async(custom_headers:custom_headers).value! end
Gets source control token
Gets source control token
@param source_control_type [String] Type of source control @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SourceControl] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 467 def get_source_control(source_control_type, custom_headers:nil) response = get_source_control_async(source_control_type, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets source control token
Gets source control token
@param source_control_type [String] Type of source control @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 498 def get_source_control_async(source_control_type, custom_headers:nil) fail ArgumentError, 'source_control_type is nil' if source_control_type.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'providers/Microsoft.Web/sourcecontrols/{sourceControlType}' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'sourceControlType' => source_control_type}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::SourceControl.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets source control token
Gets source control token
@param source_control_type [String] Type of source control @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 483 def get_source_control_with_http_info(source_control_type, custom_headers:nil) get_source_control_async(source_control_type, custom_headers:custom_headers).value! end
Gets list of available geo regions plus ministamps
Gets list of available geo regions plus ministamps
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DeploymentLocations] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 890 def get_subscription_deployment_locations(custom_headers:nil) response = get_subscription_deployment_locations_async(custom_headers:custom_headers).value! response.body unless response.nil? end
Gets list of available geo regions plus ministamps
Gets list of available geo regions plus ministamps
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 919 def get_subscription_deployment_locations_async(custom_headers:nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::DeploymentLocations.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets list of available geo regions plus ministamps
Gets list of available geo regions plus ministamps
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 905 def get_subscription_deployment_locations_with_http_info(custom_headers:nil) get_subscription_deployment_locations_async(custom_headers:custom_headers).value! end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param billing_location [String] Azure
Location of billable resource @param os_type [String] App Service OS type meters used for @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<BillingMeter>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 669 def list_billing_meters(billing_location:nil, os_type:nil, custom_headers:nil) first_page = list_billing_meters_as_lazy(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers) first_page.get_all_items end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param billing_location [String] Azure
Location of billable resource @param os_type [String] App Service OS type meters used for @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BillingMeterCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2389 def list_billing_meters_as_lazy(billing_location:nil, os_type:nil, custom_headers:nil) first_page = list_billing_meters_as_lazy_async(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers) first_page.get_all_items end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param billing_location [String] Azure
Location of billable resource @param os_type [String] App Service OS type meters used for @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2422 def list_billing_meters_as_lazy_async(billing_location:nil, os_type:nil, custom_headers:nil) request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], query_params: {'billingLocation' => billing_location,'osType' => os_type}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::BillingMeterCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param billing_location [String] Azure
Location of billable resource @param os_type [String] App Service OS type meters used for @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2406 def list_billing_meters_as_lazy_with_http_info(billing_location:nil, os_type:nil, custom_headers:nil) list_billing_meters_as_lazy_async(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers).value! end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param billing_location [String] Azure
Location of billable resource @param os_type [String] App Service OS type meters used for @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 702 def list_billing_meters_async(billing_location:nil, os_type:nil, custom_headers:nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'billingLocation' => billing_location,'osType' => os_type,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::BillingMeterCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [BillingMeterCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1921 def list_billing_meters_next(next_page_link, custom_headers:nil) response = list_billing_meters_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1954 def list_billing_meters_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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'] = accept_language unless accept_language.nil? path_template = '{nextLink}' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::BillingMeterCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1938 def list_billing_meters_next_with_http_info(next_page_link, custom_headers:nil) list_billing_meters_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets a list of meters for a given location.
Gets a list of meters for a given location.
@param billing_location [String] Azure
Location of billable resource @param os_type [String] App Service OS type meters used for @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 686 def list_billing_meters_with_http_info(billing_location:nil, os_type:nil, custom_headers:nil) list_billing_meters_async(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers).value! end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param sku [SkuName] Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' @param linux_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux workers. @param xenon_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Xenon workers. @param linux_dynamic_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux Consumption Workers. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<GeoRegion>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 991 def list_geo_regions(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_workers_enabled:nil, custom_headers:nil) first_page = list_geo_regions_as_lazy(sku:sku, linux_workers_enabled:linux_workers_enabled, xenon_workers_enabled:xenon_workers_enabled, linux_dynamic_workers_enabled:linux_dynamic_workers_enabled, custom_headers:custom_headers) first_page.get_all_items end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param sku [SkuName] Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' @param linux_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux workers. @param xenon_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Xenon workers. @param linux_dynamic_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux Consumption Workers. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [GeoRegionCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2487 def list_geo_regions_as_lazy(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_workers_enabled:nil, custom_headers:nil) first_page = list_geo_regions_as_lazy_async(sku:sku, linux_workers_enabled:linux_workers_enabled, xenon_workers_enabled:xenon_workers_enabled, linux_dynamic_workers_enabled:linux_dynamic_workers_enabled, custom_headers:custom_headers) first_page.get_all_items end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param sku [SkuName] Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' @param linux_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux workers. @param xenon_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Xenon workers. @param linux_dynamic_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux Consumption Workers. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2534 def list_geo_regions_as_lazy_async(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_workers_enabled:nil, custom_headers:nil) request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], query_params: {'sku' => sku,'linuxWorkersEnabled' => linux_workers_enabled,'xenonWorkersEnabled' => xenon_workers_enabled,'linuxDynamicWorkersEnabled' => linux_dynamic_workers_enabled}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::GeoRegionCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param sku [SkuName] Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' @param linux_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux workers. @param xenon_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Xenon workers. @param linux_dynamic_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux Consumption Workers. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2511 def list_geo_regions_as_lazy_with_http_info(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_workers_enabled:nil, custom_headers:nil) list_geo_regions_as_lazy_async(sku:sku, linux_workers_enabled:linux_workers_enabled, xenon_workers_enabled:xenon_workers_enabled, linux_dynamic_workers_enabled:linux_dynamic_workers_enabled, custom_headers:custom_headers).value! end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param sku [SkuName] Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' @param linux_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux workers. @param xenon_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Xenon workers. @param linux_dynamic_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux Consumption Workers. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1038 def list_geo_regions_async(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_workers_enabled:nil, custom_headers:nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'sku' => sku,'linuxWorkersEnabled' => linux_workers_enabled,'xenonWorkersEnabled' => xenon_workers_enabled,'linuxDynamicWorkersEnabled' => linux_dynamic_workers_enabled,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::GeoRegionCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [GeoRegionCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2017 def list_geo_regions_next(next_page_link, custom_headers:nil) response = list_geo_regions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2050 def list_geo_regions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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'] = accept_language unless accept_language.nil? path_template = '{nextLink}' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::GeoRegionCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2034 def list_geo_regions_next_with_http_info(next_page_link, custom_headers:nil) list_geo_regions_next_async(next_page_link, custom_headers:custom_headers).value! end
Get a list of available geographical regions.
Get a list of available geographical regions.
@param sku [SkuName] Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' @param linux_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux workers. @param xenon_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Xenon workers. @param linux_dynamic_workers_enabled [Boolean] Specify true
if you want to filter to only regions that support Linux Consumption Workers. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1015 def list_geo_regions_with_http_info(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_workers_enabled:nil, custom_headers:nil) list_geo_regions_async(sku:sku, linux_workers_enabled:linux_workers_enabled, xenon_workers_enabled:xenon_workers_enabled, linux_dynamic_workers_enabled:linux_dynamic_workers_enabled, custom_headers:custom_headers).value! end
List all premier add-on offers.
List all premier add-on offers.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<PremierAddOnOffer>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1204 def list_premier_add_on_offers(custom_headers:nil) first_page = list_premier_add_on_offers_as_lazy(custom_headers:custom_headers) first_page.get_all_items end
List all premier add-on offers.
List all premier add-on offers.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOnOfferCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2685 def list_premier_add_on_offers_as_lazy(custom_headers:nil) first_page = list_premier_add_on_offers_as_lazy_async(custom_headers:custom_headers) first_page.get_all_items end
List all premier add-on offers.
List all premier add-on offers.
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2714 def list_premier_add_on_offers_as_lazy_async(custom_headers:nil) request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::PremierAddOnOfferCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all premier add-on offers.
List all premier add-on offers.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2700 def list_premier_add_on_offers_as_lazy_with_http_info(custom_headers:nil) list_premier_add_on_offers_as_lazy_async(custom_headers:custom_headers).value! end
List all premier add-on offers.
List all premier add-on offers.
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1233 def list_premier_add_on_offers_async(custom_headers:nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::PremierAddOnOfferCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all premier add-on offers.
List all premier add-on offers.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [PremierAddOnOfferCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2209 def list_premier_add_on_offers_next(next_page_link, custom_headers:nil) response = list_premier_add_on_offers_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all premier add-on offers.
List all premier add-on offers.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2242 def list_premier_add_on_offers_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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'] = accept_language unless accept_language.nil? path_template = '{nextLink}' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::PremierAddOnOfferCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all premier add-on offers.
List all premier add-on offers.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2226 def list_premier_add_on_offers_next_with_http_info(next_page_link, custom_headers:nil) list_premier_add_on_offers_next_async(next_page_link, custom_headers:custom_headers).value! end
List all premier add-on offers.
List all premier add-on offers.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1219 def list_premier_add_on_offers_with_http_info(custom_headers:nil) list_premier_add_on_offers_async(custom_headers:custom_headers).value! end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param name_identifier [NameIdentifier] Hostname information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Identifier>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1102 def list_site_identifiers_assigned_to_host_name(name_identifier, custom_headers:nil) first_page = list_site_identifiers_assigned_to_host_name_as_lazy(name_identifier, custom_headers:custom_headers) first_page.get_all_items end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param name_identifier [NameIdentifier] Hostname information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [IdentifierCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2591 def list_site_identifiers_assigned_to_host_name_as_lazy(name_identifier, custom_headers:nil) first_page = list_site_identifiers_assigned_to_host_name_as_lazy_async(name_identifier, custom_headers:custom_headers) first_page.get_all_items end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param name_identifier [NameIdentifier] Hostname information. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2622 def list_site_identifiers_assigned_to_host_name_as_lazy_async(name_identifier, custom_headers:nil) fail ArgumentError, 'name_identifier is nil' if name_identifier.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::NameIdentifier.mapper() request_content = self.serialize(request_mapper, name_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::IdentifierCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param name_identifier [NameIdentifier] Hostname information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2607 def list_site_identifiers_assigned_to_host_name_as_lazy_with_http_info(name_identifier, custom_headers:nil) list_site_identifiers_assigned_to_host_name_as_lazy_async(name_identifier, custom_headers:custom_headers).value! end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param name_identifier [NameIdentifier] Hostname information. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1133 def list_site_identifiers_assigned_to_host_name_async(name_identifier, custom_headers:nil) fail ArgumentError, 'name_identifier is nil' if name_identifier.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::NameIdentifier.mapper() request_content = self.serialize(request_mapper, name_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::IdentifierCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [IdentifierCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2113 def list_site_identifiers_assigned_to_host_name_next(next_page_link, custom_headers:nil) response = list_site_identifiers_assigned_to_host_name_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2146 def list_site_identifiers_assigned_to_host_name_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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'] = accept_language unless accept_language.nil? path_template = '{nextLink}' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::IdentifierCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2130 def list_site_identifiers_assigned_to_host_name_next_with_http_info(next_page_link, custom_headers:nil) list_site_identifiers_assigned_to_host_name_next_async(next_page_link, custom_headers:custom_headers).value! end
List all apps that are assigned to a hostname.
List all apps that are assigned to a hostname.
@param name_identifier [NameIdentifier] Hostname information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1118 def list_site_identifiers_assigned_to_host_name_with_http_info(name_identifier, custom_headers:nil) list_site_identifiers_assigned_to_host_name_async(name_identifier, custom_headers:custom_headers).value! end
List all SKUs.
List all SKUs.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SkuInfos] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1296 def list_skus(custom_headers:nil) response = list_skus_async(custom_headers:custom_headers).value! response.body unless response.nil? end
List all SKUs.
List all SKUs.
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1325 def list_skus_async(custom_headers:nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/skus' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::SkuInfos.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all SKUs.
List all SKUs.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1311 def list_skus_with_http_info(custom_headers:nil) list_skus_async(custom_headers:custom_headers).value! end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SourceControl>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 376 def list_source_controls(custom_headers:nil) first_page = list_source_controls_as_lazy(custom_headers:custom_headers) first_page.get_all_items end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SourceControlCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2303 def list_source_controls_as_lazy(custom_headers:nil) first_page = list_source_controls_as_lazy_async(custom_headers:custom_headers) first_page.get_all_items end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2332 def list_source_controls_as_lazy_async(custom_headers:nil) request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' path_template = 'providers/Microsoft.Web/sourcecontrols' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::SourceControlCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2318 def list_source_controls_as_lazy_with_http_info(custom_headers:nil) list_source_controls_as_lazy_async(custom_headers:custom_headers).value! end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 405 def list_source_controls_async(custom_headers:nil) fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? path_template = 'providers/Microsoft.Web/sourcecontrols' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::SourceControlCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SourceControlCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1825 def list_source_controls_next(next_page_link, custom_headers:nil) response = list_source_controls_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1858 def list_source_controls_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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'] = accept_language unless accept_language.nil? path_template = '{nextLink}' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::SourceControlCollection.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1842 def list_source_controls_next_with_http_info(next_page_link, custom_headers:nil) list_source_controls_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the source controls available for Azure
websites.
Gets the source controls available for Azure
websites.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 391 def list_source_controls_with_http_info(custom_headers:nil) list_source_controls_async(custom_headers:custom_headers).value! end
Makes a request and returns the body of the response. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [Hash{String=>String}] containing the body of the response. Example:
request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}" path = "/path" options = { body: request_content, query_params: {'api-version' => '2016-02-01'} } result = @client.make_request(:put, path, options)
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 133 def make_request(method, path, options = {}) result = make_request_with_http_info(method, path, options) result.body unless result.nil? end
Makes a request asynchronously. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 158 def make_request_async(method, path, options = {}) fail ArgumentError, 'method is nil' if method.nil? fail ArgumentError, 'path is nil' if path.nil? request_url = options[:base_url] || @base_url if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?) @request_headers['Content-Type'] = options[:headers]['Content-Type'] end request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? options.merge!({headers: request_headers.merge(options[:headers] || {})}) options.merge!({credentials: @credentials}) unless @credentials.nil? super(request_url, method, path, options) end
Makes a request and returns the operation response. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 145 def make_request_with_http_info(method, path, options = {}) result = make_request_async(method, path, options).value! result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) result end
Move resources between resource groups.
Move resources between resource groups.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param move_resource_envelope [CsmMoveResourceEnvelope] Object that represents the resource to move. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1500 def move(resource_group_name, move_resource_envelope, custom_headers:nil) response = move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value! nil end
Move resources between resource groups.
Move resources between resource groups.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param move_resource_envelope [CsmMoveResourceEnvelope] Object that represents the resource to move. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1537 def move_async(resource_group_name, move_resource_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'move_resource_envelope is nil' if move_resource_envelope.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::CsmMoveResourceEnvelope.mapper() request_content = self.serialize(request_mapper, move_resource_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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? result end promise.execute end
Move resources between resource groups.
Move resources between resource groups.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param move_resource_envelope [CsmMoveResourceEnvelope] Object that represents the resource to move. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1519 def move_with_http_info(resource_group_name, move_resource_envelope, custom_headers:nil) move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value! end
Updates publishing user
Updates publishing user
@param user_details [User] Details of publishing user @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [User] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 276 def update_publishing_user(user_details, custom_headers:nil) response = update_publishing_user_async(user_details, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates publishing user
Updates publishing user
@param user_details [User] Details of publishing user @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 307 def update_publishing_user_async(user_details, custom_headers:nil) fail ArgumentError, 'user_details is nil' if user_details.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::User.mapper() request_content = self.serialize(request_mapper, user_details) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.Web/publishingUsers/web' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:put, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::User.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates publishing user
Updates publishing user
@param user_details [User] Details of publishing user @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 292 def update_publishing_user_with_http_info(user_details, custom_headers:nil) update_publishing_user_async(user_details, custom_headers:custom_headers).value! end
Updates source control token
Updates source control token
@param source_control_type [String] Type of source control @param request_message [SourceControl] Source control token information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SourceControl] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 563 def update_source_control(source_control_type, request_message, custom_headers:nil) response = update_source_control_async(source_control_type, request_message, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates source control token
Updates source control token
@param source_control_type [String] Type of source control @param request_message [SourceControl] Source control token information @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 596 def update_source_control_async(source_control_type, request_message, custom_headers:nil) fail ArgumentError, 'source_control_type is nil' if source_control_type.nil? fail ArgumentError, 'request_message is nil' if request_message.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::SourceControl.mapper() request_content = self.serialize(request_mapper, request_message) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.Web/sourcecontrols/{sourceControlType}' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'sourceControlType' => source_control_type}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:put, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::SourceControl.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Updates source control token
Updates source control token
@param source_control_type [String] Type of source control @param request_message [SourceControl] Source control token information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 580 def update_source_control_with_http_info(source_control_type, request_message, custom_headers:nil) update_source_control_async(source_control_type, request_message, custom_headers:custom_headers).value! end
Validate if a resource can be created.
Validate if a resource can be created.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param validate_request [ValidateRequest] Request with the resources to validate. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ValidateResponse] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1606 def validate(resource_group_name, validate_request, custom_headers:nil) response = validate_async(resource_group_name, validate_request, custom_headers:custom_headers).value! response.body unless response.nil? end
Validate if a resource can be created.
Validate if a resource can be created.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param validate_request [ValidateRequest] Request with the resources to validate. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1643 def validate_async(resource_group_name, validate_request, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'validate_request is nil' if validate_request.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ValidateRequest.mapper() request_content = self.serialize(request_mapper, validate_request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::ValidateResponse.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Validate whether a resource can be moved.
Validate whether a resource can be moved.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param move_resource_envelope [CsmMoveResourceEnvelope] Object that represents the resource to move. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1721 def validate_move(resource_group_name, move_resource_envelope, custom_headers:nil) response = validate_move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value! nil end
Validate whether a resource can be moved.
Validate whether a resource can be moved.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param move_resource_envelope [CsmMoveResourceEnvelope] Object that represents the resource to move. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1758 def validate_move_async(resource_group_name, move_resource_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'move_resource_envelope is nil' if move_resource_envelope.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::CsmMoveResourceEnvelope.mapper() request_content = self.serialize(request_mapper, move_resource_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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? result end promise.execute end
Validate whether a resource can be moved.
Validate whether a resource can be moved.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param move_resource_envelope [CsmMoveResourceEnvelope] Object that represents the resource to move. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1740 def validate_move_with_http_info(resource_group_name, move_resource_envelope, custom_headers:nil) validate_move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value! end
Validate if a resource can be created.
Validate if a resource can be created.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param validate_request [ValidateRequest] Request with the resources to validate. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1625 def validate_with_http_info(resource_group_name, validate_request, custom_headers:nil) validate_async(resource_group_name, validate_request, custom_headers:custom_headers).value! end
Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.
Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.
@param parameters [VnetParameters] VNET information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [VnetValidationFailureDetails] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1391 def verify_hosting_environment_vnet(parameters, custom_headers:nil) response = verify_hosting_environment_vnet_async(parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.
Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.
@param parameters [VnetParameters] VNET information @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1426 def verify_hosting_environment_vnet_async(parameters, custom_headers:nil) fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.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'] = accept_language unless accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::VnetParameters.mapper() request_content = self.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:post, path_template, options) 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::Web::Mgmt::V2018_02_01::Models::VnetValidationFailureDetails.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.
Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.
@param parameters [VnetParameters] VNET information @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 1409 def verify_hosting_environment_vnet_with_http_info(parameters, custom_headers:nil) verify_hosting_environment_vnet_async(parameters, custom_headers:custom_headers).value! end
Private Instance Methods
Adds telemetry information.
# File lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb, line 2764 def add_telemetry sdk_information = 'azure_mgmt_web' sdk_information = "#{sdk_information}/0.18.1" add_user_agent_information(sdk_information) end