forked from aws/aws-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAWSServerMigration.java
More file actions
361 lines (340 loc) · 20.3 KB
/
AWSServerMigration.java
File metadata and controls
361 lines (340 loc) · 20.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.servermigration;
import javax.annotation.Generated;
import com.amazonaws.*;
import com.amazonaws.regions.*;
import com.amazonaws.services.servermigration.model.*;
/**
* Interface for accessing SMS.
* <p>
* <b>Note:</b> Do not directly implement this interface, new methods are added to it regularly. Extend from
* {@link com.amazonaws.services.servermigration.AbstractAWSServerMigration} instead.
* </p>
* <p>
* Amazon Server Migration Service automates the process of migrating servers to EC2.
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public interface AWSServerMigration {
/**
* The region metadata service name for computing region endpoints. You can use this value to retrieve metadata
* (such as supported regions) of the service.
*
* @see RegionUtils#getRegionsForService(String)
*/
String ENDPOINT_PREFIX = "sms";
/**
* Overrides the default endpoint for this client ("sms.us-east-1.amazonaws.com"). Callers can use this method to
* control which AWS region they want to work with.
* <p>
* Callers can pass in just the endpoint (ex: "sms.us-east-1.amazonaws.com") or a full URL, including the protocol
* (ex: "sms.us-east-1.amazonaws.com"). If the protocol is not specified here, the default protocol from this
* client's {@link ClientConfiguration} will be used, which by default is HTTPS.
* <p>
* For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available
* endpoints for all AWS services, see: <a
* href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912">
* http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912</a>
* <p>
* <b>This method is not threadsafe. An endpoint should be configured when the client is created and before any
* service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in
* transit or retrying.</b>
*
* @param endpoint
* The endpoint (ex: "sms.us-east-1.amazonaws.com") or a full URL, including the protocol (ex:
* "sms.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will communicate with.
* @deprecated use {@link AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration)} for
* example:
* {@code builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion));}
*/
@Deprecated
void setEndpoint(String endpoint);
/**
* An alternative to {@link AWSServerMigration#setEndpoint(String)}, sets the regional endpoint for this client's
* service calls. Callers can use this method to control which AWS region they want to work with.
* <p>
* By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the
* {@link ClientConfiguration} supplied at construction.
* <p>
* <b>This method is not threadsafe. A region should be configured when the client is created and before any service
* requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit
* or retrying.</b>
*
* @param region
* The region this client will communicate with. See {@link Region#getRegion(com.amazonaws.regions.Regions)}
* for accessing a given region. Must not be null and must be a region where the service is available.
*
* @see Region#getRegion(com.amazonaws.regions.Regions)
* @see Region#createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)
* @see Region#isServiceSupported(String)
* @deprecated use {@link AwsClientBuilder#setRegion(String)}
*/
@Deprecated
void setRegion(Region region);
/**
* 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.
*
* @param createReplicationJobRequest
* @return Result of the CreateReplicationJob operation returned by the service.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @throws OperationNotPermittedException
* The specified operation is not allowed. This error can occur for a number of reasons; for example, you
* might be trying to start a Replication Run before seed Replication Run.
* @throws ServerCannotBeReplicatedException
* The provided server cannot be replicated.
* @throws ReplicationJobAlreadyExistsException
* An active Replication Job already exists for the specified server.
* @throws NoConnectorsAvailableException
* No connectors are available to handle this request. Please associate connector(s) and verify any existing
* connectors are healthy and can respond to requests.
* @throws InternalErrorException
* An internal error has occured.
* @sample AWSServerMigration.CreateReplicationJob
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/CreateReplicationJob" target="_top">AWS API
* Documentation</a>
*/
CreateReplicationJobResult createReplicationJob(CreateReplicationJobRequest createReplicationJobRequest);
/**
* 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.
*
* @param deleteReplicationJobRequest
* @return Result of the DeleteReplicationJob operation returned by the service.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @throws OperationNotPermittedException
* The specified operation is not allowed. This error can occur for a number of reasons; for example, you
* might be trying to start a Replication Run before seed Replication Run.
* @throws ReplicationJobNotFoundException
* The specified Replication Job cannot be found.
* @sample AWSServerMigration.DeleteReplicationJob
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteReplicationJob" target="_top">AWS API
* Documentation</a>
*/
DeleteReplicationJobResult deleteReplicationJob(DeleteReplicationJobRequest deleteReplicationJobRequest);
/**
* 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.
*
* @param deleteServerCatalogRequest
* @return Result of the DeleteServerCatalog operation returned by the service.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @throws OperationNotPermittedException
* The specified operation is not allowed. This error can occur for a number of reasons; for example, you
* might be trying to start a Replication Run before seed Replication Run.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @sample AWSServerMigration.DeleteServerCatalog
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteServerCatalog" target="_top">AWS API
* Documentation</a>
*/
DeleteServerCatalogResult deleteServerCatalog(DeleteServerCatalogRequest deleteServerCatalogRequest);
/**
* The DisassociateConnector API will disassociate a connector from the Server Migration Service, rendering it
* unavailable to support replication jobs.
*
* @param disassociateConnectorRequest
* @return Result of the DisassociateConnector operation returned by the service.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @throws OperationNotPermittedException
* The specified operation is not allowed. This error can occur for a number of reasons; for example, you
* might be trying to start a Replication Run before seed Replication Run.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @sample AWSServerMigration.DisassociateConnector
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DisassociateConnector" target="_top">AWS API
* Documentation</a>
*/
DisassociateConnectorResult disassociateConnector(DisassociateConnectorRequest disassociateConnectorRequest);
/**
* The GetConnectors API returns a list of connectors that are registered with the Server Migration Service.
*
* @param getConnectorsRequest
* @return Result of the GetConnectors operation returned by the service.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @sample AWSServerMigration.GetConnectors
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetConnectors" target="_top">AWS API
* Documentation</a>
*/
GetConnectorsResult getConnectors(GetConnectorsRequest getConnectorsRequest);
/**
* 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.
*
* @param getReplicationJobsRequest
* @return Result of the GetReplicationJobs operation returned by the service.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @sample AWSServerMigration.GetReplicationJobs
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetReplicationJobs" target="_top">AWS API
* Documentation</a>
*/
GetReplicationJobsResult getReplicationJobs(GetReplicationJobsRequest getReplicationJobsRequest);
/**
* 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.
*
* @param getReplicationRunsRequest
* @return Result of the GetReplicationRuns operation returned by the service.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @sample AWSServerMigration.GetReplicationRuns
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetReplicationRuns" target="_top">AWS API
* Documentation</a>
*/
GetReplicationRunsResult getReplicationRuns(GetReplicationRunsRequest getReplicationRunsRequest);
/**
* The GetServers API returns a list of all servers in your server catalog. For this call to succeed, you must
* previously have called ImportServerCatalog.
*
* @param getServersRequest
* @return Result of the GetServers operation returned by the service.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @sample AWSServerMigration.GetServers
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetServers" target="_top">AWS API
* Documentation</a>
*/
GetServersResult getServers(GetServersRequest getServersRequest);
/**
* 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.
*
* @param importServerCatalogRequest
* @return Result of the ImportServerCatalog operation returned by the service.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @throws OperationNotPermittedException
* The specified operation is not allowed. This error can occur for a number of reasons; for example, you
* might be trying to start a Replication Run before seed Replication Run.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws NoConnectorsAvailableException
* No connectors are available to handle this request. Please associate connector(s) and verify any existing
* connectors are healthy and can respond to requests.
* @sample AWSServerMigration.ImportServerCatalog
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/ImportServerCatalog" target="_top">AWS API
* Documentation</a>
*/
ImportServerCatalogResult importServerCatalog(ImportServerCatalogRequest importServerCatalogRequest);
/**
* 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.
*
* @param startOnDemandReplicationRunRequest
* @return Result of the StartOnDemandReplicationRun operation returned by the service.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @throws OperationNotPermittedException
* The specified operation is not allowed. This error can occur for a number of reasons; for example, you
* might be trying to start a Replication Run before seed Replication Run.
* @throws ReplicationRunLimitExceededException
* This user has exceeded the maximum allowed Replication Run limit.
* @sample AWSServerMigration.StartOnDemandReplicationRun
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/StartOnDemandReplicationRun"
* target="_top">AWS API Documentation</a>
*/
StartOnDemandReplicationRunResult startOnDemandReplicationRun(StartOnDemandReplicationRunRequest startOnDemandReplicationRunRequest);
/**
* 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.
*
* @param updateReplicationJobRequest
* @return Result of the UpdateReplicationJob operation returned by the service.
* @throws InvalidParameterException
* A parameter specified in the request is not valid, is unsupported, or cannot be used.
* @throws MissingRequiredParameterException
* The request is missing a required parameter. Ensure that you have supplied all the required parameters
* for the request.
* @throws OperationNotPermittedException
* The specified operation is not allowed. This error can occur for a number of reasons; for example, you
* might be trying to start a Replication Run before seed Replication Run.
* @throws UnauthorizedOperationException
* This user does not have permissions to perform this operation.
* @throws ServerCannotBeReplicatedException
* The provided server cannot be replicated.
* @throws ReplicationJobNotFoundException
* The specified Replication Job cannot be found.
* @throws InternalErrorException
* An internal error has occured.
* @sample AWSServerMigration.UpdateReplicationJob
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/UpdateReplicationJob" target="_top">AWS API
* Documentation</a>
*/
UpdateReplicationJobResult updateReplicationJob(UpdateReplicationJobRequest updateReplicationJobRequest);
/**
* Shuts down this client object, releasing any resources that might be held open. This is an optional method, and
* callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client
* has been shutdown, it should not be used to make any more requests.
*/
void shutdown();
/**
* Returns additional metadata for a previously executed successful request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
* <p>
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing a request.
*
* @param request
* The originally executed request.
*
* @return The response metadata for the specified request, or null if none is available.
*/
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request);
}