class Azure::Web::Mgmt::V2020_09_01::StaticSites
WebSite Management Client
Attributes
@return [WebSiteManagementClient] reference to the WebSiteManagementClient
Private Class Methods
Creates and initializes a new instance of the StaticSites
class. @param client service class for accessing basic functionality.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Creates a new static site in an existing resource group, or updates an existing static site.
Description for Creates a new static site in an existing resource group, or updates an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to create or update. @param static_site_envelope [StaticSiteARMResource] A JSON representation of the staticsite properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteARMResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 454 def create_or_update_static_site(resource_group_name, name, static_site_envelope, custom_headers:nil) response = create_or_update_static_site_async(resource_group_name, name, static_site_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new static site in an existing resource group, or updates an existing static site.
Description for Creates a new static site in an existing resource group, or updates an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to create or update. @param static_site_envelope [StaticSiteARMResource] A JSON representation of the staticsite properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 497 def create_or_update_static_site_async(resource_group_name, name, static_site_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, 'name is nil' if name.nil? fail ArgumentError, 'static_site_envelope is nil' if static_site_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSiteARMResource.mapper() request_content = @client.serialize(request_mapper, static_site_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(: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 || status_code == 202 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::V2020_09_01::Models::StaticSiteARMResource.mapper() result.body = @client.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 # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSiteARMResource.mapper() result.body = @client.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
Creates or updates the function app settings of a static site build.
Description for Creates or updates the function app settings of a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param app_settings [StringDictionary] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1476 def create_or_update_static_site_build_function_app_settings(resource_group_name, name, pr_id, app_settings, custom_headers:nil) response = create_or_update_static_site_build_function_app_settings_async(resource_group_name, name, pr_id, app_settings, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates or updates the function app settings of a static site build.
Description for Creates or updates the function app settings of a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param app_settings [StringDictionary] @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1517 def create_or_update_static_site_build_function_app_settings_async(resource_group_name, name, pr_id, app_settings, 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, 'name is nil' if name.nil? fail ArgumentError, 'pr_id is nil' if pr_id.nil? fail ArgumentError, 'app_settings is nil' if app_settings.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StringDictionary.mapper() request_content = @client.serialize(request_mapper, app_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'prId' => pr_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(: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 || status_code == 202 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::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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 # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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
Creates or updates the function app settings of a static site build.
Description for Creates or updates the function app settings of a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param app_settings [StringDictionary] @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1497 def create_or_update_static_site_build_function_app_settings_with_http_info(resource_group_name, name, pr_id, app_settings, custom_headers:nil) create_or_update_static_site_build_function_app_settings_async(resource_group_name, name, pr_id, app_settings, custom_headers:custom_headers).value! end
Creates a new static site custom domain in an existing resource group and static site.
Description for Creates a new static site custom domain in an existing resource group and static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain to create. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteCustomDomainOverviewARMResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2199 def create_or_update_static_site_custom_domain(resource_group_name, name, domain_name, custom_headers:nil) response = create_or_update_static_site_custom_domain_async(resource_group_name, name, domain_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new static site custom domain in an existing resource group and static site.
Description for Creates a new static site custom domain in an existing resource group and static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain to create. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2240 def create_or_update_static_site_custom_domain_async(resource_group_name, name, domain_name, 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, 'name is nil' if name.nil? fail ArgumentError, 'domain_name is nil' if domain_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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 || status_code == 202 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::V2020_09_01::Models::StaticSiteCustomDomainOverviewARMResource.mapper() result.body = @client.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 # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSiteCustomDomainOverviewARMResource.mapper() result.body = @client.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
Creates a new static site custom domain in an existing resource group and static site.
Description for Creates a new static site custom domain in an existing resource group and static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain to create. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2220 def create_or_update_static_site_custom_domain_with_http_info(resource_group_name, name, domain_name, custom_headers:nil) create_or_update_static_site_custom_domain_async(resource_group_name, name, domain_name, custom_headers:custom_headers).value! end
Creates or updates the function app settings of a static site.
Description for Creates or updates the function app settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param app_settings [StringDictionary] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1839 def create_or_update_static_site_function_app_settings(resource_group_name, name, app_settings, custom_headers:nil) response = create_or_update_static_site_function_app_settings_async(resource_group_name, name, app_settings, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates or updates the function app settings of a static site.
Description for Creates or updates the function app settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param app_settings [StringDictionary] @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1878 def create_or_update_static_site_function_app_settings_async(resource_group_name, name, app_settings, 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, 'name is nil' if name.nil? fail ArgumentError, 'app_settings is nil' if app_settings.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StringDictionary.mapper() request_content = @client.serialize(request_mapper, app_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(: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 || status_code == 202 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::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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 # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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
Creates or updates the function app settings of a static site.
Description for Creates or updates the function app settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param app_settings [StringDictionary] @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1859 def create_or_update_static_site_function_app_settings_with_http_info(resource_group_name, name, app_settings, custom_headers:nil) create_or_update_static_site_function_app_settings_async(resource_group_name, name, app_settings, custom_headers:custom_headers).value! end
Creates a new static site in an existing resource group, or updates an existing static site.
Description for Creates a new static site in an existing resource group, or updates an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to create or update. @param static_site_envelope [StaticSiteARMResource] A JSON representation of the staticsite properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 476 def create_or_update_static_site_with_http_info(resource_group_name, name, static_site_envelope, custom_headers:nil) create_or_update_static_site_async(resource_group_name, name, static_site_envelope, custom_headers:custom_headers).value! end
Creates an invitation link for a user with the role
Description for Creates an invitation link for a user with the role
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param static_site_user_roles_invitation_envelope
- StaticSiteUserInvitationRequestResource
-
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteUserInvitationResponseResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1969 def create_user_roles_invitation_link(resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers:nil) response = create_user_roles_invitation_link_async(resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates an invitation link for a user with the role
Description for Creates an invitation link for a user with the role
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param static_site_user_roles_invitation_envelope
- StaticSiteUserInvitationRequestResource
-
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2008 def create_user_roles_invitation_link_async(resource_group_name, name, static_site_user_roles_invitation_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, 'name is nil' if name.nil? fail ArgumentError, 'static_site_user_roles_invitation_envelope is nil' if static_site_user_roles_invitation_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSiteUserInvitationRequestResource.mapper() request_content = @client.serialize(request_mapper, static_site_user_roles_invitation_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, 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::V2020_09_01::Models::StaticSiteUserInvitationResponseResource.mapper() result.body = @client.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
Creates an invitation link for a user with the role
Description for Creates an invitation link for a user with the role
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param static_site_user_roles_invitation_envelope
- StaticSiteUserInvitationRequestResource
-
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1989 def create_user_roles_invitation_link_with_http_info(resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers:nil) create_user_roles_invitation_link_async(resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers:custom_headers).value! end
Deletes a static site.
Description for Deletes a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to delete. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 585 def delete_static_site(resource_group_name, name, custom_headers:nil) response = delete_static_site_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Deletes a static site.
Description for Deletes a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to delete. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 620 def delete_static_site_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, 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 || status_code == 202 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? result end promise.execute end
Deletes a static site build.
Description for Deletes a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1374 def delete_static_site_build(resource_group_name, name, pr_id, custom_headers:nil) response = delete_static_site_build_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! nil end
Deletes a static site build.
Description for Deletes a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1411 def delete_static_site_build_async(resource_group_name, name, pr_id, 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, 'name is nil' if name.nil? fail ArgumentError, 'pr_id is nil' if pr_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'prId' => pr_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, 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 || status_code == 202 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? result end promise.execute end
Deletes a static site build.
Description for Deletes a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1393 def delete_static_site_build_with_http_info(resource_group_name, name, pr_id, custom_headers:nil) delete_static_site_build_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! end
Deletes a custom domain.
Description for Deletes a custom domain.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain to delete. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2322 def delete_static_site_custom_domain(resource_group_name, name, domain_name, custom_headers:nil) response = delete_static_site_custom_domain_async(resource_group_name, name, domain_name, custom_headers:custom_headers).value! nil end
Deletes a custom domain.
Description for Deletes a custom domain.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain to delete. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2359 def delete_static_site_custom_domain_async(resource_group_name, name, domain_name, 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, 'name is nil' if name.nil? fail ArgumentError, 'domain_name is nil' if domain_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, 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 || status_code == 202 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? result end promise.execute end
Deletes a custom domain.
Description for Deletes a custom domain.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain to delete. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2341 def delete_static_site_custom_domain_with_http_info(resource_group_name, name, domain_name, custom_headers:nil) delete_static_site_custom_domain_async(resource_group_name, name, domain_name, custom_headers:custom_headers).value! end
Deletes the user entry from the static site.
Description for Deletes the user entry from the static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the staticsite. @param authprovider [String] The auth provider for this user. @param userid [String] The user id of the user. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 928 def delete_static_site_user(resource_group_name, name, authprovider, userid, custom_headers:nil) response = delete_static_site_user_async(resource_group_name, name, authprovider, userid, custom_headers:custom_headers).value! nil end
Deletes the user entry from the static site.
Description for Deletes the user entry from the static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the staticsite. @param authprovider [String] The auth provider for this user. @param userid [String] The user id of the 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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 967 def delete_static_site_user_async(resource_group_name, name, authprovider, userid, 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, 'name is nil' if name.nil? fail ArgumentError, 'authprovider is nil' if authprovider.nil? fail ArgumentError, 'userid is nil' if userid.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'authprovider' => authprovider,'userid' => userid,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, 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? result end promise.execute end
Deletes the user entry from the static site.
Description for Deletes the user entry from the static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the staticsite. @param authprovider [String] The auth provider for this user. @param userid [String] The user id of the 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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 948 def delete_static_site_user_with_http_info(resource_group_name, name, authprovider, userid, custom_headers:nil) delete_static_site_user_async(resource_group_name, name, authprovider, userid, custom_headers:custom_headers).value! end
Deletes a static site.
Description for Deletes a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to delete. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 603 def delete_static_site_with_http_info(resource_group_name, name, custom_headers:nil) delete_static_site_async(resource_group_name, name, custom_headers:custom_headers).value! end
Detaches a static site.
Description for Detaches a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to detach. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2522 def detach_static_site(resource_group_name, name, custom_headers:nil) response = detach_static_site_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Detaches a static site.
Description for Detaches a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to detach. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2557 def detach_static_site_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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 || status_code == 202 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? result end promise.execute end
Detaches a static site.
Description for Detaches a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to detach. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2540 def detach_static_site_with_http_info(resource_group_name, name, custom_headers:nil) detach_static_site_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the details of a static site.
Description for Gets the details of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteARMResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 344 def get_static_site(resource_group_name, name, custom_headers:nil) response = get_static_site_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the details of a static site.
Description for Gets the details of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 379 def get_static_site_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteARMResource.mapper() result.body = @client.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 details of a static site build.
Description for Gets the details of a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteBuildARMResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1265 def get_static_site_build(resource_group_name, name, pr_id, custom_headers:nil) response = get_static_site_build_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the details of a static site build.
Description for Gets the details of a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1302 def get_static_site_build_async(resource_group_name, name, pr_id, 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, 'name is nil' if name.nil? fail ArgumentError, 'pr_id is nil' if pr_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'prId' => pr_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteBuildARMResource.mapper() result.body = @client.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 details of a static site build.
Description for Gets the details of a static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1284 def get_static_site_build_with_http_info(resource_group_name, name, pr_id, custom_headers:nil) get_static_site_build_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! end
Gets all static site builds for a particular static site.
Description for Gets all static site builds for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StaticSiteBuildARMResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1158 def get_static_site_builds(resource_group_name, name, custom_headers:nil) first_page = get_static_site_builds_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets all static site builds for a particular static site.
Description for Gets all static site builds for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteBuildCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3800 def get_static_site_builds_as_lazy(resource_group_name, name, custom_headers:nil) response = get_static_site_builds_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| get_static_site_builds_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all static site builds for a particular static site.
Description for Gets all static site builds for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1193 def get_static_site_builds_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteBuildCollection.mapper() result.body = @client.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 all static site builds for a particular static site.
Description for Gets all static site builds for a particular static site.
@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 [StaticSiteBuildCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3339 def get_static_site_builds_next(next_page_link, custom_headers:nil) response = get_static_site_builds_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all static site builds for a particular static site.
Description for Gets all static site builds for a particular static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3372 def get_static_site_builds_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'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.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 = @client.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::V2020_09_01::Models::StaticSiteBuildCollection.mapper() result.body = @client.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 all static site builds for a particular static site.
Description for Gets all static site builds for a particular static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3356 def get_static_site_builds_next_with_http_info(next_page_link, custom_headers:nil) get_static_site_builds_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all static site builds for a particular static site.
Description for Gets all static site builds for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1176 def get_static_site_builds_with_http_info(resource_group_name, name, custom_headers:nil) get_static_site_builds_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the details of a static site.
Description for Gets the details of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 362 def get_static_site_with_http_info(resource_group_name, name, custom_headers:nil) get_static_site_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets all static sites in the specified resource group.
Description for Gets all static sites in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StaticSiteARMResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 241 def get_static_sites_by_resource_group(resource_group_name, custom_headers:nil) first_page = get_static_sites_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers) first_page.get_all_items end
Gets all static sites in the specified resource group.
Description for Gets all static sites in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3749 def get_static_sites_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) response = get_static_sites_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| get_static_sites_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all static sites in the specified resource group.
Description for Gets all static sites in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 274 def get_static_sites_by_resource_group_async(resource_group_name, 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, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteCollection.mapper() result.body = @client.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 all static sites in the specified resource group.
Description for Gets all static sites in the specified resource group.
@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 [StaticSiteCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3147 def get_static_sites_by_resource_group_next(next_page_link, custom_headers:nil) response = get_static_sites_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all static sites in the specified resource group.
Description for Gets all static sites in the specified resource group.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3180 def get_static_sites_by_resource_group_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'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.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 = @client.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::V2020_09_01::Models::StaticSiteCollection.mapper() result.body = @client.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 all static sites in the specified resource group.
Description for Gets all static sites in the specified resource group.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3164 def get_static_sites_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) get_static_sites_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all static sites in the specified resource group.
Description for Gets all static sites in the specified resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 258 def get_static_sites_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) get_static_sites_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! end
Get all Static Sites for a subscription.
Description for Get all Static Sites for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StaticSiteARMResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 147 def list(custom_headers:nil) first_page = list_as_lazy(custom_headers:custom_headers) first_page.get_all_items end
Get all Static Sites for a subscription.
Description for Get all Static Sites for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3725 def list_as_lazy(custom_headers:nil) response = list_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all Static Sites for a subscription.
Description for Get all Static Sites for a subscription.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 176 def list_async(custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteCollection.mapper() result.body = @client.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 all Static Sites for a subscription.
Description for Get all Static Sites for a subscription.
@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 [StaticSiteCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3051 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all Static Sites for a subscription.
Description for Get all Static Sites for a subscription.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3084 def list_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'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.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 = @client.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::V2020_09_01::Models::StaticSiteCollection.mapper() result.body = @client.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 all Static Sites for a subscription.
Description for Get all Static Sites for a subscription.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3068 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the application settings of a static site.
Description for Gets the application settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1718 def list_static_site_build_function_app_settings(resource_group_name, name, pr_id, custom_headers:nil) response = list_static_site_build_function_app_settings_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the application settings of a static site.
Description for Gets the application settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1755 def list_static_site_build_function_app_settings_async(resource_group_name, name, pr_id, 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, 'name is nil' if name.nil? fail ArgumentError, 'pr_id is nil' if pr_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'prId' => pr_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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 || status_code == 202 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::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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 # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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 application settings of a static site.
Description for Gets the application settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1737 def list_static_site_build_function_app_settings_with_http_info(resource_group_name, name, pr_id, custom_headers:nil) list_static_site_build_function_app_settings_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! end
Gets the functions of a particular static site build.
Description for Gets the functions of a particular static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StaticSiteFunctionOverviewARMResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1608 def list_static_site_build_functions(resource_group_name, name, pr_id, custom_headers:nil) first_page = list_static_site_build_functions_as_lazy(resource_group_name, name, pr_id, custom_headers:custom_headers) first_page.get_all_items end
Gets the functions of a particular static site build.
Description for Gets the functions of a particular static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteFunctionOverviewCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3826 def list_static_site_build_functions_as_lazy(resource_group_name, name, pr_id, custom_headers:nil) response = list_static_site_build_functions_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_static_site_build_functions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets the functions of a particular static site build.
Description for Gets the functions of a particular static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1645 def list_static_site_build_functions_async(resource_group_name, name, pr_id, 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, 'name is nil' if name.nil? fail ArgumentError, 'pr_id is nil' if pr_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'prId' => pr_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteFunctionOverviewCollection.mapper() result.body = @client.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 functions of a particular static site build.
Description for Gets the functions of a particular static site build.
@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 [StaticSiteFunctionOverviewCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3435 def list_static_site_build_functions_next(next_page_link, custom_headers:nil) response = list_static_site_build_functions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the functions of a particular static site build.
Description for Gets the functions of a particular static site build.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3468 def list_static_site_build_functions_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'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.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 = @client.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::V2020_09_01::Models::StaticSiteFunctionOverviewCollection.mapper() result.body = @client.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 functions of a particular static site build.
Description for Gets the functions of a particular static site build.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3452 def list_static_site_build_functions_next_with_http_info(next_page_link, custom_headers:nil) list_static_site_build_functions_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the functions of a particular static site build.
Description for Gets the functions of a particular static site build.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param pr_id [String] The stage site identifier. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1627 def list_static_site_build_functions_with_http_info(resource_group_name, name, pr_id, custom_headers:nil) list_static_site_build_functions_async(resource_group_name, name, pr_id, custom_headers:custom_headers).value! end
Gets all static site custom domains for a particular static site.
Description for Gets all static site custom domains for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site resource to search in. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StaticSiteCustomDomainOverviewARMResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2088 def list_static_site_custom_domains(resource_group_name, name, custom_headers:nil) first_page = list_static_site_custom_domains_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets all static site custom domains for a particular static site.
Description for Gets all static site custom domains for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site resource to search in. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteCustomDomainOverviewCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3852 def list_static_site_custom_domains_as_lazy(resource_group_name, name, custom_headers:nil) response = list_static_site_custom_domains_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_static_site_custom_domains_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets all static site custom domains for a particular static site.
Description for Gets all static site custom domains for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site resource to search in. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2125 def list_static_site_custom_domains_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteCustomDomainOverviewCollection.mapper() result.body = @client.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 all static site custom domains for a particular static site.
Description for Gets all static site custom domains for a particular static site.
@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 [StaticSiteCustomDomainOverviewCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3532 def list_static_site_custom_domains_next(next_page_link, custom_headers:nil) response = list_static_site_custom_domains_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets all static site custom domains for a particular static site.
Description for Gets all static site custom domains for a particular static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3567 def list_static_site_custom_domains_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'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.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 = @client.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::V2020_09_01::Models::StaticSiteCustomDomainOverviewCollection.mapper() result.body = @client.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 all static site custom domains for a particular static site.
Description for Gets all static site custom domains for a particular static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3550 def list_static_site_custom_domains_next_with_http_info(next_page_link, custom_headers:nil) list_static_site_custom_domains_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets all static site custom domains for a particular static site.
Description for Gets all static site custom domains for a particular static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site resource to search in. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2107 def list_static_site_custom_domains_with_http_info(resource_group_name, name, custom_headers:nil) list_static_site_custom_domains_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the application settings of a static site.
Description for Gets the application settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2724 def list_static_site_function_app_settings(resource_group_name, name, custom_headers:nil) response = list_static_site_function_app_settings_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the application settings of a static site.
Description for Gets the application settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2759 def list_static_site_function_app_settings_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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 || status_code == 202 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::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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 # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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 application settings of a static site.
Description for Gets the application settings of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2742 def list_static_site_function_app_settings_with_http_info(resource_group_name, name, custom_headers:nil) list_static_site_function_app_settings_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the functions of a static site.
Description for Gets the functions of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StaticSiteFunctionOverviewARMResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2618 def list_static_site_functions(resource_group_name, name, custom_headers:nil) first_page = list_static_site_functions_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Gets the functions of a static site.
Description for Gets the functions of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteFunctionOverviewCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3877 def list_static_site_functions_as_lazy(resource_group_name, name, custom_headers:nil) response = list_static_site_functions_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_static_site_functions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets the functions of a static site.
Description for Gets the functions of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2653 def list_static_site_functions_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteFunctionOverviewCollection.mapper() result.body = @client.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 functions of a static site.
Description for Gets the functions of a static site.
@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 [StaticSiteFunctionOverviewCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3630 def list_static_site_functions_next(next_page_link, custom_headers:nil) response = list_static_site_functions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the functions of a static site.
Description for Gets the functions of a static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3663 def list_static_site_functions_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'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.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 = @client.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::V2020_09_01::Models::StaticSiteFunctionOverviewCollection.mapper() result.body = @client.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 functions of a static site.
Description for Gets the functions of a static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3647 def list_static_site_functions_next_with_http_info(next_page_link, custom_headers:nil) list_static_site_functions_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the functions of a static site.
Description for Gets the functions of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2636 def list_static_site_functions_with_http_info(resource_group_name, name, custom_headers:nil) list_static_site_functions_async(resource_group_name, name, custom_headers:custom_headers).value! end
Lists the secrets for an existing static site.
Description for Lists the secrets for an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StringDictionary] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2840 def list_static_site_secrets(resource_group_name, name, custom_headers:nil) response = list_static_site_secrets_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Lists the secrets for an existing static site.
Description for Lists the secrets for an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2875 def list_static_site_secrets_async(resource_group_name, name, 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, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StringDictionary.mapper() result.body = @client.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
Lists the secrets for an existing static site.
Description for Lists the secrets for an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2858 def list_static_site_secrets_with_http_info(resource_group_name, name, custom_headers:nil) list_static_site_secrets_async(resource_group_name, name, custom_headers:custom_headers).value! end
Gets the list of users of a static site.
Description for Gets the list of users of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param authprovider [String] The auth provider for the users. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StaticSiteUserARMResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 818 def list_static_site_users(resource_group_name, name, authprovider, custom_headers:nil) first_page = list_static_site_users_as_lazy(resource_group_name, name, authprovider, custom_headers:custom_headers) first_page.get_all_items end
Gets the list of users of a static site.
Description for Gets the list of users of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param authprovider [String] The auth provider for the users. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteUserCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3775 def list_static_site_users_as_lazy(resource_group_name, name, authprovider, custom_headers:nil) response = list_static_site_users_async(resource_group_name, name, authprovider, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_static_site_users_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets the list of users of a static site.
Description for Gets the list of users of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param authprovider [String] The auth provider for the users. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 855 def list_static_site_users_async(resource_group_name, name, authprovider, 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, 'name is nil' if name.nil? fail ArgumentError, 'authprovider is nil' if authprovider.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'authprovider' => authprovider,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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::V2020_09_01::Models::StaticSiteUserCollection.mapper() result.body = @client.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 list of users of a static site.
Description for Gets the list of users of a static site.
@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 [StaticSiteUserCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3243 def list_static_site_users_next(next_page_link, custom_headers:nil) response = list_static_site_users_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the list of users of a static site.
Description for Gets the list of users of a static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3276 def list_static_site_users_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'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.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 = @client.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::V2020_09_01::Models::StaticSiteUserCollection.mapper() result.body = @client.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 list of users of a static site.
Description for Gets the list of users of a static site.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 3260 def list_static_site_users_next_with_http_info(next_page_link, custom_headers:nil) list_static_site_users_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the list of users of a static site.
Description for Gets the list of users of a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param authprovider [String] The auth provider for the users. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 837 def list_static_site_users_with_http_info(resource_group_name, name, authprovider, custom_headers:nil) list_static_site_users_async(resource_group_name, name, authprovider, custom_headers:custom_headers).value! end
Get all Static Sites for a subscription.
Description for Get all Static Sites for a subscription.
@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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 162 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end
Generates a preview workflow file for the static site
Description for Generates a preview workflow file for the static site
@param location [String] Location where you plan to create the static site. @param static_sites_workflow_preview_request
- StaticSitesWorkflowPreviewRequest
-
A JSON representation of the
StaticSitesWorkflowPreviewRequest properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSitesWorkflowPreview] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 38 def preview_workflow(location, static_sites_workflow_preview_request, custom_headers:nil) response = preview_workflow_async(location, static_sites_workflow_preview_request, custom_headers:custom_headers).value! response.body unless response.nil? end
Generates a preview workflow file for the static site
Description for Generates a preview workflow file for the static site
@param location [String] Location where you plan to create the static site. @param static_sites_workflow_preview_request
- StaticSitesWorkflowPreviewRequest
-
A JSON representation of the
StaticSitesWorkflowPreviewRequest properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 75 def preview_workflow_async(location, static_sites_workflow_preview_request, custom_headers:nil) fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'static_sites_workflow_preview_request is nil' if static_sites_workflow_preview_request.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSitesWorkflowPreviewRequest.mapper() request_content = @client.serialize(request_mapper, static_sites_workflow_preview_request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'location' => location,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, 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::V2020_09_01::Models::StaticSitesWorkflowPreview.mapper() result.body = @client.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
Generates a preview workflow file for the static site
Description for Generates a preview workflow file for the static site
@param location [String] Location where you plan to create the static site. @param static_sites_workflow_preview_request
- StaticSitesWorkflowPreviewRequest
-
A JSON representation of the
StaticSitesWorkflowPreviewRequest properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 57 def preview_workflow_with_http_info(location, static_sites_workflow_preview_request, custom_headers:nil) preview_workflow_async(location, static_sites_workflow_preview_request, custom_headers:custom_headers).value! end
Resets the api key for an existing static site.
Description for Resets the api key for an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param reset_properties_envelope [StaticSiteResetPropertiesARMResource] @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2946 def reset_static_site_api_key(resource_group_name, name, reset_properties_envelope, custom_headers:nil) response = reset_static_site_api_key_async(resource_group_name, name, reset_properties_envelope, custom_headers:custom_headers).value! nil end
Resets the api key for an existing static site.
Description for Resets the api key for an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param reset_properties_envelope [StaticSiteResetPropertiesARMResource] @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2983 def reset_static_site_api_key_async(resource_group_name, name, reset_properties_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, 'name is nil' if name.nil? fail ArgumentError, 'reset_properties_envelope is nil' if reset_properties_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSiteResetPropertiesARMResource.mapper() request_content = @client.serialize(request_mapper, reset_properties_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, 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? result end promise.execute end
Resets the api key for an existing static site.
Description for Resets the api key for an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param reset_properties_envelope [StaticSiteResetPropertiesARMResource] @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2965 def reset_static_site_api_key_with_http_info(resource_group_name, name, reset_properties_envelope, custom_headers:nil) reset_static_site_api_key_async(resource_group_name, name, reset_properties_envelope, custom_headers:custom_headers).value! end
Creates a new static site in an existing resource group, or updates an existing static site.
Description for Creates a new static site in an existing resource group, or updates an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to create or update. @param static_site_envelope [StaticSitePatchResource] A JSON representation of the staticsite properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteARMResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 685 def update_static_site(resource_group_name, name, static_site_envelope, custom_headers:nil) response = update_static_site_async(resource_group_name, name, static_site_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new static site in an existing resource group, or updates an existing static site.
Description for Creates a new static site in an existing resource group, or updates an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to create or update. @param static_site_envelope [StaticSitePatchResource] A JSON representation of the staticsite properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 728 def update_static_site_async(resource_group_name, name, static_site_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, 'name is nil' if name.nil? fail ArgumentError, 'static_site_envelope is nil' if static_site_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSitePatchResource.mapper() request_content = @client.serialize(request_mapper, static_site_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, 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 || status_code == 202 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::V2020_09_01::Models::StaticSiteARMResource.mapper() result.body = @client.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 # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSiteARMResource.mapper() result.body = @client.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 a user entry with the listed roles
Description for Updates a user entry with the listed roles
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param authprovider [String] The auth provider for this user. @param userid [String] The user id of the user. @param static_site_user_envelope [StaticSiteUserARMResource] A JSON representation of the StaticSiteUser properties. See example. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StaticSiteUserARMResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1034 def update_static_site_user(resource_group_name, name, authprovider, userid, static_site_user_envelope, custom_headers:nil) response = update_static_site_user_async(resource_group_name, name, authprovider, userid, static_site_user_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates a user entry with the listed roles
Description for Updates a user entry with the listed roles
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param authprovider [String] The auth provider for this user. @param userid [String] The user id of the user. @param static_site_user_envelope [StaticSiteUserARMResource] A JSON representation of the StaticSiteUser properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1077 def update_static_site_user_async(resource_group_name, name, authprovider, userid, static_site_user_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, 'name is nil' if name.nil? fail ArgumentError, 'authprovider is nil' if authprovider.nil? fail ArgumentError, 'userid is nil' if userid.nil? fail ArgumentError, 'static_site_user_envelope is nil' if static_site_user_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StaticSiteUserARMResource.mapper() request_content = @client.serialize(request_mapper, static_site_user_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'authprovider' => authprovider,'userid' => userid,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, 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::V2020_09_01::Models::StaticSiteUserARMResource.mapper() result.body = @client.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 a user entry with the listed roles
Description for Updates a user entry with the listed roles
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param authprovider [String] The auth provider for this user. @param userid [String] The user id of the user. @param static_site_user_envelope [StaticSiteUserARMResource] A JSON representation of the StaticSiteUser properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 1056 def update_static_site_user_with_http_info(resource_group_name, name, authprovider, userid, static_site_user_envelope, custom_headers:nil) update_static_site_user_async(resource_group_name, name, authprovider, userid, static_site_user_envelope, custom_headers:custom_headers).value! end
Creates a new static site in an existing resource group, or updates an existing static site.
Description for Creates a new static site in an existing resource group, or updates an existing static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site to create or update. @param static_site_envelope [StaticSitePatchResource] A JSON representation of the staticsite properties. See example. @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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 707 def update_static_site_with_http_info(resource_group_name, name, static_site_envelope, custom_headers:nil) update_static_site_async(resource_group_name, name, static_site_envelope, custom_headers:custom_headers).value! end
Validates a particular custom domain can be added to a static site.
Description for Validates a particular custom domain can be added to a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain to validate. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2422 def validate_custom_domain_can_be_added_to_static_site(resource_group_name, name, domain_name, custom_headers:nil) response = validate_custom_domain_can_be_added_to_static_site_async(resource_group_name, name, domain_name, custom_headers:custom_headers).value! nil end
Validates a particular custom domain can be added to a static site.
Description for Validates a particular custom domain can be added to a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain 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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2461 def validate_custom_domain_can_be_added_to_static_site_async(resource_group_name, name, domain_name, 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, 'name is nil' if name.nil? fail ArgumentError, 'domain_name is nil' if domain_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.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'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.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 || status_code == 202 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? result end promise.execute end
Validates a particular custom domain can be added to a static site.
Description for Validates a particular custom domain can be added to a static site.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the static site. @param domain_name [String] The custom domain 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/2020-09-01/generated/azure_mgmt_web/static_sites.rb, line 2442 def validate_custom_domain_can_be_added_to_static_site_with_http_info(resource_group_name, name, domain_name, custom_headers:nil) validate_custom_domain_can_be_added_to_static_site_async(resource_group_name, name, domain_name, custom_headers:custom_headers).value! end