Class: Azure::Support::Mgmt::V2020_04_01::Communications
- Inherits:
-
Object
- Object
- Azure::Support::Mgmt::V2020_04_01::Communications
- Includes:
- MsRestAzure
- Defined in:
- lib/2020-04-01/generated/azure_mgmt_support/communications.rb
Overview
Microsoft Azure Support Resource Provider.
Instance Attribute Summary collapse
-
#client ⇒ MicrosoftSupport
readonly
Reference to the MicrosoftSupport.
Instance Method Summary collapse
-
#begin_create(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ CommunicationDetails
Adds a new customer communication to an Azure support ticket.
-
#begin_create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Adds a new customer communication to an Azure support ticket.
-
#begin_create_with_http_info(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Adds a new customer communication to an Azure support ticket.
-
#check_name_availability(support_ticket_name, check_name_availability_input, custom_headers: nil) ⇒ CheckNameAvailabilityOutput
Check the availability of a resource name.
-
#check_name_availability_async(support_ticket_name, check_name_availability_input, custom_headers: nil) ⇒ Concurrent::Promise
Check the availability of a resource name.
-
#check_name_availability_with_http_info(support_ticket_name, check_name_availability_input, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Check the availability of a resource name.
-
#create(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ CommunicationDetails
Adds a new customer communication to an Azure support ticket.
-
#create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ Concurrent::Promise
object.
-
#get(support_ticket_name, communication_name, custom_headers: nil) ⇒ CommunicationDetails
Returns communication details for a support ticket.
-
#get_async(support_ticket_name, communication_name, custom_headers: nil) ⇒ Concurrent::Promise
Returns communication details for a support ticket.
-
#get_with_http_info(support_ticket_name, communication_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns communication details for a support ticket.
-
#initialize(client) ⇒ Communications
constructor
Creates and initializes a new instance of the Communications class.
-
#list(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ Array<CommunicationDetails>
Lists all communications (attachments not included) for a support ticket.
-
#list_as_lazy(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ CommunicationsListResult
Lists all communications (attachments not included) for a support ticket.
-
#list_async(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists all communications (attachments not included) for a support ticket.
-
#list_next(next_page_link, custom_headers: nil) ⇒ CommunicationsListResult
Lists all communications (attachments not included) for a support ticket.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all communications (attachments not included) for a support ticket.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all communications (attachments not included) for a support ticket.
-
#list_with_http_info(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all communications (attachments not included) for a support ticket.
Constructor Details
#initialize(client) ⇒ Communications
Creates and initializes a new instance of the Communications class.
17 18 19 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ MicrosoftSupport (readonly)
Returns reference to the MicrosoftSupport.
22 23 24 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 22 def client @client end |
Instance Method Details
#begin_create(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ CommunicationDetails
Adds a new customer communication to an Azure support ticket.
object. will be added to the HTTP request.
418 419 420 421 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 418 def begin_create(support_ticket_name, communication_name, create_communication_parameters, custom_headers:nil) response = begin_create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Adds a new customer communication to an Azure support ticket.
object. to the HTTP request.
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 451 def begin_create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers:nil) fail ArgumentError, 'support_ticket_name is nil' if support_ticket_name.nil? fail ArgumentError, 'communication_name is nil' if communication_name.nil? fail ArgumentError, 'create_communication_parameters is nil' if create_communication_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::CommunicationDetails.mapper() request_content = @client.serialize(request_mapper, create_communication_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'supportTicketName' => support_ticket_name,'communicationName' => communication_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, ) 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::CommunicationDetails.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_with_http_info(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Adds a new customer communication to an Azure support ticket.
object. will be added to the HTTP request.
435 436 437 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 435 def begin_create_with_http_info(support_ticket_name, communication_name, create_communication_parameters, custom_headers:nil) begin_create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers:custom_headers).value! end |
#check_name_availability(support_ticket_name, check_name_availability_input, custom_headers: nil) ⇒ CheckNameAvailabilityOutput
Check the availability of a resource name. This API should be used to check the uniqueness of the name for adding a new communication to the support ticket.
check. will be added to the HTTP request.
37 38 39 40 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 37 def check_name_availability(support_ticket_name, check_name_availability_input, custom_headers:nil) response = check_name_availability_async(support_ticket_name, check_name_availability_input, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_name_availability_async(support_ticket_name, check_name_availability_input, custom_headers: nil) ⇒ Concurrent::Promise
Check the availability of a resource name. This API should be used to check the uniqueness of the name for adding a new communication to the support ticket.
check. to the HTTP request.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 72 def check_name_availability_async(support_ticket_name, check_name_availability_input, custom_headers:nil) fail ArgumentError, 'support_ticket_name is nil' if support_ticket_name.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/supportTickets/{supportTicketName}/checkNameAvailability' request_url = @base_url || @client.base_url = { 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(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::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., e.backtrace, result) end end result end promise.execute end |
#check_name_availability_with_http_info(support_ticket_name, check_name_availability_input, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Check the availability of a resource name. This API should be used to check the uniqueness of the name for adding a new communication to the support ticket.
check. will be added to the HTTP request.
55 56 57 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 55 def check_name_availability_with_http_info(support_ticket_name, check_name_availability_input, custom_headers:nil) check_name_availability_async(support_ticket_name, check_name_availability_input, custom_headers:custom_headers).value! end |
#create(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ CommunicationDetails
Adds a new customer communication to an Azure support ticket.
object. will be added to the HTTP request.
372 373 374 375 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 372 def create(support_ticket_name, communication_name, create_communication_parameters, custom_headers:nil) response = create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers: nil) ⇒ Concurrent::Promise
object. will be added to the HTTP request.
response.
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 388 def create_async(support_ticket_name, communication_name, create_communication_parameters, custom_headers:nil) # Send request promise = begin_create_async(support_ticket_name, communication_name, create_communication_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::CommunicationDetails.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(support_ticket_name, communication_name, custom_headers: nil) ⇒ CommunicationDetails
Returns communication details for a support ticket.
will be added to the HTTP request.
276 277 278 279 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 276 def get(support_ticket_name, communication_name, custom_headers:nil) response = get_async(support_ticket_name, communication_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(support_ticket_name, communication_name, custom_headers: nil) ⇒ Concurrent::Promise
Returns communication details for a support ticket.
to the HTTP request.
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 305 def get_async(support_ticket_name, communication_name, custom_headers:nil) fail ArgumentError, 'support_ticket_name is nil' if support_ticket_name.nil? fail ArgumentError, 'communication_name is nil' if communication_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}/communications/{communicationName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'supportTicketName' => support_ticket_name,'communicationName' => communication_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, ) 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::CommunicationDetails.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(support_ticket_name, communication_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns communication details for a support ticket.
will be added to the HTTP request.
291 292 293 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 291 def get_with_http_info(support_ticket_name, communication_name, custom_headers:nil) get_async(support_ticket_name, communication_name, custom_headers:custom_headers).value! end |
#list(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ Array<CommunicationDetails>
Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. <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.
Default is 10 and max is 10. by communicationType and createdDate properties. CommunicationType supports Equals (‘eq’) operator and createdDate supports Greater Than (‘gt’) and Greater Than or Equals (‘ge’) operators. You may combine the CommunicationType and CreatedDate filters by Logical And (‘and’) operator. will be added to the HTTP request.
157 158 159 160 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 157 def list(support_ticket_name, top:nil, filter:nil, custom_headers:nil) first_page = list_as_lazy(support_ticket_name, top:top, filter:filter, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ CommunicationsListResult
Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. <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.
Default is 10 and max is 10. by communicationType and createdDate properties. CommunicationType supports Equals (‘eq’) operator and createdDate supports Greater Than (‘gt’) and Greater Than or Equals (‘ge’) operators. You may combine the CommunicationType and CreatedDate filters by Logical And (‘and’) operator. will be added to the HTTP request.
response.
649 650 651 652 653 654 655 656 657 658 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 649 def list_as_lazy(support_ticket_name, top:nil, filter:nil, custom_headers:nil) response = list_async(support_ticket_name, 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 |
#list_async(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. <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.
Default is 10 and max is 10. by communicationType and createdDate properties. CommunicationType supports Equals (‘eq’) operator and createdDate supports Greater Than (‘gt’) and Greater Than or Equals (‘ge’) operators. You may combine the CommunicationType and CreatedDate filters by Logical And (‘and’) operator. to the HTTP request.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 212 def list_async(support_ticket_name, top:nil, filter:nil, 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}/communications' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'supportTicketName' => support_ticket_name,'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, ) 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::CommunicationsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next(next_page_link, custom_headers: nil) ⇒ CommunicationsListResult
Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. <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.
to List operation. will be added to the HTTP request.
531 532 533 534 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 531 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 |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. <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.
to List operation. to the HTTP request.
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 574 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 = { 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, ) 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::CommunicationsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. <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.
to List operation. will be added to the HTTP request.
553 554 555 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 553 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_with_http_info(support_ticket_name, top: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. <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.
Default is 10 and max is 10. by communicationType and createdDate properties. CommunicationType supports Equals (‘eq’) operator and createdDate supports Greater Than (‘gt’) and Greater Than or Equals (‘ge’) operators. You may combine the CommunicationType and CreatedDate filters by Logical And (‘and’) operator. will be added to the HTTP request.
185 186 187 |
# File 'lib/2020-04-01/generated/azure_mgmt_support/communications.rb', line 185 def list_with_http_info(support_ticket_name, top:nil, filter:nil, custom_headers:nil) list_async(support_ticket_name, top:top, filter:filter, custom_headers:custom_headers).value! end |