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

Class: Aws::AppConfig::Client

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

Overview

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

appconfig = Aws::AppConfig::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::AppConfig::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::AppConfig::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_application(options = {}) ⇒ Types::Application

An application in AppConfig is a logical unit of code that provides capabilities for your customers. For example, an application can be a microservice that runs on Amazon EC2 instances, a mobile application installed by your users, a serverless application using Amazon API Gateway and AWS Lambda, or any system you run on behalf of others.

Examples:

Request syntax with placeholder values


resp = client.create_application({
  name: "Name", # required
  description: "Description",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.id #=> String
resp.name #=> String
resp.description #=> String

Options Hash (options):

  • :name (required, String)

    A name for the application.

  • :description (String)

    A description of the application.

  • :tags (Hash<String,String>)

    Metadata to assign to the application. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

Returns:

See Also:

#create_configuration_profile(options = {}) ⇒ Types::ConfigurationProfile

Information that enables AppConfig to access the configuration source. Valid configuration sources include Systems Manager (SSM) documents, SSM Parameter Store parameters, and Amazon S3 objects. A configuration profile includes the following information.

  • The Uri location of the configuration data.

  • The AWS Identity and Access Management (IAM) role that provides access to the configuration data.

  • A validator for the configuration data. Available validators include either a JSON Schema or an AWS Lambda function.

For more information, see Create a Configuration and a Configuration Profile in the AWS AppConfig User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_configuration_profile({
  application_id: "Id", # required
  name: "Name", # required
  description: "Description",
  location_uri: "Uri", # required
  retrieval_role_arn: "RoleArn",
  validators: [
    {
      type: "JSON_SCHEMA", # required, accepts JSON_SCHEMA, LAMBDA
      content: "StringWithLengthBetween0And32768", # required
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.application_id #=> String
resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.location_uri #=> String
resp.retrieval_role_arn #=> String
resp.validators #=> Array
resp.validators[0].type #=> String, one of "JSON_SCHEMA", "LAMBDA"
resp.validators[0].content #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :name (required, String)

    A name for the configuration profile.

  • :description (String)

    A description of the configuration profile.

  • :location_uri (required, String)

    A URI to locate the configuration. You can specify a Systems Manager (SSM) document, an SSM Parameter Store parameter, or an Amazon S3 object. For an SSM document, specify either the document name in the format ssm-document://<Document_name> or the Amazon Resource Name (ARN). For a parameter, specify either the parameter name in the format ssm-parameter://<Parameter_name> or the ARN. For an Amazon S3 object, specify the URI in the following format: s3://<bucket>/<objectKey>. Here is an example: s3://my-bucket/my-app/us-east-1/my-config.json

  • :retrieval_role_arn (String)

    The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

  • :validators (Array<Types::Validator>)

    A list of methods for validating the configuration.

  • :tags (Hash<String,String>)

    Metadata to assign to the configuration profile. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

Returns:

See Also:

#create_deployment_strategy(options = {}) ⇒ Types::DeploymentStrategy

A deployment strategy defines important criteria for rolling out your configuration to the designated targets. A deployment strategy includes: the overall duration required, a percentage of targets to receive the deployment during each interval, an algorithm that defines how percentage grows, and bake time.

Examples:

Request syntax with placeholder values


resp = client.create_deployment_strategy({
  name: "Name", # required
  description: "Description",
  deployment_duration_in_minutes: 1, # required
  final_bake_time_in_minutes: 1,
  growth_factor: 1.0, # required
  growth_type: "LINEAR", # accepts LINEAR, EXPONENTIAL
  replicate_to: "NONE", # required, accepts NONE, SSM_DOCUMENT
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.deployment_duration_in_minutes #=> Integer
resp.growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.growth_factor #=> Float
resp.final_bake_time_in_minutes #=> Integer
resp.replicate_to #=> String, one of "NONE", "SSM_DOCUMENT"

Options Hash (options):

  • :name (required, String)

    A name for the deployment strategy.

  • :description (String)

    A description of the deployment strategy.

  • :deployment_duration_in_minutes (required, Integer)

    Total amount of time for a deployment to last.

  • :final_bake_time_in_minutes (Integer)

    The amount of time AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic roll back.

  • :growth_factor (required, Float)

    The percentage of targets to receive a deployed configuration during each interval.

  • :growth_type (String)

    The algorithm used to define how percentage grows over time. AWS AppConfig supports the following growth types:

    Linear: For this type, AppConfig processes the deployment by dividing the total number of targets by the value specified for Step percentage. For example, a linear deployment that uses a Step percentage of 10 deploys the configuration to 10 percent of the hosts. After those deployments are complete, the system deploys the configuration to the next 10 percent. This continues until 100% of the targets have successfully received the configuration.

    Exponential: For this type, AppConfig processes the deployment exponentially using the following formula: G*(2^N). In this formula, G is the growth factor specified by the user and N is the number of steps until the configuration is deployed to all targets. For example, if you specify a growth factor of 2, then the system rolls out the configuration as follows:

    2*(2^0)

    2*(2^1)

    2*(2^2)

    Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the targets, and continues until the configuration has been deployed to all targets.

  • :replicate_to (required, String)

    Save the deployment strategy to a Systems Manager (SSM) document.

  • :tags (Hash<String,String>)

    Metadata to assign to the deployment strategy. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

Returns:

See Also:

#create_environment(options = {}) ⇒ Types::Environment

For each application, you define one or more environments. An environment is a logical deployment group of AppConfig targets, such as applications in a Beta or Production environment. You can also define environments for application subcomponents such as the Web, Mobile and Back-end components for your application. You can configure Amazon CloudWatch alarms for each environment. The system monitors alarms during a configuration deployment. If an alarm is triggered, the system rolls back the configuration.

Examples:

Request syntax with placeholder values


resp = client.create_environment({
  application_id: "Id", # required
  name: "Name", # required
  description: "Description",
  monitors: [
    {
      alarm_arn: "Arn",
      alarm_role_arn: "RoleArn",
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.application_id #=> String
resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.state #=> String, one of "READY_FOR_DEPLOYMENT", "DEPLOYING", "ROLLING_BACK", "ROLLED_BACK"
resp.monitors #=> Array
resp.monitors[0].alarm_arn #=> String
resp.monitors[0].alarm_role_arn #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :name (required, String)

    A name for the environment.

  • :description (String)

    A description of the environment.

  • :monitors (Array<Types::Monitor>)

    Amazon CloudWatch alarms to monitor during the deployment process.

  • :tags (Hash<String,String>)

    Metadata to assign to the environment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

Returns:

See Also:

#create_hosted_configuration_version(options = {}) ⇒ Types::HostedConfigurationVersion

Create a new configuration in the AppConfig configuration store.

Examples:

Request syntax with placeholder values


resp = client.create_hosted_configuration_version({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
  description: "Description",
  content: "data", # required
  content_type: "StringWithLengthBetween1And255", # required
  latest_version_number: 1,
})

Response structure


resp.application_id #=> String
resp.configuration_profile_id #=> String
resp.version_number #=> Integer
resp.description #=> String
resp.content #=> IO
resp.content_type #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :configuration_profile_id (required, String)

    The configuration profile ID.

  • :description (String)

    A description of the configuration.

  • :content (required, IO, String)

    The content of the configuration or the configuration data.

  • :content_type (required, String)

    A standard MIME type describing the format of the configuration content. For more information, see Content-Type.

  • :latest_version_number (Integer)

    An optional locking token used to prevent race conditions from overwriting configuration updates when creating a new version. To ensure your data is not overwritten when creating multiple hosted configuration versions in rapid succession, specify the version of the latest hosted configuration version.

Returns:

See Also:

#delete_application(options = {}) ⇒ Struct

Delete an application. Deleting an application does not delete a configuration from a host.

Examples:

Request syntax with placeholder values


resp = client.delete_application({
  application_id: "Id", # required
})

Options Hash (options):

  • :application_id (required, String)

    The ID of the application to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_configuration_profile(options = {}) ⇒ Struct

Delete a configuration profile. Deleting a configuration profile does not delete a configuration from a host.

Examples:

Request syntax with placeholder values


resp = client.delete_configuration_profile({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
})

Options Hash (options):

  • :application_id (required, String)

    The application ID that includes the configuration profile you want to delete.

  • :configuration_profile_id (required, String)

    The ID of the configuration profile you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_deployment_strategy(options = {}) ⇒ Struct

Delete a deployment strategy. Deleting a deployment strategy does not delete a configuration from a host.

Examples:

Request syntax with placeholder values


resp = client.delete_deployment_strategy({
  deployment_strategy_id: "DeploymentStrategyId", # required
})

Options Hash (options):

  • :deployment_strategy_id (required, String)

    The ID of the deployment strategy you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_environment(options = {}) ⇒ Struct

Delete an environment. Deleting an environment does not delete a configuration from a host.

Examples:

Request syntax with placeholder values


resp = client.delete_environment({
  application_id: "Id", # required
  environment_id: "Id", # required
})

Options Hash (options):

  • :application_id (required, String)

    The application ID that includes the environment you want to delete.

  • :environment_id (required, String)

    The ID of the environment you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_hosted_configuration_version(options = {}) ⇒ Struct

Delete a version of a configuration from the AppConfig configuration store.

Examples:

Request syntax with placeholder values


resp = client.delete_hosted_configuration_version({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
  version_number: 1, # required
})

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :configuration_profile_id (required, String)

    The configuration profile ID.

  • :version_number (required, Integer)

    The versions number to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#get_application(options = {}) ⇒ Types::Application

Retrieve information about an application.

Examples:

Request syntax with placeholder values


resp = client.get_application({
  application_id: "Id", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.description #=> String

Options Hash (options):

  • :application_id (required, String)

    The ID of the application you want to get.

Returns:

See Also:

#get_configuration(options = {}) ⇒ Types::Configuration

Receive information about a configuration.

AWS AppConfig uses the value of the ClientConfigurationVersion parameter to identify the configuration version on your clients. If you don’t send ClientConfigurationVersion with each call to GetConfiguration, your clients receive the current configuration. You are charged each time your clients receive a configuration.

To avoid excess charges, we recommend that you include the ClientConfigurationVersion value with every call to GetConfiguration. This value must be saved on your client. Subsequent calls to GetConfiguration must pass this value by using the ClientConfigurationVersion parameter.

Examples:

Request syntax with placeholder values


resp = client.get_configuration({
  application: "StringWithLengthBetween1And64", # required
  environment: "StringWithLengthBetween1And64", # required
  configuration: "StringWithLengthBetween1And64", # required
  client_id: "StringWithLengthBetween1And64", # required
  client_configuration_version: "Version",
})

Response structure


resp.content #=> IO
resp.configuration_version #=> String
resp.content_type #=> String

Options Hash (options):

  • :application (required, String)

    The application to get. Specify either the application name or the application ID.

  • :environment (required, String)

    The environment to get. Specify either the environment name or the environment ID.

  • :configuration (required, String)

    The configuration to get. Specify either the configuration name or the configuration ID.

  • :client_id (required, String)

    A unique ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.

  • :client_configuration_version (String)

    The configuration version returned in the most recent GetConfiguration response.

    AWS AppConfig uses the value of the ClientConfigurationVersion parameter to identify the configuration version on your clients. If you don’t send ClientConfigurationVersion with each call to GetConfiguration, your clients receive the current configuration. You are charged each time your clients receive a configuration.

    To avoid excess charges, we recommend that you include the ClientConfigurationVersion value with every call to GetConfiguration. This value must be saved on your client. Subsequent calls to GetConfiguration must pass this value by using the ClientConfigurationVersion parameter.

    For more information about working with configurations, see Retrieving the Configuration in the AWS AppConfig User Guide.

Returns:

See Also:

#get_configuration_profile(options = {}) ⇒ Types::ConfigurationProfile

Retrieve information about a configuration profile.

Examples:

Request syntax with placeholder values


resp = client.get_configuration_profile({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
})

Response structure


resp.application_id #=> String
resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.location_uri #=> String
resp.retrieval_role_arn #=> String
resp.validators #=> Array
resp.validators[0].type #=> String, one of "JSON_SCHEMA", "LAMBDA"
resp.validators[0].content #=> String

Options Hash (options):

  • :application_id (required, String)

    The ID of the application that includes the configuration profile you want to get.

  • :configuration_profile_id (required, String)

    The ID of the configuration profile you want to get.

Returns:

See Also:

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

Retrieve information about a configuration deployment.

Examples:

Request syntax with placeholder values


resp = client.get_deployment({
  application_id: "Id", # required
  environment_id: "Id", # required
  deployment_number: 1, # required
})

Response structure


resp.application_id #=> String
resp.environment_id #=> String
resp.deployment_strategy_id #=> String
resp.configuration_profile_id #=> String
resp.deployment_number #=> Integer
resp.configuration_name #=> String
resp.configuration_location_uri #=> String
resp.configuration_version #=> String
resp.description #=> String
resp.deployment_duration_in_minutes #=> Integer
resp.growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.growth_factor #=> Float
resp.final_bake_time_in_minutes #=> Integer
resp.state #=> String, one of "BAKING", "VALIDATING", "DEPLOYING", "COMPLETE", "ROLLING_BACK", "ROLLED_BACK"
resp.event_log #=> Array
resp.event_log[0].event_type #=> String, one of "PERCENTAGE_UPDATED", "ROLLBACK_STARTED", "ROLLBACK_COMPLETED", "BAKE_TIME_STARTED", "DEPLOYMENT_STARTED", "DEPLOYMENT_COMPLETED"
resp.event_log[0].triggered_by #=> String, one of "USER", "APPCONFIG", "CLOUDWATCH_ALARM", "INTERNAL_ERROR"
resp.event_log[0].description #=> String
resp.event_log[0].occurred_at #=> Time
resp.percentage_complete #=> Float
resp.started_at #=> Time
resp.completed_at #=> Time

Options Hash (options):

  • :application_id (required, String)

    The ID of the application that includes the deployment you want to get.

  • :environment_id (required, String)

    The ID of the environment that includes the deployment you want to get.

  • :deployment_number (required, Integer)

    The sequence number of the deployment.

Returns:

See Also:

#get_deployment_strategy(options = {}) ⇒ Types::DeploymentStrategy

Retrieve information about a deployment strategy. A deployment strategy defines important criteria for rolling out your configuration to the designated targets. A deployment strategy includes: the overall duration required, a percentage of targets to receive the deployment during each interval, an algorithm that defines how percentage grows, and bake time.

Examples:

Request syntax with placeholder values


resp = client.get_deployment_strategy({
  deployment_strategy_id: "DeploymentStrategyId", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.deployment_duration_in_minutes #=> Integer
resp.growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.growth_factor #=> Float
resp.final_bake_time_in_minutes #=> Integer
resp.replicate_to #=> String, one of "NONE", "SSM_DOCUMENT"

Options Hash (options):

  • :deployment_strategy_id (required, String)

    The ID of the deployment strategy to get.

Returns:

See Also:

#get_environment(options = {}) ⇒ Types::Environment

Retrieve information about an environment. An environment is a logical deployment group of AppConfig applications, such as applications in a Production environment or in an EU_Region environment. Each configuration deployment targets an environment. You can enable one or more Amazon CloudWatch alarms for an environment. If an alarm is triggered during a deployment, AppConfig roles back the configuration.

Examples:

Request syntax with placeholder values


resp = client.get_environment({
  application_id: "Id", # required
  environment_id: "Id", # required
})

Response structure


resp.application_id #=> String
resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.state #=> String, one of "READY_FOR_DEPLOYMENT", "DEPLOYING", "ROLLING_BACK", "ROLLED_BACK"
resp.monitors #=> Array
resp.monitors[0].alarm_arn #=> String
resp.monitors[0].alarm_role_arn #=> String

Options Hash (options):

  • :application_id (required, String)

    The ID of the application that includes the environment you want to get.

  • :environment_id (required, String)

    The ID of the environment you wnat to get.

Returns:

See Also:

#get_hosted_configuration_version(options = {}) ⇒ Types::HostedConfigurationVersion

Get information about a specific configuration version.

Examples:

Request syntax with placeholder values


resp = client.get_hosted_configuration_version({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
  version_number: 1, # required
})

Response structure


resp.application_id #=> String
resp.configuration_profile_id #=> String
resp.version_number #=> Integer
resp.description #=> String
resp.content #=> IO
resp.content_type #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :configuration_profile_id (required, String)

    The configuration profile ID.

  • :version_number (required, Integer)

    The version.

Returns:

See Also:

#list_applications(options = {}) ⇒ Types::Applications

List all applications in your AWS account.

Examples:

Request syntax with placeholder values


resp = client.list_applications({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (Integer)

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:

#list_configuration_profiles(options = {}) ⇒ Types::ConfigurationProfiles

Lists the configuration profiles for an application.

Examples:

Request syntax with placeholder values


resp = client.list_configuration_profiles({
  application_id: "Id", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].application_id #=> String
resp.items[0].id #=> String
resp.items[0].name #=> String
resp.items[0].location_uri #=> String
resp.items[0].validator_types #=> Array
resp.items[0].validator_types[0] #=> String, one of "JSON_SCHEMA", "LAMBDA"
resp.next_token #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :max_results (Integer)

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:

#list_deployment_strategies(options = {}) ⇒ Types::DeploymentStrategies

List deployment strategies.

Examples:

Request syntax with placeholder values


resp = client.list_deployment_strategies({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.items[0].deployment_duration_in_minutes #=> Integer
resp.items[0].growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.items[0].growth_factor #=> Float
resp.items[0].final_bake_time_in_minutes #=> Integer
resp.items[0].replicate_to #=> String, one of "NONE", "SSM_DOCUMENT"
resp.next_token #=> String

Options Hash (options):

  • :max_results (Integer)

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:

#list_deployments(options = {}) ⇒ Types::Deployments

Lists the deployments for an environment.

Examples:

Request syntax with placeholder values


resp = client.list_deployments({
  application_id: "Id", # required
  environment_id: "Id", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].deployment_number #=> Integer
resp.items[0].configuration_name #=> String
resp.items[0].configuration_version #=> String
resp.items[0].deployment_duration_in_minutes #=> Integer
resp.items[0].growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.items[0].growth_factor #=> Float
resp.items[0].final_bake_time_in_minutes #=> Integer
resp.items[0].state #=> String, one of "BAKING", "VALIDATING", "DEPLOYING", "COMPLETE", "ROLLING_BACK", "ROLLED_BACK"
resp.items[0].percentage_complete #=> Float
resp.items[0].started_at #=> Time
resp.items[0].completed_at #=> Time
resp.next_token #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :environment_id (required, String)

    The environment ID.

  • :max_results (Integer)

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:

#list_environments(options = {}) ⇒ Types::Environments

List the environments for an application.

Examples:

Request syntax with placeholder values


resp = client.list_environments({
  application_id: "Id", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].application_id #=> String
resp.items[0].id #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.items[0].state #=> String, one of "READY_FOR_DEPLOYMENT", "DEPLOYING", "ROLLING_BACK", "ROLLED_BACK"
resp.items[0].monitors #=> Array
resp.items[0].monitors[0].alarm_arn #=> String
resp.items[0].monitors[0].alarm_role_arn #=> String
resp.next_token #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :max_results (Integer)

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:

#list_hosted_configuration_versions(options = {}) ⇒ Types::HostedConfigurationVersions

View a list of configurations stored in the AppConfig configuration store by version.

Examples:

Request syntax with placeholder values


resp = client.list_hosted_configuration_versions({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].application_id #=> String
resp.items[0].configuration_profile_id #=> String
resp.items[0].version_number #=> Integer
resp.items[0].description #=> String
resp.items[0].content_type #=> String
resp.next_token #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :configuration_profile_id (required, String)

    The configuration profile ID.

  • :max_results (Integer)

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:

#list_tags_for_resource(options = {}) ⇒ Types::ResourceTags

Retrieves the list of key-value tags assigned to the resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "Arn", # required
})

Response structure


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

Options Hash (options):

  • :resource_arn (required, String)

    The resource ARN.

Returns:

See Also:

#start_deployment(options = {}) ⇒ Types::Deployment

Starts a deployment.

Examples:

Request syntax with placeholder values


resp = client.start_deployment({
  application_id: "Id", # required
  environment_id: "Id", # required
  deployment_strategy_id: "DeploymentStrategyId", # required
  configuration_profile_id: "Id", # required
  configuration_version: "Version", # required
  description: "Description",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.application_id #=> String
resp.environment_id #=> String
resp.deployment_strategy_id #=> String
resp.configuration_profile_id #=> String
resp.deployment_number #=> Integer
resp.configuration_name #=> String
resp.configuration_location_uri #=> String
resp.configuration_version #=> String
resp.description #=> String
resp.deployment_duration_in_minutes #=> Integer
resp.growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.growth_factor #=> Float
resp.final_bake_time_in_minutes #=> Integer
resp.state #=> String, one of "BAKING", "VALIDATING", "DEPLOYING", "COMPLETE", "ROLLING_BACK", "ROLLED_BACK"
resp.event_log #=> Array
resp.event_log[0].event_type #=> String, one of "PERCENTAGE_UPDATED", "ROLLBACK_STARTED", "ROLLBACK_COMPLETED", "BAKE_TIME_STARTED", "DEPLOYMENT_STARTED", "DEPLOYMENT_COMPLETED"
resp.event_log[0].triggered_by #=> String, one of "USER", "APPCONFIG", "CLOUDWATCH_ALARM", "INTERNAL_ERROR"
resp.event_log[0].description #=> String
resp.event_log[0].occurred_at #=> Time
resp.percentage_complete #=> Float
resp.started_at #=> Time
resp.completed_at #=> Time

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :environment_id (required, String)

    The environment ID.

  • :deployment_strategy_id (required, String)

    The deployment strategy ID.

  • :configuration_profile_id (required, String)

    The configuration profile ID.

  • :configuration_version (required, String)

    The configuration version to deploy.

  • :description (String)

    A description of the deployment.

  • :tags (Hash<String,String>)

    Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

Returns:

See Also:

#stop_deployment(options = {}) ⇒ Types::Deployment

Stops a deployment. This API action works only on deployments that have a status of DEPLOYING. This action moves the deployment to a status of ROLLED_BACK.

Examples:

Request syntax with placeholder values


resp = client.stop_deployment({
  application_id: "Id", # required
  environment_id: "Id", # required
  deployment_number: 1, # required
})

Response structure


resp.application_id #=> String
resp.environment_id #=> String
resp.deployment_strategy_id #=> String
resp.configuration_profile_id #=> String
resp.deployment_number #=> Integer
resp.configuration_name #=> String
resp.configuration_location_uri #=> String
resp.configuration_version #=> String
resp.description #=> String
resp.deployment_duration_in_minutes #=> Integer
resp.growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.growth_factor #=> Float
resp.final_bake_time_in_minutes #=> Integer
resp.state #=> String, one of "BAKING", "VALIDATING", "DEPLOYING", "COMPLETE", "ROLLING_BACK", "ROLLED_BACK"
resp.event_log #=> Array
resp.event_log[0].event_type #=> String, one of "PERCENTAGE_UPDATED", "ROLLBACK_STARTED", "ROLLBACK_COMPLETED", "BAKE_TIME_STARTED", "DEPLOYMENT_STARTED", "DEPLOYMENT_COMPLETED"
resp.event_log[0].triggered_by #=> String, one of "USER", "APPCONFIG", "CLOUDWATCH_ALARM", "INTERNAL_ERROR"
resp.event_log[0].description #=> String
resp.event_log[0].occurred_at #=> Time
resp.percentage_complete #=> Float
resp.started_at #=> Time
resp.completed_at #=> Time

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :environment_id (required, String)

    The environment ID.

  • :deployment_number (required, Integer)

    The sequence number of the deployment.

Returns:

See Also:

#tag_resource(options = {}) ⇒ Struct

Metadata to assign to an AppConfig resource. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define. You can specify a maximum of 50 tags for a resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "Arn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Options Hash (options):

  • :resource_arn (required, String)

    The ARN of the resource for which to retrieve tags.

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

    The key-value string map. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Deletes a tag key and value from an AppConfig resource.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :resource_arn (required, String)

    The ARN of the resource for which to remove tags.

  • :tag_keys (required, Array<String>)

    The tag keys to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_application(options = {}) ⇒ Types::Application

Updates an application.

Examples:

Request syntax with placeholder values


resp = client.update_application({
  application_id: "Id", # required
  name: "Name",
  description: "Description",
})

Response structure


resp.id #=> String
resp.name #=> String
resp.description #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :name (String)

    The name of the application.

  • :description (String)

    A description of the application.

Returns:

See Also:

#update_configuration_profile(options = {}) ⇒ Types::ConfigurationProfile

Updates a configuration profile.

Examples:

Request syntax with placeholder values


resp = client.update_configuration_profile({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
  name: "Name",
  description: "Description",
  retrieval_role_arn: "RoleArn",
  validators: [
    {
      type: "JSON_SCHEMA", # required, accepts JSON_SCHEMA, LAMBDA
      content: "StringWithLengthBetween0And32768", # required
    },
  ],
})

Response structure


resp.application_id #=> String
resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.location_uri #=> String
resp.retrieval_role_arn #=> String
resp.validators #=> Array
resp.validators[0].type #=> String, one of "JSON_SCHEMA", "LAMBDA"
resp.validators[0].content #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :configuration_profile_id (required, String)

    The ID of the configuration profile.

  • :name (String)

    The name of the configuration profile.

  • :description (String)

    A description of the configuration profile.

  • :retrieval_role_arn (String)

    The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

  • :validators (Array<Types::Validator>)

    A list of methods for validating the configuration.

Returns:

See Also:

#update_deployment_strategy(options = {}) ⇒ Types::DeploymentStrategy

Updates a deployment strategy.

Examples:

Request syntax with placeholder values


resp = client.update_deployment_strategy({
  deployment_strategy_id: "DeploymentStrategyId", # required
  description: "Description",
  deployment_duration_in_minutes: 1,
  final_bake_time_in_minutes: 1,
  growth_factor: 1.0,
  growth_type: "LINEAR", # accepts LINEAR, EXPONENTIAL
})

Response structure


resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.deployment_duration_in_minutes #=> Integer
resp.growth_type #=> String, one of "LINEAR", "EXPONENTIAL"
resp.growth_factor #=> Float
resp.final_bake_time_in_minutes #=> Integer
resp.replicate_to #=> String, one of "NONE", "SSM_DOCUMENT"

Options Hash (options):

  • :deployment_strategy_id (required, String)

    The deployment strategy ID.

  • :description (String)

    A description of the deployment strategy.

  • :deployment_duration_in_minutes (Integer)

    Total amount of time for a deployment to last.

  • :final_bake_time_in_minutes (Integer)

    The amount of time AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic roll back.

  • :growth_factor (Float)

    The percentage of targets to receive a deployed configuration during each interval.

  • :growth_type (String)

    The algorithm used to define how percentage grows over time. AWS AppConfig supports the following growth types:

    Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 initially makes the configuration available to 20 percent of the targets. After 1/5th of the deployment time has passed, the system updates the percentage to 40 percent. This continues until 100% of the targets are set to receive the deployed configuration.

    Exponential: For this type, AppConfig processes the deployment exponentially using the following formula: G*(2^N). In this formula, G is the growth factor specified by the user and N is the number of steps until the configuration is deployed to all targets. For example, if you specify a growth factor of 2, then the system rolls out the configuration as follows:

    2*(2^0)

    2*(2^1)

    2*(2^2)

    Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the targets, and continues until the configuration has been deployed to all targets.

Returns:

See Also:

#update_environment(options = {}) ⇒ Types::Environment

Updates an environment.

Examples:

Request syntax with placeholder values


resp = client.update_environment({
  application_id: "Id", # required
  environment_id: "Id", # required
  name: "Name",
  description: "Description",
  monitors: [
    {
      alarm_arn: "Arn",
      alarm_role_arn: "RoleArn",
    },
  ],
})

Response structure


resp.application_id #=> String
resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.state #=> String, one of "READY_FOR_DEPLOYMENT", "DEPLOYING", "ROLLING_BACK", "ROLLED_BACK"
resp.monitors #=> Array
resp.monitors[0].alarm_arn #=> String
resp.monitors[0].alarm_role_arn #=> String

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :environment_id (required, String)

    The environment ID.

  • :name (String)

    The name of the environment.

  • :description (String)

    A description of the environment.

  • :monitors (Array<Types::Monitor>)

    Amazon CloudWatch alarms to monitor during the deployment process.

Returns:

See Also:

#validate_configuration(options = {}) ⇒ Struct

Uses the validators in a configuration profile to validate a configuration.

Examples:

Request syntax with placeholder values


resp = client.validate_configuration({
  application_id: "Id", # required
  configuration_profile_id: "Id", # required
  configuration_version: "Version", # required
})

Options Hash (options):

  • :application_id (required, String)

    The application ID.

  • :configuration_profile_id (required, String)

    The configuration profile ID.

  • :configuration_version (required, String)

    The version of the configuration to validate.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

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

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

Basic Usage

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

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

Configuration

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

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

Callbacks

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

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

  # disable max attempts
  w.max_attempts = nil

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

end

Handling Errors

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

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

Parameters:

  • waiter_name (Symbol)

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

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

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

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

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

  • (Errors::TooManyAttemptsError)

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

  • (Errors::UnexpectedError)

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

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

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

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.