You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::APIGateway::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::APIGateway::Client
- Defined in:
- (unknown)
Overview
An API client for Amazon API Gateway. To construct a client, you need to configure a :region
and :credentials
.
apigateway = Aws::APIGateway::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']
andENV['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::APIGateway::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
Constructor collapse
-
#initialize(options = {}) ⇒ Aws::APIGateway::Client
constructor
Constructs an API client.
API Operations collapse
-
#create_api_key(options = {}) ⇒ Types::ApiKey
Create an ApiKey resource.
- #create_authorizer(options = {}) ⇒ Types::Authorizer
-
#create_base_path_mapping(options = {}) ⇒ Types::BasePathMapping
Creates a new BasePathMapping resource.
.
-
#create_deployment(options = {}) ⇒ Types::Deployment
Creates a Deployment resource, which makes a specified RestApi callable over the internet.
.
-
#create_documentation_part(options = {}) ⇒ Types::DocumentationPart
Returns a response object which responds to the following methods:.
-
#create_documentation_version(options = {}) ⇒ Types::DocumentationVersion
Returns a response object which responds to the following methods:.
-
#create_domain_name(options = {}) ⇒ Types::DomainName
Creates a new domain name.
.
- #create_model(options = {}) ⇒ Types::Model
-
#create_request_validator(options = {}) ⇒ Types::RequestValidator
Creates a ReqeustValidator of a given RestApi.
.
-
#create_resource(options = {}) ⇒ Types::Resource
Creates a Resource resource.
.
-
#create_rest_api(options = {}) ⇒ Types::RestApi
Creates a new RestApi resource.
.
-
#create_stage(options = {}) ⇒ Types::Stage
Creates a new Stage resource that references a pre-existing Deployment for the API.
-
#create_usage_plan(options = {}) ⇒ Types::UsagePlan
Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.
-
#create_usage_plan_key(options = {}) ⇒ Types::UsagePlanKey
Creates a usage plan key for adding an existing API key to a usage plan.
.
-
#create_vpc_link(options = {}) ⇒ Types::VpcLink
Creates a VPC link, under the caller's account in a selected region, in an asynchronous operation that typically takes 2-4 minutes to complete and become operational.
-
#delete_api_key(options = {}) ⇒ Struct
Deletes the ApiKey resource.
.
- #delete_authorizer(options = {}) ⇒ Struct
-
#delete_base_path_mapping(options = {}) ⇒ Struct
Deletes the BasePathMapping resource.
.
-
#delete_client_certificate(options = {}) ⇒ Struct
Deletes the ClientCertificate resource.
.
-
#delete_deployment(options = {}) ⇒ Struct
Deletes a Deployment resource.
-
#delete_documentation_part(options = {}) ⇒ Struct
Returns an empty response.
-
#delete_documentation_version(options = {}) ⇒ Struct
Returns an empty response.
-
#delete_domain_name(options = {}) ⇒ Struct
Deletes the DomainName resource.
.
-
#delete_gateway_response(options = {}) ⇒ Struct
Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.
.
-
#delete_integration(options = {}) ⇒ Struct
Represents a delete integration.
.
-
#delete_integration_response(options = {}) ⇒ Struct
Represents a delete integration response.
.
-
#delete_method(options = {}) ⇒ Struct
Deletes an existing Method resource.
.
-
#delete_method_response(options = {}) ⇒ Struct
Deletes an existing MethodResponse resource.
.
-
#delete_model(options = {}) ⇒ Struct
Deletes a model.
.
-
#delete_request_validator(options = {}) ⇒ Struct
Deletes a RequestValidator of a given RestApi.
.
-
#delete_resource(options = {}) ⇒ Struct
Deletes a Resource resource.
.
-
#delete_rest_api(options = {}) ⇒ Struct
Deletes the specified API.
.
-
#delete_stage(options = {}) ⇒ Struct
Deletes a Stage resource.
.
-
#delete_usage_plan(options = {}) ⇒ Struct
Deletes a usage plan of a given plan Id.
.
-
#delete_usage_plan_key(options = {}) ⇒ Struct
Deletes a usage plan key and remove the underlying API key from the associated usage plan.
.
-
#delete_vpc_link(options = {}) ⇒ Struct
Deletes an existing VpcLink of a specified identifier.
.
-
#flush_stage_authorizers_cache(options = {}) ⇒ Struct
Flushes all authorizer cache entries on a stage.
.
-
#flush_stage_cache(options = {}) ⇒ Struct
Flushes a stage's cache.
.
-
#generate_client_certificate(options = {}) ⇒ Types::ClientCertificate
Generates a ClientCertificate resource.
.
-
#get_account(options = {}) ⇒ Types::Account
Gets information about the current Account resource.
.
-
#get_api_key(options = {}) ⇒ Types::ApiKey
Gets information about the current ApiKey resource.
.
-
#get_api_keys(options = {}) ⇒ Types::ApiKeys
Gets information about the current ApiKeys resource.
.
- #get_authorizer(options = {}) ⇒ Types::Authorizer
- #get_authorizers(options = {}) ⇒ Types::Authorizers
-
#get_base_path_mapping(options = {}) ⇒ Types::BasePathMapping
Describe a BasePathMapping resource.
.
-
#get_base_path_mappings(options = {}) ⇒ Types::BasePathMappings
Represents a collection of BasePathMapping resources.
.
-
#get_client_certificate(options = {}) ⇒ Types::ClientCertificate
Gets information about the current ClientCertificate resource.
.
-
#get_client_certificates(options = {}) ⇒ Types::ClientCertificates
Gets a collection of ClientCertificate resources.
.
-
#get_deployment(options = {}) ⇒ Types::Deployment
Gets information about a Deployment resource.
.
-
#get_deployments(options = {}) ⇒ Types::Deployments
Gets information about a Deployments collection.
.
-
#get_documentation_part(options = {}) ⇒ Types::DocumentationPart
Returns a response object which responds to the following methods:.
-
#get_documentation_parts(options = {}) ⇒ Types::DocumentationParts
Returns a response object which responds to the following methods:.
-
#get_documentation_version(options = {}) ⇒ Types::DocumentationVersion
Returns a response object which responds to the following methods:.
-
#get_documentation_versions(options = {}) ⇒ Types::DocumentationVersions
Returns a response object which responds to the following methods:.
-
#get_domain_name(options = {}) ⇒ Types::DomainName
Represents a domain name that is contained in a simpler, more intuitive URL that can be called.
.
-
#get_domain_names(options = {}) ⇒ Types::DomainNames
Represents a collection of DomainName resources.
.
-
#get_export(options = {}) ⇒ Types::ExportResponse
Exports a deployed version of a RestApi in a specified format.
.
-
#get_gateway_response(options = {}) ⇒ Types::GatewayResponse
Gets a GatewayResponse of a specified response type on the given RestApi.
.
-
#get_gateway_responses(options = {}) ⇒ Types::GatewayResponses
Gets the GatewayResponses collection on the given RestApi.
-
#get_integration(options = {}) ⇒ Types::Integration
Get the integration settings.
.
-
#get_integration_response(options = {}) ⇒ Types::IntegrationResponse
Represents a get integration response.
.
-
#get_method(options = {}) ⇒ Types::Method
Describe an existing Method resource.
.
-
#get_method_response(options = {}) ⇒ Types::MethodResponse
Describes a MethodResponse resource.
.
-
#get_model(options = {}) ⇒ Types::Model
Describes an existing model defined for a RestApi resource.
.
-
#get_model_template(options = {}) ⇒ Types::Template
Generates a sample mapping template that can be used to transform a payload into the structure of a model.
.
- #get_models(options = {}) ⇒ Types::Models
-
#get_request_validator(options = {}) ⇒ Types::RequestValidator
Gets a RequestValidator of a given RestApi.
.
-
#get_request_validators(options = {}) ⇒ Types::RequestValidators
Gets the RequestValidators collection of a given RestApi.
.
-
#get_resource(options = {}) ⇒ Types::Resource
Lists information about a resource.
.
-
#get_resources(options = {}) ⇒ Types::Resources
Lists information about a collection of Resource resources.
.
-
#get_rest_api(options = {}) ⇒ Types::RestApi
Lists the RestApi resource in the collection.
.
-
#get_rest_apis(options = {}) ⇒ Types::RestApis
Lists the RestApis resources for your collection.
.
- #get_sdk(options = {}) ⇒ Types::SdkResponse
-
#get_sdk_type(options = {}) ⇒ Types::SdkType
Returns a response object which responds to the following methods:.
-
#get_sdk_types(options = {}) ⇒ Types::SdkTypes
Returns a response object which responds to the following methods:.
-
#get_stage(options = {}) ⇒ Types::Stage
Gets information about a Stage resource.
.
-
#get_stages(options = {}) ⇒ Types::Stages
Gets information about one or more Stage resources.
.
-
#get_tags(options = {}) ⇒ Types::Tags
Gets the Tags collection for a given resource.
.
-
#get_usage(options = {}) ⇒ Types::Usage
Gets the usage data of a usage plan in a specified time interval.
.
-
#get_usage_plan(options = {}) ⇒ Types::UsagePlan
Gets a usage plan of a given plan identifier.
.
-
#get_usage_plan_key(options = {}) ⇒ Types::UsagePlanKey
Gets a usage plan key of a given key identifier.
.
-
#get_usage_plan_keys(options = {}) ⇒ Types::UsagePlanKeys
Gets all the usage plan keys representing the API keys added to a specified usage plan.
.
-
#get_usage_plans(options = {}) ⇒ Types::UsagePlans
Gets all the usage plans of the caller's account.
.
-
#get_vpc_link(options = {}) ⇒ Types::VpcLink
Gets a specified VPC link under the caller's account in a region.
.
-
#get_vpc_links(options = {}) ⇒ Types::VpcLinks
Gets the VpcLinks collection under the caller's account in a selected region.
.
-
#import_api_keys(options = {}) ⇒ Types::ApiKeyIds
Import API keys from an external source, such as a CSV-formatted file.
.
-
#import_documentation_parts(options = {}) ⇒ Types::DocumentationPartIds
Returns a response object which responds to the following methods:.
-
#import_rest_api(options = {}) ⇒ Types::RestApi
A feature of the API Gateway control service for creating a new API from an external API definition file.
.
-
#put_gateway_response(options = {}) ⇒ Types::GatewayResponse
Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.
.
-
#put_integration(options = {}) ⇒ Types::Integration
Sets up a method's integration.
.
-
#put_integration_response(options = {}) ⇒ Types::IntegrationResponse
Represents a put integration.
.
-
#put_method(options = {}) ⇒ Types::Method
Add a method to an existing Resource resource.
.
-
#put_method_response(options = {}) ⇒ Types::MethodResponse
Adds a MethodResponse to an existing Method resource.
.
-
#put_rest_api(options = {}) ⇒ Types::RestApi
A feature of the API Gateway control service for updating an existing API with an input of external API definitions.
-
#tag_resource(options = {}) ⇒ Struct
Adds or updates a tag on a given resource.
.
-
#test_invoke_authorizer(options = {}) ⇒ Types::TestInvokeAuthorizerResponse
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
- #test_invoke_method(options = {}) ⇒ Types::TestInvokeMethodResponse
-
#untag_resource(options = {}) ⇒ Struct
Removes a tag from a given resource.
.
-
#update_account(options = {}) ⇒ Types::Account
Changes information about the current Account resource.
.
-
#update_api_key(options = {}) ⇒ Types::ApiKey
Changes information about an ApiKey resource.
.
- #update_authorizer(options = {}) ⇒ Types::Authorizer
-
#update_base_path_mapping(options = {}) ⇒ Types::BasePathMapping
Changes information about the BasePathMapping resource.
.
-
#update_client_certificate(options = {}) ⇒ Types::ClientCertificate
Changes information about an ClientCertificate resource.
.
-
#update_deployment(options = {}) ⇒ Types::Deployment
Changes information about a Deployment resource.
.
-
#update_documentation_part(options = {}) ⇒ Types::DocumentationPart
Returns a response object which responds to the following methods:.
-
#update_documentation_version(options = {}) ⇒ Types::DocumentationVersion
Returns a response object which responds to the following methods:.
-
#update_domain_name(options = {}) ⇒ Types::DomainName
Changes information about the DomainName resource.
.
-
#update_gateway_response(options = {}) ⇒ Types::GatewayResponse
Updates a GatewayResponse of a specified response type on the given RestApi.
.
-
#update_integration(options = {}) ⇒ Types::Integration
Represents an update integration.
.
-
#update_integration_response(options = {}) ⇒ Types::IntegrationResponse
Represents an update integration response.
.
-
#update_method(options = {}) ⇒ Types::Method
Updates an existing Method resource.
.
-
#update_method_response(options = {}) ⇒ Types::MethodResponse
Updates an existing MethodResponse resource.
.
-
#update_model(options = {}) ⇒ Types::Model
Changes information about a model.
.
-
#update_request_validator(options = {}) ⇒ Types::RequestValidator
Updates a RequestValidator of a given RestApi.
.
-
#update_resource(options = {}) ⇒ Types::Resource
Changes information about a Resource resource.
.
-
#update_rest_api(options = {}) ⇒ Types::RestApi
Changes information about the specified API.
.
-
#update_stage(options = {}) ⇒ Types::Stage
Changes information about a Stage resource.
.
-
#update_usage(options = {}) ⇒ Types::Usage
Grants a temporary extension to the remaining quota of a usage plan associated with a specified API key.
.
-
#update_usage_plan(options = {}) ⇒ Types::UsagePlan
Updates a usage plan of a given plan Id.
.
-
#update_vpc_link(options = {}) ⇒ Types::VpcLink
Updates an existing VpcLink of a specified identifier.
.
Instance Method Summary collapse
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
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::APIGateway::Client
Constructs an API client.
Instance Method Details
#create_api_key(options = {}) ⇒ Types::ApiKey
#create_authorizer(options = {}) ⇒ Types::Authorizer
#create_base_path_mapping(options = {}) ⇒ Types::BasePathMapping
Creates a new BasePathMapping resource.
#create_deployment(options = {}) ⇒ Types::Deployment
Creates a Deployment resource, which makes a specified RestApi callable over the internet.
#create_documentation_part(options = {}) ⇒ Types::DocumentationPart
Returns a response object which responds to the following methods:
- #id => String
- #location => Types::DocumentationPartLocation
- #properties => String
#create_documentation_version(options = {}) ⇒ Types::DocumentationVersion
Returns a response object which responds to the following methods:
- #version => String
- #created_date => Time
- #description => String
#create_domain_name(options = {}) ⇒ Types::DomainName
Creates a new domain name.
#create_model(options = {}) ⇒ Types::Model
#create_request_validator(options = {}) ⇒ Types::RequestValidator
Creates a ReqeustValidator of a given RestApi.
#create_resource(options = {}) ⇒ Types::Resource
Creates a Resource resource.
#create_rest_api(options = {}) ⇒ Types::RestApi
Creates a new RestApi resource.
#create_stage(options = {}) ⇒ Types::Stage
Creates a new Stage resource that references a pre-existing Deployment for the API.
#create_usage_plan(options = {}) ⇒ Types::UsagePlan
Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.
#create_usage_plan_key(options = {}) ⇒ Types::UsagePlanKey
Creates a usage plan key for adding an existing API key to a usage plan.
#create_vpc_link(options = {}) ⇒ Types::VpcLink
Creates a VPC link, under the caller's account in a selected region, in an asynchronous operation that typically takes 2-4 minutes to complete and become operational. The caller must have permissions to create and update VPC Endpoint services.
#delete_api_key(options = {}) ⇒ Struct
Deletes the ApiKey resource.
#delete_authorizer(options = {}) ⇒ Struct
#delete_base_path_mapping(options = {}) ⇒ Struct
Deletes the BasePathMapping resource.
#delete_client_certificate(options = {}) ⇒ Struct
Deletes the ClientCertificate resource.
#delete_deployment(options = {}) ⇒ Struct
Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.
#delete_documentation_part(options = {}) ⇒ Struct
Returns an empty response.
#delete_documentation_version(options = {}) ⇒ Struct
Returns an empty response.
#delete_domain_name(options = {}) ⇒ Struct
Deletes the DomainName resource.
#delete_gateway_response(options = {}) ⇒ Struct
Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.
#delete_integration(options = {}) ⇒ Struct
Represents a delete integration.
#delete_integration_response(options = {}) ⇒ Struct
Represents a delete integration response.
#delete_method(options = {}) ⇒ Struct
Deletes an existing Method resource.
#delete_method_response(options = {}) ⇒ Struct
Deletes an existing MethodResponse resource.
#delete_model(options = {}) ⇒ Struct
Deletes a model.
#delete_request_validator(options = {}) ⇒ Struct
Deletes a RequestValidator of a given RestApi.
#delete_resource(options = {}) ⇒ Struct
Deletes a Resource resource.
#delete_rest_api(options = {}) ⇒ Struct
Deletes the specified API.
#delete_stage(options = {}) ⇒ Struct
Deletes a Stage resource.
#delete_usage_plan(options = {}) ⇒ Struct
Deletes a usage plan of a given plan Id.
#delete_usage_plan_key(options = {}) ⇒ Struct
Deletes a usage plan key and remove the underlying API key from the associated usage plan.
#delete_vpc_link(options = {}) ⇒ Struct
Deletes an existing VpcLink of a specified identifier.
#flush_stage_authorizers_cache(options = {}) ⇒ Struct
Flushes all authorizer cache entries on a stage.
#flush_stage_cache(options = {}) ⇒ Struct
Flushes a stage's cache.
#generate_client_certificate(options = {}) ⇒ Types::ClientCertificate
Generates a ClientCertificate resource.
#get_account(options = {}) ⇒ Types::Account
Gets information about the current Account resource.
#get_api_key(options = {}) ⇒ Types::ApiKey
Gets information about the current ApiKey resource.
#get_api_keys(options = {}) ⇒ Types::ApiKeys
Gets information about the current ApiKeys resource.
#get_authorizer(options = {}) ⇒ Types::Authorizer
#get_authorizers(options = {}) ⇒ Types::Authorizers
#get_base_path_mapping(options = {}) ⇒ Types::BasePathMapping
Describe a BasePathMapping resource.
#get_base_path_mappings(options = {}) ⇒ Types::BasePathMappings
Represents a collection of BasePathMapping resources.
#get_client_certificate(options = {}) ⇒ Types::ClientCertificate
Gets information about the current ClientCertificate resource.
#get_client_certificates(options = {}) ⇒ Types::ClientCertificates
Gets a collection of ClientCertificate resources.
#get_deployment(options = {}) ⇒ Types::Deployment
Gets information about a Deployment resource.
#get_deployments(options = {}) ⇒ Types::Deployments
Gets information about a Deployments collection.
#get_documentation_part(options = {}) ⇒ Types::DocumentationPart
Returns a response object which responds to the following methods:
- #id => String
- #location => Types::DocumentationPartLocation
- #properties => String
#get_documentation_parts(options = {}) ⇒ Types::DocumentationParts
Returns a response object which responds to the following methods:
- #position => String
- #items => Array<Types::DocumentationPart>
#get_documentation_version(options = {}) ⇒ Types::DocumentationVersion
Returns a response object which responds to the following methods:
- #version => String
- #created_date => Time
- #description => String
#get_documentation_versions(options = {}) ⇒ Types::DocumentationVersions
Returns a response object which responds to the following methods:
- #position => String
- #items => Array<Types::DocumentationVersion>
#get_domain_name(options = {}) ⇒ Types::DomainName
Represents a domain name that is contained in a simpler, more intuitive URL that can be called.
#get_domain_names(options = {}) ⇒ Types::DomainNames
Represents a collection of DomainName resources.
#get_export(options = {}) ⇒ Types::ExportResponse
Exports a deployed version of a RestApi in a specified format.
#get_gateway_response(options = {}) ⇒ Types::GatewayResponse
Gets a GatewayResponse of a specified response type on the given RestApi.
#get_gateway_responses(options = {}) ⇒ Types::GatewayResponses
Gets the GatewayResponses collection on the given RestApi. If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default GatewayResponses collection for the supported response types.
#get_integration(options = {}) ⇒ Types::Integration
Get the integration settings.
#get_integration_response(options = {}) ⇒ Types::IntegrationResponse
Represents a get integration response.
#get_method(options = {}) ⇒ Types::Method
Describe an existing Method resource.
#get_method_response(options = {}) ⇒ Types::MethodResponse
Describes a MethodResponse resource.
#get_model(options = {}) ⇒ Types::Model
Describes an existing model defined for a RestApi resource.
#get_model_template(options = {}) ⇒ Types::Template
Generates a sample mapping template that can be used to transform a payload into the structure of a model.
#get_models(options = {}) ⇒ Types::Models
#get_request_validator(options = {}) ⇒ Types::RequestValidator
Gets a RequestValidator of a given RestApi.
#get_request_validators(options = {}) ⇒ Types::RequestValidators
Gets the RequestValidators collection of a given RestApi.
#get_resource(options = {}) ⇒ Types::Resource
Lists information about a resource.
#get_resources(options = {}) ⇒ Types::Resources
Lists information about a collection of Resource resources.
#get_rest_api(options = {}) ⇒ Types::RestApi
Lists the RestApi resource in the collection.
#get_rest_apis(options = {}) ⇒ Types::RestApis
Lists the RestApis resources for your collection.
#get_sdk(options = {}) ⇒ Types::SdkResponse
#get_sdk_type(options = {}) ⇒ Types::SdkType
Returns a response object which responds to the following methods:
- #id => String
- #friendly_name => String
- #description => String
- #configuration_properties => Array<Types::SdkConfigurationProperty>
#get_sdk_types(options = {}) ⇒ Types::SdkTypes
Returns a response object which responds to the following methods:
- #position => String
- #items => Array<Types::SdkType>
#get_stage(options = {}) ⇒ Types::Stage
Gets information about a Stage resource.
#get_stages(options = {}) ⇒ Types::Stages
Gets information about one or more Stage resources.
#get_tags(options = {}) ⇒ Types::Tags
Gets the Tags collection for a given resource.
#get_usage(options = {}) ⇒ Types::Usage
Gets the usage data of a usage plan in a specified time interval.
#get_usage_plan(options = {}) ⇒ Types::UsagePlan
Gets a usage plan of a given plan identifier.
#get_usage_plan_key(options = {}) ⇒ Types::UsagePlanKey
Gets a usage plan key of a given key identifier.
#get_usage_plan_keys(options = {}) ⇒ Types::UsagePlanKeys
Gets all the usage plan keys representing the API keys added to a specified usage plan.
#get_usage_plans(options = {}) ⇒ Types::UsagePlans
Gets all the usage plans of the caller's account.
#get_vpc_link(options = {}) ⇒ Types::VpcLink
Gets a specified VPC link under the caller's account in a region.
#get_vpc_links(options = {}) ⇒ Types::VpcLinks
Gets the VpcLinks collection under the caller's account in a selected region.
#import_api_keys(options = {}) ⇒ Types::ApiKeyIds
Import API keys from an external source, such as a CSV-formatted file.
#import_documentation_parts(options = {}) ⇒ Types::DocumentationPartIds
#import_rest_api(options = {}) ⇒ Types::RestApi
A feature of the API Gateway control service for creating a new API from an external API definition file.
#put_gateway_response(options = {}) ⇒ Types::GatewayResponse
Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.
#put_integration(options = {}) ⇒ Types::Integration
Sets up a method's integration.
#put_integration_response(options = {}) ⇒ Types::IntegrationResponse
Represents a put integration.
#put_method(options = {}) ⇒ Types::Method
Add a method to an existing Resource resource.
#put_method_response(options = {}) ⇒ Types::MethodResponse
Adds a MethodResponse to an existing Method resource.
#put_rest_api(options = {}) ⇒ Types::RestApi
A feature of the API Gateway control service for updating an existing API with an input of external API definitions. The update can take the form of merging the supplied definition into the existing API or overwriting the existing API.
#tag_resource(options = {}) ⇒ Struct
Adds or updates a tag on a given resource.
#test_invoke_authorizer(options = {}) ⇒ Types::TestInvokeAuthorizerResponse
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
#test_invoke_method(options = {}) ⇒ Types::TestInvokeMethodResponse
#untag_resource(options = {}) ⇒ Struct
Removes a tag from a given resource.
#update_account(options = {}) ⇒ Types::Account
Changes information about the current Account resource.
#update_api_key(options = {}) ⇒ Types::ApiKey
Changes information about an ApiKey resource.
#update_authorizer(options = {}) ⇒ Types::Authorizer
#update_base_path_mapping(options = {}) ⇒ Types::BasePathMapping
Changes information about the BasePathMapping resource.
#update_client_certificate(options = {}) ⇒ Types::ClientCertificate
Changes information about an ClientCertificate resource.
#update_deployment(options = {}) ⇒ Types::Deployment
Changes information about a Deployment resource.
#update_documentation_part(options = {}) ⇒ Types::DocumentationPart
Returns a response object which responds to the following methods:
- #id => String
- #location => Types::DocumentationPartLocation
- #properties => String
#update_documentation_version(options = {}) ⇒ Types::DocumentationVersion
Returns a response object which responds to the following methods:
- #version => String
- #created_date => Time
- #description => String
#update_domain_name(options = {}) ⇒ Types::DomainName
Changes information about the DomainName resource.
#update_gateway_response(options = {}) ⇒ Types::GatewayResponse
Updates a GatewayResponse of a specified response type on the given RestApi.
#update_integration(options = {}) ⇒ Types::Integration
Represents an update integration.
#update_integration_response(options = {}) ⇒ Types::IntegrationResponse
Represents an update integration response.
#update_method(options = {}) ⇒ Types::Method
Updates an existing Method resource.
#update_method_response(options = {}) ⇒ Types::MethodResponse
Updates an existing MethodResponse resource.
#update_model(options = {}) ⇒ Types::Model
Changes information about a model.
#update_request_validator(options = {}) ⇒ Types::RequestValidator
Updates a RequestValidator of a given RestApi.
#update_resource(options = {}) ⇒ Types::Resource
Changes information about a Resource resource.
#update_rest_api(options = {}) ⇒ Types::RestApi
Changes information about the specified API.
#update_stage(options = {}) ⇒ Types::Stage
Changes information about a Stage resource.
#update_usage(options = {}) ⇒ Types::Usage
Grants a temporary extension to the remaining quota of a usage plan associated with a specified API key.
#update_usage_plan(options = {}) ⇒ Types::UsagePlan
Updates a usage plan of a given plan Id.
#update_vpc_link(options = {}) ⇒ Types::VpcLink
Updates an existing VpcLink of a specified identifier.
#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
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name | Client Method | Default Delay: | Default Max Attempts: |
---|