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

Class: Aws::SMS::Client

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

Overview

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

sms = Aws::SMS::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::SMS::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::SMS::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.

  • :simple_json (Boolean) — default: false

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

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

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

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

  • :ssl_verify_peer (Boolean) — default: true

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

  • :stub_responses (Boolean) — default: false

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

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

  • :validate_params (Boolean) — default: true

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

Instance Method Details

#create_app(options = {}) ⇒ Types::CreateAppResponse

Creates an application. An application consists of one or more server groups. Each server group contain one or more servers.

Examples:

Request syntax with placeholder values


resp = client.create_app({
  name: "AppName",
  description: "AppDescription",
  role_name: "RoleName",
  client_token: "ClientToken",
  server_groups: [
    {
      server_group_id: "ServerGroupId",
      name: "ServerGroupName",
      server_list: [
        {
          server_id: "ServerId",
          server_type: "VIRTUAL_MACHINE", # accepts VIRTUAL_MACHINE
          vm_server: {
            vm_server_address: {
              vm_manager_id: "VmManagerId",
              vm_id: "VmId",
            },
            vm_name: "VmName",
            vm_manager_name: "VmManagerName",
            vm_manager_type: "VSPHERE", # accepts VSPHERE, SCVMM, HYPERV-MANAGER
            vm_path: "VmPath",
          },
          replication_job_id: "ReplicationJobId",
          replication_job_terminated: false,
        },
      ],
    },
  ],
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.app_summary.app_id #=> String
resp.app_summary.name #=> String
resp.app_summary.description #=> String
resp.app_summary.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "DELETE_FAILED"
resp.app_summary.status_message #=> String
resp.app_summary.replication_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_REPLICATION", "VALIDATION_IN_PROGRESS", "REPLICATION_PENDING", "REPLICATION_IN_PROGRESS", "REPLICATED", "DELTA_REPLICATION_IN_PROGRESS", "DELTA_REPLICATED", "DELTA_REPLICATION_FAILED", "REPLICATION_FAILED", "REPLICATION_STOPPING", "REPLICATION_STOP_FAILED", "REPLICATION_STOPPED"
resp.app_summary.replication_status_message #=> String
resp.app_summary.latest_replication_time #=> Time
resp.app_summary.launch_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_LAUNCH", "VALIDATION_IN_PROGRESS", "LAUNCH_PENDING", "LAUNCH_IN_PROGRESS", "LAUNCHED", "DELTA_LAUNCH_IN_PROGRESS", "DELTA_LAUNCH_FAILED", "LAUNCH_FAILED", "TERMINATE_IN_PROGRESS", "TERMINATE_FAILED", "TERMINATED"
resp.app_summary.launch_status_message #=> String
resp.app_summary.launch_details.latest_launch_time #=> Time
resp.app_summary.launch_details.stack_name #=> String
resp.app_summary.launch_details.stack_id #=> String
resp.app_summary.creation_time #=> Time
resp.app_summary.last_modified #=> Time
resp.app_summary.role_name #=> String
resp.app_summary.total_server_groups #=> Integer
resp.app_summary.total_servers #=> Integer
resp.server_groups #=> Array
resp.server_groups[0].server_group_id #=> String
resp.server_groups[0].name #=> String
resp.server_groups[0].server_list #=> Array
resp.server_groups[0].server_list[0].server_id #=> String
resp.server_groups[0].server_list[0].server_type #=> String, one of "VIRTUAL_MACHINE"
resp.server_groups[0].server_list[0].vm_server.vm_server_address.vm_manager_id #=> String
resp.server_groups[0].server_list[0].vm_server.vm_server_address.vm_id #=> String
resp.server_groups[0].server_list[0].vm_server.vm_name #=> String
resp.server_groups[0].server_list[0].vm_server.vm_manager_name #=> String
resp.server_groups[0].server_list[0].vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.server_groups[0].server_list[0].vm_server.vm_path #=> String
resp.server_groups[0].server_list[0].replication_job_id #=> String
resp.server_groups[0].server_list[0].replication_job_terminated #=> true/false
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :name (String)

    Name of the new application.

  • :description (String)

    Description of the new application

  • :role_name (String)

    Name of service role in customer\'s account to be used by AWS SMS.

  • :client_token (String)

    A unique, case-sensitive identifier you provide to ensure idempotency of application creation.

  • :server_groups (Array<Types::ServerGroup>)

    List of server groups to include in the application.

  • :tags (Array<Types::Tag>)

    List of tags to be associated with the application.

Returns:

See Also:

#create_replication_job(options = {}) ⇒ Types::CreateReplicationJobResponse

Creates a replication job. The replication job schedules periodic replication runs to replicate your server to AWS. Each replication run creates an Amazon Machine Image (AMI).

Examples:

Request syntax with placeholder values


resp = client.create_replication_job({
  server_id: "ServerId", # required
  seed_replication_time: Time.now, # required
  frequency: 1,
  run_once: false,
  license_type: "AWS", # accepts AWS, BYOL
  role_name: "RoleName",
  description: "Description",
  number_of_recent_amis_to_keep: 1,
  encrypted: false,
  kms_key_id: "KmsKeyId",
})

Response structure


resp.replication_job_id #=> String

Options Hash (options):

  • :server_id (required, String)

    The identifier of the server.

  • :seed_replication_time (required, Time)

    The seed replication time.

  • :frequency (Integer)

    The time between consecutive replication runs, in hours.

  • :run_once (Boolean)
  • :license_type (String)

    The license type to be used for the AMI created by a successful replication run.

  • :role_name (String)

    The name of the IAM role to be used by the AWS SMS.

  • :description (String)

    The description of the replication job.

  • :number_of_recent_amis_to_keep (Integer)

    The maximum number of SMS-created AMIs to retain. The oldest will be deleted once the maximum number is reached and a new AMI is created.

  • :encrypted (Boolean)

    When true, the replication job produces encrypted AMIs. See also KmsKeyId below.

  • :kms_key_id (String)

    KMS key ID for replication jobs that produce encrypted AMIs. Can be any of the following:

    • KMS key ID

    • KMS key alias

    • ARN referring to KMS key ID

    • ARN referring to KMS key alias

    If encrypted is true but a KMS key id is not specified, the customer\'s default KMS key for EBS is used.

Returns:

See Also:

#delete_app(options = {}) ⇒ Struct

Deletes an existing application. Optionally deletes the launched stack associated with the application and all AWS SMS replication jobs for servers in the application.

Examples:

Request syntax with placeholder values


resp = client.delete_app({
  app_id: "AppId",
  force_stop_app_replication: false,
  force_terminate_app: false,
})

Options Hash (options):

  • :app_id (String)

    ID of the application to delete.

  • :force_stop_app_replication (Boolean)

    While deleting the application, stop all replication jobs corresponding to the servers in the application.

  • :force_terminate_app (Boolean)

    While deleting the application, terminate the stack corresponding to the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_app_launch_configuration(options = {}) ⇒ Struct

Deletes existing launch configuration for an application.

Examples:

Request syntax with placeholder values


resp = client.delete_app_launch_configuration({
  app_id: "AppId",
})

Options Hash (options):

  • :app_id (String)

    ID of the application associated with the launch configuration.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_app_replication_configuration(options = {}) ⇒ Struct

Deletes existing replication configuration for an application.

Examples:

Request syntax with placeholder values


resp = client.delete_app_replication_configuration({
  app_id: "AppId",
})

Options Hash (options):

  • :app_id (String)

    ID of the application associated with the replication configuration.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_replication_job(options = {}) ⇒ Struct

Deletes the specified replication job.

After you delete a replication job, there are no further replication runs. AWS deletes the contents of the Amazon S3 bucket used to store AWS SMS artifacts. The AMIs created by the replication runs are not deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_replication_job({
  replication_job_id: "ReplicationJobId", # required
})

Options Hash (options):

  • :replication_job_id (required, String)

    The identifier of the replication job.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_server_catalog(options = {}) ⇒ Struct

Deletes all servers from your server catalog.

Examples:

Request syntax with placeholder values


resp = client.delete_server_catalog()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_connector(options = {}) ⇒ Struct

Disassociates the specified connector from AWS SMS.

After you disassociate a connector, it is no longer available to support replication jobs.

Examples:

Request syntax with placeholder values


resp = client.disassociate_connector({
  connector_id: "ConnectorId", # required
})

Options Hash (options):

  • :connector_id (required, String)

    The identifier of the connector.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#generate_change_set(options = {}) ⇒ Types::GenerateChangeSetResponse

Generates a target change set for a currently launched stack and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.

Examples:

Request syntax with placeholder values


resp = client.generate_change_set({
  app_id: "AppId",
  changeset_format: "JSON", # accepts JSON, YAML
})

Response structure


resp.s3_location.bucket #=> String
resp.s3_location.key #=> String

Options Hash (options):

  • :app_id (String)

    ID of the application associated with the change set.

  • :changeset_format (String)

    Format for the change set.

Returns:

See Also:

#generate_template(options = {}) ⇒ Types::GenerateTemplateResponse

Generates an Amazon CloudFormation template based on the current launch configuration and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.

Examples:

Request syntax with placeholder values


resp = client.generate_template({
  app_id: "AppId",
  template_format: "JSON", # accepts JSON, YAML
})

Response structure


resp.s3_location.bucket #=> String
resp.s3_location.key #=> String

Options Hash (options):

  • :app_id (String)

    ID of the application associated with the Amazon CloudFormation template.

  • :template_format (String)

    Format for generating the Amazon CloudFormation template.

Returns:

See Also:

#get_app(options = {}) ⇒ Types::GetAppResponse

Retrieve information about an application.

Examples:

Request syntax with placeholder values


resp = client.get_app({
  app_id: "AppId",
})

Response structure


resp.app_summary.app_id #=> String
resp.app_summary.name #=> String
resp.app_summary.description #=> String
resp.app_summary.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "DELETE_FAILED"
resp.app_summary.status_message #=> String
resp.app_summary.replication_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_REPLICATION", "VALIDATION_IN_PROGRESS", "REPLICATION_PENDING", "REPLICATION_IN_PROGRESS", "REPLICATED", "DELTA_REPLICATION_IN_PROGRESS", "DELTA_REPLICATED", "DELTA_REPLICATION_FAILED", "REPLICATION_FAILED", "REPLICATION_STOPPING", "REPLICATION_STOP_FAILED", "REPLICATION_STOPPED"
resp.app_summary.replication_status_message #=> String
resp.app_summary.latest_replication_time #=> Time
resp.app_summary.launch_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_LAUNCH", "VALIDATION_IN_PROGRESS", "LAUNCH_PENDING", "LAUNCH_IN_PROGRESS", "LAUNCHED", "DELTA_LAUNCH_IN_PROGRESS", "DELTA_LAUNCH_FAILED", "LAUNCH_FAILED", "TERMINATE_IN_PROGRESS", "TERMINATE_FAILED", "TERMINATED"
resp.app_summary.launch_status_message #=> String
resp.app_summary.launch_details.latest_launch_time #=> Time
resp.app_summary.launch_details.stack_name #=> String
resp.app_summary.launch_details.stack_id #=> String
resp.app_summary.creation_time #=> Time
resp.app_summary.last_modified #=> Time
resp.app_summary.role_name #=> String
resp.app_summary.total_server_groups #=> Integer
resp.app_summary.total_servers #=> Integer
resp.server_groups #=> Array
resp.server_groups[0].server_group_id #=> String
resp.server_groups[0].name #=> String
resp.server_groups[0].server_list #=> Array
resp.server_groups[0].server_list[0].server_id #=> String
resp.server_groups[0].server_list[0].server_type #=> String, one of "VIRTUAL_MACHINE"
resp.server_groups[0].server_list[0].vm_server.vm_server_address.vm_manager_id #=> String
resp.server_groups[0].server_list[0].vm_server.vm_server_address.vm_id #=> String
resp.server_groups[0].server_list[0].vm_server.vm_name #=> String
resp.server_groups[0].server_list[0].vm_server.vm_manager_name #=> String
resp.server_groups[0].server_list[0].vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.server_groups[0].server_list[0].vm_server.vm_path #=> String
resp.server_groups[0].server_list[0].replication_job_id #=> String
resp.server_groups[0].server_list[0].replication_job_terminated #=> true/false
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :app_id (String)

    ID of the application whose information is being retrieved.

Returns:

See Also:

#get_app_launch_configuration(options = {}) ⇒ Types::GetAppLaunchConfigurationResponse

Retrieves the application launch configuration associated with an application.

Examples:

Request syntax with placeholder values


resp = client.get_app_launch_configuration({
  app_id: "AppId",
})

Response structure


resp.app_id #=> String
resp.role_name #=> String
resp.server_group_launch_configurations #=> Array
resp.server_group_launch_configurations[0].server_group_id #=> String
resp.server_group_launch_configurations[0].launch_order #=> Integer
resp.server_group_launch_configurations[0].server_launch_configurations #=> Array
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.server_id #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.server_type #=> String, one of "VIRTUAL_MACHINE"
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.vm_server.vm_server_address.vm_manager_id #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.vm_server.vm_server_address.vm_id #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.vm_server.vm_name #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.vm_server.vm_manager_name #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.vm_server.vm_path #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.replication_job_id #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].server.replication_job_terminated #=> true/false
resp.server_group_launch_configurations[0].server_launch_configurations[0].logical_id #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].vpc #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].subnet #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].security_group #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].ec2_key_name #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].user_data.s3_location.bucket #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].user_data.s3_location.key #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].instance_type #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].associate_public_ip_address #=> true/false

Options Hash (options):

  • :app_id (String)

    ID of the application launch configuration.

Returns:

See Also:

#get_app_replication_configuration(options = {}) ⇒ Types::GetAppReplicationConfigurationResponse

Retrieves an application replication configuration associatd with an application.

Examples:

Request syntax with placeholder values


resp = client.get_app_replication_configuration({
  app_id: "AppId",
})

Response structure


resp.server_group_replication_configurations #=> Array
resp.server_group_replication_configurations[0].server_group_id #=> String
resp.server_group_replication_configurations[0].server_replication_configurations #=> Array
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.server_id #=> String
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.server_type #=> String, one of "VIRTUAL_MACHINE"
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.vm_server.vm_server_address.vm_manager_id #=> String
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.vm_server.vm_server_address.vm_id #=> String
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.vm_server.vm_name #=> String
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.vm_server.vm_manager_name #=> String
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.vm_server.vm_path #=> String
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.replication_job_id #=> String
resp.server_group_replication_configurations[0].server_replication_configurations[0].server.replication_job_terminated #=> true/false
resp.server_group_replication_configurations[0].server_replication_configurations[0].server_replication_parameters.seed_time #=> Time
resp.server_group_replication_configurations[0].server_replication_configurations[0].server_replication_parameters.frequency #=> Integer
resp.server_group_replication_configurations[0].server_replication_configurations[0].server_replication_parameters.run_once #=> true/false
resp.server_group_replication_configurations[0].server_replication_configurations[0].server_replication_parameters.license_type #=> String, one of "AWS", "BYOL"
resp.server_group_replication_configurations[0].server_replication_configurations[0].server_replication_parameters.number_of_recent_amis_to_keep #=> Integer
resp.server_group_replication_configurations[0].server_replication_configurations[0].server_replication_parameters.encrypted #=> true/false
resp.server_group_replication_configurations[0].server_replication_configurations[0].server_replication_parameters.kms_key_id #=> String

Options Hash (options):

  • :app_id (String)

    ID of the application associated with the replication configuration.

Returns:

See Also:

#get_connectors(options = {}) ⇒ Types::GetConnectorsResponse

Describes the connectors registered with the AWS SMS.

Examples:

Request syntax with placeholder values


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

Response structure


resp.connector_list #=> Array
resp.connector_list[0].connector_id #=> String
resp.connector_list[0].version #=> String
resp.connector_list[0].status #=> String, one of "HEALTHY", "UNHEALTHY"
resp.connector_list[0].capability_list #=> Array
resp.connector_list[0].capability_list[0] #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER", "SNAPSHOT_BATCHING"
resp.connector_list[0].vm_manager_name #=> String
resp.connector_list[0].vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.connector_list[0].vm_manager_id #=> String
resp.connector_list[0].ip_address #=> String
resp.connector_list[0].mac_address #=> String
resp.connector_list[0].associated_on #=> Time
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned NextToken value.

Returns:

See Also:

#get_replication_jobs(options = {}) ⇒ Types::GetReplicationJobsResponse

Describes the specified replication job or all of your replication jobs.

Examples:

Request syntax with placeholder values


resp = client.get_replication_jobs({
  replication_job_id: "ReplicationJobId",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.replication_job_list #=> Array
resp.replication_job_list[0].replication_job_id #=> String
resp.replication_job_list[0].server_id #=> String
resp.replication_job_list[0].server_type #=> String, one of "VIRTUAL_MACHINE"
resp.replication_job_list[0].vm_server.vm_server_address.vm_manager_id #=> String
resp.replication_job_list[0].vm_server.vm_server_address.vm_id #=> String
resp.replication_job_list[0].vm_server.vm_name #=> String
resp.replication_job_list[0].vm_server.vm_manager_name #=> String
resp.replication_job_list[0].vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.replication_job_list[0].vm_server.vm_path #=> String
resp.replication_job_list[0].seed_replication_time #=> Time
resp.replication_job_list[0].frequency #=> Integer
resp.replication_job_list[0].run_once #=> true/false
resp.replication_job_list[0].next_replication_run_start_time #=> Time
resp.replication_job_list[0].license_type #=> String, one of "AWS", "BYOL"
resp.replication_job_list[0].role_name #=> String
resp.replication_job_list[0].latest_ami_id #=> String
resp.replication_job_list[0].state #=> String, one of "PENDING", "ACTIVE", "FAILED", "DELETING", "DELETED", "COMPLETED", "PAUSED_ON_FAILURE", "FAILING"
resp.replication_job_list[0].status_message #=> String
resp.replication_job_list[0].description #=> String
resp.replication_job_list[0].number_of_recent_amis_to_keep #=> Integer
resp.replication_job_list[0].encrypted #=> true/false
resp.replication_job_list[0].kms_key_id #=> String
resp.replication_job_list[0].replication_run_list #=> Array
resp.replication_job_list[0].replication_run_list[0].replication_run_id #=> String
resp.replication_job_list[0].replication_run_list[0].state #=> String, one of "PENDING", "MISSED", "ACTIVE", "FAILED", "COMPLETED", "DELETING", "DELETED"
resp.replication_job_list[0].replication_run_list[0].type #=> String, one of "ON_DEMAND", "AUTOMATIC"
resp.replication_job_list[0].replication_run_list[0].stage_details.stage #=> String
resp.replication_job_list[0].replication_run_list[0].stage_details.stage_progress #=> String
resp.replication_job_list[0].replication_run_list[0].status_message #=> String
resp.replication_job_list[0].replication_run_list[0].ami_id #=> String
resp.replication_job_list[0].replication_run_list[0].scheduled_start_time #=> Time
resp.replication_job_list[0].replication_run_list[0].completed_time #=> Time
resp.replication_job_list[0].replication_run_list[0].description #=> String
resp.replication_job_list[0].replication_run_list[0].encrypted #=> true/false
resp.replication_job_list[0].replication_run_list[0].kms_key_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :replication_job_id (String)

    The identifier of the replication job.

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned NextToken value.

Returns:

See Also:

#get_replication_runs(options = {}) ⇒ Types::GetReplicationRunsResponse

Describes the replication runs for the specified replication job.

Examples:

Request syntax with placeholder values


resp = client.get_replication_runs({
  replication_job_id: "ReplicationJobId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.replication_job.replication_job_id #=> String
resp.replication_job.server_id #=> String
resp.replication_job.server_type #=> String, one of "VIRTUAL_MACHINE"
resp.replication_job.vm_server.vm_server_address.vm_manager_id #=> String
resp.replication_job.vm_server.vm_server_address.vm_id #=> String
resp.replication_job.vm_server.vm_name #=> String
resp.replication_job.vm_server.vm_manager_name #=> String
resp.replication_job.vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.replication_job.vm_server.vm_path #=> String
resp.replication_job.seed_replication_time #=> Time
resp.replication_job.frequency #=> Integer
resp.replication_job.run_once #=> true/false
resp.replication_job.next_replication_run_start_time #=> Time
resp.replication_job.license_type #=> String, one of "AWS", "BYOL"
resp.replication_job.role_name #=> String
resp.replication_job.latest_ami_id #=> String
resp.replication_job.state #=> String, one of "PENDING", "ACTIVE", "FAILED", "DELETING", "DELETED", "COMPLETED", "PAUSED_ON_FAILURE", "FAILING"
resp.replication_job.status_message #=> String
resp.replication_job.description #=> String
resp.replication_job.number_of_recent_amis_to_keep #=> Integer
resp.replication_job.encrypted #=> true/false
resp.replication_job.kms_key_id #=> String
resp.replication_job.replication_run_list #=> Array
resp.replication_job.replication_run_list[0].replication_run_id #=> String
resp.replication_job.replication_run_list[0].state #=> String, one of "PENDING", "MISSED", "ACTIVE", "FAILED", "COMPLETED", "DELETING", "DELETED"
resp.replication_job.replication_run_list[0].type #=> String, one of "ON_DEMAND", "AUTOMATIC"
resp.replication_job.replication_run_list[0].stage_details.stage #=> String
resp.replication_job.replication_run_list[0].stage_details.stage_progress #=> String
resp.replication_job.replication_run_list[0].status_message #=> String
resp.replication_job.replication_run_list[0].ami_id #=> String
resp.replication_job.replication_run_list[0].scheduled_start_time #=> Time
resp.replication_job.replication_run_list[0].completed_time #=> Time
resp.replication_job.replication_run_list[0].description #=> String
resp.replication_job.replication_run_list[0].encrypted #=> true/false
resp.replication_job.replication_run_list[0].kms_key_id #=> String
resp.replication_run_list #=> Array
resp.replication_run_list[0].replication_run_id #=> String
resp.replication_run_list[0].state #=> String, one of "PENDING", "MISSED", "ACTIVE", "FAILED", "COMPLETED", "DELETING", "DELETED"
resp.replication_run_list[0].type #=> String, one of "ON_DEMAND", "AUTOMATIC"
resp.replication_run_list[0].stage_details.stage #=> String
resp.replication_run_list[0].stage_details.stage_progress #=> String
resp.replication_run_list[0].status_message #=> String
resp.replication_run_list[0].ami_id #=> String
resp.replication_run_list[0].scheduled_start_time #=> Time
resp.replication_run_list[0].completed_time #=> Time
resp.replication_run_list[0].description #=> String
resp.replication_run_list[0].encrypted #=> true/false
resp.replication_run_list[0].kms_key_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :replication_job_id (required, String)

    The identifier of the replication job.

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned NextToken value.

Returns:

See Also:

#get_servers(options = {}) ⇒ Types::GetServersResponse

Describes the servers in your server catalog.

Before you can describe your servers, you must import them using ImportServerCatalog.

Examples:

Request syntax with placeholder values


resp = client.get_servers({
  next_token: "NextToken",
  max_results: 1,
  vm_server_address_list: [
    {
      vm_manager_id: "VmManagerId",
      vm_id: "VmId",
    },
  ],
})

Response structure


resp.last_modified_on #=> Time
resp.server_catalog_status #=> String, one of "NOT_IMPORTED", "IMPORTING", "AVAILABLE", "DELETED", "EXPIRED"
resp.server_list #=> Array
resp.server_list[0].server_id #=> String
resp.server_list[0].server_type #=> String, one of "VIRTUAL_MACHINE"
resp.server_list[0].vm_server.vm_server_address.vm_manager_id #=> String
resp.server_list[0].vm_server.vm_server_address.vm_id #=> String
resp.server_list[0].vm_server.vm_name #=> String
resp.server_list[0].vm_server.vm_manager_name #=> String
resp.server_list[0].vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.server_list[0].vm_server.vm_path #=> String
resp.server_list[0].replication_job_id #=> String
resp.server_list[0].replication_job_terminated #=> true/false
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned NextToken value.

  • :vm_server_address_list (Array<Types::VmServerAddress>)

    List of VmServerAddress objects

Returns:

See Also:

#import_server_catalog(options = {}) ⇒ Struct

Gathers a complete list of on-premises servers. Connectors must be installed and monitoring all servers that you want to import.

This call returns immediately, but might take additional time to retrieve all the servers.

Examples:

Request syntax with placeholder values


resp = client.import_server_catalog()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#launch_app(options = {}) ⇒ Struct

Launches an application stack.

Examples:

Request syntax with placeholder values


resp = client.launch_app({
  app_id: "AppId",
})

Options Hash (options):

  • :app_id (String)

    ID of the application to launch.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#list_apps(options = {}) ⇒ Types::ListAppsResponse

Returns a list of summaries for all applications.

Examples:

Request syntax with placeholder values


resp = client.list_apps({
  app_ids: ["AppId"],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.apps #=> Array
resp.apps[0].app_id #=> String
resp.apps[0].name #=> String
resp.apps[0].description #=> String
resp.apps[0].status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "DELETE_FAILED"
resp.apps[0].status_message #=> String
resp.apps[0].replication_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_REPLICATION", "VALIDATION_IN_PROGRESS", "REPLICATION_PENDING", "REPLICATION_IN_PROGRESS", "REPLICATED", "DELTA_REPLICATION_IN_PROGRESS", "DELTA_REPLICATED", "DELTA_REPLICATION_FAILED", "REPLICATION_FAILED", "REPLICATION_STOPPING", "REPLICATION_STOP_FAILED", "REPLICATION_STOPPED"
resp.apps[0].replication_status_message #=> String
resp.apps[0].latest_replication_time #=> Time
resp.apps[0].launch_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_LAUNCH", "VALIDATION_IN_PROGRESS", "LAUNCH_PENDING", "LAUNCH_IN_PROGRESS", "LAUNCHED", "DELTA_LAUNCH_IN_PROGRESS", "DELTA_LAUNCH_FAILED", "LAUNCH_FAILED", "TERMINATE_IN_PROGRESS", "TERMINATE_FAILED", "TERMINATED"
resp.apps[0].launch_status_message #=> String
resp.apps[0].launch_details.latest_launch_time #=> Time
resp.apps[0].launch_details.stack_name #=> String
resp.apps[0].launch_details.stack_id #=> String
resp.apps[0].creation_time #=> Time
resp.apps[0].last_modified #=> Time
resp.apps[0].role_name #=> String
resp.apps[0].total_server_groups #=> Integer
resp.apps[0].total_servers #=> Integer
resp.next_token #=> String

Options Hash (options):

  • :app_ids (Array<String>)
  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned NextToken value.

Returns:

See Also:

#put_app_launch_configuration(options = {}) ⇒ Struct

Creates a launch configuration for an application.

Examples:

Request syntax with placeholder values


resp = client.put_app_launch_configuration({
  app_id: "AppId",
  role_name: "RoleName",
  server_group_launch_configurations: [
    {
      server_group_id: "ServerGroupId",
      launch_order: 1,
      server_launch_configurations: [
        {
          server: {
            server_id: "ServerId",
            server_type: "VIRTUAL_MACHINE", # accepts VIRTUAL_MACHINE
            vm_server: {
              vm_server_address: {
                vm_manager_id: "VmManagerId",
                vm_id: "VmId",
              },
              vm_name: "VmName",
              vm_manager_name: "VmManagerName",
              vm_manager_type: "VSPHERE", # accepts VSPHERE, SCVMM, HYPERV-MANAGER
              vm_path: "VmPath",
            },
            replication_job_id: "ReplicationJobId",
            replication_job_terminated: false,
          },
          logical_id: "LogicalId",
          vpc: "VPC",
          subnet: "Subnet",
          security_group: "SecurityGroup",
          ec2_key_name: "EC2KeyName",
          user_data: {
            s3_location: {
              bucket: "BucketName",
              key: "KeyName",
            },
          },
          instance_type: "InstanceType",
          associate_public_ip_address: false,
        },
      ],
    },
  ],
})

Options Hash (options):

  • :app_id (String)

    ID of the application associated with the launch configuration.

  • :role_name (String)

    Name of service role in the customer\'s account that Amazon CloudFormation uses to launch the application.

  • :server_group_launch_configurations (Array<Types::ServerGroupLaunchConfiguration>)

    Launch configurations for server groups in the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_app_replication_configuration(options = {}) ⇒ Struct

Creates or updates a replication configuration for an application.

Examples:

Request syntax with placeholder values


resp = client.put_app_replication_configuration({
  app_id: "AppId",
  server_group_replication_configurations: [
    {
      server_group_id: "ServerGroupId",
      server_replication_configurations: [
        {
          server: {
            server_id: "ServerId",
            server_type: "VIRTUAL_MACHINE", # accepts VIRTUAL_MACHINE
            vm_server: {
              vm_server_address: {
                vm_manager_id: "VmManagerId",
                vm_id: "VmId",
              },
              vm_name: "VmName",
              vm_manager_name: "VmManagerName",
              vm_manager_type: "VSPHERE", # accepts VSPHERE, SCVMM, HYPERV-MANAGER
              vm_path: "VmPath",
            },
            replication_job_id: "ReplicationJobId",
            replication_job_terminated: false,
          },
          server_replication_parameters: {
            seed_time: Time.now,
            frequency: 1,
            run_once: false,
            license_type: "AWS", # accepts AWS, BYOL
            number_of_recent_amis_to_keep: 1,
            encrypted: false,
            kms_key_id: "KmsKeyId",
          },
        },
      ],
    },
  ],
})

Options Hash (options):

  • :app_id (String)

    ID of the application tassociated with the replication configuration.

  • :server_group_replication_configurations (Array<Types::ServerGroupReplicationConfiguration>)

    Replication configurations for server groups in the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_app_replication(options = {}) ⇒ Struct

Starts replicating an application.

Examples:

Request syntax with placeholder values


resp = client.start_app_replication({
  app_id: "AppId",
})

Options Hash (options):

  • :app_id (String)

    ID of the application to replicate.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_on_demand_replication_run(options = {}) ⇒ Types::StartOnDemandReplicationRunResponse

Starts an on-demand replication run for the specified replication job. This replication run starts immediately. This replication run is in addition to the ones already scheduled.

There is a limit on the number of on-demand replications runs you can request in a 24-hour period.

Examples:

Request syntax with placeholder values


resp = client.start_on_demand_replication_run({
  replication_job_id: "ReplicationJobId", # required
  description: "Description",
})

Response structure


resp.replication_run_id #=> String

Options Hash (options):

  • :replication_job_id (required, String)

    The identifier of the replication job.

  • :description (String)

    The description of the replication run.

Returns:

See Also:

#stop_app_replication(options = {}) ⇒ Struct

Stops replicating an application.

Examples:

Request syntax with placeholder values


resp = client.stop_app_replication({
  app_id: "AppId",
})

Options Hash (options):

  • :app_id (String)

    ID of the application to stop replicating.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#terminate_app(options = {}) ⇒ Struct

Terminates the stack for an application.

Examples:

Request syntax with placeholder values


resp = client.terminate_app({
  app_id: "AppId",
})

Options Hash (options):

  • :app_id (String)

    ID of the application to terminate.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_app(options = {}) ⇒ Types::UpdateAppResponse

Updates an application.

Examples:

Request syntax with placeholder values


resp = client.update_app({
  app_id: "AppId",
  name: "AppName",
  description: "AppDescription",
  role_name: "RoleName",
  server_groups: [
    {
      server_group_id: "ServerGroupId",
      name: "ServerGroupName",
      server_list: [
        {
          server_id: "ServerId",
          server_type: "VIRTUAL_MACHINE", # accepts VIRTUAL_MACHINE
          vm_server: {
            vm_server_address: {
              vm_manager_id: "VmManagerId",
              vm_id: "VmId",
            },
            vm_name: "VmName",
            vm_manager_name: "VmManagerName",
            vm_manager_type: "VSPHERE", # accepts VSPHERE, SCVMM, HYPERV-MANAGER
            vm_path: "VmPath",
          },
          replication_job_id: "ReplicationJobId",
          replication_job_terminated: false,
        },
      ],
    },
  ],
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.app_summary.app_id #=> String
resp.app_summary.name #=> String
resp.app_summary.description #=> String
resp.app_summary.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "DELETE_FAILED"
resp.app_summary.status_message #=> String
resp.app_summary.replication_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_REPLICATION", "VALIDATION_IN_PROGRESS", "REPLICATION_PENDING", "REPLICATION_IN_PROGRESS", "REPLICATED", "DELTA_REPLICATION_IN_PROGRESS", "DELTA_REPLICATED", "DELTA_REPLICATION_FAILED", "REPLICATION_FAILED", "REPLICATION_STOPPING", "REPLICATION_STOP_FAILED", "REPLICATION_STOPPED"
resp.app_summary.replication_status_message #=> String
resp.app_summary.latest_replication_time #=> Time
resp.app_summary.launch_status #=> String, one of "READY_FOR_CONFIGURATION", "CONFIGURATION_IN_PROGRESS", "CONFIGURATION_INVALID", "READY_FOR_LAUNCH", "VALIDATION_IN_PROGRESS", "LAUNCH_PENDING", "LAUNCH_IN_PROGRESS", "LAUNCHED", "DELTA_LAUNCH_IN_PROGRESS", "DELTA_LAUNCH_FAILED", "LAUNCH_FAILED", "TERMINATE_IN_PROGRESS", "TERMINATE_FAILED", "TERMINATED"
resp.app_summary.launch_status_message #=> String
resp.app_summary.launch_details.latest_launch_time #=> Time
resp.app_summary.launch_details.stack_name #=> String
resp.app_summary.launch_details.stack_id #=> String
resp.app_summary.creation_time #=> Time
resp.app_summary.last_modified #=> Time
resp.app_summary.role_name #=> String
resp.app_summary.total_server_groups #=> Integer
resp.app_summary.total_servers #=> Integer
resp.server_groups #=> Array
resp.server_groups[0].server_group_id #=> String
resp.server_groups[0].name #=> String
resp.server_groups[0].server_list #=> Array
resp.server_groups[0].server_list[0].server_id #=> String
resp.server_groups[0].server_list[0].server_type #=> String, one of "VIRTUAL_MACHINE"
resp.server_groups[0].server_list[0].vm_server.vm_server_address.vm_manager_id #=> String
resp.server_groups[0].server_list[0].vm_server.vm_server_address.vm_id #=> String
resp.server_groups[0].server_list[0].vm_server.vm_name #=> String
resp.server_groups[0].server_list[0].vm_server.vm_manager_name #=> String
resp.server_groups[0].server_list[0].vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.server_groups[0].server_list[0].vm_server.vm_path #=> String
resp.server_groups[0].server_list[0].replication_job_id #=> String
resp.server_groups[0].server_list[0].replication_job_terminated #=> true/false
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :app_id (String)

    ID of the application to update.

  • :name (String)

    New name of the application.

  • :description (String)

    New description of the application.

  • :role_name (String)

    Name of the service role in the customer\'s account used by AWS SMS.

  • :server_groups (Array<Types::ServerGroup>)

    List of server groups in the application to update.

  • :tags (Array<Types::Tag>)

    List of tags to associate with the application.

Returns:

See Also:

#update_replication_job(options = {}) ⇒ Struct

Updates the specified settings for the specified replication job.

Examples:

Request syntax with placeholder values


resp = client.update_replication_job({
  replication_job_id: "ReplicationJobId", # required
  frequency: 1,
  next_replication_run_start_time: Time.now,
  license_type: "AWS", # accepts AWS, BYOL
  role_name: "RoleName",
  description: "Description",
  number_of_recent_amis_to_keep: 1,
  encrypted: false,
  kms_key_id: "KmsKeyId",
})

Options Hash (options):

  • :replication_job_id (required, String)

    The identifier of the replication job.

  • :frequency (Integer)

    The time between consecutive replication runs, in hours.

  • :next_replication_run_start_time (Time)

    The start time of the next replication run.

  • :license_type (String)

    The license type to be used for the AMI created by a successful replication run.

  • :role_name (String)

    The name of the IAM role to be used by AWS SMS.

  • :description (String)

    The description of the replication job.

  • :number_of_recent_amis_to_keep (Integer)

    The maximum number of SMS-created AMIs to retain. The oldest will be deleted once the maximum number is reached and a new AMI is created.

  • :encrypted (Boolean)

    When true, the replication job produces encrypted AMIs . See also KmsKeyId below.

  • :kms_key_id (String)

    KMS key ID for replication jobs that produce encrypted AMIs. Can be any of the following:

    • KMS key ID

    • KMS key alias

    • ARN referring to KMS key ID

    • ARN referring to KMS key alias

    If encrypted is true but a KMS key id is not specified, the customer\'s default KMS key for EBS is used.

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.