class Azure::Support::Mgmt::V2020_04_01::SupportTickets
Attributes
@return [MicrosoftSupport] reference to the MicrosoftSupport
Private Class Methods
Creates and initializes a new instance of the SupportTickets
class. @param client service class for accessing basic functionality.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services
and ProblemClassifications
API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure
portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure
support is currently not supported via the API. The Azure
support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure
resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include x-ms-authorization-auxiliary header to provide an auxiliary token as per [documentation](docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
@param support_ticket_name [String] Support
ticket name. @param create_support_ticket_parameters [SupportTicketDetails] Support
ticket request payload. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SupportTicketDetails] operation results.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 579 def begin_create(support_ticket_name, create_support_ticket_parameters, custom_headers:nil) response = begin_create_async(support_ticket_name, create_support_ticket_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services
and ProblemClassifications
API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure
portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure
support is currently not supported via the API. The Azure
support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure
resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include x-ms-authorization-auxiliary header to provide an auxiliary token as per [documentation](docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
@param support_ticket_name [String] Support
ticket name. @param create_support_ticket_parameters [SupportTicketDetails] Support
ticket request payload. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 652 def begin_create_async(support_ticket_name, create_support_ticket_parameters, custom_headers:nil) fail ArgumentError, 'support_ticket_name is nil' if support_ticket_name.nil? fail ArgumentError, 'create_support_ticket_parameters is nil' if create_support_ticket_parameters.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::Support::Mgmt::V2020_04_01::Models::SupportTicketDetails.mapper() request_content = @client.serialize(request_mapper, create_support_ticket_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'supportTicketName' => support_ticket_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::Support::Mgmt::V2020_04_01::Models::SupportTicketDetails.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 support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services
and ProblemClassifications
API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure
portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure
support is currently not supported via the API. The Azure
support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure
resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include x-ms-authorization-auxiliary header to provide an auxiliary token as per [documentation](docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
@param support_ticket_name [String] Support
ticket name. @param create_support_ticket_parameters [SupportTicketDetails] Support
ticket request payload. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 616 def begin_create_with_http_info(support_ticket_name, create_support_ticket_parameters, custom_headers:nil) begin_create_async(support_ticket_name, create_support_ticket_parameters, custom_headers:custom_headers).value! end
Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription.
@param check_name_availability_input [CheckNameAvailabilityInput] Input to check. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CheckNameAvailabilityOutput] operation results.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 36 def check_name_availability(check_name_availability_input, custom_headers:nil) response = check_name_availability_async(check_name_availability_input, custom_headers:custom_headers).value! response.body unless response.nil? end
Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription.
@param check_name_availability_input [CheckNameAvailabilityInput] Input to check. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 69 def check_name_availability_async(check_name_availability_input, custom_headers:nil) fail ArgumentError, 'check_name_availability_input is nil' if check_name_availability_input.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::Support::Mgmt::V2020_04_01::Models::CheckNameAvailabilityInput.mapper() request_content = @client.serialize(request_mapper, check_name_availability_input) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Support/checkNameAvailability' 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}, 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::Support::Mgmt::V2020_04_01::Models::CheckNameAvailabilityOutput.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
Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription.
@param check_name_availability_input [CheckNameAvailabilityInput] Input to check. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 53 def check_name_availability_with_http_info(check_name_availability_input, custom_headers:nil) check_name_availability_async(check_name_availability_input, custom_headers:custom_headers).value! end
Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services
and ProblemClassifications
API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure
portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure
support is currently not supported via the API. The Azure
support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure
resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include x-ms-authorization-auxiliary header to provide an auxiliary token as per [documentation](docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
@param support_ticket_name [String] Support
ticket name. @param create_support_ticket_parameters [SupportTicketDetails] Support
ticket request payload. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SupportTicketDetails] operation results.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 514 def create(support_ticket_name, create_support_ticket_parameters, custom_headers:nil) response = create_async(support_ticket_name, create_support_ticket_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
@param support_ticket_name [String] Support
ticket name. @param create_support_ticket_parameters [SupportTicketDetails] Support
ticket request payload. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 529 def create_async(support_ticket_name, create_support_ticket_parameters, custom_headers:nil) # Send request promise = begin_create_async(support_ticket_name, create_support_ticket_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Support::Mgmt::V2020_04_01::Models::SupportTicketDetails.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Get ticket details for an Azure
subscription. Support
ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@param support_ticket_name [String] Support
ticket name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SupportTicketDetails] operation results.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 269 def get(support_ticket_name, custom_headers:nil) response = get_async(support_ticket_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get ticket details for an Azure
subscription. Support
ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@param support_ticket_name [String] Support
ticket name. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 300 def get_async(support_ticket_name, custom_headers:nil) fail ArgumentError, 'support_ticket_name is nil' if support_ticket_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}/providers/Microsoft.Support/supportTickets/{supportTicketName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'supportTicketName' => support_ticket_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::Support::Mgmt::V2020_04_01::Models::SupportTicketDetails.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 ticket details for an Azure
subscription. Support
ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@param support_ticket_name [String] Support
ticket name. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 285 def get_with_http_info(support_ticket_name, custom_headers:nil) get_async(support_ticket_name, custom_headers:custom_headers).value! end
Lists all the support tickets for an Azure
subscription. You can also filter the support tickets by Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@param top [Integer] The number of values to return in the collection. Default is 25 and max is 100. @param filter [String] The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn more](docs.microsoft.com/odata/concepts/queryoptions-overview). Status filter can only be used with Equals ('eq') operator. For CreatedDate filter, the supported operators are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters, combine them using the logical 'AND'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SupportTicketDetails>] operation results.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 152 def list(top:nil, filter:nil, custom_headers:nil) first_page = list_as_lazy(top:top, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Lists all the support tickets for an Azure
subscription. You can also filter the support tickets by Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@param top [Integer] The number of values to return in the collection. Default is 25 and max is 100. @param filter [String] The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn more](docs.microsoft.com/odata/concepts/queryoptions-overview). Status filter can only be used with Equals ('eq') operator. For CreatedDate filter, the supported operators are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters, combine them using the logical 'AND'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SupportTicketsListResult] which provide lazy access to pages of the response.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 842 def list_as_lazy(top:nil, filter:nil, custom_headers:nil) response = list_async(top:top, filter:filter, 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
Lists all the support tickets for an Azure
subscription. You can also filter the support tickets by Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@param top [Integer] The number of values to return in the collection. Default is 25 and max is 100. @param filter [String] The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn more](docs.microsoft.com/odata/concepts/queryoptions-overview). Status filter can only be used with Equals ('eq') operator. For CreatedDate filter, the supported operators are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters, combine them using the logical 'AND'. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 205 def list_async(top:nil, filter:nil, 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.Support/supportTickets' 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: {'$top' => top,'$filter' => filter,'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::Support::Mgmt::V2020_04_01::Models::SupportTicketsListResult.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 all the support tickets for an Azure
subscription. You can also filter the support tickets by Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@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 [SupportTicketsListResult] operation results.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 729 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
Lists all the support tickets for an Azure
subscription. You can also filter the support tickets by Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 768 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::Support::Mgmt::V2020_04_01::Models::SupportTicketsListResult.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 all the support tickets for an Azure
subscription. You can also filter the support tickets by Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 749 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end
Lists all the support tickets for an Azure
subscription. You can also filter the support tickets by Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an error.
@param top [Integer] The number of values to return in the collection. Default is 25 and max is 100. @param filter [String] The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn more](docs.microsoft.com/odata/concepts/queryoptions-overview). Status filter can only be used with Equals ('eq') operator. For CreatedDate filter, the supported operators are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters, combine them using the logical 'AND'. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 179 def list_with_http_info(top:nil, filter:nil, custom_headers:nil) list_async(top:top, filter:filter, custom_headers:custom_headers).value! end
This API allows you to update the severity level, ticket status, and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure
support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications
API.<br/><br/>Changing the ticket status to closed is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
@param support_ticket_name [String] Support
ticket name. @param update_support_ticket [UpdateSupportTicket] UpdateSupportTicket object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SupportTicketDetails] operation results.
# File lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb, line 373 def update(support_ticket_name, update_support_ticket, custom_headers:nil) response = update_async(support_ticket_name, update_support_ticket, custom_headers:custom_headers).value! response.body unless response.nil? end
This API allows you to update the severity level, ticket status, and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure
support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications
API.<br/><br/>Changing the ticket status to closed is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
@param support_ticket_name [String] Support
ticket name. @param update_support_ticket [UpdateSupportTicket] UpdateSupportTicket object. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 420 def update_async(support_ticket_name, update_support_ticket, custom_headers:nil) fail ArgumentError, 'support_ticket_name is nil' if support_ticket_name.nil? fail ArgumentError, 'update_support_ticket is nil' if update_support_ticket.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::Support::Mgmt::V2020_04_01::Models::UpdateSupportTicket.mapper() request_content = @client.serialize(request_mapper, update_support_ticket) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'supportTicketName' => support_ticket_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 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::Support::Mgmt::V2020_04_01::Models::SupportTicketDetails.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
This API allows you to update the severity level, ticket status, and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure
support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications
API.<br/><br/>Changing the ticket status to closed is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
@param support_ticket_name [String] Support
ticket name. @param update_support_ticket [UpdateSupportTicket] UpdateSupportTicket object. @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-04-01/generated/azure_mgmt_support/support_tickets.rb, line 397 def update_with_http_info(support_ticket_name, update_support_ticket, custom_headers:nil) update_async(support_ticket_name, update_support_ticket, custom_headers:custom_headers).value! end