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

Class: Aws::Imagebuilder::Client

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

Overview

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

imagebuilder = Aws::Imagebuilder::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::Imagebuilder::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::Imagebuilder::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

#cancel_image_creation(options = {}) ⇒ Types::CancelImageCreationResponse

CancelImageCreation cancels the creation of Image. This operation can only be used on images in a non-terminal state.

Examples:

Request syntax with placeholder values


resp = client.cancel_image_creation({
  image_build_version_arn: "ImageBuildVersionArn", # required
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.image_build_version_arn #=> String

Options Hash (options):

  • :image_build_version_arn (required, String)

    The Amazon Resource Name (ARN) of the image whose creation you want to cancel.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

Returns:

See Also:

#create_component(options = {}) ⇒ Types::CreateComponentResponse

Creates a new component that can be used to build, validate, test, and assess your image.

Examples:

Request syntax with placeholder values


resp = client.create_component({
  name: "ResourceName", # required
  semantic_version: "VersionNumber", # required
  description: "NonEmptyString",
  change_description: "NonEmptyString",
  platform: "Windows", # required, accepts Windows, Linux
  supported_os_versions: ["OsVersion"],
  data: "InlineComponentData",
  uri: "Uri",
  kms_key_id: "NonEmptyString",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.component_build_version_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the component.

  • :semantic_version (required, String)

    The semantic version of the component. This version follows the semantic version syntax. For example, major.minor.patch. This could be versioned like software (2.0.1) or like a date (2019.12.01).

  • :description (String)

    The description of the component. Describes the contents of the component.

  • :change_description (String)

    The change description of the component. Describes what change has been made in this version, or what makes this version different from other versions of this component.

  • :platform (required, String)

    The platform of the component.

  • :supported_os_versions (Array<String>)

    The operating system (OS) version supported by the component. If the OS information is available, a prefix match is performed against the parent image OS version during image recipe creation.

  • :data (String)

    The data of the component. Used to specify the data inline. Either data or uri can be used to specify the data within the component.

  • :uri (String)

    The uri of the component. Must be an S3 URL and the requester must have permission to access the S3 bucket. If you use S3, you can specify component content up to your service quota. Either data or uri can be used to specify the data within the component.

  • :kms_key_id (String)

    The ID of the KMS key that should be used to encrypt this component.

  • :tags (Hash<String,String>)

    The tags of the component.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token of the component.

Returns:

See Also:

#create_distribution_configuration(options = {}) ⇒ Types::CreateDistributionConfigurationResponse

Creates a new distribution configuration. Distribution configurations define and configure the outputs of your pipeline.

Examples:

Request syntax with placeholder values


resp = client.create_distribution_configuration({
  name: "ResourceName", # required
  description: "NonEmptyString",
  distributions: [ # required
    {
      region: "NonEmptyString", # required
      ami_distribution_configuration: {
        name: "AmiNameString",
        description: "NonEmptyString",
        target_account_ids: ["AccountId"],
        ami_tags: {
          "TagKey" => "TagValue",
        },
        kms_key_id: "NonEmptyString",
        launch_permission: {
          user_ids: ["AccountId"],
          user_groups: ["NonEmptyString"],
        },
      },
      license_configuration_arns: ["LicenseConfigurationArn"],
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.distribution_configuration_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the distribution configuration.

  • :description (String)

    The description of the distribution configuration.

  • :distributions (required, Array<Types::Distribution>)

    The distributions of the distribution configuration.

  • :tags (Hash<String,String>)

    The tags of the distribution configuration.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token of the distribution configuration.

Returns:

See Also:

#create_image(options = {}) ⇒ Types::CreateImageResponse

Creates a new image. This request will create a new image along with all of the configured output resources defined in the distribution configuration.

Examples:

Request syntax with placeholder values


resp = client.create_image({
  image_recipe_arn: "ImageRecipeArn", # required
  distribution_configuration_arn: "DistributionConfigurationArn",
  infrastructure_configuration_arn: "InfrastructureConfigurationArn", # required
  image_tests_configuration: {
    image_tests_enabled: false,
    timeout_minutes: 1,
  },
  enhanced_image_metadata_enabled: false,
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.image_build_version_arn #=> String

Options Hash (options):

  • :image_recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.

  • :distribution_configuration_arn (String)

    The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline.

  • :infrastructure_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.

  • :image_tests_configuration (Types::ImageTestsConfiguration)

    The image tests configuration of the image.

  • :enhanced_image_metadata_enabled (Boolean)

    Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

  • :tags (Hash<String,String>)

    The tags of the image.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

Returns:

See Also:

#create_image_pipeline(options = {}) ⇒ Types::CreateImagePipelineResponse

Creates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images.

Examples:

Request syntax with placeholder values


resp = client.create_image_pipeline({
  name: "ResourceName", # required
  description: "NonEmptyString",
  image_recipe_arn: "ImageRecipeArn", # required
  infrastructure_configuration_arn: "InfrastructureConfigurationArn", # required
  distribution_configuration_arn: "DistributionConfigurationArn",
  image_tests_configuration: {
    image_tests_enabled: false,
    timeout_minutes: 1,
  },
  enhanced_image_metadata_enabled: false,
  schedule: {
    schedule_expression: "NonEmptyString",
    pipeline_execution_start_condition: "EXPRESSION_MATCH_ONLY", # accepts EXPRESSION_MATCH_ONLY, EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE
  },
  status: "DISABLED", # accepts DISABLED, ENABLED
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.image_pipeline_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the image pipeline.

  • :description (String)

    The description of the image pipeline.

  • :image_recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the image recipe that will be used to configure images created by this image pipeline.

  • :infrastructure_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the infrastructure configuration that will be used to build images created by this image pipeline.

  • :distribution_configuration_arn (String)

    The Amazon Resource Name (ARN) of the distribution configuration that will be used to configure and distribute images created by this image pipeline.

  • :image_tests_configuration (Types::ImageTestsConfiguration)

    The image test configuration of the image pipeline.

  • :enhanced_image_metadata_enabled (Boolean)

    Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

  • :schedule (Types::Schedule)

    The schedule of the image pipeline.

  • :status (String)

    The status of the image pipeline.

  • :tags (Hash<String,String>)

    The tags of the image pipeline.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

Returns:

See Also:

#create_image_recipe(options = {}) ⇒ Types::CreateImageRecipeResponse

Creates a new image recipe. Image recipes define how images are configured, tested, and assessed.

Examples:

Request syntax with placeholder values


resp = client.create_image_recipe({
  name: "ResourceName", # required
  description: "NonEmptyString",
  semantic_version: "VersionNumber", # required
  components: [ # required
    {
      component_arn: "ComponentVersionArnOrBuildVersionArn", # required
    },
  ],
  parent_image: "NonEmptyString", # required
  block_device_mappings: [
    {
      device_name: "NonEmptyString",
      ebs: {
        encrypted: false,
        delete_on_termination: false,
        iops: 1,
        kms_key_id: "NonEmptyString",
        snapshot_id: "NonEmptyString",
        volume_size: 1,
        volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
      },
      virtual_name: "NonEmptyString",
      no_device: "EmptyString",
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
  working_directory: "NonEmptyString",
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.image_recipe_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the image recipe.

  • :description (String)

    The description of the image recipe.

  • :semantic_version (required, String)

    The semantic version of the image recipe.

  • :components (required, Array<Types::ComponentConfiguration>)

    The components of the image recipe.

  • :parent_image (required, String)

    The parent image of the image recipe. The value of the string can be the ARN of the parent image or an AMI ID. The format for the ARN follows this example: arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/xxxx.x.x. You can provide the specific version that you want to use, or you can use a wildcard in all of the fields. If you enter an AMI ID for the string value, you must have access to the AMI, and the AMI must be in the same Region in which you are using Image Builder.

  • :block_device_mappings (Array<Types::InstanceBlockDeviceMapping>)

    The block device mappings of the image recipe.

  • :tags (Hash<String,String>)

    The tags of the image recipe.

  • :working_directory (String)

    The working directory to be used during build and test workflows.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

Returns:

See Also:

#create_infrastructure_configuration(options = {}) ⇒ Types::CreateInfrastructureConfigurationResponse

Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.

Examples:

Request syntax with placeholder values


resp = client.create_infrastructure_configuration({
  name: "ResourceName", # required
  description: "NonEmptyString",
  instance_types: ["InstanceType"],
  instance_profile_name: "NonEmptyString", # required
  security_group_ids: ["NonEmptyString"],
  subnet_id: "NonEmptyString",
  logging: {
    s3_logs: {
      s3_bucket_name: "NonEmptyString",
      s3_key_prefix: "NonEmptyString",
    },
  },
  key_pair: "NonEmptyString",
  terminate_instance_on_failure: false,
  sns_topic_arn: "SnsTopicArn",
  resource_tags: {
    "TagKey" => "TagValue",
  },
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.infrastructure_configuration_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the infrastructure configuration.

  • :description (String)

    The description of the infrastructure configuration.

  • :instance_types (Array<String>)

    The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. The service will pick one of these instance types based on availability.

  • :instance_profile_name (required, String)

    The instance profile to associate with the instance used to customize your EC2 AMI.

  • :security_group_ids (Array<String>)

    The security group IDs to associate with the instance used to customize your EC2 AMI.

  • :subnet_id (String)

    The subnet ID in which to place the instance used to customize your EC2 AMI.

  • :logging (Types::Logging)

    The logging configuration of the infrastructure configuration.

  • :key_pair (String)

    The key pair of the infrastructure configuration. This can be used to log on to and debug the instance used to create your image.

  • :terminate_instance_on_failure (Boolean)

    The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.

  • :sns_topic_arn (String)

    The SNS topic on which to send image build events.

  • :resource_tags (Hash<String,String>)

    The tags attached to the resource created by Image Builder.

  • :tags (Hash<String,String>)

    The tags of the infrastructure configuration.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

Returns:

See Also:

#delete_component(options = {}) ⇒ Types::DeleteComponentResponse

Deletes a component build version.

Examples:

Request syntax with placeholder values


resp = client.delete_component({
  component_build_version_arn: "ComponentBuildVersionArn", # required
})

Response structure


resp.request_id #=> String
resp.component_build_version_arn #=> String

Options Hash (options):

  • :component_build_version_arn (required, String)

    The Amazon Resource Name (ARN) of the component build version to delete.

Returns:

See Also:

#delete_distribution_configuration(options = {}) ⇒ Types::DeleteDistributionConfigurationResponse

Deletes a distribution configuration.

Examples:

Request syntax with placeholder values


resp = client.delete_distribution_configuration({
  distribution_configuration_arn: "DistributionConfigurationArn", # required
})

Response structure


resp.request_id #=> String
resp.distribution_configuration_arn #=> String

Options Hash (options):

  • :distribution_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the distribution configuration to delete.

Returns:

See Also:

#delete_image(options = {}) ⇒ Types::DeleteImageResponse

Deletes an image.

Examples:

Request syntax with placeholder values


resp = client.delete_image({
  image_build_version_arn: "ImageBuildVersionArn", # required
})

Response structure


resp.request_id #=> String
resp.image_build_version_arn #=> String

Options Hash (options):

  • :image_build_version_arn (required, String)

    The Amazon Resource Name (ARN) of the image to delete.

Returns:

See Also:

#delete_image_pipeline(options = {}) ⇒ Types::DeleteImagePipelineResponse

Deletes an image pipeline.

Examples:

Request syntax with placeholder values


resp = client.delete_image_pipeline({
  image_pipeline_arn: "ImagePipelineArn", # required
})

Response structure


resp.request_id #=> String
resp.image_pipeline_arn #=> String

Options Hash (options):

  • :image_pipeline_arn (required, String)

    The Amazon Resource Name (ARN) of the image pipeline to delete.

Returns:

See Also:

#delete_image_recipe(options = {}) ⇒ Types::DeleteImageRecipeResponse

Deletes an image recipe.

Examples:

Request syntax with placeholder values


resp = client.delete_image_recipe({
  image_recipe_arn: "ImageRecipeArn", # required
})

Response structure


resp.request_id #=> String
resp.image_recipe_arn #=> String

Options Hash (options):

  • :image_recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the image recipe to delete.

Returns:

See Also:

#delete_infrastructure_configuration(options = {}) ⇒ Types::DeleteInfrastructureConfigurationResponse

Deletes an infrastructure configuration.

Examples:

Request syntax with placeholder values


resp = client.delete_infrastructure_configuration({
  infrastructure_configuration_arn: "InfrastructureConfigurationArn", # required
})

Response structure


resp.request_id #=> String
resp.infrastructure_configuration_arn #=> String

Options Hash (options):

  • :infrastructure_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the infrastructure configuration to delete.

Returns:

See Also:

#get_component(options = {}) ⇒ Types::GetComponentResponse

Gets a component object.

Examples:

Request syntax with placeholder values


resp = client.get_component({
  component_build_version_arn: "ComponentVersionArnOrBuildVersionArn", # required
})

Response structure


resp.request_id #=> String
resp.component.arn #=> String
resp.component.name #=> String
resp.component.version #=> String
resp.component.description #=> String
resp.component.change_description #=> String
resp.component.type #=> String, one of "BUILD", "TEST"
resp.component.platform #=> String, one of "Windows", "Linux"
resp.component.supported_os_versions #=> Array
resp.component.supported_os_versions[0] #=> String
resp.component.owner #=> String
resp.component.data #=> String
resp.component.kms_key_id #=> String
resp.component.encrypted #=> true/false
resp.component.date_created #=> String
resp.component.tags #=> Hash
resp.component.tags["TagKey"] #=> String

Options Hash (options):

  • :component_build_version_arn (required, String)

    The Amazon Resource Name (ARN) of the component that you want to retrieve. Regex requires \"/\d+$\" suffix.

Returns:

See Also:

#get_component_policy(options = {}) ⇒ Types::GetComponentPolicyResponse

Gets a component policy.

Examples:

Request syntax with placeholder values


resp = client.get_component_policy({
  component_arn: "ComponentBuildVersionArn", # required
})

Response structure


resp.request_id #=> String
resp.policy #=> String

Options Hash (options):

  • :component_arn (required, String)

    The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.

Returns:

See Also:

#get_distribution_configuration(options = {}) ⇒ Types::GetDistributionConfigurationResponse

Gets a distribution configuration.

Examples:

Request syntax with placeholder values


resp = client.get_distribution_configuration({
  distribution_configuration_arn: "DistributionConfigurationArn", # required
})

Response structure


resp.request_id #=> String
resp.distribution_configuration.arn #=> String
resp.distribution_configuration.name #=> String
resp.distribution_configuration.description #=> String
resp.distribution_configuration.distributions #=> Array
resp.distribution_configuration.distributions[0].region #=> String
resp.distribution_configuration.distributions[0].ami_distribution_configuration.name #=> String
resp.distribution_configuration.distributions[0].ami_distribution_configuration.description #=> String
resp.distribution_configuration.distributions[0].ami_distribution_configuration. #=> Array
resp.distribution_configuration.distributions[0].ami_distribution_configuration.[0] #=> String
resp.distribution_configuration.distributions[0].ami_distribution_configuration.ami_tags #=> Hash
resp.distribution_configuration.distributions[0].ami_distribution_configuration.ami_tags["TagKey"] #=> String
resp.distribution_configuration.distributions[0].ami_distribution_configuration.kms_key_id #=> String
resp.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_ids #=> Array
resp.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_ids[0] #=> String
resp.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_groups #=> Array
resp.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_groups[0] #=> String
resp.distribution_configuration.distributions[0].license_configuration_arns #=> Array
resp.distribution_configuration.distributions[0].license_configuration_arns[0] #=> String
resp.distribution_configuration.timeout_minutes #=> Integer
resp.distribution_configuration.date_created #=> String
resp.distribution_configuration.date_updated #=> String
resp.distribution_configuration.tags #=> Hash
resp.distribution_configuration.tags["TagKey"] #=> String

Options Hash (options):

  • :distribution_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the distribution configuration that you want to retrieve.

Returns:

See Also:

#get_image(options = {}) ⇒ Types::GetImageResponse

Gets an image.

Examples:

Request syntax with placeholder values


resp = client.get_image({
  image_build_version_arn: "ImageVersionArnOrBuildVersionArn", # required
})

Response structure


resp.request_id #=> String
resp.image.arn #=> String
resp.image.name #=> String
resp.image.version #=> String
resp.image.platform #=> String, one of "Windows", "Linux"
resp.image. #=> true/false
resp.image.os_version #=> String
resp.image.state.status #=> String, one of "PENDING", "CREATING", "BUILDING", "TESTING", "DISTRIBUTING", "INTEGRATING", "AVAILABLE", "CANCELLED", "FAILED", "DEPRECATED", "DELETED"
resp.image.state.reason #=> String
resp.image.image_recipe.arn #=> String
resp.image.image_recipe.name #=> String
resp.image.image_recipe.description #=> String
resp.image.image_recipe.platform #=> String, one of "Windows", "Linux"
resp.image.image_recipe.owner #=> String
resp.image.image_recipe.version #=> String
resp.image.image_recipe.components #=> Array
resp.image.image_recipe.components[0].component_arn #=> String
resp.image.image_recipe.parent_image #=> String
resp.image.image_recipe.block_device_mappings #=> Array
resp.image.image_recipe.block_device_mappings[0].device_name #=> String
resp.image.image_recipe.block_device_mappings[0].ebs.encrypted #=> true/false
resp.image.image_recipe.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.image.image_recipe.block_device_mappings[0].ebs.iops #=> Integer
resp.image.image_recipe.block_device_mappings[0].ebs.kms_key_id #=> String
resp.image.image_recipe.block_device_mappings[0].ebs.snapshot_id #=> String
resp.image.image_recipe.block_device_mappings[0].ebs.volume_size #=> Integer
resp.image.image_recipe.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.image.image_recipe.block_device_mappings[0].virtual_name #=> String
resp.image.image_recipe.block_device_mappings[0].no_device #=> String
resp.image.image_recipe.date_created #=> String
resp.image.image_recipe.tags #=> Hash
resp.image.image_recipe.tags["TagKey"] #=> String
resp.image.image_recipe.working_directory #=> String
resp.image.source_pipeline_name #=> String
resp.image.source_pipeline_arn #=> String
resp.image.infrastructure_configuration.arn #=> String
resp.image.infrastructure_configuration.name #=> String
resp.image.infrastructure_configuration.description #=> String
resp.image.infrastructure_configuration.instance_types #=> Array
resp.image.infrastructure_configuration.instance_types[0] #=> String
resp.image.infrastructure_configuration.instance_profile_name #=> String
resp.image.infrastructure_configuration.security_group_ids #=> Array
resp.image.infrastructure_configuration.security_group_ids[0] #=> String
resp.image.infrastructure_configuration.subnet_id #=> String
resp.image.infrastructure_configuration.logging.s3_logs.s3_bucket_name #=> String
resp.image.infrastructure_configuration.logging.s3_logs.s3_key_prefix #=> String
resp.image.infrastructure_configuration.key_pair #=> String
resp.image.infrastructure_configuration.terminate_instance_on_failure #=> true/false
resp.image.infrastructure_configuration.sns_topic_arn #=> String
resp.image.infrastructure_configuration.date_created #=> String
resp.image.infrastructure_configuration.date_updated #=> String
resp.image.infrastructure_configuration.resource_tags #=> Hash
resp.image.infrastructure_configuration.resource_tags["TagKey"] #=> String
resp.image.infrastructure_configuration.tags #=> Hash
resp.image.infrastructure_configuration.tags["TagKey"] #=> String
resp.image.distribution_configuration.arn #=> String
resp.image.distribution_configuration.name #=> String
resp.image.distribution_configuration.description #=> String
resp.image.distribution_configuration.distributions #=> Array
resp.image.distribution_configuration.distributions[0].region #=> String
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.name #=> String
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.description #=> String
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration. #=> Array
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.[0] #=> String
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.ami_tags #=> Hash
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.ami_tags["TagKey"] #=> String
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.kms_key_id #=> String
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_ids #=> Array
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_ids[0] #=> String
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_groups #=> Array
resp.image.distribution_configuration.distributions[0].ami_distribution_configuration.launch_permission.user_groups[0] #=> String
resp.image.distribution_configuration.distributions[0].license_configuration_arns #=> Array
resp.image.distribution_configuration.distributions[0].license_configuration_arns[0] #=> String
resp.image.distribution_configuration.timeout_minutes #=> Integer
resp.image.distribution_configuration.date_created #=> String
resp.image.distribution_configuration.date_updated #=> String
resp.image.distribution_configuration.tags #=> Hash
resp.image.distribution_configuration.tags["TagKey"] #=> String
resp.image.image_tests_configuration.image_tests_enabled #=> true/false
resp.image.image_tests_configuration.timeout_minutes #=> Integer
resp.image.date_created #=> String
resp.image.output_resources.amis #=> Array
resp.image.output_resources.amis[0].region #=> String
resp.image.output_resources.amis[0].image #=> String
resp.image.output_resources.amis[0].name #=> String
resp.image.output_resources.amis[0].description #=> String
resp.image.output_resources.amis[0].state.status #=> String, one of "PENDING", "CREATING", "BUILDING", "TESTING", "DISTRIBUTING", "INTEGRATING", "AVAILABLE", "CANCELLED", "FAILED", "DEPRECATED", "DELETED"
resp.image.output_resources.amis[0].state.reason #=> String
resp.image.output_resources.amis[0]. #=> String
resp.image.tags #=> Hash
resp.image.tags["TagKey"] #=> String

Options Hash (options):

  • :image_build_version_arn (required, String)

    The Amazon Resource Name (ARN) of the image that you want to retrieve.

Returns:

See Also:

#get_image_pipeline(options = {}) ⇒ Types::GetImagePipelineResponse

Gets an image pipeline.

Examples:

Request syntax with placeholder values


resp = client.get_image_pipeline({
  image_pipeline_arn: "ImagePipelineArn", # required
})

Response structure


resp.request_id #=> String
resp.image_pipeline.arn #=> String
resp.image_pipeline.name #=> String
resp.image_pipeline.description #=> String
resp.image_pipeline.platform #=> String, one of "Windows", "Linux"
resp.image_pipeline. #=> true/false
resp.image_pipeline.image_recipe_arn #=> String
resp.image_pipeline.infrastructure_configuration_arn #=> String
resp.image_pipeline.distribution_configuration_arn #=> String
resp.image_pipeline.image_tests_configuration.image_tests_enabled #=> true/false
resp.image_pipeline.image_tests_configuration.timeout_minutes #=> Integer
resp.image_pipeline.schedule.schedule_expression #=> String
resp.image_pipeline.schedule.pipeline_execution_start_condition #=> String, one of "EXPRESSION_MATCH_ONLY", "EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE"
resp.image_pipeline.status #=> String, one of "DISABLED", "ENABLED"
resp.image_pipeline.date_created #=> String
resp.image_pipeline.date_updated #=> String
resp.image_pipeline.date_last_run #=> String
resp.image_pipeline.date_next_run #=> String
resp.image_pipeline.tags #=> Hash
resp.image_pipeline.tags["TagKey"] #=> String

Options Hash (options):

  • :image_pipeline_arn (required, String)

    The Amazon Resource Name (ARN) of the image pipeline that you want to retrieve.

Returns:

See Also:

#get_image_policy(options = {}) ⇒ Types::GetImagePolicyResponse

Gets an image policy.

Examples:

Request syntax with placeholder values


resp = client.get_image_policy({
  image_arn: "ImageBuildVersionArn", # required
})

Response structure


resp.request_id #=> String
resp.policy #=> String

Options Hash (options):

  • :image_arn (required, String)

    The Amazon Resource Name (ARN) of the image whose policy you want to retrieve.

Returns:

See Also:

#get_image_recipe(options = {}) ⇒ Types::GetImageRecipeResponse

Gets an image recipe.

Examples:

Request syntax with placeholder values


resp = client.get_image_recipe({
  image_recipe_arn: "ImageRecipeArn", # required
})

Response structure


resp.request_id #=> String
resp.image_recipe.arn #=> String
resp.image_recipe.name #=> String
resp.image_recipe.description #=> String
resp.image_recipe.platform #=> String, one of "Windows", "Linux"
resp.image_recipe.owner #=> String
resp.image_recipe.version #=> String
resp.image_recipe.components #=> Array
resp.image_recipe.components[0].component_arn #=> String
resp.image_recipe.parent_image #=> String
resp.image_recipe.block_device_mappings #=> Array
resp.image_recipe.block_device_mappings[0].device_name #=> String
resp.image_recipe.block_device_mappings[0].ebs.encrypted #=> true/false
resp.image_recipe.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.image_recipe.block_device_mappings[0].ebs.iops #=> Integer
resp.image_recipe.block_device_mappings[0].ebs.kms_key_id #=> String
resp.image_recipe.block_device_mappings[0].ebs.snapshot_id #=> String
resp.image_recipe.block_device_mappings[0].ebs.volume_size #=> Integer
resp.image_recipe.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.image_recipe.block_device_mappings[0].virtual_name #=> String
resp.image_recipe.block_device_mappings[0].no_device #=> String
resp.image_recipe.date_created #=> String
resp.image_recipe.tags #=> Hash
resp.image_recipe.tags["TagKey"] #=> String
resp.image_recipe.working_directory #=> String

Options Hash (options):

  • :image_recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the image recipe that you want to retrieve.

Returns:

See Also:

#get_image_recipe_policy(options = {}) ⇒ Types::GetImageRecipePolicyResponse

Gets an image recipe policy.

Examples:

Request syntax with placeholder values


resp = client.get_image_recipe_policy({
  image_recipe_arn: "ImageRecipeArn", # required
})

Response structure


resp.request_id #=> String
resp.policy #=> String

Options Hash (options):

  • :image_recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the image recipe whose policy you want to retrieve.

Returns:

See Also:

#get_infrastructure_configuration(options = {}) ⇒ Types::GetInfrastructureConfigurationResponse

Gets an infrastructure configuration.

Examples:

Request syntax with placeholder values


resp = client.get_infrastructure_configuration({
  infrastructure_configuration_arn: "InfrastructureConfigurationArn", # required
})

Response structure


resp.request_id #=> String
resp.infrastructure_configuration.arn #=> String
resp.infrastructure_configuration.name #=> String
resp.infrastructure_configuration.description #=> String
resp.infrastructure_configuration.instance_types #=> Array
resp.infrastructure_configuration.instance_types[0] #=> String
resp.infrastructure_configuration.instance_profile_name #=> String
resp.infrastructure_configuration.security_group_ids #=> Array
resp.infrastructure_configuration.security_group_ids[0] #=> String
resp.infrastructure_configuration.subnet_id #=> String
resp.infrastructure_configuration.logging.s3_logs.s3_bucket_name #=> String
resp.infrastructure_configuration.logging.s3_logs.s3_key_prefix #=> String
resp.infrastructure_configuration.key_pair #=> String
resp.infrastructure_configuration.terminate_instance_on_failure #=> true/false
resp.infrastructure_configuration.sns_topic_arn #=> String
resp.infrastructure_configuration.date_created #=> String
resp.infrastructure_configuration.date_updated #=> String
resp.infrastructure_configuration.resource_tags #=> Hash
resp.infrastructure_configuration.resource_tags["TagKey"] #=> String
resp.infrastructure_configuration.tags #=> Hash
resp.infrastructure_configuration.tags["TagKey"] #=> String

Options Hash (options):

  • :infrastructure_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the infrastructure configuration that you want to retrieve.

Returns:

See Also:

#import_component(options = {}) ⇒ Types::ImportComponentResponse

Imports a component and transforms its data into a component document.

Examples:

Request syntax with placeholder values


resp = client.import_component({
  name: "ResourceName", # required
  semantic_version: "VersionNumber", # required
  description: "NonEmptyString",
  change_description: "NonEmptyString",
  type: "BUILD", # required, accepts BUILD, TEST
  format: "SHELL", # required, accepts SHELL
  platform: "Windows", # required, accepts Windows, Linux
  data: "NonEmptyString",
  uri: "Uri",
  kms_key_id: "NonEmptyString",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.component_build_version_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the component.

  • :semantic_version (required, String)

    The semantic version of the component. This version follows the semantic version syntax. For example, major.minor.patch. This could be versioned like software (2.0.1) or like a date (2019.12.01).

  • :description (String)

    The description of the component. Describes the contents of the component.

  • :change_description (String)

    The change description of the component. Describes what change has been made in this version, or what makes this version different from other versions of this component.

  • :type (required, String)

    The type of the component denotes whether the component is used to build the image or only to test it.

  • :format (required, String)

    The format of the resource that you want to import as a component.

  • :platform (required, String)

    The platform of the component.

  • :data (String)

    The data of the component. Used to specify the data inline. Either data or uri can be used to specify the data within the component.

  • :uri (String)

    The uri of the component. Must be an S3 URL and the requester must have permission to access the S3 bucket. If you use S3, you can specify component content up to your service quota. Either data or uri can be used to specify the data within the component.

  • :kms_key_id (String)

    The ID of the KMS key that should be used to encrypt this component.

  • :tags (Hash<String,String>)

    The tags of the component.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token of the component.

Returns:

See Also:

#list_component_build_versions(options = {}) ⇒ Types::ListComponentBuildVersionsResponse

Returns the list of component build versions for the specified semantic version.

Examples:

Request syntax with placeholder values


resp = client.list_component_build_versions({
  component_version_arn: "ComponentVersionArn", # required
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.component_summary_list #=> Array
resp.component_summary_list[0].arn #=> String
resp.component_summary_list[0].name #=> String
resp.component_summary_list[0].version #=> String
resp.component_summary_list[0].platform #=> String, one of "Windows", "Linux"
resp.component_summary_list[0].supported_os_versions #=> Array
resp.component_summary_list[0].supported_os_versions[0] #=> String
resp.component_summary_list[0].type #=> String, one of "BUILD", "TEST"
resp.component_summary_list[0].owner #=> String
resp.component_summary_list[0].description #=> String
resp.component_summary_list[0].change_description #=> String
resp.component_summary_list[0].date_created #=> String
resp.component_summary_list[0].tags #=> Hash
resp.component_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :component_version_arn (required, String)

    The component version Amazon Resource Name (ARN) whose versions you want to list.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_components(options = {}) ⇒ Types::ListComponentsResponse

Returns the list of component build versions for the specified semantic version.

Examples:

Request syntax with placeholder values


resp = client.list_components({
  owner: "Self", # accepts Self, Shared, Amazon
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.component_version_list #=> Array
resp.component_version_list[0].arn #=> String
resp.component_version_list[0].name #=> String
resp.component_version_list[0].version #=> String
resp.component_version_list[0].description #=> String
resp.component_version_list[0].platform #=> String, one of "Windows", "Linux"
resp.component_version_list[0].supported_os_versions #=> Array
resp.component_version_list[0].supported_os_versions[0] #=> String
resp.component_version_list[0].type #=> String, one of "BUILD", "TEST"
resp.component_version_list[0].owner #=> String
resp.component_version_list[0].date_created #=> String
resp.next_token #=> String

Options Hash (options):

  • :owner (String)

    The owner defines which components you want to list. By default, this request will only show components owned by your account. You can use this field to specify if you want to view components owned by yourself, by Amazon, or those components that have been shared with you by other customers.

  • :filters (Array<Types::Filter>)

    The filters.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_distribution_configurations(options = {}) ⇒ Types::ListDistributionConfigurationsResponse

Returns a list of distribution configurations.

Examples:

Request syntax with placeholder values


resp = client.list_distribution_configurations({
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.distribution_configuration_summary_list #=> Array
resp.distribution_configuration_summary_list[0].arn #=> String
resp.distribution_configuration_summary_list[0].name #=> String
resp.distribution_configuration_summary_list[0].description #=> String
resp.distribution_configuration_summary_list[0].date_created #=> String
resp.distribution_configuration_summary_list[0].date_updated #=> String
resp.distribution_configuration_summary_list[0].tags #=> Hash
resp.distribution_configuration_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :filters (Array<Types::Filter>)

    The filters.

    • name - The name of this distribution configuration.

    ^

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_image_build_versions(options = {}) ⇒ Types::ListImageBuildVersionsResponse

Returns a list of image build versions.

Examples:

Request syntax with placeholder values


resp = client.list_image_build_versions({
  image_version_arn: "ImageVersionArn", # required
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.image_summary_list #=> Array
resp.image_summary_list[0].arn #=> String
resp.image_summary_list[0].name #=> String
resp.image_summary_list[0].version #=> String
resp.image_summary_list[0].platform #=> String, one of "Windows", "Linux"
resp.image_summary_list[0].os_version #=> String
resp.image_summary_list[0].state.status #=> String, one of "PENDING", "CREATING", "BUILDING", "TESTING", "DISTRIBUTING", "INTEGRATING", "AVAILABLE", "CANCELLED", "FAILED", "DEPRECATED", "DELETED"
resp.image_summary_list[0].state.reason #=> String
resp.image_summary_list[0].owner #=> String
resp.image_summary_list[0].date_created #=> String
resp.image_summary_list[0].output_resources.amis #=> Array
resp.image_summary_list[0].output_resources.amis[0].region #=> String
resp.image_summary_list[0].output_resources.amis[0].image #=> String
resp.image_summary_list[0].output_resources.amis[0].name #=> String
resp.image_summary_list[0].output_resources.amis[0].description #=> String
resp.image_summary_list[0].output_resources.amis[0].state.status #=> String, one of "PENDING", "CREATING", "BUILDING", "TESTING", "DISTRIBUTING", "INTEGRATING", "AVAILABLE", "CANCELLED", "FAILED", "DEPRECATED", "DELETED"
resp.image_summary_list[0].output_resources.amis[0].state.reason #=> String
resp.image_summary_list[0].output_resources.amis[0]. #=> String
resp.image_summary_list[0].tags #=> Hash
resp.image_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :image_version_arn (required, String)

    The Amazon Resource Name (ARN) of the image whose build versions you want to retrieve.

  • :filters (Array<Types::Filter>)

    The filters.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_image_pipeline_images(options = {}) ⇒ Types::ListImagePipelineImagesResponse

Returns a list of images created by the specified pipeline.

Examples:

Request syntax with placeholder values


resp = client.list_image_pipeline_images({
  image_pipeline_arn: "ImagePipelineArn", # required
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.image_summary_list #=> Array
resp.image_summary_list[0].arn #=> String
resp.image_summary_list[0].name #=> String
resp.image_summary_list[0].version #=> String
resp.image_summary_list[0].platform #=> String, one of "Windows", "Linux"
resp.image_summary_list[0].os_version #=> String
resp.image_summary_list[0].state.status #=> String, one of "PENDING", "CREATING", "BUILDING", "TESTING", "DISTRIBUTING", "INTEGRATING", "AVAILABLE", "CANCELLED", "FAILED", "DEPRECATED", "DELETED"
resp.image_summary_list[0].state.reason #=> String
resp.image_summary_list[0].owner #=> String
resp.image_summary_list[0].date_created #=> String
resp.image_summary_list[0].output_resources.amis #=> Array
resp.image_summary_list[0].output_resources.amis[0].region #=> String
resp.image_summary_list[0].output_resources.amis[0].image #=> String
resp.image_summary_list[0].output_resources.amis[0].name #=> String
resp.image_summary_list[0].output_resources.amis[0].description #=> String
resp.image_summary_list[0].output_resources.amis[0].state.status #=> String, one of "PENDING", "CREATING", "BUILDING", "TESTING", "DISTRIBUTING", "INTEGRATING", "AVAILABLE", "CANCELLED", "FAILED", "DEPRECATED", "DELETED"
resp.image_summary_list[0].output_resources.amis[0].state.reason #=> String
resp.image_summary_list[0].output_resources.amis[0]. #=> String
resp.image_summary_list[0].tags #=> Hash
resp.image_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :image_pipeline_arn (required, String)

    The Amazon Resource Name (ARN) of the image pipeline whose images you want to view.

  • :filters (Array<Types::Filter>)

    The filters.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_image_pipelines(options = {}) ⇒ Types::ListImagePipelinesResponse

Returns a list of image pipelines.

Examples:

Request syntax with placeholder values


resp = client.list_image_pipelines({
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.image_pipeline_list #=> Array
resp.image_pipeline_list[0].arn #=> String
resp.image_pipeline_list[0].name #=> String
resp.image_pipeline_list[0].description #=> String
resp.image_pipeline_list[0].platform #=> String, one of "Windows", "Linux"
resp.image_pipeline_list[0]. #=> true/false
resp.image_pipeline_list[0].image_recipe_arn #=> String
resp.image_pipeline_list[0].infrastructure_configuration_arn #=> String
resp.image_pipeline_list[0].distribution_configuration_arn #=> String
resp.image_pipeline_list[0].image_tests_configuration.image_tests_enabled #=> true/false
resp.image_pipeline_list[0].image_tests_configuration.timeout_minutes #=> Integer
resp.image_pipeline_list[0].schedule.schedule_expression #=> String
resp.image_pipeline_list[0].schedule.pipeline_execution_start_condition #=> String, one of "EXPRESSION_MATCH_ONLY", "EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE"
resp.image_pipeline_list[0].status #=> String, one of "DISABLED", "ENABLED"
resp.image_pipeline_list[0].date_created #=> String
resp.image_pipeline_list[0].date_updated #=> String
resp.image_pipeline_list[0].date_last_run #=> String
resp.image_pipeline_list[0].date_next_run #=> String
resp.image_pipeline_list[0].tags #=> Hash
resp.image_pipeline_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :filters (Array<Types::Filter>)

    The filters.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_image_recipes(options = {}) ⇒ Types::ListImageRecipesResponse

Returns a list of image recipes.

Examples:

Request syntax with placeholder values


resp = client.list_image_recipes({
  owner: "Self", # accepts Self, Shared, Amazon
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.image_recipe_summary_list #=> Array
resp.image_recipe_summary_list[0].arn #=> String
resp.image_recipe_summary_list[0].name #=> String
resp.image_recipe_summary_list[0].platform #=> String, one of "Windows", "Linux"
resp.image_recipe_summary_list[0].owner #=> String
resp.image_recipe_summary_list[0].parent_image #=> String
resp.image_recipe_summary_list[0].date_created #=> String
resp.image_recipe_summary_list[0].tags #=> Hash
resp.image_recipe_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :owner (String)

    The owner defines which image recipes you want to list. By default, this request will only show image recipes owned by your account. You can use this field to specify if you want to view image recipes owned by yourself, by Amazon, or those image recipes that have been shared with you by other customers.

  • :filters (Array<Types::Filter>)

    The filters.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_images(options = {}) ⇒ Types::ListImagesResponse

Returns the list of images that you have access to.

Examples:

Request syntax with placeholder values


resp = client.list_images({
  owner: "Self", # accepts Self, Shared, Amazon
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.image_version_list #=> Array
resp.image_version_list[0].arn #=> String
resp.image_version_list[0].name #=> String
resp.image_version_list[0].version #=> String
resp.image_version_list[0].platform #=> String, one of "Windows", "Linux"
resp.image_version_list[0].os_version #=> String
resp.image_version_list[0].owner #=> String
resp.image_version_list[0].date_created #=> String
resp.next_token #=> String

Options Hash (options):

  • :owner (String)

    The owner defines which images you want to list. By default, this request will only show images owned by your account. You can use this field to specify if you want to view images owned by yourself, by Amazon, or those images that have been shared with you by other customers.

  • :filters (Array<Types::Filter>)

    The filters.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

#list_infrastructure_configurations(options = {}) ⇒ Types::ListInfrastructureConfigurationsResponse

Returns a list of infrastructure configurations.

Examples:

Request syntax with placeholder values


resp = client.list_infrastructure_configurations({
  filters: [
    {
      name: "FilterName",
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.request_id #=> String
resp.infrastructure_configuration_summary_list #=> Array
resp.infrastructure_configuration_summary_list[0].arn #=> String
resp.infrastructure_configuration_summary_list[0].name #=> String
resp.infrastructure_configuration_summary_list[0].description #=> String
resp.infrastructure_configuration_summary_list[0].date_created #=> String
resp.infrastructure_configuration_summary_list[0].date_updated #=> String
resp.infrastructure_configuration_summary_list[0].resource_tags #=> Hash
resp.infrastructure_configuration_summary_list[0].resource_tags["TagKey"] #=> String
resp.infrastructure_configuration_summary_list[0].tags #=> Hash
resp.infrastructure_configuration_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :filters (Array<Types::Filter>)

    The filters.

  • :max_results (Integer)

    The maximum items to return in a request.

  • :next_token (String)

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

See Also:

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

Returns the list of tags for the specified resource.

Examples:

Request syntax with placeholder values


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

Response structure


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

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.

Returns:

See Also:

#put_component_policy(options = {}) ⇒ Types::PutComponentPolicyResponse

Applies a policy to a component. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutComponentPolicy, you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.

Examples:

Request syntax with placeholder values


resp = client.put_component_policy({
  component_arn: "ComponentBuildVersionArn", # required
  policy: "ResourcePolicyDocument", # required
})

Response structure


resp.request_id #=> String
resp.component_arn #=> String

Options Hash (options):

  • :component_arn (required, String)

    The Amazon Resource Name (ARN) of the component that this policy should be applied to.

  • :policy (required, String)

    The policy to apply.

Returns:

See Also:

#put_image_policy(options = {}) ⇒ Types::PutImagePolicyResponse

Applies a policy to an image. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutImagePolicy, you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.

Examples:

Request syntax with placeholder values


resp = client.put_image_policy({
  image_arn: "ImageBuildVersionArn", # required
  policy: "ResourcePolicyDocument", # required
})

Response structure


resp.request_id #=> String
resp.image_arn #=> String

Options Hash (options):

  • :image_arn (required, String)

    The Amazon Resource Name (ARN) of the image that this policy should be applied to.

  • :policy (required, String)

    The policy to apply.

Returns:

See Also:

#put_image_recipe_policy(options = {}) ⇒ Types::PutImageRecipePolicyResponse

Applies a policy to an image recipe. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutImageRecipePolicy, you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.

Examples:

Request syntax with placeholder values


resp = client.put_image_recipe_policy({
  image_recipe_arn: "ImageRecipeArn", # required
  policy: "ResourcePolicyDocument", # required
})

Response structure


resp.request_id #=> String
resp.image_recipe_arn #=> String

Options Hash (options):

  • :image_recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the image recipe that this policy should be applied to.

  • :policy (required, String)

    The policy to apply.

Returns:

See Also:

#start_image_pipeline_execution(options = {}) ⇒ Types::StartImagePipelineExecutionResponse

Manually triggers a pipeline to create an image.

Examples:

Request syntax with placeholder values


resp = client.start_image_pipeline_execution({
  image_pipeline_arn: "ImagePipelineArn", # required
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.image_build_version_arn #=> String

Options Hash (options):

  • :image_pipeline_arn (required, String)

    The Amazon Resource Name (ARN) of the image pipeline that you want to manually invoke.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

Returns:

See Also:

#tag_resource(options = {}) ⇒ Struct

Adds a tag to a resource.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to tag.

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

    The tags to apply to the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Removes a tag from a resource.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to untag.

  • :tag_keys (required, Array<String>)

    The tag keys to remove from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_distribution_configuration(options = {}) ⇒ Types::UpdateDistributionConfigurationResponse

Updates a new distribution configuration. Distribution configurations define and configure the outputs of your pipeline.

Examples:

Request syntax with placeholder values


resp = client.update_distribution_configuration({
  distribution_configuration_arn: "DistributionConfigurationArn", # required
  description: "NonEmptyString",
  distributions: [ # required
    {
      region: "NonEmptyString", # required
      ami_distribution_configuration: {
        name: "AmiNameString",
        description: "NonEmptyString",
        target_account_ids: ["AccountId"],
        ami_tags: {
          "TagKey" => "TagValue",
        },
        kms_key_id: "NonEmptyString",
        launch_permission: {
          user_ids: ["AccountId"],
          user_groups: ["NonEmptyString"],
        },
      },
      license_configuration_arns: ["LicenseConfigurationArn"],
    },
  ],
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.distribution_configuration_arn #=> String

Options Hash (options):

  • :distribution_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the distribution configuration that you want to update.

  • :description (String)

    The description of the distribution configuration.

  • :distributions (required, Array<Types::Distribution>)

    The distributions of the distribution configuration.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token of the distribution configuration.

Returns:

See Also:

#update_image_pipeline(options = {}) ⇒ Types::UpdateImagePipelineResponse

Updates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images.

Examples:

Request syntax with placeholder values


resp = client.update_image_pipeline({
  image_pipeline_arn: "ImagePipelineArn", # required
  description: "NonEmptyString",
  image_recipe_arn: "ImageRecipeArn", # required
  infrastructure_configuration_arn: "InfrastructureConfigurationArn", # required
  distribution_configuration_arn: "DistributionConfigurationArn",
  image_tests_configuration: {
    image_tests_enabled: false,
    timeout_minutes: 1,
  },
  enhanced_image_metadata_enabled: false,
  schedule: {
    schedule_expression: "NonEmptyString",
    pipeline_execution_start_condition: "EXPRESSION_MATCH_ONLY", # accepts EXPRESSION_MATCH_ONLY, EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE
  },
  status: "DISABLED", # accepts DISABLED, ENABLED
  client_token: "ClientToken", # required
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.image_pipeline_arn #=> String

Options Hash (options):

  • :image_pipeline_arn (required, String)

    The Amazon Resource Name (ARN) of the image pipeline that you want to update.

  • :description (String)

    The description of the image pipeline.

  • :image_recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the image recipe that will be used to configure images updated by this image pipeline.

  • :infrastructure_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the infrastructure configuration that will be used to build images updated by this image pipeline.

  • :distribution_configuration_arn (String)

    The Amazon Resource Name (ARN) of the distribution configuration that will be used to configure and distribute images updated by this image pipeline.

  • :image_tests_configuration (Types::ImageTestsConfiguration)

    The image test configuration of the image pipeline.

  • :enhanced_image_metadata_enabled (Boolean)

    Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

  • :schedule (Types::Schedule)

    The schedule of the image pipeline.

  • :status (String)

    The status of the image pipeline.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

Returns:

See Also:

#update_infrastructure_configuration(options = {}) ⇒ Types::UpdateInfrastructureConfigurationResponse

Updates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.

Examples:

Request syntax with placeholder values


resp = client.update_infrastructure_configuration({
  infrastructure_configuration_arn: "InfrastructureConfigurationArn", # required
  description: "NonEmptyString",
  instance_types: ["InstanceType"],
  instance_profile_name: "NonEmptyString", # required
  security_group_ids: ["NonEmptyString"],
  subnet_id: "NonEmptyString",
  logging: {
    s3_logs: {
      s3_bucket_name: "NonEmptyString",
      s3_key_prefix: "NonEmptyString",
    },
  },
  key_pair: "NonEmptyString",
  terminate_instance_on_failure: false,
  sns_topic_arn: "SnsTopicArn",
  client_token: "ClientToken", # required
  resource_tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.request_id #=> String
resp.client_token #=> String
resp.infrastructure_configuration_arn #=> String

Options Hash (options):

  • :infrastructure_configuration_arn (required, String)

    The Amazon Resource Name (ARN) of the infrastructure configuration that you want to update.

  • :description (String)

    The description of the infrastructure configuration.

  • :instance_types (Array<String>)

    The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. The service will pick one of these instance types based on availability.

  • :instance_profile_name (required, String)

    The instance profile to associate with the instance used to customize your EC2 AMI.

  • :security_group_ids (Array<String>)

    The security group IDs to associate with the instance used to customize your EC2 AMI.

  • :subnet_id (String)

    The subnet ID to place the instance used to customize your EC2 AMI in.

  • :logging (Types::Logging)

    The logging configuration of the infrastructure configuration.

  • :key_pair (String)

    The key pair of the infrastructure configuration. This can be used to log on to and debug the instance used to create your image.

  • :terminate_instance_on_failure (Boolean)

    The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.

  • :sns_topic_arn (String)

    The SNS topic on which to send image build events.

  • :client_token (required, String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The idempotency token used to make this request idempotent.

  • :resource_tags (Hash<String,String>)

    The tags attached to the resource created by Image Builder.

Returns:

See Also:

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

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

Basic Usage

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

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

Configuration

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

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

Callbacks

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

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

  # disable max attempts
  w.max_attempts = nil

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

end

Handling Errors

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

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

Parameters:

  • waiter_name (Symbol)

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

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

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

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

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

  • (Errors::TooManyAttemptsError)

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

  • (Errors::UnexpectedError)

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

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

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

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.