Class: Azure::ARM::Web::WebSiteManagementClient
- Inherits:
-
MsRestAzure::AzureServiceClient
- Object
- MsRestAzure::AzureServiceClient
- Azure::ARM::Web::WebSiteManagementClient
- Includes:
- MsRestAzure, MsRestAzure::Serialization
- Defined in:
- lib/generated/azure_mgmt_web/web_site_management_client.rb
Overview
A service client - single point of access to the REST API.
Instance Attribute Summary collapse
-
#accept_language ⇒ String
Gets or sets the preferred language for the response.
-
#app_service_certificate_orders ⇒ AppServiceCertificateOrders
readonly
App_service_certificate_orders.
-
#app_service_environments ⇒ AppServiceEnvironments
readonly
App_service_environments.
-
#app_service_plans ⇒ AppServicePlans
readonly
App_service_plans.
-
#base_url ⇒ String
The base URI of the service.
-
#certificates ⇒ Certificates
readonly
Certificates.
-
#credentials ⇒ Object
readonly
Credentials needed for the client to connect to Azure.
-
#deleted_web_apps ⇒ DeletedWebApps
readonly
Deleted_web_apps.
-
#domains ⇒ Domains
readonly
Domains.
-
#generate_client_request_id ⇒ Boolean
is generated and included in each request.
-
#long_running_operation_retry_timeout ⇒ Integer
Running Operations.
-
#provider ⇒ Provider
readonly
Provider.
-
#recommendations ⇒ Recommendations
readonly
Recommendations.
-
#subscription_id ⇒ String
string (e.g. 00000000-0000-0000-0000-000000000000).
-
#top_level_domains ⇒ TopLevelDomains
readonly
Top_level_domains.
-
#web_apps ⇒ WebApps
readonly
Web_apps.
Instance Method Summary collapse
-
#check_name_availability(name, type, is_fqdn = nil, custom_headers = nil) ⇒ ResourceNameAvailability
Check if a resource name is available.
-
#check_name_availability_async(name, type, is_fqdn = nil, custom_headers = nil) ⇒ Concurrent::Promise
Check if a resource name is available.
-
#check_name_availability_with_http_info(name, type, is_fqdn = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Check if a resource name is available.
-
#get_publishing_user(custom_headers = nil) ⇒ User
Gets publishing user.
-
#get_publishing_user_async(custom_headers = nil) ⇒ Concurrent::Promise
Gets publishing user.
-
#get_publishing_user_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets publishing user.
-
#initialize(credentials = nil, base_url = nil, options = nil) ⇒ WebSiteManagementClient
constructor
Creates initializes a new instance of the WebSiteManagementClient class.
-
#list_geo_regions(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ Array<GeoRegion>
Get a list of available geographical regions.
-
#list_geo_regions_as_lazy(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ GeoRegionCollection
Get a list of available geographical regions.
-
#list_geo_regions_as_lazy_async(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ Concurrent::Promise
Get a list of available geographical regions.
-
#list_geo_regions_as_lazy_with_http_info(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get a list of available geographical regions.
-
#list_geo_regions_async(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ Concurrent::Promise
Get a list of available geographical regions.
-
#list_geo_regions_next(next_page_link, custom_headers = nil) ⇒ GeoRegionCollection
Get a list of available geographical regions.
-
#list_geo_regions_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Get a list of available geographical regions.
-
#list_geo_regions_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get a list of available geographical regions.
-
#list_geo_regions_with_http_info(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get a list of available geographical regions.
-
#list_premier_add_on_offers(custom_headers = nil) ⇒ Array<PremierAddOnOffer>
List all premier add-on offers.
-
#list_premier_add_on_offers_as_lazy(custom_headers = nil) ⇒ PremierAddOnOfferCollection
List all premier add-on offers.
-
#list_premier_add_on_offers_as_lazy_async(custom_headers = nil) ⇒ Concurrent::Promise
List all premier add-on offers.
-
#list_premier_add_on_offers_as_lazy_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all premier add-on offers.
-
#list_premier_add_on_offers_async(custom_headers = nil) ⇒ Concurrent::Promise
List all premier add-on offers.
-
#list_premier_add_on_offers_next(next_page_link, custom_headers = nil) ⇒ PremierAddOnOfferCollection
List all premier add-on offers.
-
#list_premier_add_on_offers_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
List all premier add-on offers.
-
#list_premier_add_on_offers_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all premier add-on offers.
-
#list_premier_add_on_offers_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all premier add-on offers.
-
#list_skus(custom_headers = nil) ⇒ SkuInfos
List all SKUs.
-
#list_skus_async(custom_headers = nil) ⇒ Concurrent::Promise
List all SKUs.
-
#list_skus_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all SKUs.
-
#list_source_controls(custom_headers = nil) ⇒ Array<SourceControl>
Gets the source controls available for Azure websites.
-
#list_source_controls_as_lazy(custom_headers = nil) ⇒ SourceControlCollection
Gets the source controls available for Azure websites.
-
#list_source_controls_as_lazy_async(custom_headers = nil) ⇒ Concurrent::Promise
Gets the source controls available for Azure websites.
-
#list_source_controls_as_lazy_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the source controls available for Azure websites.
-
#list_source_controls_async(custom_headers = nil) ⇒ Concurrent::Promise
Gets the source controls available for Azure websites.
-
#list_source_controls_next(next_page_link, custom_headers = nil) ⇒ SourceControlCollection
Gets the source controls available for Azure websites.
-
#list_source_controls_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets the source controls available for Azure websites.
-
#list_source_controls_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the source controls available for Azure websites.
-
#list_source_controls_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the source controls available for Azure websites.
-
#make_request(method, path, options = {}) ⇒ Hash{String=>String}
Makes a request and returns the body of the response.
-
#make_request_async(method, path, options = {}) ⇒ Concurrent::Promise
Makes a request asynchronously.
-
#make_request_with_http_info(method, path, options = {}) ⇒ MsRestAzure::AzureOperationResponse
Makes a request and returns the operation response.
-
#move(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Object
Move resources between resource groups.
-
#move_async(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Move resources between resource groups.
-
#move_with_http_info(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Move resources between resource groups.
-
#update_publishing_user(user_details, custom_headers = nil) ⇒ User
Updates publishing user.
-
#update_publishing_user_async(user_details, custom_headers = nil) ⇒ Concurrent::Promise
Updates publishing user.
-
#update_publishing_user_with_http_info(user_details, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates publishing user.
-
#update_source_control(source_control_type, request_message, custom_headers = nil) ⇒ SourceControl
Updates source control token.
-
#update_source_control_async(source_control_type, request_message, custom_headers = nil) ⇒ Concurrent::Promise
Updates source control token.
-
#update_source_control_with_http_info(source_control_type, request_message, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates source control token.
-
#validate(resource_group_name, validate_request, custom_headers = nil) ⇒ ValidateResponse
Validate if a resource can be created.
-
#validate_async(resource_group_name, validate_request, custom_headers = nil) ⇒ Concurrent::Promise
Validate if a resource can be created.
-
#validate_move(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Object
Validate whether a resource can be moved.
-
#validate_move_async(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Validate whether a resource can be moved.
-
#validate_move_with_http_info(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validate whether a resource can be moved.
-
#validate_with_http_info(resource_group_name, validate_request, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validate if a resource can be created.
Constructor Details
#initialize(credentials = nil, base_url = nil, options = nil) ⇒ WebSiteManagementClient
Creates initializes a new instance of the WebSiteManagementClient class.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 71 def initialize(credentials = nil, base_url = nil, = nil) super(credentials, ) @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) @domains = Domains.new(self) @top_level_domains = TopLevelDomains.new(self) @certificates = Certificates.new(self) @deleted_web_apps = DeletedWebApps.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) @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true add_telemetry end |
Instance Attribute Details
#accept_language ⇒ String
Returns Gets or sets the preferred language for the response.
25 26 27 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 25 def accept_language @accept_language end |
#app_service_certificate_orders ⇒ AppServiceCertificateOrders (readonly)
Returns app_service_certificate_orders.
36 37 38 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 36 def app_service_certificate_orders @app_service_certificate_orders end |
#app_service_environments ⇒ AppServiceEnvironments (readonly)
Returns app_service_environments.
60 61 62 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 60 def app_service_environments @app_service_environments end |
#app_service_plans ⇒ AppServicePlans (readonly)
Returns app_service_plans.
63 64 65 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 63 def app_service_plans @app_service_plans end |
#base_url ⇒ String
Returns the base URI of the service.
15 16 17 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 15 def base_url @base_url end |
#certificates ⇒ Certificates (readonly)
Returns certificates.
45 46 47 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 45 def certificates @certificates end |
#credentials ⇒ Object (readonly)
Returns Credentials needed for the client to connect to Azure.
18 19 20 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 18 def credentials @credentials end |
#deleted_web_apps ⇒ DeletedWebApps (readonly)
Returns deleted_web_apps.
48 49 50 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 48 def deleted_web_apps @deleted_web_apps end |
#domains ⇒ Domains (readonly)
Returns domains.
39 40 41 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 39 def domains @domains end |
#generate_client_request_id ⇒ Boolean
is generated and included in each request. Default is true.
33 34 35 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 33 def generate_client_request_id @generate_client_request_id end |
#long_running_operation_retry_timeout ⇒ Integer
Running Operations. Default value is 30.
29 30 31 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 29 def long_running_operation_retry_timeout @long_running_operation_retry_timeout end |
#provider ⇒ Provider (readonly)
Returns provider.
51 52 53 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 51 def provider @provider end |
#recommendations ⇒ Recommendations (readonly)
Returns recommendations.
54 55 56 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 54 def recommendations @recommendations end |
#subscription_id ⇒ String
string (e.g. 00000000-0000-0000-0000-000000000000).
22 23 24 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 22 def subscription_id @subscription_id end |
#top_level_domains ⇒ TopLevelDomains (readonly)
Returns top_level_domains.
42 43 44 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 42 def top_level_domains @top_level_domains end |
#web_apps ⇒ WebApps (readonly)
Returns web_apps.
57 58 59 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 57 def web_apps @web_apps end |
Instance Method Details
#check_name_availability(name, type, is_fqdn = nil, custom_headers = nil) ⇒ ResourceNameAvailability
Check if a resource name is available.
Check if a resource name is available.
Possible values include: ‘Site’, ‘Slot’, ‘HostingEnvironment’ will be added to the HTTP request.
542 543 544 545 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 542 def check_name_availability(name, type, is_fqdn = nil, custom_headers = nil) response = check_name_availability_async(name, type, is_fqdn, custom_headers).value! response.body unless response.nil? end |
#check_name_availability_async(name, type, is_fqdn = nil, custom_headers = nil) ⇒ Concurrent::Promise
Check if a resource name is available.
Check if a resource name is available.
Possible values include: ‘Site’, ‘Slot’, ‘HostingEnvironment’ to the HTTP request.
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 579 def check_name_availability_async(name, type, is_fqdn = nil, custom_headers = nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? api_version = '2016-03-01' 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 = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Web::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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#check_name_availability_with_http_info(name, type, is_fqdn = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Check if a resource name is available.
Check if a resource name is available.
Possible values include: ‘Site’, ‘Slot’, ‘HostingEnvironment’ will be added to the HTTP request.
561 562 563 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 561 def check_name_availability_with_http_info(name, type, is_fqdn = nil, custom_headers = nil) check_name_availability_async(name, type, is_fqdn, custom_headers).value! end |
#get_publishing_user(custom_headers = nil) ⇒ User
Gets publishing user
Gets publishing user
will be added to the HTTP request.
159 160 161 162 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 159 def get_publishing_user(custom_headers = nil) response = get_publishing_user_async(custom_headers).value! response.body unless response.nil? end |
#get_publishing_user_async(custom_headers = nil) ⇒ Concurrent::Promise
Gets publishing user
Gets publishing user
to the HTTP request.
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 188 def get_publishing_user_async(custom_headers = nil) api_version = '2016-03-01' request_headers = {} # 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#get_publishing_user_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets publishing user
Gets publishing user
will be added to the HTTP request.
174 175 176 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 174 def get_publishing_user_with_http_info(custom_headers = nil) get_publishing_user_async(custom_headers).value! end |
#list_geo_regions(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ Array<GeoRegion>
Get a list of available geographical regions.
Get a list of available geographical regions.
include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.
661 662 663 664 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 661 def list_geo_regions(sku = nil, linux_workers_enabled = nil, custom_headers = nil) first_page = list_geo_regions_as_lazy(sku, linux_workers_enabled, custom_headers) first_page.get_all_items end |
#list_geo_regions_as_lazy(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ GeoRegionCollection
Get a list of available geographical regions.
Get a list of available geographical regions.
include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.
1619 1620 1621 1622 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1619 def list_geo_regions_as_lazy(sku = nil, linux_workers_enabled = nil, custom_headers = nil) first_page = list_geo_regions_as_lazy_as_lazy(sku, linux_workers_enabled, custom_headers) first_page.get_all_items end |
#list_geo_regions_as_lazy_async(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ Concurrent::Promise
Get a list of available geographical regions.
Get a list of available geographical regions.
include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. to the HTTP request.
1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1658 def list_geo_regions_as_lazy_async(sku = nil, linux_workers_enabled = nil, custom_headers = nil) api_version = '2016-03-01' request_headers = {} path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions' request_url = @base_url || self.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], query_params: {'sku' => sku,'linuxWorkersEnabled' => linux_workers_enabled,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_geo_regions_as_lazy_with_http_info(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get a list of available geographical regions.
Get a list of available geographical regions.
include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.
1639 1640 1641 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1639 def list_geo_regions_as_lazy_with_http_info(sku = nil, linux_workers_enabled = nil, custom_headers = nil) list_geo_regions_as_lazy_async(sku, linux_workers_enabled, custom_headers).value! end |
#list_geo_regions_async(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ Concurrent::Promise
Get a list of available geographical regions.
Get a list of available geographical regions.
include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. to the HTTP request.
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 700 def list_geo_regions_async(sku = nil, linux_workers_enabled = nil, custom_headers = nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? api_version = '2016-03-01' request_headers = {} # 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 = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => subscription_id}, query_params: {'sku' => sku,'linuxWorkersEnabled' => linux_workers_enabled,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = self.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_geo_regions_next(next_page_link, custom_headers = nil) ⇒ GeoRegionCollection
Get a list of available geographical regions.
Get a list of available geographical regions.
to List operation. will be added to the HTTP request.
1347 1348 1349 1350 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1347 def list_geo_regions_next(next_page_link, custom_headers = nil) response = list_geo_regions_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end |
#list_geo_regions_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Get a list of available geographical regions.
Get a list of available geographical regions.
to List operation. to the HTTP request.
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1380 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 = {} # 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_geo_regions_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get a list of available geographical regions.
Get a list of available geographical regions.
to List operation. will be added to the HTTP request.
1364 1365 1366 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1364 def list_geo_regions_next_with_http_info(next_page_link, custom_headers = nil) list_geo_regions_next_async(next_page_link, custom_headers).value! end |
#list_geo_regions_with_http_info(sku = nil, linux_workers_enabled = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get a list of available geographical regions.
Get a list of available geographical regions.
include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.
681 682 683 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 681 def list_geo_regions_with_http_info(sku = nil, linux_workers_enabled = nil, custom_headers = nil) list_geo_regions_async(sku, linux_workers_enabled, custom_headers).value! end |
#list_premier_add_on_offers(custom_headers = nil) ⇒ Array<PremierAddOnOffer>
List all premier add-on offers.
List all premier add-on offers.
will be added to the HTTP request.
760 761 762 763 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 760 def list_premier_add_on_offers(custom_headers = nil) first_page = list_premier_add_on_offers_as_lazy(custom_headers) first_page.get_all_items end |
#list_premier_add_on_offers_as_lazy(custom_headers = nil) ⇒ PremierAddOnOfferCollection
List all premier add-on offers.
List all premier add-on offers.
will be added to the HTTP request.
1712 1713 1714 1715 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1712 def list_premier_add_on_offers_as_lazy(custom_headers = nil) first_page = list_premier_add_on_offers_as_lazy_as_lazy(custom_headers) first_page.get_all_items end |
#list_premier_add_on_offers_as_lazy_async(custom_headers = nil) ⇒ Concurrent::Promise
List all premier add-on offers.
List all premier add-on offers.
to the HTTP request.
1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1741 def list_premier_add_on_offers_as_lazy_async(custom_headers = nil) api_version = '2016-03-01' request_headers = {} path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers' request_url = @base_url || self.base_url = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_premier_add_on_offers_as_lazy_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all premier add-on offers.
List all premier add-on offers.
will be added to the HTTP request.
1727 1728 1729 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1727 def list_premier_add_on_offers_as_lazy_with_http_info(custom_headers = nil) list_premier_add_on_offers_as_lazy_async(custom_headers).value! end |
#list_premier_add_on_offers_async(custom_headers = nil) ⇒ Concurrent::Promise
List all premier add-on offers.
List all premier add-on offers.
to the HTTP request.
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 789 def list_premier_add_on_offers_async(custom_headers = nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? api_version = '2016-03-01' request_headers = {} # 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_premier_add_on_offers_next(next_page_link, custom_headers = nil) ⇒ PremierAddOnOfferCollection
List all premier add-on offers.
List all premier add-on offers.
to List operation. will be added to the HTTP request.
1440 1441 1442 1443 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1440 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).value! response.body unless response.nil? end |
#list_premier_add_on_offers_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
List all premier add-on offers.
List all premier add-on offers.
to List operation. to the HTTP request.
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1473 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 = {} # 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_premier_add_on_offers_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all premier add-on offers.
List all premier add-on offers.
to List operation. will be added to the HTTP request.
1457 1458 1459 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1457 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).value! end |
#list_premier_add_on_offers_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all premier add-on offers.
List all premier add-on offers.
will be added to the HTTP request.
775 776 777 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 775 def list_premier_add_on_offers_with_http_info(custom_headers = nil) list_premier_add_on_offers_async(custom_headers).value! end |
#list_skus(custom_headers = nil) ⇒ SkuInfos
List all SKUs.
List all SKUs.
will be added to the HTTP request.
849 850 851 852 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 849 def list_skus(custom_headers = nil) response = list_skus_async(custom_headers).value! response.body unless response.nil? end |
#list_skus_async(custom_headers = nil) ⇒ Concurrent::Promise
List all SKUs.
List all SKUs.
to the HTTP request.
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 878 def list_skus_async(custom_headers = nil) fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? api_version = '2016-03-01' request_headers = {} # 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_skus_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List all SKUs.
List all SKUs.
will be added to the HTTP request.
864 865 866 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 864 def list_skus_with_http_info(custom_headers = nil) list_skus_async(custom_headers).value! end |
#list_source_controls(custom_headers = nil) ⇒ Array<SourceControl>
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
will be added to the HTTP request.
346 347 348 349 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 346 def list_source_controls(custom_headers = nil) first_page = list_source_controls_as_lazy(custom_headers) first_page.get_all_items end |
#list_source_controls_as_lazy(custom_headers = nil) ⇒ SourceControlCollection
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
will be added to the HTTP request.
1531 1532 1533 1534 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1531 def list_source_controls_as_lazy(custom_headers = nil) first_page = list_source_controls_as_lazy_as_lazy(custom_headers) first_page.get_all_items end |
#list_source_controls_as_lazy_async(custom_headers = nil) ⇒ Concurrent::Promise
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
to the HTTP request.
1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1560 def list_source_controls_as_lazy_async(custom_headers = nil) api_version = '2016-03-01' request_headers = {} path_template = 'providers/Microsoft.Web/sourcecontrols' request_url = @base_url || self.base_url = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_source_controls_as_lazy_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
will be added to the HTTP request.
1546 1547 1548 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1546 def list_source_controls_as_lazy_with_http_info(custom_headers = nil) list_source_controls_as_lazy_async(custom_headers).value! end |
#list_source_controls_async(custom_headers = nil) ⇒ Concurrent::Promise
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
to the HTTP request.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 375 def list_source_controls_async(custom_headers = nil) api_version = '2016-03-01' request_headers = {} # 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_source_controls_next(next_page_link, custom_headers = nil) ⇒ SourceControlCollection
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
to List operation. will be added to the HTTP request.
1254 1255 1256 1257 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1254 def list_source_controls_next(next_page_link, custom_headers = nil) response = list_source_controls_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end |
#list_source_controls_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
to List operation. to the HTTP request.
1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1287 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 = {} # 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#list_source_controls_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
to List operation. will be added to the HTTP request.
1271 1272 1273 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1271 def list_source_controls_next_with_http_info(next_page_link, custom_headers = nil) list_source_controls_next_async(next_page_link, custom_headers).value! end |
#list_source_controls_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the source controls available for Azure websites.
Gets the source controls available for Azure websites.
will be added to the HTTP request.
361 362 363 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 361 def list_source_controls_with_http_info(custom_headers = nil) list_source_controls_async(custom_headers).value! end |
#make_request(method, path, options = {}) ⇒ Hash{String=>String}
Makes a request and returns the body of the response. Example:
request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
path = "/path"
= {
body: request_content,
query_params: {'api-version' => '2016-02-01'}
}
result = @client.make_request(:put, path, )
110 111 112 113 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 110 def make_request(method, path, = {}) result = make_request_with_http_info(method, path, ) result.body unless result.nil? end |
#make_request_async(method, path, options = {}) ⇒ Concurrent::Promise
Makes a request asynchronously.
135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 135 def make_request_async(method, path, = {}) fail ArgumentError, 'method is nil' if method.nil? fail ArgumentError, 'path is nil' if path.nil? request_url = [:base_url] || @base_url request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? .merge!({headers: request_headers.merge([:headers] || {})}) .merge!({credentials: @credentials}) unless @credentials.nil? super(request_url, method, path, ) end |
#make_request_with_http_info(method, path, options = {}) ⇒ MsRestAzure::AzureOperationResponse
Makes a request and returns the operation response.
122 123 124 125 126 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 122 def make_request_with_http_info(method, path, = {}) result = make_request_async(method, path, ).value! result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) result end |
#move(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Object
Move resources between resource groups.
Move resources between resource groups.
resource belongs. represents the resource to move. will be added to the HTTP request.
941 942 943 944 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 941 def move(resource_group_name, move_resource_envelope, custom_headers = nil) response = move_async(resource_group_name, move_resource_envelope, custom_headers).value! nil end |
#move_async(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Move resources between resource groups.
Move resources between resource groups.
resource belongs. represents the resource to move. to the HTTP request.
978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 978 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, 'move_resource_envelope is nil' if move_resource_envelope.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? api_version = '2016-03-01' request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Web::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 = { 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, ) 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 end promise.execute end |
#move_with_http_info(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Move resources between resource groups.
Move resources between resource groups.
resource belongs. represents the resource to move. will be added to the HTTP request.
960 961 962 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 960 def move_with_http_info(resource_group_name, move_resource_envelope, custom_headers = nil) move_async(resource_group_name, move_resource_envelope, custom_headers).value! end |
#update_publishing_user(user_details, custom_headers = nil) ⇒ User
Updates publishing user
Updates publishing user
will be added to the HTTP request.
247 248 249 250 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 247 def update_publishing_user(user_details, custom_headers = nil) response = update_publishing_user_async(user_details, custom_headers).value! response.body unless response.nil? end |
#update_publishing_user_async(user_details, custom_headers = nil) ⇒ Concurrent::Promise
Updates publishing user
Updates publishing user
to the HTTP request.
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 278 def update_publishing_user_async(user_details, custom_headers = nil) fail ArgumentError, 'user_details is nil' if user_details.nil? api_version = '2016-03-01' request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Web::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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#update_publishing_user_with_http_info(user_details, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates publishing user
Updates publishing user
will be added to the HTTP request.
263 264 265 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 263 def update_publishing_user_with_http_info(user_details, custom_headers = nil) update_publishing_user_async(user_details, custom_headers).value! end |
#update_source_control(source_control_type, request_message, custom_headers = nil) ⇒ SourceControl
Updates source control token
Updates source control token
will be added to the HTTP request.
435 436 437 438 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 435 def update_source_control(source_control_type, , custom_headers = nil) response = update_source_control_async(source_control_type, , custom_headers).value! response.body unless response.nil? end |
#update_source_control_async(source_control_type, request_message, custom_headers = nil) ⇒ Concurrent::Promise
Updates source control token
Updates source control token
to the HTTP request.
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 468 def update_source_control_async(source_control_type, , custom_headers = nil) fail ArgumentError, 'source_control_type is nil' if source_control_type.nil? fail ArgumentError, 'request_message is nil' if .nil? api_version = '2016-03-01' request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Web::Models::SourceControl.mapper() request_content = self.serialize(request_mapper, ) 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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#update_source_control_with_http_info(source_control_type, request_message, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates source control token
Updates source control token
will be added to the HTTP request.
452 453 454 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 452 def update_source_control_with_http_info(source_control_type, , custom_headers = nil) update_source_control_async(source_control_type, , custom_headers).value! end |
#validate(resource_group_name, validate_request, custom_headers = nil) ⇒ ValidateResponse
Validate if a resource can be created.
Validate if a resource can be created.
resource belongs. validate. will be added to the HTTP request.
1043 1044 1045 1046 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1043 def validate(resource_group_name, validate_request, custom_headers = nil) response = validate_async(resource_group_name, validate_request, custom_headers).value! response.body unless response.nil? end |
#validate_async(resource_group_name, validate_request, custom_headers = nil) ⇒ Concurrent::Promise
Validate if a resource can be created.
Validate if a resource can be created.
resource belongs. validate. to the HTTP request.
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1080 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, 'validate_request is nil' if validate_request.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? api_version = '2016-03-01' request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Web::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 = { 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, ) 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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Web::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., e.backtrace, result) end end result end promise.execute end |
#validate_move(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Object
Validate whether a resource can be moved.
Validate whether a resource can be moved.
resource belongs. represents the resource to move. will be added to the HTTP request.
1154 1155 1156 1157 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1154 def validate_move(resource_group_name, move_resource_envelope, custom_headers = nil) response = validate_move_async(resource_group_name, move_resource_envelope, custom_headers).value! nil end |
#validate_move_async(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Validate whether a resource can be moved.
Validate whether a resource can be moved.
resource belongs. represents the resource to move. to the HTTP request.
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1191 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, 'move_resource_envelope is nil' if move_resource_envelope.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? api_version = '2016-03-01' request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Web::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 = { 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, ) 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 end promise.execute end |
#validate_move_with_http_info(resource_group_name, move_resource_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validate whether a resource can be moved.
Validate whether a resource can be moved.
resource belongs. represents the resource to move. will be added to the HTTP request.
1173 1174 1175 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1173 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).value! end |
#validate_with_http_info(resource_group_name, validate_request, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validate if a resource can be created.
Validate if a resource can be created.
resource belongs. validate. will be added to the HTTP request.
1062 1063 1064 |
# File 'lib/generated/azure_mgmt_web/web_site_management_client.rb', line 1062 def validate_with_http_info(resource_group_name, validate_request, custom_headers = nil) validate_async(resource_group_name, validate_request, custom_headers).value! end |