
commonMain.aws.sdk.kotlin.services.sms.DefaultSmsClient.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sms
import aws.sdk.kotlin.runtime.client.AwsClientOption
import aws.sdk.kotlin.runtime.http.ApiMetadata
import aws.sdk.kotlin.runtime.http.AwsUserAgentMetadata
import aws.sdk.kotlin.runtime.http.interceptors.AwsSpanInterceptor
import aws.sdk.kotlin.runtime.http.middleware.AwsRetryHeaderMiddleware
import aws.sdk.kotlin.runtime.http.middleware.RecursionDetection
import aws.sdk.kotlin.runtime.http.middleware.UserAgent
import aws.sdk.kotlin.services.sms.auth.SmsAuthSchemeProviderAdapter
import aws.sdk.kotlin.services.sms.auth.SmsIdentityProviderConfigAdapter
import aws.sdk.kotlin.services.sms.endpoints.internal.EndpointResolverAdapter
import aws.sdk.kotlin.services.sms.model.*
import aws.sdk.kotlin.services.sms.serde.*
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
import aws.smithy.kotlin.runtime.auth.awssigning.AwsSigningAttributes
import aws.smithy.kotlin.runtime.auth.awssigning.DefaultAwsSigner
import aws.smithy.kotlin.runtime.awsprotocol.json.AwsJsonProtocol
import aws.smithy.kotlin.runtime.client.SdkClientOption
import aws.smithy.kotlin.runtime.collections.attributesOf
import aws.smithy.kotlin.runtime.collections.putIfAbsent
import aws.smithy.kotlin.runtime.collections.putIfAbsentNotNull
import aws.smithy.kotlin.runtime.http.SdkHttpClient
import aws.smithy.kotlin.runtime.http.auth.AuthScheme
import aws.smithy.kotlin.runtime.http.auth.SigV4AuthScheme
import aws.smithy.kotlin.runtime.http.operation.OperationAuthConfig
import aws.smithy.kotlin.runtime.http.operation.OperationMetrics
import aws.smithy.kotlin.runtime.http.operation.SdkHttpOperation
import aws.smithy.kotlin.runtime.http.operation.context
import aws.smithy.kotlin.runtime.http.operation.roundTrip
import aws.smithy.kotlin.runtime.http.operation.telemetry
import aws.smithy.kotlin.runtime.io.SdkManagedGroup
import aws.smithy.kotlin.runtime.io.addIfManaged
import aws.smithy.kotlin.runtime.operation.ExecutionContext
public const val ServiceApiVersion: String = "2016-10-24"
internal class DefaultSmsClient(override val config: SmsClient.Config) : SmsClient {
private val managedResources = SdkManagedGroup()
private val client = SdkHttpClient(config.httpClient)
private val identityProviderConfig = SmsIdentityProviderConfigAdapter(config)
private val configuredAuthSchemes = with(config.authSchemes.associateBy(AuthScheme::schemeId).toMutableMap()){
getOrPut(AuthSchemeId.AwsSigV4){
SigV4AuthScheme(DefaultAwsSigner, "sms")
}
toMap()
}
private val authSchemeAdapter = SmsAuthSchemeProviderAdapter(config)
private val telemetryScope = "aws.sdk.kotlin.services.sms"
private val opMetrics = OperationMetrics(telemetryScope, config.telemetryProvider)
init {
managedResources.addIfManaged(config.httpClient)
managedResources.addIfManaged(config.credentialsProvider)
}
private val awsUserAgentMetadata = AwsUserAgentMetadata.fromEnvironment(ApiMetadata(ServiceId, SdkVersion), config.applicationId)
/**
* Creates an application. An application consists of one or more server groups. Each server group contain one or more servers.
*/
override suspend fun createApp(input: CreateAppRequest): CreateAppResponse {
val op = SdkHttpOperation.build {
serializer = CreateAppOperationSerializer()
deserializer = CreateAppOperationDeserializer()
operationName = "CreateApp"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Creates a replication job. The replication job schedules periodic replication runs to replicate your server to Amazon Web Services. Each replication run creates an Amazon Machine Image (AMI).
*/
override suspend fun createReplicationJob(input: CreateReplicationJobRequest): CreateReplicationJobResponse {
val op = SdkHttpOperation.build {
serializer = CreateReplicationJobOperationSerializer()
deserializer = CreateReplicationJobOperationDeserializer()
operationName = "CreateReplicationJob"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Deletes the specified application. Optionally deletes the launched stack associated with the application and all Server Migration Service replication jobs for servers in the application.
*/
override suspend fun deleteApp(input: DeleteAppRequest): DeleteAppResponse {
val op = SdkHttpOperation.build {
serializer = DeleteAppOperationSerializer()
deserializer = DeleteAppOperationDeserializer()
operationName = "DeleteApp"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Deletes the launch configuration for the specified application.
*/
override suspend fun deleteAppLaunchConfiguration(input: DeleteAppLaunchConfigurationRequest): DeleteAppLaunchConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = DeleteAppLaunchConfigurationOperationSerializer()
deserializer = DeleteAppLaunchConfigurationOperationDeserializer()
operationName = "DeleteAppLaunchConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Deletes the replication configuration for the specified application.
*/
override suspend fun deleteAppReplicationConfiguration(input: DeleteAppReplicationConfigurationRequest): DeleteAppReplicationConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = DeleteAppReplicationConfigurationOperationSerializer()
deserializer = DeleteAppReplicationConfigurationOperationDeserializer()
operationName = "DeleteAppReplicationConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Deletes the validation configuration for the specified application.
*/
override suspend fun deleteAppValidationConfiguration(input: DeleteAppValidationConfigurationRequest): DeleteAppValidationConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = DeleteAppValidationConfigurationOperationSerializer()
deserializer = DeleteAppValidationConfigurationOperationDeserializer()
operationName = "DeleteAppValidationConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Deletes the specified replication job.
*
* After you delete a replication job, there are no further replication runs. Amazon Web Services deletes the contents of the Amazon S3 bucket used to store Server Migration Service artifacts. The AMIs created by the replication runs are not deleted.
*/
override suspend fun deleteReplicationJob(input: DeleteReplicationJobRequest): DeleteReplicationJobResponse {
val op = SdkHttpOperation.build {
serializer = DeleteReplicationJobOperationSerializer()
deserializer = DeleteReplicationJobOperationDeserializer()
operationName = "DeleteReplicationJob"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Deletes all servers from your server catalog.
*/
override suspend fun deleteServerCatalog(input: DeleteServerCatalogRequest): DeleteServerCatalogResponse {
val op = SdkHttpOperation.build {
serializer = DeleteServerCatalogOperationSerializer()
deserializer = DeleteServerCatalogOperationDeserializer()
operationName = "DeleteServerCatalog"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Disassociates the specified connector from Server Migration Service.
*
* After you disassociate a connector, it is no longer available to support replication jobs.
*/
override suspend fun disassociateConnector(input: DisassociateConnectorRequest): DisassociateConnectorResponse {
val op = SdkHttpOperation.build {
serializer = DisassociateConnectorOperationSerializer()
deserializer = DisassociateConnectorOperationDeserializer()
operationName = "DisassociateConnector"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* 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.
*/
override suspend fun generateChangeSet(input: GenerateChangeSetRequest): GenerateChangeSetResponse {
val op = SdkHttpOperation.build {
serializer = GenerateChangeSetOperationSerializer()
deserializer = GenerateChangeSetOperationDeserializer()
operationName = "GenerateChangeSet"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Generates an CloudFormation template based on the current launch configuration and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.
*/
override suspend fun generateTemplate(input: GenerateTemplateRequest): GenerateTemplateResponse {
val op = SdkHttpOperation.build {
serializer = GenerateTemplateOperationSerializer()
deserializer = GenerateTemplateOperationDeserializer()
operationName = "GenerateTemplate"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Retrieve information about the specified application.
*/
override suspend fun getApp(input: GetAppRequest): GetAppResponse {
val op = SdkHttpOperation.build {
serializer = GetAppOperationSerializer()
deserializer = GetAppOperationDeserializer()
operationName = "GetApp"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Retrieves the application launch configuration associated with the specified application.
*/
override suspend fun getAppLaunchConfiguration(input: GetAppLaunchConfigurationRequest): GetAppLaunchConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = GetAppLaunchConfigurationOperationSerializer()
deserializer = GetAppLaunchConfigurationOperationDeserializer()
operationName = "GetAppLaunchConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Retrieves the application replication configuration associated with the specified application.
*/
override suspend fun getAppReplicationConfiguration(input: GetAppReplicationConfigurationRequest): GetAppReplicationConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = GetAppReplicationConfigurationOperationSerializer()
deserializer = GetAppReplicationConfigurationOperationDeserializer()
operationName = "GetAppReplicationConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Retrieves information about a configuration for validating an application.
*/
override suspend fun getAppValidationConfiguration(input: GetAppValidationConfigurationRequest): GetAppValidationConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = GetAppValidationConfigurationOperationSerializer()
deserializer = GetAppValidationConfigurationOperationDeserializer()
operationName = "GetAppValidationConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Retrieves output from validating an application.
*/
override suspend fun getAppValidationOutput(input: GetAppValidationOutputRequest): GetAppValidationOutputResponse {
val op = SdkHttpOperation.build {
serializer = GetAppValidationOutputOperationSerializer()
deserializer = GetAppValidationOutputOperationDeserializer()
operationName = "GetAppValidationOutput"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Describes the connectors registered with the Server Migration Service.
*/
override suspend fun getConnectors(input: GetConnectorsRequest): GetConnectorsResponse {
val op = SdkHttpOperation.build {
serializer = GetConnectorsOperationSerializer()
deserializer = GetConnectorsOperationDeserializer()
operationName = "GetConnectors"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Describes the specified replication job or all of your replication jobs.
*/
override suspend fun getReplicationJobs(input: GetReplicationJobsRequest): GetReplicationJobsResponse {
val op = SdkHttpOperation.build {
serializer = GetReplicationJobsOperationSerializer()
deserializer = GetReplicationJobsOperationDeserializer()
operationName = "GetReplicationJobs"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Describes the replication runs for the specified replication job.
*/
override suspend fun getReplicationRuns(input: GetReplicationRunsRequest): GetReplicationRunsResponse {
val op = SdkHttpOperation.build {
serializer = GetReplicationRunsOperationSerializer()
deserializer = GetReplicationRunsOperationDeserializer()
operationName = "GetReplicationRuns"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Describes the servers in your server catalog.
*
* Before you can describe your servers, you must import them using ImportServerCatalog.
*/
override suspend fun getServers(input: GetServersRequest): GetServersResponse {
val op = SdkHttpOperation.build {
serializer = GetServersOperationSerializer()
deserializer = GetServersOperationDeserializer()
operationName = "GetServers"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Allows application import from Migration Hub.
*/
override suspend fun importAppCatalog(input: ImportAppCatalogRequest): ImportAppCatalogResponse {
val op = SdkHttpOperation.build {
serializer = ImportAppCatalogOperationSerializer()
deserializer = ImportAppCatalogOperationDeserializer()
operationName = "ImportAppCatalog"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* 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.
*/
override suspend fun importServerCatalog(input: ImportServerCatalogRequest): ImportServerCatalogResponse {
val op = SdkHttpOperation.build {
serializer = ImportServerCatalogOperationSerializer()
deserializer = ImportServerCatalogOperationDeserializer()
operationName = "ImportServerCatalog"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Launches the specified application as a stack in CloudFormation.
*/
override suspend fun launchApp(input: LaunchAppRequest): LaunchAppResponse {
val op = SdkHttpOperation.build {
serializer = LaunchAppOperationSerializer()
deserializer = LaunchAppOperationDeserializer()
operationName = "LaunchApp"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Retrieves summaries for all applications.
*/
override suspend fun listApps(input: ListAppsRequest): ListAppsResponse {
val op = SdkHttpOperation.build {
serializer = ListAppsOperationSerializer()
deserializer = ListAppsOperationDeserializer()
operationName = "ListApps"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Provides information to Server Migration Service about whether application validation is successful.
*/
override suspend fun notifyAppValidationOutput(input: NotifyAppValidationOutputRequest): NotifyAppValidationOutputResponse {
val op = SdkHttpOperation.build {
serializer = NotifyAppValidationOutputOperationSerializer()
deserializer = NotifyAppValidationOutputOperationDeserializer()
operationName = "NotifyAppValidationOutput"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Creates or updates the launch configuration for the specified application.
*/
override suspend fun putAppLaunchConfiguration(input: PutAppLaunchConfigurationRequest): PutAppLaunchConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = PutAppLaunchConfigurationOperationSerializer()
deserializer = PutAppLaunchConfigurationOperationDeserializer()
operationName = "PutAppLaunchConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Creates or updates the replication configuration for the specified application.
*/
override suspend fun putAppReplicationConfiguration(input: PutAppReplicationConfigurationRequest): PutAppReplicationConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = PutAppReplicationConfigurationOperationSerializer()
deserializer = PutAppReplicationConfigurationOperationDeserializer()
operationName = "PutAppReplicationConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Creates or updates a validation configuration for the specified application.
*/
override suspend fun putAppValidationConfiguration(input: PutAppValidationConfigurationRequest): PutAppValidationConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = PutAppValidationConfigurationOperationSerializer()
deserializer = PutAppValidationConfigurationOperationDeserializer()
operationName = "PutAppValidationConfiguration"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Starts replicating the specified application by creating replication jobs for each server in the application.
*/
override suspend fun startAppReplication(input: StartAppReplicationRequest): StartAppReplicationResponse {
val op = SdkHttpOperation.build {
serializer = StartAppReplicationOperationSerializer()
deserializer = StartAppReplicationOperationDeserializer()
operationName = "StartAppReplication"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Starts an on-demand replication run for the specified application.
*/
override suspend fun startOnDemandAppReplication(input: StartOnDemandAppReplicationRequest): StartOnDemandAppReplicationResponse {
val op = SdkHttpOperation.build {
serializer = StartOnDemandAppReplicationOperationSerializer()
deserializer = StartOnDemandAppReplicationOperationDeserializer()
operationName = "StartOnDemandAppReplication"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* 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.
*/
override suspend fun startOnDemandReplicationRun(input: StartOnDemandReplicationRunRequest): StartOnDemandReplicationRunResponse {
val op = SdkHttpOperation.build {
serializer = StartOnDemandReplicationRunOperationSerializer()
deserializer = StartOnDemandReplicationRunOperationDeserializer()
operationName = "StartOnDemandReplicationRun"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Stops replicating the specified application by deleting the replication job for each server in the application.
*/
override suspend fun stopAppReplication(input: StopAppReplicationRequest): StopAppReplicationResponse {
val op = SdkHttpOperation.build {
serializer = StopAppReplicationOperationSerializer()
deserializer = StopAppReplicationOperationDeserializer()
operationName = "StopAppReplication"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Terminates the stack for the specified application.
*/
override suspend fun terminateApp(input: TerminateAppRequest): TerminateAppResponse {
val op = SdkHttpOperation.build {
serializer = TerminateAppOperationSerializer()
deserializer = TerminateAppOperationDeserializer()
operationName = "TerminateApp"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Updates the specified application.
*/
override suspend fun updateApp(input: UpdateAppRequest): UpdateAppResponse {
val op = SdkHttpOperation.build {
serializer = UpdateAppOperationSerializer()
deserializer = UpdateAppOperationDeserializer()
operationName = "UpdateApp"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
/**
* Updates the specified settings for the specified replication job.
*/
override suspend fun updateReplicationJob(input: UpdateReplicationJobRequest): UpdateReplicationJobResponse {
val op = SdkHttpOperation.build {
serializer = UpdateReplicationJobOperationSerializer()
deserializer = UpdateReplicationJobOperationDeserializer()
operationName = "UpdateReplicationJob"
serviceName = ServiceId
telemetry {
provider = config.telemetryProvider
scope = telemetryScope
metrics = opMetrics
attributes = attributesOf {
"rpc.system" to "aws-api"
}
}
execution.auth = OperationAuthConfig(authSchemeAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(AwsSpanInterceptor)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AWSServerMigrationService_V2016_10_24", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
return op.roundTrip(client, input)
}
override fun close() {
managedResources.unshareAll()
}
/**
* merge the defaults configured for the service into the execution context before firing off a request
*/
private fun mergeServiceDefaults(ctx: ExecutionContext) {
ctx.putIfAbsentNotNull(AwsClientOption.Region, config.region)
ctx.putIfAbsent(SdkClientOption.ClientName, config.clientName)
ctx.putIfAbsent(SdkClientOption.LogMode, config.logMode)
ctx.putIfAbsent(AwsSigningAttributes.SigningService, "sms")
ctx.putIfAbsentNotNull(AwsSigningAttributes.SigningRegion, config.region)
ctx.putIfAbsent(AwsSigningAttributes.CredentialsProvider, config.credentialsProvider)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy