You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Support::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for AWS Support. To construct a client, you need to configure a :region and :credentials.

support = Aws::Support::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::Support::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::Support::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#add_attachments_to_set(options = {}) ⇒ Types::AddAttachmentsToSetResponse

Adds one or more attachments to an attachment set. If an attachmentSetId is not specified, a new attachment set is created, and the ID of the set is returned in the response. If an attachmentSetId is specified, the attachments are added to the specified set, if it exists.

An attachment set is a temporary container for attachments that are to be added to a case or case communication. The set is available for one hour after it is created; the expiryTime returned in the response indicates when the set expires. The maximum number of attachments in a set is 3, and the maximum size of any attachment in the set is 5 MB.

Examples:

Request syntax with placeholder values


resp = client.add_attachments_to_set({
  attachment_set_id: "AttachmentSetId",
  attachments: [ # required
    {
      file_name: "FileName",
      data: "data",
    },
  ],
})

Response structure


resp.attachment_set_id #=> String
resp.expiry_time #=> String

Options Hash (options):

  • :attachment_set_id (String)

    The ID of the attachment set. If an attachmentSetId is not specified, a new attachment set is created, and the ID of the set is returned in the response. If an attachmentSetId is specified, the attachments are added to the specified set, if it exists.

  • :attachments (required, Array<Types::Attachment>)

    One or more attachments to add to the set. The limit is 3 attachments per set, and the size limit is 5 MB per attachment.

Returns:

See Also:

#add_communication_to_case(options = {}) ⇒ Types::AddCommunicationToCaseResponse

Adds additional customer communication to an AWS Support case. You use the caseId value to identify the case to add communication to. You can list a set of email addresses to copy on the communication using the ccEmailAddresses value. The communicationBody value contains the text of the communication.

The response indicates the success or failure of the request.

This operation implements a subset of the features of the AWS Support Center.

Examples:

Request syntax with placeholder values


resp = client.add_communication_to_case({
  case_id: "CaseId",
  communication_body: "CommunicationBody", # required
  cc_email_addresses: ["CcEmailAddress"],
  attachment_set_id: "AttachmentSetId",
})

Response structure


resp.result #=> true/false

Options Hash (options):

  • :case_id (String)

    The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47

  • :communication_body (required, String)

    The body of an email communication to add to the support case.

  • :cc_email_addresses (Array<String>)

    The email addresses in the CC line of an email to be added to the support case.

  • :attachment_set_id (String)

    The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet

Returns:

See Also:

#create_case(options = {}) ⇒ Types::CreateCaseResponse

Creates a new case in the AWS Support Center. This operation is modeled on the behavior of the AWS Support Center Create Case page. Its parameters require you to specify the following information:

  • issueType. The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."

  • serviceCode. The code for an AWS service. You obtain the serviceCode by calling DescribeServices.

  • categoryCode. The category for the service defined for the serviceCode value. You also obtain the category code for a service by calling DescribeServices. Each AWS service defines its own set of category codes.

  • severityCode. A value that indicates the urgency of the case, which in turn determines the response time according to your service level agreement with AWS Support. You obtain the SeverityCode by calling DescribeSeverityLevels.

  • subject. The Subject field on the AWS Support Center Create Case page.

  • communicationBody. The Description field on the AWS Support Center Create Case page.

  • attachmentSetId. The ID of a set of attachments that has been created by using AddAttachmentsToSet.

  • language. The human language in which AWS Support handles the case. English and Japanese are currently supported.

  • ccEmailAddresses. The AWS Support Center CC field on the Create Case page. You can list email addresses to be copied on any correspondence about the case. The account that opens the case is already identified by passing the AWS Credentials in the HTTP POST method or in a method or function call from one of the programming languages supported by an AWS SDK.

To add additional communication or attachments to an existing case, use AddCommunicationToCase.

A successful CreateCase request returns an AWS Support case number. Case numbers are used by the DescribeCases operation to retrieve existing AWS Support cases.

Examples:

Request syntax with placeholder values


resp = client.create_case({
  subject: "Subject", # required
  service_code: "ServiceCode",
  severity_code: "SeverityCode",
  category_code: "CategoryCode",
  communication_body: "CommunicationBody", # required
  cc_email_addresses: ["CcEmailAddress"],
  language: "Language",
  issue_type: "IssueType",
  attachment_set_id: "AttachmentSetId",
})

Response structure


resp.case_id #=> String

Options Hash (options):

  • :subject (required, String)

    The title of the AWS Support case.

  • :service_code (String)

    The code for the AWS service returned by the call to DescribeServices.

  • :severity_code (String)

    The code for the severity level returned by the call to DescribeSeverityLevels.

    The availability of severity levels depends on each customer\'s support subscription. In other words, your subscription may not necessarily require the urgent level of response time.

  • :category_code (String)

    The category of problem for the AWS Support case.

  • :communication_body (required, String)

    The communication body text when you create an AWS Support case by calling CreateCase.

  • :cc_email_addresses (Array<String>)

    A list of email addresses that AWS Support copies on case correspondence.

  • :language (String)

    The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English (\"en\") and Japanese (\"ja\"). Language parameters must be passed explicitly for operations that take them.

  • :issue_type (String)

    The type of issue for the case. You can specify either \"customer-service\" or \"technical.\" If you do not indicate a value, the default is \"technical.\"

  • :attachment_set_id (String)

    The ID of a set of one or more attachments for the case. Create the set by using AddAttachmentsToSet.

Returns:

See Also:

#describe_attachment(options = {}) ⇒ Types::DescribeAttachmentResponse

Returns the attachment that has the specified ID. Attachment IDs are generated by the case management system when you add an attachment to a case or case communication. Attachment IDs are returned in the AttachmentDetails objects that are returned by the DescribeCommunications operation.

Examples:

Request syntax with placeholder values


resp = client.describe_attachment({
  attachment_id: "AttachmentId", # required
})

Response structure


resp.attachment.file_name #=> String
resp.attachment.data #=> IO

Options Hash (options):

  • :attachment_id (required, String)

    The ID of the attachment to return. Attachment IDs are returned by the DescribeCommunications operation.

Returns:

See Also:

#describe_cases(options = {}) ⇒ Types::DescribeCasesResponse

Returns a list of cases that you specify by passing one or more case IDs. In addition, you can filter the cases by date by setting values for the afterTime and beforeTime request parameters. You can set values for the includeResolvedCases and includeCommunications request parameters to control how much information is returned.

Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.

The response returns the following in JSON format:

  • One or more CaseDetails data types.

  • One or more nextToken values, which specify where to paginate the returned records represented by the CaseDetails objects.

Examples:

Request syntax with placeholder values


resp = client.describe_cases({
  case_id_list: ["CaseId"],
  display_id: "DisplayId",
  after_time: "AfterTime",
  before_time: "BeforeTime",
  include_resolved_cases: false,
  next_token: "NextToken",
  max_results: 1,
  language: "Language",
  include_communications: false,
})

Response structure


resp.cases #=> Array
resp.cases[0].case_id #=> String
resp.cases[0].display_id #=> String
resp.cases[0].subject #=> String
resp.cases[0].status #=> String
resp.cases[0].service_code #=> String
resp.cases[0].category_code #=> String
resp.cases[0].severity_code #=> String
resp.cases[0]. #=> String
resp.cases[0].time_created #=> String
resp.cases[0].recent_communications.communications #=> Array
resp.cases[0].recent_communications.communications[0].case_id #=> String
resp.cases[0].recent_communications.communications[0].body #=> String
resp.cases[0].recent_communications.communications[0]. #=> String
resp.cases[0].recent_communications.communications[0].time_created #=> String
resp.cases[0].recent_communications.communications[0].attachment_set #=> Array
resp.cases[0].recent_communications.communications[0].attachment_set[0].attachment_id #=> String
resp.cases[0].recent_communications.communications[0].attachment_set[0].file_name #=> String
resp.cases[0].recent_communications.next_token #=> String
resp.cases[0].cc_email_addresses #=> Array
resp.cases[0].cc_email_addresses[0] #=> String
resp.cases[0].language #=> String
resp.next_token #=> String

Options Hash (options):

  • :case_id_list (Array<String>)

    A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.

  • :display_id (String)

    The ID displayed for a case in the AWS Support Center user interface.

  • :after_time (String)

    The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

  • :before_time (String)

    The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

  • :include_resolved_cases (Boolean)

    Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.

  • :next_token (String)

    A resumption point for pagination.

  • :max_results (Integer)

    The maximum number of results to return before paginating.

  • :language (String)

    The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English (\"en\") and Japanese (\"ja\"). Language parameters must be passed explicitly for operations that take them.

  • :include_communications (Boolean)

    Specifies whether communications should be included in the DescribeCases results. The default is true.

Returns:

See Also:

#describe_communications(options = {}) ⇒ Types::DescribeCommunicationsResponse

Returns communications (and attachments) for one or more support cases. You can use the afterTime and beforeTime parameters to filter by date. You can use the caseId parameter to restrict the results to a particular case.

Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.

You can use the maxResults and nextToken parameters to control the pagination of the result set. Set maxResults to the number of cases you want displayed on each page, and use nextToken to specify the resumption of pagination.

Examples:

Request syntax with placeholder values


resp = client.describe_communications({
  case_id: "CaseId", # required
  before_time: "BeforeTime",
  after_time: "AfterTime",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.communications #=> Array
resp.communications[0].case_id #=> String
resp.communications[0].body #=> String
resp.communications[0]. #=> String
resp.communications[0].time_created #=> String
resp.communications[0].attachment_set #=> Array
resp.communications[0].attachment_set[0].attachment_id #=> String
resp.communications[0].attachment_set[0].file_name #=> String
resp.next_token #=> String

Options Hash (options):

  • :case_id (required, String)

    The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47

  • :before_time (String)

    The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

  • :after_time (String)

    The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

  • :next_token (String)

    A resumption point for pagination.

  • :max_results (Integer)

    The maximum number of results to return before paginating.

Returns:

See Also:

#describe_services(options = {}) ⇒ Types::DescribeServicesResponse

Returns the current list of AWS services and a list of service categories that applies to each one. You then use service names and categories in your CreateCase requests. Each AWS service has its own set of categories.

The service codes and category codes correspond to the values that are displayed in the Service and Category drop-down lists on the AWS Support Center Create Case page. The values in those fields, however, do not necessarily match the service codes and categories returned by the DescribeServices request. Always use the service codes and categories obtained programmatically. This practice ensures that you always have the most recent set of service and category codes.

Examples:

Request syntax with placeholder values


resp = client.describe_services({
  service_code_list: ["ServiceCode"],
  language: "Language",
})

Response structure


resp.services #=> Array
resp.services[0].code #=> String
resp.services[0].name #=> String
resp.services[0].categories #=> Array
resp.services[0].categories[0].code #=> String
resp.services[0].categories[0].name #=> String

Options Hash (options):

  • :service_code_list (Array<String>)

    A JSON-formatted list of service codes available for AWS services.

  • :language (String)

    The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English (\"en\") and Japanese (\"ja\"). Language parameters must be passed explicitly for operations that take them.

Returns:

See Also:

#describe_severity_levels(options = {}) ⇒ Types::DescribeSeverityLevelsResponse

Returns the list of severity levels that you can assign to an AWS Support case. The severity level for a case is also a field in the CaseDetails data type included in any CreateCase request.

Examples:

Request syntax with placeholder values


resp = client.describe_severity_levels({
  language: "Language",
})

Response structure


resp.severity_levels #=> Array
resp.severity_levels[0].code #=> String
resp.severity_levels[0].name #=> String

Options Hash (options):

  • :language (String)

    The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English (\"en\") and Japanese (\"ja\"). Language parameters must be passed explicitly for operations that take them.

Returns:

See Also:

#describe_trusted_advisor_check_refresh_statuses(options = {}) ⇒ Types::DescribeTrustedAdvisorCheckRefreshStatusesResponse

Returns the refresh status of the Trusted Advisor checks that have the specified check IDs. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks.

Some checks are refreshed automatically, and their refresh statuses cannot be retrieved by using this operation. Use of the DescribeTrustedAdvisorCheckRefreshStatuses operation for these checks causes an InvalidParameterValue error.

Examples:

Request syntax with placeholder values


resp = client.describe_trusted_advisor_check_refresh_statuses({
  check_ids: ["String"], # required
})

Response structure


resp.statuses #=> Array
resp.statuses[0].check_id #=> String
resp.statuses[0].status #=> String
resp.statuses[0].millis_until_next_refreshable #=> Integer

Options Hash (options):

  • :check_ids (required, Array<String>)

    The IDs of the Trusted Advisor checks to get the status of. Note: Specifying the check ID of a check that is automatically refreshed causes an InvalidParameterValue error.

Returns:

See Also:

#describe_trusted_advisor_check_result(options = {}) ⇒ Types::DescribeTrustedAdvisorCheckResultResponse

Returns the results of the Trusted Advisor check that has the specified check ID. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks.

The response contains a TrustedAdvisorCheckResult object, which contains these three objects:

In addition, the response contains these fields:

  • status. The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".

  • timestamp. The time of the last refresh of the check.

  • checkId. The unique identifier for the check.

Examples:

Request syntax with placeholder values


resp = client.describe_trusted_advisor_check_result({
  check_id: "String", # required
  language: "String",
})

Response structure


resp.result.check_id #=> String
resp.result.timestamp #=> String
resp.result.status #=> String
resp.result.resources_summary.resources_processed #=> Integer
resp.result.resources_summary.resources_flagged #=> Integer
resp.result.resources_summary.resources_ignored #=> Integer
resp.result.resources_summary.resources_suppressed #=> Integer
resp.result.category_specific_summary.cost_optimizing.estimated_monthly_savings #=> Float
resp.result.category_specific_summary.cost_optimizing.estimated_percent_monthly_savings #=> Float
resp.result.flagged_resources #=> Array
resp.result.flagged_resources[0].status #=> String
resp.result.flagged_resources[0].region #=> String
resp.result.flagged_resources[0].resource_id #=> String
resp.result.flagged_resources[0].is_suppressed #=> true/false
resp.result.flagged_resources[0]. #=> Array
resp.result.flagged_resources[0].[0] #=> String

Options Hash (options):

  • :check_id (required, String)

    The unique identifier for the Trusted Advisor check.

  • :language (String)

    The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English (\"en\") and Japanese (\"ja\"). Language parameters must be passed explicitly for operations that take them.

Returns:

See Also:

#describe_trusted_advisor_check_summaries(options = {}) ⇒ Types::DescribeTrustedAdvisorCheckSummariesResponse

Returns the summaries of the results of the Trusted Advisor checks that have the specified check IDs. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks.

The response contains an array of TrustedAdvisorCheckSummary objects.

Examples:

Request syntax with placeholder values


resp = client.describe_trusted_advisor_check_summaries({
  check_ids: ["String"], # required
})

Response structure


resp.summaries #=> Array
resp.summaries[0].check_id #=> String
resp.summaries[0].timestamp #=> String
resp.summaries[0].status #=> String
resp.summaries[0].has_flagged_resources #=> true/false
resp.summaries[0].resources_summary.resources_processed #=> Integer
resp.summaries[0].resources_summary.resources_flagged #=> Integer
resp.summaries[0].resources_summary.resources_ignored #=> Integer
resp.summaries[0].resources_summary.resources_suppressed #=> Integer
resp.summaries[0].category_specific_summary.cost_optimizing.estimated_monthly_savings #=> Float
resp.summaries[0].category_specific_summary.cost_optimizing.estimated_percent_monthly_savings #=> Float

Options Hash (options):

  • :check_ids (required, Array<String>)

    The IDs of the Trusted Advisor checks.

Returns:

See Also:

#describe_trusted_advisor_checks(options = {}) ⇒ Types::DescribeTrustedAdvisorChecksResponse

Returns information about all available Trusted Advisor checks, including name, ID, category, description, and metadata. You must specify a language code; English ("en") and Japanese ("ja") are currently supported. The response contains a TrustedAdvisorCheckDescription for each check.

Examples:

Request syntax with placeholder values


resp = client.describe_trusted_advisor_checks({
  language: "String", # required
})

Response structure


resp.checks #=> Array
resp.checks[0].id #=> String
resp.checks[0].name #=> String
resp.checks[0].description #=> String
resp.checks[0].category #=> String
resp.checks[0]. #=> Array
resp.checks[0].[0] #=> String

Options Hash (options):

  • :language (required, String)

    The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English (\"en\") and Japanese (\"ja\"). Language parameters must be passed explicitly for operations that take them.

Returns:

See Also:

#refresh_trusted_advisor_check(options = {}) ⇒ Types::RefreshTrustedAdvisorCheckResponse

Requests a refresh of the Trusted Advisor check that has the specified check ID. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks.

Some checks are refreshed automatically, and they cannot be refreshed by using this operation. Use of the RefreshTrustedAdvisorCheck operation for these checks causes an InvalidParameterValue error.

The response contains a TrustedAdvisorCheckRefreshStatus object, which contains these fields:

  • status. The refresh status of the check: "none", "enqueued", "processing", "success", or "abandoned".

  • millisUntilNextRefreshable. The amount of time, in milliseconds, until the check is eligible for refresh.

  • checkId. The unique identifier for the check.

Examples:

Request syntax with placeholder values


resp = client.refresh_trusted_advisor_check({
  check_id: "String", # required
})

Response structure


resp.status.check_id #=> String
resp.status.status #=> String
resp.status.millis_until_next_refreshable #=> Integer

Options Hash (options):

  • :check_id (required, String)

    The unique identifier for the Trusted Advisor check to refresh. Note: Specifying the check ID of a check that is automatically refreshed causes an InvalidParameterValue error.

Returns:

See Also:

#resolve_case(options = {}) ⇒ Types::ResolveCaseResponse

Takes a caseId and returns the initial state of the case along with the state of the case after the call to ResolveCase completed.

Examples:

Request syntax with placeholder values


resp = client.resolve_case({
  case_id: "CaseId",
})

Response structure


resp.initial_case_status #=> String
resp.final_case_status #=> String

Options Hash (options):

  • :case_id (String)

    The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.