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

Class: Aws::ApiGatewayV2::Client

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

Overview

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

apigatewayv2 = Aws::ApiGatewayV2::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::ApiGatewayV2::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::ApiGatewayV2::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

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

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery 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.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

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

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery 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.

  • :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

#create_api(options = {}) ⇒ Types::CreateApiResponse

Creates an Api resource.

Examples:

Request syntax with placeholder values


resp = client.create_api({
  api_key_selection_expression: "SelectionExpression",
  description: "StringWithLengthBetween0And1024",
  disable_schema_validation: false,
  name: "StringWithLengthBetween1And128", # required
  protocol_type: "WEBSOCKET", # required, accepts WEBSOCKET
  route_selection_expression: "SelectionExpression", # required
  version: "StringWithLengthBetween1And64",
})

Response structure


resp.api_endpoint #=> String
resp.api_id #=> String
resp.api_key_selection_expression #=> String
resp.created_date #=> Time
resp.description #=> String
resp.disable_schema_validation #=> true/false
resp.name #=> String
resp.protocol_type #=> String, one of "WEBSOCKET"
resp.route_selection_expression #=> String
resp.version #=> String
resp.warnings #=> Array
resp.warnings[0] #=> String

Options Hash (options):

  • :api_key_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :description (String)

    A string with a length between [0-1024].

  • :disable_schema_validation (Boolean)
  • :name (required, String)

    A string with a length between [1-128].

  • :protocol_type (required, String)
  • :route_selection_expression (required, String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :version (String)

    A string with a length between [1-64].

Returns:

#create_api_mapping(options = {}) ⇒ Types::CreateApiMappingResponse

Creates an API mapping.

Examples:

Request syntax with placeholder values


resp = client.create_api_mapping({
  api_id: "Id", # required
  api_mapping_key: "SelectionKey",
  domain_name: "__string", # required
  stage: "StringWithLengthBetween1And128", # required
})

Response structure


resp.api_id #=> String
resp.api_mapping_id #=> String
resp.api_mapping_key #=> String
resp.stage #=> String

Options Hash (options):

  • :api_id (required, String)

    The identifier.

  • :api_mapping_key (String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

  • :domain_name (required, String)
  • :stage (required, String)

    A string with a length between [1-128].

Returns:

#create_authorizer(options = {}) ⇒ Types::CreateAuthorizerResponse

Creates an Authorizer for an API.

Examples:

Request syntax with placeholder values


resp = client.create_authorizer({
  api_id: "__string", # required
  authorizer_credentials_arn: "Arn",
  authorizer_result_ttl_in_seconds: 1,
  authorizer_type: "REQUEST", # required, accepts REQUEST
  authorizer_uri: "UriWithLengthBetween1And2048", # required
  identity_source: ["__string"], # required
  identity_validation_expression: "StringWithLengthBetween0And1024",
  name: "StringWithLengthBetween1And128", # required
  provider_arns: ["Arn"],
})

Response structure


resp.authorizer_credentials_arn #=> String
resp.authorizer_id #=> String
resp.authorizer_result_ttl_in_seconds #=> Integer
resp.authorizer_type #=> String, one of "REQUEST"
resp.authorizer_uri #=> String
resp.identity_source #=> Array
resp.identity_source[0] #=> String
resp.identity_validation_expression #=> String
resp.name #=> String
resp.provider_arns #=> Array
resp.provider_arns[0] #=> String

Options Hash (options):

  • :api_id (required, String)
  • :authorizer_credentials_arn (String)

    Represents an Amazon Resource Name (ARN).

  • :authorizer_result_ttl_in_seconds (Integer)

    An integer with a value between [0-3600].

  • :authorizer_type (required, String)

    The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.

  • :authorizer_uri (required, String)

    A string representation of a URI with a length between [1-2048].

  • :identity_source (required, Array<String>)

    The identity source for which authorization is requested. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is $method.request.header.Auth, $method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

  • :identity_validation_expression (String)

    A string with a length between [0-1024].

  • :name (required, String)

    A string with a length between [1-128].

  • :provider_arns (Array<String>)

    For REQUEST authorizer, this is not defined.

Returns:

#create_deployment(options = {}) ⇒ Types::CreateDeploymentResponse

Creates a Deployment for an API.

Examples:

Request syntax with placeholder values


resp = client.create_deployment({
  api_id: "__string", # required
  description: "StringWithLengthBetween0And1024",
  stage_name: "StringWithLengthBetween1And128",
})

Response structure


resp.created_date #=> Time
resp.deployment_id #=> String
resp.deployment_status #=> String, one of "PENDING", "FAILED", "DEPLOYED"
resp.deployment_status_message #=> String
resp.description #=> String

Options Hash (options):

  • :api_id (required, String)
  • :description (String)

    A string with a length between [0-1024].

  • :stage_name (String)

    A string with a length between [1-128].

Returns:

#create_domain_name(options = {}) ⇒ Types::CreateDomainNameResponse

Creates a domain name.

Examples:

Request syntax with placeholder values


resp = client.create_domain_name({
  domain_name: "StringWithLengthBetween1And512", # required
  domain_name_configurations: [
    {
      api_gateway_domain_name: "__string",
      certificate_arn: "Arn",
      certificate_name: "StringWithLengthBetween1And128",
      certificate_upload_date: Time.now,
      endpoint_type: "REGIONAL", # accepts REGIONAL, EDGE
      hosted_zone_id: "__string",
      security_policy: "TLS_1_0", # accepts TLS_1_0, TLS_1_2
      domain_name_status: "AVAILABLE", # accepts AVAILABLE, UPDATING
      domain_name_status_message: "__string",
    },
  ],
  tags: {
    "__string" => "StringWithLengthBetween1And1600",
  },
})

Response structure


resp.api_mapping_selection_expression #=> String
resp.domain_name #=> String
resp.domain_name_configurations #=> Array
resp.domain_name_configurations[0].api_gateway_domain_name #=> String
resp.domain_name_configurations[0].certificate_arn #=> String
resp.domain_name_configurations[0].certificate_name #=> String
resp.domain_name_configurations[0].certificate_upload_date #=> Time
resp.domain_name_configurations[0].endpoint_type #=> String, one of "REGIONAL", "EDGE"
resp.domain_name_configurations[0].hosted_zone_id #=> String
resp.domain_name_configurations[0].security_policy #=> String, one of "TLS_1_0", "TLS_1_2"
resp.domain_name_configurations[0].domain_name_status #=> String, one of "AVAILABLE", "UPDATING"
resp.domain_name_configurations[0].domain_name_status_message #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :domain_name (required, String)

    A string with a length between [1-512].

  • :domain_name_configurations (Array<Types::DomainNameConfiguration>)

    The domain name configurations.

  • :tags (Hash<String,String>)

    A key value pair of string with key length between[1-128] and value length between[1-256]

Returns:

#create_integration(options = {}) ⇒ Types::CreateIntegrationResult

Creates an Integration.

Examples:

Request syntax with placeholder values


resp = client.create_integration({
  api_id: "__string", # required
  connection_id: "StringWithLengthBetween1And1024",
  connection_type: "INTERNET", # accepts INTERNET, VPC_LINK
  content_handling_strategy: "CONVERT_TO_BINARY", # accepts CONVERT_TO_BINARY, CONVERT_TO_TEXT
  credentials_arn: "Arn",
  description: "StringWithLengthBetween0And1024",
  integration_method: "StringWithLengthBetween1And64",
  integration_type: "AWS", # required, accepts AWS, HTTP, MOCK, HTTP_PROXY, AWS_PROXY
  integration_uri: "UriWithLengthBetween1And2048",
  passthrough_behavior: "WHEN_NO_MATCH", # accepts WHEN_NO_MATCH, NEVER, WHEN_NO_TEMPLATES
  request_parameters: {
    "__string" => "StringWithLengthBetween1And512",
  },
  request_templates: {
    "__string" => "StringWithLengthBetween0And32K",
  },
  template_selection_expression: "SelectionExpression",
  timeout_in_millis: 1,
})

Response structure


resp.connection_id #=> String
resp.connection_type #=> String, one of "INTERNET", "VPC_LINK"
resp.content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.credentials_arn #=> String
resp.description #=> String
resp.integration_id #=> String
resp.integration_method #=> String
resp.integration_response_selection_expression #=> String
resp.integration_type #=> String, one of "AWS", "HTTP", "MOCK", "HTTP_PROXY", "AWS_PROXY"
resp.integration_uri #=> String
resp.passthrough_behavior #=> String, one of "WHEN_NO_MATCH", "NEVER", "WHEN_NO_TEMPLATES"
resp.request_parameters #=> Hash
resp.request_parameters["__string"] #=> String
resp.request_templates #=> Hash
resp.request_templates["__string"] #=> String
resp.template_selection_expression #=> String
resp.timeout_in_millis #=> Integer

Options Hash (options):

  • :api_id (required, String)
  • :connection_id (String)

    A string with a length between [1-1024].

  • :connection_type (String)

    Represents a connection type.

  • :content_handling_strategy (String)

    Specifies how to handle response payload content type conversions.

  • :credentials_arn (String)

    Represents an Amazon Resource Name (ARN).

  • :description (String)

    A string with a length between [0-1024].

  • :integration_method (String)

    A string with a length between [1-64].

  • :integration_type (required, String)

    Represents an API method integration type.

  • :integration_uri (String)

    A string representation of a URI with a length between [1-2048].

  • :passthrough_behavior (String)

    Represents passthrough behavior for an integration response.

  • :request_parameters (Hash<String,String>)

    A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.`name`, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.`name` or integration.response.body.`JSON-expression`, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

  • :request_templates (Hash<String,String>)

    A mapping of identifier keys to templates. The value is an actual template script. The key is typically a SelectionKey which is chosen based on evaluating a selection expression.

  • :template_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :timeout_in_millis (Integer)

    An integer with a value between [50-29000].

Returns:

#create_integration_response(options = {}) ⇒ Types::CreateIntegrationResponseResponse

Creates an IntegrationResponses.

Examples:

Request syntax with placeholder values


resp = client.create_integration_response({
  api_id: "__string", # required
  content_handling_strategy: "CONVERT_TO_BINARY", # accepts CONVERT_TO_BINARY, CONVERT_TO_TEXT
  integration_id: "__string", # required
  integration_response_key: "SelectionKey", # required
  response_parameters: {
    "__string" => "StringWithLengthBetween1And512",
  },
  response_templates: {
    "__string" => "StringWithLengthBetween0And32K",
  },
  template_selection_expression: "SelectionExpression",
})

Response structure


resp.content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.integration_response_id #=> String
resp.integration_response_key #=> String
resp.response_parameters #=> Hash
resp.response_parameters["__string"] #=> String
resp.response_templates #=> Hash
resp.response_templates["__string"] #=> String
resp.template_selection_expression #=> String

Options Hash (options):

  • :api_id (required, String)
  • :content_handling_strategy (String)

    Specifies how to handle response payload content type conversions.

  • :integration_id (required, String)
  • :integration_response_key (required, String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

  • :response_parameters (Hash<String,String>)

    A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.`name`, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.`name` or integration.response.body.`JSON-expression`, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

  • :response_templates (Hash<String,String>)

    A mapping of identifier keys to templates. The value is an actual template script. The key is typically a SelectionKey which is chosen based on evaluating a selection expression.

  • :template_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

Returns:

#create_model(options = {}) ⇒ Types::CreateModelResponse

Creates a Model for an API.

Examples:

Request syntax with placeholder values


resp = client.create_model({
  api_id: "__string", # required
  content_type: "StringWithLengthBetween1And256",
  description: "StringWithLengthBetween0And1024",
  name: "StringWithLengthBetween1And128", # required
  schema: "StringWithLengthBetween0And32K", # required
})

Response structure


resp.content_type #=> String
resp.description #=> String
resp.model_id #=> String
resp.name #=> String
resp.schema #=> String

Options Hash (options):

  • :api_id (required, String)
  • :content_type (String)

    A string with a length between [1-256].

  • :description (String)

    A string with a length between [0-1024].

  • :name (required, String)

    A string with a length between [1-128].

  • :schema (required, String)

    A string with a length between [0-32768].

Returns:

#create_route(options = {}) ⇒ Types::CreateRouteResult

Creates a Route for an API.

Examples:

Request syntax with placeholder values


resp = client.create_route({
  api_id: "__string", # required
  api_key_required: false,
  authorization_scopes: ["StringWithLengthBetween1And64"],
  authorization_type: "NONE", # accepts NONE, AWS_IAM, CUSTOM
  authorizer_id: "Id",
  model_selection_expression: "SelectionExpression",
  operation_name: "StringWithLengthBetween1And64",
  request_models: {
    "__string" => "StringWithLengthBetween1And128",
  },
  request_parameters: {
    "__string" => {
      required: false,
    },
  },
  route_key: "SelectionKey", # required
  route_response_selection_expression: "SelectionExpression",
  target: "StringWithLengthBetween1And128",
})

Response structure


resp.api_key_required #=> true/false
resp.authorization_scopes #=> Array
resp.authorization_scopes[0] #=> String
resp.authorization_type #=> String, one of "NONE", "AWS_IAM", "CUSTOM"
resp.authorizer_id #=> String
resp.model_selection_expression #=> String
resp.operation_name #=> String
resp.request_models #=> Hash
resp.request_models["__string"] #=> String
resp.request_parameters #=> Hash
resp.request_parameters["__string"].required #=> true/false
resp.route_id #=> String
resp.route_key #=> String
resp.route_response_selection_expression #=> String
resp.target #=> String

Options Hash (options):

  • :api_id (required, String)
  • :api_key_required (Boolean)
  • :authorization_scopes (Array<String>)

    A list of authorization scopes configured on a route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

  • :authorization_type (String)

    The authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.

  • :authorizer_id (String)

    The identifier.

  • :model_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :operation_name (String)

    A string with a length between [1-64].

  • :request_models (Hash<String,String>)

    The route models.

  • :request_parameters (Hash<String,Types::ParameterConstraints>)

    The route parameters.

  • :route_key (required, String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

  • :route_response_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :target (String)

    A string with a length between [1-128].

Returns:

#create_route_response(options = {}) ⇒ Types::CreateRouteResponseResponse

Creates a RouteResponse for a Route.

Examples:

Request syntax with placeholder values


resp = client.create_route_response({
  api_id: "__string", # required
  model_selection_expression: "SelectionExpression",
  response_models: {
    "__string" => "StringWithLengthBetween1And128",
  },
  response_parameters: {
    "__string" => {
      required: false,
    },
  },
  route_id: "__string", # required
  route_response_key: "SelectionKey", # required
})

Response structure


resp.model_selection_expression #=> String
resp.response_models #=> Hash
resp.response_models["__string"] #=> String
resp.response_parameters #=> Hash
resp.response_parameters["__string"].required #=> true/false
resp.route_response_id #=> String
resp.route_response_key #=> String

Options Hash (options):

  • :api_id (required, String)
  • :model_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :response_models (Hash<String,String>)

    The route models.

  • :response_parameters (Hash<String,Types::ParameterConstraints>)

    The route parameters.

  • :route_id (required, String)
  • :route_response_key (required, String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

Returns:

#create_stage(options = {}) ⇒ Types::CreateStageResponse

Creates a Stage for an API.

Examples:

Request syntax with placeholder values


resp = client.create_stage({
  access_log_settings: {
    destination_arn: "Arn",
    format: "StringWithLengthBetween1And1024",
  },
  api_id: "__string", # required
  client_certificate_id: "Id",
  default_route_settings: {
    data_trace_enabled: false,
    detailed_metrics_enabled: false,
    logging_level: "ERROR", # accepts ERROR, INFO, false
    throttling_burst_limit: 1,
    throttling_rate_limit: 1.0,
  },
  deployment_id: "Id",
  description: "StringWithLengthBetween0And1024",
  route_settings: {
    "__string" => {
      data_trace_enabled: false,
      detailed_metrics_enabled: false,
      logging_level: "ERROR", # accepts ERROR, INFO, false
      throttling_burst_limit: 1,
      throttling_rate_limit: 1.0,
    },
  },
  stage_name: "StringWithLengthBetween1And128", # required
  stage_variables: {
    "__string" => "StringWithLengthBetween0And2048",
  },
  tags: {
    "__string" => "StringWithLengthBetween1And1600",
  },
})

Response structure


resp.access_log_settings.destination_arn #=> String
resp.access_log_settings.format #=> String
resp.client_certificate_id #=> String
resp.created_date #=> Time
resp.default_route_settings.data_trace_enabled #=> true/false
resp.default_route_settings.detailed_metrics_enabled #=> true/false
resp.default_route_settings.logging_level #=> String, one of "ERROR", "INFO", "false"
resp.default_route_settings.throttling_burst_limit #=> Integer
resp.default_route_settings.throttling_rate_limit #=> Float
resp.deployment_id #=> String
resp.description #=> String
resp.last_updated_date #=> Time
resp.route_settings #=> Hash
resp.route_settings["__string"].data_trace_enabled #=> true/false
resp.route_settings["__string"].detailed_metrics_enabled #=> true/false
resp.route_settings["__string"].logging_level #=> String, one of "ERROR", "INFO", "false"
resp.route_settings["__string"].throttling_burst_limit #=> Integer
resp.route_settings["__string"].throttling_rate_limit #=> Float
resp.stage_name #=> String
resp.stage_variables #=> Hash
resp.stage_variables["__string"] #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :access_log_settings (Types::AccessLogSettings)

    Settings for logging access in a stage.

  • :api_id (required, String)
  • :client_certificate_id (String)

    The identifier.

  • :default_route_settings (Types::RouteSettings)

    Represents a collection of route settings.

  • :deployment_id (String)

    The identifier.

  • :description (String)

    A string with a length between [0-1024].

  • :route_settings (Hash<String,Types::RouteSettings>)

    The route settings map.

  • :stage_name (required, String)

    A string with a length between [1-128].

  • :stage_variables (Hash<String,String>)

    The stage variable map.

  • :tags (Hash<String,String>)

    A key value pair of string with key length between[1-128] and value length between[1-256]

Returns:

#delete_api(options = {}) ⇒ Struct

Deletes an Api resource.

Examples:

Request syntax with placeholder values


resp = client.delete_api({
  api_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_api_mapping(options = {}) ⇒ Struct

Deletes an API mapping.

Examples:

Request syntax with placeholder values


resp = client.delete_api_mapping({
  api_mapping_id: "__string", # required
  domain_name: "__string", # required
})

Options Hash (options):

  • :api_mapping_id (required, String)
  • :domain_name (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_authorizer(options = {}) ⇒ Struct

Deletes an Authorizer.

Examples:

Request syntax with placeholder values


resp = client.delete_authorizer({
  api_id: "__string", # required
  authorizer_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :authorizer_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_deployment(options = {}) ⇒ Struct

Deletes a Deployment.

Examples:

Request syntax with placeholder values


resp = client.delete_deployment({
  api_id: "__string", # required
  deployment_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :deployment_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_domain_name(options = {}) ⇒ Struct

Deletes a domain name.

Examples:

Request syntax with placeholder values


resp = client.delete_domain_name({
  domain_name: "__string", # required
})

Options Hash (options):

  • :domain_name (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_integration(options = {}) ⇒ Struct

Deletes an Integration.

Examples:

Request syntax with placeholder values


resp = client.delete_integration({
  api_id: "__string", # required
  integration_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :integration_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_integration_response(options = {}) ⇒ Struct

Deletes an IntegrationResponses.

Examples:

Request syntax with placeholder values


resp = client.delete_integration_response({
  api_id: "__string", # required
  integration_id: "__string", # required
  integration_response_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :integration_id (required, String)
  • :integration_response_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_model(options = {}) ⇒ Struct

Deletes a Model.

Examples:

Request syntax with placeholder values


resp = client.delete_model({
  api_id: "__string", # required
  model_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :model_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_route(options = {}) ⇒ Struct

Deletes a Route.

Examples:

Request syntax with placeholder values


resp = client.delete_route({
  api_id: "__string", # required
  route_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :route_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_route_response(options = {}) ⇒ Struct

Deletes a RouteResponse.

Examples:

Request syntax with placeholder values


resp = client.delete_route_response({
  api_id: "__string", # required
  route_id: "__string", # required
  route_response_id: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :route_id (required, String)
  • :route_response_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#delete_stage(options = {}) ⇒ Struct

Deletes a Stage.

Examples:

Request syntax with placeholder values


resp = client.delete_stage({
  api_id: "__string", # required
  stage_name: "__string", # required
})

Options Hash (options):

  • :api_id (required, String)
  • :stage_name (required, String)

Returns:

  • (Struct)

    Returns an empty response.

#get_api(options = {}) ⇒ Types::GetApiResponse

Gets an Api resource.

Examples:

Request syntax with placeholder values


resp = client.get_api({
  api_id: "__string", # required
})

Response structure


resp.api_endpoint #=> String
resp.api_id #=> String
resp.api_key_selection_expression #=> String
resp.created_date #=> Time
resp.description #=> String
resp.disable_schema_validation #=> true/false
resp.name #=> String
resp.protocol_type #=> String, one of "WEBSOCKET"
resp.route_selection_expression #=> String
resp.version #=> String
resp.warnings #=> Array
resp.warnings[0] #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :api_id (required, String)

Returns:

#get_api_mapping(options = {}) ⇒ Types::GetApiMappingResponse

The API mapping.

Examples:

Request syntax with placeholder values


resp = client.get_api_mapping({
  api_mapping_id: "__string", # required
  domain_name: "__string", # required
})

Response structure


resp.api_id #=> String
resp.api_mapping_id #=> String
resp.api_mapping_key #=> String
resp.stage #=> String

Options Hash (options):

  • :api_mapping_id (required, String)
  • :domain_name (required, String)

Returns:

#get_api_mappings(options = {}) ⇒ Types::GetApiMappingsResponse

The API mappings.

Examples:

Request syntax with placeholder values


resp = client.get_api_mappings({
  domain_name: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].api_id #=> String
resp.items[0].api_mapping_id #=> String
resp.items[0].api_mapping_key #=> String
resp.items[0].stage #=> String
resp.next_token #=> String

Options Hash (options):

  • :domain_name (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_apis(options = {}) ⇒ Types::GetApisResponse

Gets a collection of Api resources.

Examples:

Request syntax with placeholder values


resp = client.get_apis({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].api_endpoint #=> String
resp.items[0].api_id #=> String
resp.items[0].api_key_selection_expression #=> String
resp.items[0].created_date #=> Time
resp.items[0].description #=> String
resp.items[0].disable_schema_validation #=> true/false
resp.items[0].name #=> String
resp.items[0].protocol_type #=> String, one of "WEBSOCKET"
resp.items[0].route_selection_expression #=> String
resp.items[0].version #=> String
resp.items[0].warnings #=> Array
resp.items[0].warnings[0] #=> String
resp.items[0].tags #=> Hash
resp.items[0].tags["__string"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

#get_authorizer(options = {}) ⇒ Types::GetAuthorizerResponse

Gets an Authorizer.

Examples:

Request syntax with placeholder values


resp = client.get_authorizer({
  api_id: "__string", # required
  authorizer_id: "__string", # required
})

Response structure


resp.authorizer_credentials_arn #=> String
resp.authorizer_id #=> String
resp.authorizer_result_ttl_in_seconds #=> Integer
resp.authorizer_type #=> String, one of "REQUEST"
resp.authorizer_uri #=> String
resp.identity_source #=> Array
resp.identity_source[0] #=> String
resp.identity_validation_expression #=> String
resp.name #=> String
resp.provider_arns #=> Array
resp.provider_arns[0] #=> String

Options Hash (options):

  • :api_id (required, String)
  • :authorizer_id (required, String)

Returns:

#get_authorizers(options = {}) ⇒ Types::GetAuthorizersResponse

Gets the Authorizers for an API.

Examples:

Request syntax with placeholder values


resp = client.get_authorizers({
  api_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].authorizer_credentials_arn #=> String
resp.items[0].authorizer_id #=> String
resp.items[0].authorizer_result_ttl_in_seconds #=> Integer
resp.items[0].authorizer_type #=> String, one of "REQUEST"
resp.items[0].authorizer_uri #=> String
resp.items[0].identity_source #=> Array
resp.items[0].identity_source[0] #=> String
resp.items[0].identity_validation_expression #=> String
resp.items[0].name #=> String
resp.items[0].provider_arns #=> Array
resp.items[0].provider_arns[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_deployment(options = {}) ⇒ Types::GetDeploymentResponse

Gets a Deployment.

Examples:

Request syntax with placeholder values


resp = client.get_deployment({
  api_id: "__string", # required
  deployment_id: "__string", # required
})

Response structure


resp.created_date #=> Time
resp.deployment_id #=> String
resp.deployment_status #=> String, one of "PENDING", "FAILED", "DEPLOYED"
resp.deployment_status_message #=> String
resp.description #=> String

Options Hash (options):

  • :api_id (required, String)
  • :deployment_id (required, String)

Returns:

#get_deployments(options = {}) ⇒ Types::GetDeploymentsResponse

Gets the Deployments for an API.

Examples:

Request syntax with placeholder values


resp = client.get_deployments({
  api_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].created_date #=> Time
resp.items[0].deployment_id #=> String
resp.items[0].deployment_status #=> String, one of "PENDING", "FAILED", "DEPLOYED"
resp.items[0].deployment_status_message #=> String
resp.items[0].description #=> String
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_domain_name(options = {}) ⇒ Types::GetDomainNameResponse

Gets a domain name.

Examples:

Request syntax with placeholder values


resp = client.get_domain_name({
  domain_name: "__string", # required
})

Response structure


resp.api_mapping_selection_expression #=> String
resp.domain_name #=> String
resp.domain_name_configurations #=> Array
resp.domain_name_configurations[0].api_gateway_domain_name #=> String
resp.domain_name_configurations[0].certificate_arn #=> String
resp.domain_name_configurations[0].certificate_name #=> String
resp.domain_name_configurations[0].certificate_upload_date #=> Time
resp.domain_name_configurations[0].endpoint_type #=> String, one of "REGIONAL", "EDGE"
resp.domain_name_configurations[0].hosted_zone_id #=> String
resp.domain_name_configurations[0].security_policy #=> String, one of "TLS_1_0", "TLS_1_2"
resp.domain_name_configurations[0].domain_name_status #=> String, one of "AVAILABLE", "UPDATING"
resp.domain_name_configurations[0].domain_name_status_message #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :domain_name (required, String)

Returns:

#get_domain_names(options = {}) ⇒ Types::GetDomainNamesResponse

Gets the domain names for an AWS account.

Examples:

Request syntax with placeholder values


resp = client.get_domain_names({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].api_mapping_selection_expression #=> String
resp.items[0].domain_name #=> String
resp.items[0].domain_name_configurations #=> Array
resp.items[0].domain_name_configurations[0].api_gateway_domain_name #=> String
resp.items[0].domain_name_configurations[0].certificate_arn #=> String
resp.items[0].domain_name_configurations[0].certificate_name #=> String
resp.items[0].domain_name_configurations[0].certificate_upload_date #=> Time
resp.items[0].domain_name_configurations[0].endpoint_type #=> String, one of "REGIONAL", "EDGE"
resp.items[0].domain_name_configurations[0].hosted_zone_id #=> String
resp.items[0].domain_name_configurations[0].security_policy #=> String, one of "TLS_1_0", "TLS_1_2"
resp.items[0].domain_name_configurations[0].domain_name_status #=> String, one of "AVAILABLE", "UPDATING"
resp.items[0].domain_name_configurations[0].domain_name_status_message #=> String
resp.items[0].tags #=> Hash
resp.items[0].tags["__string"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

#get_integration(options = {}) ⇒ Types::GetIntegrationResult

Gets an Integration.

Examples:

Request syntax with placeholder values


resp = client.get_integration({
  api_id: "__string", # required
  integration_id: "__string", # required
})

Response structure


resp.connection_id #=> String
resp.connection_type #=> String, one of "INTERNET", "VPC_LINK"
resp.content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.credentials_arn #=> String
resp.description #=> String
resp.integration_id #=> String
resp.integration_method #=> String
resp.integration_response_selection_expression #=> String
resp.integration_type #=> String, one of "AWS", "HTTP", "MOCK", "HTTP_PROXY", "AWS_PROXY"
resp.integration_uri #=> String
resp.passthrough_behavior #=> String, one of "WHEN_NO_MATCH", "NEVER", "WHEN_NO_TEMPLATES"
resp.request_parameters #=> Hash
resp.request_parameters["__string"] #=> String
resp.request_templates #=> Hash
resp.request_templates["__string"] #=> String
resp.template_selection_expression #=> String
resp.timeout_in_millis #=> Integer

Options Hash (options):

  • :api_id (required, String)
  • :integration_id (required, String)

Returns:

#get_integration_response(options = {}) ⇒ Types::GetIntegrationResponseResponse

Gets an IntegrationResponses.

Examples:

Request syntax with placeholder values


resp = client.get_integration_response({
  api_id: "__string", # required
  integration_id: "__string", # required
  integration_response_id: "__string", # required
})

Response structure


resp.content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.integration_response_id #=> String
resp.integration_response_key #=> String
resp.response_parameters #=> Hash
resp.response_parameters["__string"] #=> String
resp.response_templates #=> Hash
resp.response_templates["__string"] #=> String
resp.template_selection_expression #=> String

Options Hash (options):

  • :api_id (required, String)
  • :integration_id (required, String)
  • :integration_response_id (required, String)

Returns:

#get_integration_responses(options = {}) ⇒ Types::GetIntegrationResponsesResponse

Gets the IntegrationResponses for an Integration.

Examples:

Request syntax with placeholder values


resp = client.get_integration_responses({
  api_id: "__string", # required
  integration_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.items[0].integration_response_id #=> String
resp.items[0].integration_response_key #=> String
resp.items[0].response_parameters #=> Hash
resp.items[0].response_parameters["__string"] #=> String
resp.items[0].response_templates #=> Hash
resp.items[0].response_templates["__string"] #=> String
resp.items[0].template_selection_expression #=> String
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :integration_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_integrations(options = {}) ⇒ Types::GetIntegrationsResponse

Gets the Integrations for an API.

Examples:

Request syntax with placeholder values


resp = client.get_integrations({
  api_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].connection_id #=> String
resp.items[0].connection_type #=> String, one of "INTERNET", "VPC_LINK"
resp.items[0].content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.items[0].credentials_arn #=> String
resp.items[0].description #=> String
resp.items[0].integration_id #=> String
resp.items[0].integration_method #=> String
resp.items[0].integration_response_selection_expression #=> String
resp.items[0].integration_type #=> String, one of "AWS", "HTTP", "MOCK", "HTTP_PROXY", "AWS_PROXY"
resp.items[0].integration_uri #=> String
resp.items[0].passthrough_behavior #=> String, one of "WHEN_NO_MATCH", "NEVER", "WHEN_NO_TEMPLATES"
resp.items[0].request_parameters #=> Hash
resp.items[0].request_parameters["__string"] #=> String
resp.items[0].request_templates #=> Hash
resp.items[0].request_templates["__string"] #=> String
resp.items[0].template_selection_expression #=> String
resp.items[0].timeout_in_millis #=> Integer
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_model(options = {}) ⇒ Types::GetModelResponse

Gets a Model.

Examples:

Request syntax with placeholder values


resp = client.get_model({
  api_id: "__string", # required
  model_id: "__string", # required
})

Response structure


resp.content_type #=> String
resp.description #=> String
resp.model_id #=> String
resp.name #=> String
resp.schema #=> String

Options Hash (options):

  • :api_id (required, String)
  • :model_id (required, String)

Returns:

#get_model_template(options = {}) ⇒ Types::GetModelTemplateResponse

Gets a model template.

Examples:

Request syntax with placeholder values


resp = client.get_model_template({
  api_id: "__string", # required
  model_id: "__string", # required
})

Response structure


resp.value #=> String

Options Hash (options):

  • :api_id (required, String)
  • :model_id (required, String)

Returns:

#get_models(options = {}) ⇒ Types::GetModelsResponse

Gets the Models for an API.

Examples:

Request syntax with placeholder values


resp = client.get_models({
  api_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].content_type #=> String
resp.items[0].description #=> String
resp.items[0].model_id #=> String
resp.items[0].name #=> String
resp.items[0].schema #=> String
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_route(options = {}) ⇒ Types::GetRouteResult

Gets a Route.

Examples:

Request syntax with placeholder values


resp = client.get_route({
  api_id: "__string", # required
  route_id: "__string", # required
})

Response structure


resp.api_key_required #=> true/false
resp.authorization_scopes #=> Array
resp.authorization_scopes[0] #=> String
resp.authorization_type #=> String, one of "NONE", "AWS_IAM", "CUSTOM"
resp.authorizer_id #=> String
resp.model_selection_expression #=> String
resp.operation_name #=> String
resp.request_models #=> Hash
resp.request_models["__string"] #=> String
resp.request_parameters #=> Hash
resp.request_parameters["__string"].required #=> true/false
resp.route_id #=> String
resp.route_key #=> String
resp.route_response_selection_expression #=> String
resp.target #=> String

Options Hash (options):

  • :api_id (required, String)
  • :route_id (required, String)

Returns:

#get_route_response(options = {}) ⇒ Types::GetRouteResponseResponse

Gets a RouteResponse.

Examples:

Request syntax with placeholder values


resp = client.get_route_response({
  api_id: "__string", # required
  route_id: "__string", # required
  route_response_id: "__string", # required
})

Response structure


resp.model_selection_expression #=> String
resp.response_models #=> Hash
resp.response_models["__string"] #=> String
resp.response_parameters #=> Hash
resp.response_parameters["__string"].required #=> true/false
resp.route_response_id #=> String
resp.route_response_key #=> String

Options Hash (options):

  • :api_id (required, String)
  • :route_id (required, String)
  • :route_response_id (required, String)

Returns:

#get_route_responses(options = {}) ⇒ Types::GetRouteResponsesResponse

Gets the RouteResponses for a Route.

Examples:

Request syntax with placeholder values


resp = client.get_route_responses({
  api_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
  route_id: "__string", # required
})

Response structure


resp.items #=> Array
resp.items[0].model_selection_expression #=> String
resp.items[0].response_models #=> Hash
resp.items[0].response_models["__string"] #=> String
resp.items[0].response_parameters #=> Hash
resp.items[0].response_parameters["__string"].required #=> true/false
resp.items[0].route_response_id #=> String
resp.items[0].route_response_key #=> String
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :max_results (String)
  • :next_token (String)
  • :route_id (required, String)

Returns:

#get_routes(options = {}) ⇒ Types::GetRoutesResponse

Gets the Routes for an API.

Examples:

Request syntax with placeholder values


resp = client.get_routes({
  api_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].api_key_required #=> true/false
resp.items[0].authorization_scopes #=> Array
resp.items[0].authorization_scopes[0] #=> String
resp.items[0].authorization_type #=> String, one of "NONE", "AWS_IAM", "CUSTOM"
resp.items[0].authorizer_id #=> String
resp.items[0].model_selection_expression #=> String
resp.items[0].operation_name #=> String
resp.items[0].request_models #=> Hash
resp.items[0].request_models["__string"] #=> String
resp.items[0].request_parameters #=> Hash
resp.items[0].request_parameters["__string"].required #=> true/false
resp.items[0].route_id #=> String
resp.items[0].route_key #=> String
resp.items[0].route_response_selection_expression #=> String
resp.items[0].target #=> String
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_stage(options = {}) ⇒ Types::GetStageResponse

Gets a Stage.

Examples:

Request syntax with placeholder values


resp = client.get_stage({
  api_id: "__string", # required
  stage_name: "__string", # required
})

Response structure


resp.access_log_settings.destination_arn #=> String
resp.access_log_settings.format #=> String
resp.client_certificate_id #=> String
resp.created_date #=> Time
resp.default_route_settings.data_trace_enabled #=> true/false
resp.default_route_settings.detailed_metrics_enabled #=> true/false
resp.default_route_settings.logging_level #=> String, one of "ERROR", "INFO", "false"
resp.default_route_settings.throttling_burst_limit #=> Integer
resp.default_route_settings.throttling_rate_limit #=> Float
resp.deployment_id #=> String
resp.description #=> String
resp.last_updated_date #=> Time
resp.route_settings #=> Hash
resp.route_settings["__string"].data_trace_enabled #=> true/false
resp.route_settings["__string"].detailed_metrics_enabled #=> true/false
resp.route_settings["__string"].logging_level #=> String, one of "ERROR", "INFO", "false"
resp.route_settings["__string"].throttling_burst_limit #=> Integer
resp.route_settings["__string"].throttling_rate_limit #=> Float
resp.stage_name #=> String
resp.stage_variables #=> Hash
resp.stage_variables["__string"] #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :api_id (required, String)
  • :stage_name (required, String)

Returns:

#get_stages(options = {}) ⇒ Types::GetStagesResponse

Gets the Stages for an API.

Examples:

Request syntax with placeholder values


resp = client.get_stages({
  api_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.items #=> Array
resp.items[0].access_log_settings.destination_arn #=> String
resp.items[0].access_log_settings.format #=> String
resp.items[0].client_certificate_id #=> String
resp.items[0].created_date #=> Time
resp.items[0].default_route_settings.data_trace_enabled #=> true/false
resp.items[0].default_route_settings.detailed_metrics_enabled #=> true/false
resp.items[0].default_route_settings.logging_level #=> String, one of "ERROR", "INFO", "false"
resp.items[0].default_route_settings.throttling_burst_limit #=> Integer
resp.items[0].default_route_settings.throttling_rate_limit #=> Float
resp.items[0].deployment_id #=> String
resp.items[0].description #=> String
resp.items[0].last_updated_date #=> Time
resp.items[0].route_settings #=> Hash
resp.items[0].route_settings["__string"].data_trace_enabled #=> true/false
resp.items[0].route_settings["__string"].detailed_metrics_enabled #=> true/false
resp.items[0].route_settings["__string"].logging_level #=> String, one of "ERROR", "INFO", "false"
resp.items[0].route_settings["__string"].throttling_burst_limit #=> Integer
resp.items[0].route_settings["__string"].throttling_rate_limit #=> Float
resp.items[0].stage_name #=> String
resp.items[0].stage_variables #=> Hash
resp.items[0].stage_variables["__string"] #=> String
resp.items[0].tags #=> Hash
resp.items[0].tags["__string"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :api_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

#get_tags(options = {}) ⇒ Types::GetTagsResponse

Gets the Tags for a resource.

Examples:

Request syntax with placeholder values


resp = client.get_tags({
  resource_arn: "__string", # required
})

Response structure


resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :resource_arn (required, String)

Returns:

#tag_resource(options = {}) ⇒ Struct

Returns an empty response.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "__string", # required
  tags: {
    "__string" => "StringWithLengthBetween1And1600",
  },
})

Options Hash (options):

  • :resource_arn (required, String)
  • :tags (Hash<String,String>)

    A key value pair of string with key length between[1-128] and value length between[1-256]

Returns:

  • (Struct)

    Returns an empty response.

#untag_resource(options = {}) ⇒ Struct

Returns an empty response.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "__string", # required
  tag_keys: ["__string"], # required
})

Options Hash (options):

  • :resource_arn (required, String)
  • :tag_keys (required, Array<String>)

Returns:

  • (Struct)

    Returns an empty response.

#update_api(options = {}) ⇒ Types::UpdateApiResponse

Updates an Api resource.

Examples:

Request syntax with placeholder values


resp = client.update_api({
  api_id: "__string", # required
  api_key_selection_expression: "SelectionExpression",
  description: "StringWithLengthBetween0And1024",
  disable_schema_validation: false,
  name: "StringWithLengthBetween1And128",
  route_selection_expression: "SelectionExpression",
  version: "StringWithLengthBetween1And64",
})

Response structure


resp.api_endpoint #=> String
resp.api_id #=> String
resp.api_key_selection_expression #=> String
resp.created_date #=> Time
resp.description #=> String
resp.disable_schema_validation #=> true/false
resp.name #=> String
resp.protocol_type #=> String, one of "WEBSOCKET"
resp.route_selection_expression #=> String
resp.version #=> String
resp.warnings #=> Array
resp.warnings[0] #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :api_id (required, String)
  • :api_key_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :description (String)

    A string with a length between [0-1024].

  • :disable_schema_validation (Boolean)
  • :name (String)

    A string with a length between [1-128].

  • :route_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :version (String)

    A string with a length between [1-64].

Returns:

#update_api_mapping(options = {}) ⇒ Types::UpdateApiMappingResponse

The API mapping.

Examples:

Request syntax with placeholder values


resp = client.update_api_mapping({
  api_id: "Id", # required
  api_mapping_id: "__string", # required
  api_mapping_key: "SelectionKey",
  domain_name: "__string", # required
  stage: "StringWithLengthBetween1And128",
})

Response structure


resp.api_id #=> String
resp.api_mapping_id #=> String
resp.api_mapping_key #=> String
resp.stage #=> String

Options Hash (options):

  • :api_id (required, String)

    The identifier.

  • :api_mapping_id (required, String)
  • :api_mapping_key (String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

  • :domain_name (required, String)
  • :stage (String)

    A string with a length between [1-128].

Returns:

#update_authorizer(options = {}) ⇒ Types::UpdateAuthorizerResponse

Updates an Authorizer.

Examples:

Request syntax with placeholder values


resp = client.update_authorizer({
  api_id: "__string", # required
  authorizer_credentials_arn: "Arn",
  authorizer_id: "__string", # required
  authorizer_result_ttl_in_seconds: 1,
  authorizer_type: "REQUEST", # accepts REQUEST
  authorizer_uri: "UriWithLengthBetween1And2048",
  identity_source: ["__string"],
  identity_validation_expression: "StringWithLengthBetween0And1024",
  name: "StringWithLengthBetween1And128",
  provider_arns: ["Arn"],
})

Response structure


resp.authorizer_credentials_arn #=> String
resp.authorizer_id #=> String
resp.authorizer_result_ttl_in_seconds #=> Integer
resp.authorizer_type #=> String, one of "REQUEST"
resp.authorizer_uri #=> String
resp.identity_source #=> Array
resp.identity_source[0] #=> String
resp.identity_validation_expression #=> String
resp.name #=> String
resp.provider_arns #=> Array
resp.provider_arns[0] #=> String

Options Hash (options):

  • :api_id (required, String)
  • :authorizer_credentials_arn (String)

    Represents an Amazon Resource Name (ARN).

  • :authorizer_id (required, String)
  • :authorizer_result_ttl_in_seconds (Integer)

    An integer with a value between [0-3600].

  • :authorizer_type (String)

    The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.

  • :authorizer_uri (String)

    A string representation of a URI with a length between [1-2048].

  • :identity_source (Array<String>)

    The identity source for which authorization is requested. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is $method.request.header.Auth, $method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

  • :identity_validation_expression (String)

    A string with a length between [0-1024].

  • :name (String)

    A string with a length between [1-128].

  • :provider_arns (Array<String>)

    For REQUEST authorizer, this is not defined.

Returns:

#update_deployment(options = {}) ⇒ Types::UpdateDeploymentResponse

Updates a Deployment.

Examples:

Request syntax with placeholder values


resp = client.update_deployment({
  api_id: "__string", # required
  deployment_id: "__string", # required
  description: "StringWithLengthBetween0And1024",
})

Response structure


resp.created_date #=> Time
resp.deployment_id #=> String
resp.deployment_status #=> String, one of "PENDING", "FAILED", "DEPLOYED"
resp.deployment_status_message #=> String
resp.description #=> String

Options Hash (options):

  • :api_id (required, String)
  • :deployment_id (required, String)
  • :description (String)

    A string with a length between [0-1024].

Returns:

#update_domain_name(options = {}) ⇒ Types::UpdateDomainNameResponse

Updates a domain name.

Examples:

Request syntax with placeholder values


resp = client.update_domain_name({
  domain_name: "__string", # required
  domain_name_configurations: [
    {
      api_gateway_domain_name: "__string",
      certificate_arn: "Arn",
      certificate_name: "StringWithLengthBetween1And128",
      certificate_upload_date: Time.now,
      endpoint_type: "REGIONAL", # accepts REGIONAL, EDGE
      hosted_zone_id: "__string",
      security_policy: "TLS_1_0", # accepts TLS_1_0, TLS_1_2
      domain_name_status: "AVAILABLE", # accepts AVAILABLE, UPDATING
      domain_name_status_message: "__string",
    },
  ],
})

Response structure


resp.api_mapping_selection_expression #=> String
resp.domain_name #=> String
resp.domain_name_configurations #=> Array
resp.domain_name_configurations[0].api_gateway_domain_name #=> String
resp.domain_name_configurations[0].certificate_arn #=> String
resp.domain_name_configurations[0].certificate_name #=> String
resp.domain_name_configurations[0].certificate_upload_date #=> Time
resp.domain_name_configurations[0].endpoint_type #=> String, one of "REGIONAL", "EDGE"
resp.domain_name_configurations[0].hosted_zone_id #=> String
resp.domain_name_configurations[0].security_policy #=> String, one of "TLS_1_0", "TLS_1_2"
resp.domain_name_configurations[0].domain_name_status #=> String, one of "AVAILABLE", "UPDATING"
resp.domain_name_configurations[0].domain_name_status_message #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

Returns:

#update_integration(options = {}) ⇒ Types::UpdateIntegrationResult

Updates an Integration.

Examples:

Request syntax with placeholder values


resp = client.update_integration({
  api_id: "__string", # required
  connection_id: "StringWithLengthBetween1And1024",
  connection_type: "INTERNET", # accepts INTERNET, VPC_LINK
  content_handling_strategy: "CONVERT_TO_BINARY", # accepts CONVERT_TO_BINARY, CONVERT_TO_TEXT
  credentials_arn: "Arn",
  description: "StringWithLengthBetween0And1024",
  integration_id: "__string", # required
  integration_method: "StringWithLengthBetween1And64",
  integration_type: "AWS", # accepts AWS, HTTP, MOCK, HTTP_PROXY, AWS_PROXY
  integration_uri: "UriWithLengthBetween1And2048",
  passthrough_behavior: "WHEN_NO_MATCH", # accepts WHEN_NO_MATCH, NEVER, WHEN_NO_TEMPLATES
  request_parameters: {
    "__string" => "StringWithLengthBetween1And512",
  },
  request_templates: {
    "__string" => "StringWithLengthBetween0And32K",
  },
  template_selection_expression: "SelectionExpression",
  timeout_in_millis: 1,
})

Response structure


resp.connection_id #=> String
resp.connection_type #=> String, one of "INTERNET", "VPC_LINK"
resp.content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.credentials_arn #=> String
resp.description #=> String
resp.integration_id #=> String
resp.integration_method #=> String
resp.integration_response_selection_expression #=> String
resp.integration_type #=> String, one of "AWS", "HTTP", "MOCK", "HTTP_PROXY", "AWS_PROXY"
resp.integration_uri #=> String
resp.passthrough_behavior #=> String, one of "WHEN_NO_MATCH", "NEVER", "WHEN_NO_TEMPLATES"
resp.request_parameters #=> Hash
resp.request_parameters["__string"] #=> String
resp.request_templates #=> Hash
resp.request_templates["__string"] #=> String
resp.template_selection_expression #=> String
resp.timeout_in_millis #=> Integer

Options Hash (options):

  • :api_id (required, String)
  • :connection_id (String)

    A string with a length between [1-1024].

  • :connection_type (String)

    Represents a connection type.

  • :content_handling_strategy (String)

    Specifies how to handle response payload content type conversions.

  • :credentials_arn (String)

    Represents an Amazon Resource Name (ARN).

  • :description (String)

    A string with a length between [0-1024].

  • :integration_id (required, String)
  • :integration_method (String)

    A string with a length between [1-64].

  • :integration_type (String)

    Represents an API method integration type.

  • :integration_uri (String)

    A string representation of a URI with a length between [1-2048].

  • :passthrough_behavior (String)

    Represents passthrough behavior for an integration response.

  • :request_parameters (Hash<String,String>)

    A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.`name`, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.`name` or integration.response.body.`JSON-expression`, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

  • :request_templates (Hash<String,String>)

    A mapping of identifier keys to templates. The value is an actual template script. The key is typically a SelectionKey which is chosen based on evaluating a selection expression.

  • :template_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :timeout_in_millis (Integer)

    An integer with a value between [50-29000].

Returns:

#update_integration_response(options = {}) ⇒ Types::UpdateIntegrationResponseResponse

Updates an IntegrationResponses.

Examples:

Request syntax with placeholder values


resp = client.update_integration_response({
  api_id: "__string", # required
  content_handling_strategy: "CONVERT_TO_BINARY", # accepts CONVERT_TO_BINARY, CONVERT_TO_TEXT
  integration_id: "__string", # required
  integration_response_id: "__string", # required
  integration_response_key: "SelectionKey",
  response_parameters: {
    "__string" => "StringWithLengthBetween1And512",
  },
  response_templates: {
    "__string" => "StringWithLengthBetween0And32K",
  },
  template_selection_expression: "SelectionExpression",
})

Response structure


resp.content_handling_strategy #=> String, one of "CONVERT_TO_BINARY", "CONVERT_TO_TEXT"
resp.integration_response_id #=> String
resp.integration_response_key #=> String
resp.response_parameters #=> Hash
resp.response_parameters["__string"] #=> String
resp.response_templates #=> Hash
resp.response_templates["__string"] #=> String
resp.template_selection_expression #=> String

Options Hash (options):

  • :api_id (required, String)
  • :content_handling_strategy (String)

    Specifies how to handle response payload content type conversions.

  • :integration_id (required, String)
  • :integration_response_id (required, String)
  • :integration_response_key (String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

  • :response_parameters (Hash<String,String>)

    A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.`name`, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.`name` or integration.response.body.`JSON-expression`, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

  • :response_templates (Hash<String,String>)

    A mapping of identifier keys to templates. The value is an actual template script. The key is typically a SelectionKey which is chosen based on evaluating a selection expression.

  • :template_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

Returns:

#update_model(options = {}) ⇒ Types::UpdateModelResponse

Updates a Model.

Examples:

Request syntax with placeholder values


resp = client.update_model({
  api_id: "__string", # required
  content_type: "StringWithLengthBetween1And256",
  description: "StringWithLengthBetween0And1024",
  model_id: "__string", # required
  name: "StringWithLengthBetween1And128",
  schema: "StringWithLengthBetween0And32K",
})

Response structure


resp.content_type #=> String
resp.description #=> String
resp.model_id #=> String
resp.name #=> String
resp.schema #=> String

Options Hash (options):

  • :api_id (required, String)
  • :content_type (String)

    A string with a length between [1-256].

  • :description (String)

    A string with a length between [0-1024].

  • :model_id (required, String)
  • :name (String)

    A string with a length between [1-128].

  • :schema (String)

    A string with a length between [0-32768].

Returns:

#update_route(options = {}) ⇒ Types::UpdateRouteResult

Updates a Route.

Examples:

Request syntax with placeholder values


resp = client.update_route({
  api_id: "__string", # required
  api_key_required: false,
  authorization_scopes: ["StringWithLengthBetween1And64"],
  authorization_type: "NONE", # accepts NONE, AWS_IAM, CUSTOM
  authorizer_id: "Id",
  model_selection_expression: "SelectionExpression",
  operation_name: "StringWithLengthBetween1And64",
  request_models: {
    "__string" => "StringWithLengthBetween1And128",
  },
  request_parameters: {
    "__string" => {
      required: false,
    },
  },
  route_id: "__string", # required
  route_key: "SelectionKey",
  route_response_selection_expression: "SelectionExpression",
  target: "StringWithLengthBetween1And128",
})

Response structure


resp.api_key_required #=> true/false
resp.authorization_scopes #=> Array
resp.authorization_scopes[0] #=> String
resp.authorization_type #=> String, one of "NONE", "AWS_IAM", "CUSTOM"
resp.authorizer_id #=> String
resp.model_selection_expression #=> String
resp.operation_name #=> String
resp.request_models #=> Hash
resp.request_models["__string"] #=> String
resp.request_parameters #=> Hash
resp.request_parameters["__string"].required #=> true/false
resp.route_id #=> String
resp.route_key #=> String
resp.route_response_selection_expression #=> String
resp.target #=> String

Options Hash (options):

  • :api_id (required, String)
  • :api_key_required (Boolean)
  • :authorization_scopes (Array<String>)

    A list of authorization scopes configured on a route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

  • :authorization_type (String)

    The authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.

  • :authorizer_id (String)

    The identifier.

  • :model_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :operation_name (String)

    A string with a length between [1-64].

  • :request_models (Hash<String,String>)

    The route models.

  • :request_parameters (Hash<String,Types::ParameterConstraints>)

    The route parameters.

  • :route_id (required, String)
  • :route_key (String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

  • :route_response_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :target (String)

    A string with a length between [1-128].

Returns:

#update_route_response(options = {}) ⇒ Types::UpdateRouteResponseResponse

Updates a RouteResponse.

Examples:

Request syntax with placeholder values


resp = client.update_route_response({
  api_id: "__string", # required
  model_selection_expression: "SelectionExpression",
  response_models: {
    "__string" => "StringWithLengthBetween1And128",
  },
  response_parameters: {
    "__string" => {
      required: false,
    },
  },
  route_id: "__string", # required
  route_response_id: "__string", # required
  route_response_key: "SelectionKey",
})

Response structure


resp.model_selection_expression #=> String
resp.response_models #=> Hash
resp.response_models["__string"] #=> String
resp.response_parameters #=> Hash
resp.response_parameters["__string"].required #=> true/false
resp.route_response_id #=> String
resp.route_response_key #=> String

Options Hash (options):

  • :api_id (required, String)
  • :model_selection_expression (String)

    An expression used to extract information at runtime. See Selection Expressions for more information.

  • :response_models (Hash<String,String>)

    The route models.

  • :response_parameters (Hash<String,Types::ParameterConstraints>)

    The route parameters.

  • :route_id (required, String)
  • :route_response_id (required, String)
  • :route_response_key (String)

    After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

Returns:

#update_stage(options = {}) ⇒ Types::UpdateStageResponse

Updates a Stage.

Examples:

Request syntax with placeholder values


resp = client.update_stage({
  access_log_settings: {
    destination_arn: "Arn",
    format: "StringWithLengthBetween1And1024",
  },
  api_id: "__string", # required
  client_certificate_id: "Id",
  default_route_settings: {
    data_trace_enabled: false,
    detailed_metrics_enabled: false,
    logging_level: "ERROR", # accepts ERROR, INFO, false
    throttling_burst_limit: 1,
    throttling_rate_limit: 1.0,
  },
  deployment_id: "Id",
  description: "StringWithLengthBetween0And1024",
  route_settings: {
    "__string" => {
      data_trace_enabled: false,
      detailed_metrics_enabled: false,
      logging_level: "ERROR", # accepts ERROR, INFO, false
      throttling_burst_limit: 1,
      throttling_rate_limit: 1.0,
    },
  },
  stage_name: "__string", # required
  stage_variables: {
    "__string" => "StringWithLengthBetween0And2048",
  },
})

Response structure


resp.access_log_settings.destination_arn #=> String
resp.access_log_settings.format #=> String
resp.client_certificate_id #=> String
resp.created_date #=> Time
resp.default_route_settings.data_trace_enabled #=> true/false
resp.default_route_settings.detailed_metrics_enabled #=> true/false
resp.default_route_settings.logging_level #=> String, one of "ERROR", "INFO", "false"
resp.default_route_settings.throttling_burst_limit #=> Integer
resp.default_route_settings.throttling_rate_limit #=> Float
resp.deployment_id #=> String
resp.description #=> String
resp.last_updated_date #=> Time
resp.route_settings #=> Hash
resp.route_settings["__string"].data_trace_enabled #=> true/false
resp.route_settings["__string"].detailed_metrics_enabled #=> true/false
resp.route_settings["__string"].logging_level #=> String, one of "ERROR", "INFO", "false"
resp.route_settings["__string"].throttling_burst_limit #=> Integer
resp.route_settings["__string"].throttling_rate_limit #=> Float
resp.stage_name #=> String
resp.stage_variables #=> Hash
resp.stage_variables["__string"] #=> String
resp.tags #=> Hash
resp.tags["__string"] #=> String

Options Hash (options):

  • :access_log_settings (Types::AccessLogSettings)

    Settings for logging access in a stage.

  • :api_id (required, String)
  • :client_certificate_id (String)

    The identifier.

  • :default_route_settings (Types::RouteSettings)

    Represents a collection of route settings.

  • :deployment_id (String)

    The identifier.

  • :description (String)

    A string with a length between [0-1024].

  • :route_settings (Hash<String,Types::RouteSettings>)

    The route settings map.

  • :stage_name (required, String)
  • :stage_variables (Hash<String,String>)

    The stage variable map.

Returns:

#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.