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

Class: Aws::SMS::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

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

The CreateReplicationJob API is used to create a ReplicationJob to replicate a server on AWS. Call this API to first create a ReplicationJob, which will then schedule periodic ReplicationRuns to replicate your server to AWS. Each ReplicationRun will result in the creation of an AWS AMI.

Examples:

Request syntax with placeholder values


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

Response structure


resp.replication_job_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    Unique Identifier for a server

  • :seed_replication_time (required, Time, DateTime, Date, Integer, String)

    Timestamp of an operation

  • :frequency (required, Integer)

    Interval between Replication Runs. This value is specified in hours, and represents the time between consecutive Replication Runs.

  • :license_type (String)

    The license type to be used for the Amazon Machine Image (AMI) created after a successful ReplicationRun.

  • :role_name (String)

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

  • :description (String)

    The description for a Replication Job/Run.

Returns:

See Also:



207
208
209
210
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 207

def create_replication_job(params = {}, options = {})
  req = build_request(:create_replication_job, params)
  req.send_request(options)
end

#delete_replication_job(params = {}) ⇒ Struct

The DeleteReplicationJob API is used to delete a ReplicationJob, resulting in no further ReplicationRuns. This will delete the contents of the S3 bucket used to store SMS artifacts, but will not delete any AMIs created by the SMS service.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :replication_job_id (required, String)

    The unique identifier for a Replication Job.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



232
233
234
235
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 232

def delete_replication_job(params = {}, options = {})
  req = build_request(:delete_replication_job, params)
  req.send_request(options)
end

#delete_server_catalog(params = {}) ⇒ Struct

The DeleteServerCatalog API clears all servers from your server catalog. This means that these servers will no longer be accessible to the Server Migration Service.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.

See Also:



247
248
249
250
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 247

def delete_server_catalog(params = {}, options = {})
  req = build_request(:delete_server_catalog, params)
  req.send_request(options)
end

#disassociate_connector(params = {}) ⇒ Struct

The DisassociateConnector API will disassociate a connector from the Server Migration Service, rendering it unavailable to support replication jobs.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :connector_id (required, String)

    Unique Identifier for Connector

Returns:

  • (Struct)

    Returns an empty response.

See Also:



271
272
273
274
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 271

def disassociate_connector(params = {}, options = {})
  req = build_request(:disassociate_connector, params)
  req.send_request(options)
end

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

The GetConnectors API returns a list of connectors that are registered with the Server Migration Service.

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"
resp.connector_list[0].vm_manager_name #=> String
resp.connector_list[0].vm_manager_type #=> String, one of "VSPHERE"
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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    Pagination token to pass as input to API call

  • :max_results (Integer)

    The maximum number of results to return in one API call. If left empty, this will default to 50.

Returns:

See Also:



318
319
320
321
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 318

def get_connectors(params = {}, options = {})
  req = build_request(:get_connectors, params)
  req.send_request(options)
end

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

The GetReplicationJobs API will return all of your ReplicationJobs and their details. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationJobs.

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"
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].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"
resp.replication_job_list[0].status_message #=> String
resp.replication_job_list[0].description #=> 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].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.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :replication_job_id (String)

    The unique identifier for a Replication Job.

  • :next_token (String)

    Pagination token to pass as input to API call

  • :max_results (Integer)

    The maximum number of results to return in one API call. If left empty, this will default to 50.

Returns:

See Also:



386
387
388
389
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 386

def get_replication_jobs(params = {}, options = {})
  req = build_request(:get_replication_jobs, params)
  req.send_request(options)
end

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

The GetReplicationRuns API will return all ReplicationRuns for a given ReplicationJob. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationRuns for a ReplicationJob.

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"
resp.replication_job.vm_server.vm_path #=> String
resp.replication_job.seed_replication_time #=> Time
resp.replication_job.frequency #=> Integer
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"
resp.replication_job.status_message #=> String
resp.replication_job.description #=> 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].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_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].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.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :replication_job_id (required, String)

    The unique identifier for a Replication Job.

  • :next_token (String)

    Pagination token to pass as input to API call

  • :max_results (Integer)

    The maximum number of results to return in one API call. If left empty, this will default to 50.

Returns:

See Also:



464
465
466
467
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 464

def get_replication_runs(params = {}, options = {})
  req = build_request(:get_replication_runs, params)
  req.send_request(options)
end

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

The GetServers API returns a list of all servers in your server catalog. For this call to succeed, you must previously have called ImportServerCatalog.

Examples:

Request syntax with placeholder values


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

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"
resp.server_list[0].vm_server.vm_path #=> String
resp.server_list[0].replication_job_id #=> String
resp.server_list[0].replication_job_terminated #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    Pagination token to pass as input to API call

  • :max_results (Integer)

    The maximum number of results to return in one API call. If left empty, this will default to 50.

Returns:

See Also:



515
516
517
518
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 515

def get_servers(params = {}, options = {})
  req = build_request(:get_servers, params)
  req.send_request(options)
end

#import_server_catalog(params = {}) ⇒ Struct

The ImportServerCatalog API is used to gather the complete list of on-premises servers on your premises. This API call requires connectors to be installed and monitoring all servers you would like imported. This API call returns immediately, but may take some time to retrieve all of the servers.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.

See Also:



532
533
534
535
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 532

def import_server_catalog(params = {}, options = {})
  req = build_request(:import_server_catalog, params)
  req.send_request(options)
end

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

The StartOnDemandReplicationRun API is used to start a ReplicationRun on demand (in addition to those that are scheduled based on your frequency). This ReplicationRun will start immediately. StartOnDemandReplicationRun is subject to limits on how many on demand ReplicationRuns you may call per 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

Parameters:

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

    ({})

Options Hash (params):

  • :replication_job_id (required, String)

    The unique identifier for a Replication Job.

  • :description (String)

    The description for a Replication Job/Run.

Returns:

See Also:



568
569
570
571
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 568

def start_on_demand_replication_run(params = {}, options = {})
  req = build_request(:start_on_demand_replication_run, params)
  req.send_request(options)
end

#update_replication_job(params = {}) ⇒ Struct

The UpdateReplicationJob API is used to change the settings of your existing ReplicationJob created using CreateReplicationJob. Calling this API will affect the next scheduled ReplicationRun.

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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :replication_job_id (required, String)

    The unique identifier for a Replication Job.

  • :frequency (Integer)

    Interval between Replication Runs. This value is specified in hours, and represents the time between consecutive Replication Runs.

  • :next_replication_run_start_time (Time, DateTime, Date, Integer, String)

    Timestamp of an operation

  • :license_type (String)

    The license type to be used for the Amazon Machine Image (AMI) created after a successful ReplicationRun.

  • :role_name (String)

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

  • :description (String)

    The description for a Replication Job/Run.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



614
615
616
617
# File 'gems/aws-sdk-sms/lib/aws-sdk-sms/client.rb', line 614

def update_replication_job(params = {}, options = {})
  req = build_request(:update_replication_job, params)
  req.send_request(options)
end