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.imported_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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)

    The name of the new application.

  • :description (String)

    The description of the new application

  • :role_name (String)

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

  • :client_token (String)

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

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

    The server groups to include in the application.

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

    The 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 ID 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)

    Indicates whether to run the replication job one time.

  • :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 is deleted after the maximum number is reached and a new AMI is created.

  • :encrypted (Boolean)

    Indicates whether the replication job produces encrypted AMIs.

  • :kms_key_id (String)

    The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:

    • KMS key ID

    • KMS key alias

    • ARN referring to the KMS key ID

    • ARN referring to the KMS key alias

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

Returns:

See Also:

#delete_app(options = {}) ⇒ Struct

Deletes the specified 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)

    The ID of the application.

  • :force_stop_app_replication (Boolean)

    Indicates whether to stop all replication jobs corresponding to the servers in the application while deleting the application.

  • :force_terminate_app (Boolean)

    Indicates whether to terminate the stack corresponding to the application while deleting the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_app_launch_configuration(options = {}) ⇒ Struct

Deletes the launch configuration for the specified application.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :app_id (String)

    The ID of the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_app_replication_configuration(options = {}) ⇒ Struct

Deletes the replication configuration for the specified application.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :app_id (String)

    The ID of the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_app_validation_configuration(options = {}) ⇒ Struct

Deletes the validation configuration for the specified application.

Examples:

Request syntax with placeholder values


resp = client.delete_app_validation_configuration({
  app_id: "AppIdWithValidation", # required
})

Options Hash (options):

  • :app_id (required, String)

    The ID of the application.

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 ID 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 ID 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)

    The ID of the application associated with the change set.

  • :changeset_format (String)

    The format for the change set.

Returns:

See Also:

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

Generates an AWS 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)

    The ID of the application associated with the AWS CloudFormation template.

  • :template_format (String)

    The format for generating the AWS CloudFormation template.

Returns:

See Also:

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

Retrieve information about the specified 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.imported_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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)

    The ID of the application.

Returns:

See Also:

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

Retrieves the application launch configuration associated with the specified 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.auto_launch #=> true/false
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
resp.server_group_launch_configurations[0].server_launch_configurations[0].iam_instance_profile_name #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].configure_script.bucket #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].configure_script.key #=> String
resp.server_group_launch_configurations[0].server_launch_configurations[0].configure_script_type #=> String, one of "SHELL_SCRIPT", "POWERSHELL_SCRIPT"

Options Hash (options):

  • :app_id (String)

    The ID of the application.

Returns:

See Also:

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

Retrieves the application replication configuration associated with the specified 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)

    The ID of the application.

Returns:

See Also:

#get_app_validation_configuration(options = {}) ⇒ Types::GetAppValidationConfigurationResponse

Retrieves information about a configuration for validating an application.

Examples:

Request syntax with placeholder values


resp = client.get_app_validation_configuration({
  app_id: "AppIdWithValidation", # required
})

Response structure


resp.app_validation_configurations #=> Array
resp.app_validation_configurations[0].validation_id #=> String
resp.app_validation_configurations[0].name #=> String
resp.app_validation_configurations[0].app_validation_strategy #=> String, one of "SSM"
resp.app_validation_configurations[0].ssm_validation_parameters.source.s3_location.bucket #=> String
resp.app_validation_configurations[0].ssm_validation_parameters.source.s3_location.key #=> String
resp.app_validation_configurations[0].ssm_validation_parameters.instance_id #=> String
resp.app_validation_configurations[0].ssm_validation_parameters.script_type #=> String, one of "SHELL_SCRIPT", "POWERSHELL_SCRIPT"
resp.app_validation_configurations[0].ssm_validation_parameters.command #=> String
resp.app_validation_configurations[0].ssm_validation_parameters.execution_timeout_seconds #=> Integer
resp.app_validation_configurations[0].ssm_validation_parameters.output_s3_bucket_name #=> String
resp.server_group_validation_configurations #=> Array
resp.server_group_validation_configurations[0].server_group_id #=> String
resp.server_group_validation_configurations[0].server_validation_configurations #=> Array
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.server_id #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.server_type #=> String, one of "VIRTUAL_MACHINE"
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.vm_server.vm_server_address.vm_manager_id #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.vm_server.vm_server_address.vm_id #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.vm_server.vm_name #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.vm_server.vm_manager_name #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.vm_server.vm_path #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.replication_job_id #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server.replication_job_terminated #=> true/false
resp.server_group_validation_configurations[0].server_validation_configurations[0].validation_id #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].name #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].server_validation_strategy #=> String, one of "USERDATA"
resp.server_group_validation_configurations[0].server_validation_configurations[0].user_data_validation_parameters.source.s3_location.bucket #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].user_data_validation_parameters.source.s3_location.key #=> String
resp.server_group_validation_configurations[0].server_validation_configurations[0].user_data_validation_parameters.script_type #=> String, one of "SHELL_SCRIPT", "POWERSHELL_SCRIPT"

Options Hash (options):

  • :app_id (required, String)

    The ID of the application.

Returns:

See Also:

#get_app_validation_output(options = {}) ⇒ Types::GetAppValidationOutputResponse

Retrieves output from validating an application.

Examples:

Request syntax with placeholder values


resp = client.get_app_validation_output({
  app_id: "AppIdWithValidation", # required
})

Response structure


resp.validation_output_list #=> Array
resp.validation_output_list[0].validation_id #=> String
resp.validation_output_list[0].name #=> String
resp.validation_output_list[0].status #=> String, one of "READY_FOR_VALIDATION", "PENDING", "IN_PROGRESS", "SUCCEEDED", "FAILED"
resp.validation_output_list[0].status_message #=> String
resp.validation_output_list[0].latest_validation_time #=> Time
resp.validation_output_list[0].app_validation_output.ssm_output.s3_location.bucket #=> String
resp.validation_output_list[0].app_validation_output.ssm_output.s3_location.key #=> String
resp.validation_output_list[0].server_validation_output.server.server_id #=> String
resp.validation_output_list[0].server_validation_output.server.server_type #=> String, one of "VIRTUAL_MACHINE"
resp.validation_output_list[0].server_validation_output.server.vm_server.vm_server_address.vm_manager_id #=> String
resp.validation_output_list[0].server_validation_output.server.vm_server.vm_server_address.vm_id #=> String
resp.validation_output_list[0].server_validation_output.server.vm_server.vm_name #=> String
resp.validation_output_list[0].server_validation_output.server.vm_server.vm_manager_name #=> String
resp.validation_output_list[0].server_validation_output.server.vm_server.vm_manager_type #=> String, one of "VSPHERE", "SCVMM", "HYPERV-MANAGER"
resp.validation_output_list[0].server_validation_output.server.vm_server.vm_path #=> String
resp.validation_output_list[0].server_validation_output.server.replication_job_id #=> String
resp.validation_output_list[0].server_validation_output.server.replication_job_terminated #=> true/false

Options Hash (options):

  • :app_id (required, String)

    The ID of the application.

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", "SMS_OPTIMIZED"
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 ID 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 ID 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>)

    The server addresses.

Returns:

See Also:

#import_app_catalog(options = {}) ⇒ Struct

Allows application import from AWS Migration Hub.

Examples:

Request syntax with placeholder values


resp = client.import_app_catalog({
  role_name: "RoleName",
})

Options Hash (options):

  • :role_name (String)

    The name of the service role. If you omit this parameter, we create a service-linked role for AWS Migration Hub in your account. Otherwise, the role that you provide must have the policy and trust policy described in the AWS Migration Hub User Guide.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#import_server_catalog(options = {}) ⇒ Struct

Gathers a complete list of on-premises servers. Connectors must be installed and monitoring all servers 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 the specified application as a stack in AWS CloudFormation.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :app_id (String)

    The ID of the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

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

Retrieves 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].imported_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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>)

    The unique application IDs.

  • :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 100. To retrieve the remaining results, make another call with the returned NextToken value.

Returns:

See Also:

#notify_app_validation_output(options = {}) ⇒ Struct

Provides information to AWS SMS about whether application validation is successful.

Examples:

Request syntax with placeholder values


resp = client.notify_app_validation_output({
  app_id: "AppIdWithValidation", # required
  notification_context: {
    validation_id: "ValidationId",
    status: "READY_FOR_VALIDATION", # accepts READY_FOR_VALIDATION, PENDING, IN_PROGRESS, SUCCEEDED, FAILED
    status_message: "ValidationStatusMessage",
  },
})

Options Hash (options):

  • :app_id (required, String)

    The ID of the application.

  • :notification_context (Types::NotificationContext)

    The notification information.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_app_launch_configuration(options = {}) ⇒ Struct

Creates or updates the launch configuration for the specified application.

Examples:

Request syntax with placeholder values


resp = client.put_app_launch_configuration({
  app_id: "AppId",
  role_name: "RoleName",
  auto_launch: false,
  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: "S3BucketName",
              key: "S3KeyName",
            },
          },
          instance_type: "InstanceType",
          associate_public_ip_address: false,
          iam_instance_profile_name: "RoleName",
          configure_script: {
            bucket: "S3BucketName",
            key: "S3KeyName",
          },
          configure_script_type: "SHELL_SCRIPT", # accepts SHELL_SCRIPT, POWERSHELL_SCRIPT
        },
      ],
    },
  ],
})

Options Hash (options):

  • :app_id (String)

    The ID of the application.

  • :role_name (String)

    The name of service role in the customer\'s account that AWS CloudFormation uses to launch the application.

  • :auto_launch (Boolean)

    Indicates whether the application is configured to launch automatically after replication is complete.

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

    Information about the 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 the replication configuration for the specified 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)

    The ID of the application.

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

    Information about the replication configurations for server groups in the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_app_validation_configuration(options = {}) ⇒ Struct

Creates or updates a validation configuration for the specified application.

Examples:

Request syntax with placeholder values


resp = client.put_app_validation_configuration({
  app_id: "AppIdWithValidation", # required
  app_validation_configurations: [
    {
      validation_id: "ValidationId",
      name: "NonEmptyStringWithMaxLen255",
      app_validation_strategy: "SSM", # accepts SSM
      ssm_validation_parameters: {
        source: {
          s3_location: {
            bucket: "S3BucketName",
            key: "S3KeyName",
          },
        },
        instance_id: "InstanceId",
        script_type: "SHELL_SCRIPT", # accepts SHELL_SCRIPT, POWERSHELL_SCRIPT
        command: "Command",
        execution_timeout_seconds: 1,
        output_s3_bucket_name: "BucketName",
      },
    },
  ],
  server_group_validation_configurations: [
    {
      server_group_id: "ServerGroupId",
      server_validation_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,
          },
          validation_id: "ValidationId",
          name: "NonEmptyStringWithMaxLen255",
          server_validation_strategy: "USERDATA", # accepts USERDATA
          user_data_validation_parameters: {
            source: {
              s3_location: {
                bucket: "S3BucketName",
                key: "S3KeyName",
              },
            },
            script_type: "SHELL_SCRIPT", # accepts SHELL_SCRIPT, POWERSHELL_SCRIPT
          },
        },
      ],
    },
  ],
})

Options Hash (options):

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_app_replication(options = {}) ⇒ Struct

Starts replicating the specified application by creating replication jobs for each server in the application.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :app_id (String)

    The ID of the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_on_demand_app_replication(options = {}) ⇒ Struct

Starts an on-demand replication run for the specified application.

Examples:

Request syntax with placeholder values


resp = client.start_on_demand_app_replication({
  app_id: "AppId", # required
  description: "Description",
})

Options Hash (options):

  • :app_id (required, String)

    The ID of the application.

  • :description (String)

    The description of the replication run.

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 that 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 ID of the replication job.

  • :description (String)

    The description of the replication run.

Returns:

See Also:

#stop_app_replication(options = {}) ⇒ Struct

Stops replicating the specified application by deleting the replication job for each server in the application.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :app_id (String)

    The ID of the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#terminate_app(options = {}) ⇒ Struct

Terminates the stack for the specified application.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :app_id (String)

    The ID of the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

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

Updates the specified 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.imported_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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_configuration_status #=> String, one of "NOT_CONFIGURED", "CONFIGURED"
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", "PARTIALLY_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)

    The ID of the application.

  • :name (String)

    The new name of the application.

  • :description (String)

    The new description of the application.

  • :role_name (String)

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

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

    The server groups in the application to update.

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

    The 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 ID 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 is deleted after the maximum number is reached and a new AMI is created.

  • :encrypted (Boolean)

    When true, the replication job produces encrypted AMIs. For more information, KmsKeyId.

  • :kms_key_id (String)

    The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:

    • KMS key ID

    • KMS key alias

    • ARN referring to the KMS key ID

    • ARN referring to the KMS key alias

    If encrypted is enabled but a KMS key ID is not specified, the customer\'s default KMS key for Amazon 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.