
commonMain.aws.sdk.kotlin.services.codestar.DefaultCodeStarClient.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codestar
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.middleware.AwsRetryHeaderMiddleware
import aws.sdk.kotlin.runtime.http.middleware.RecursionDetection
import aws.sdk.kotlin.runtime.http.middleware.UserAgent
import aws.sdk.kotlin.services.codestar.auth.AuthSchemeProviderAdapter
import aws.sdk.kotlin.services.codestar.auth.IdentityProviderConfigAdapter
import aws.sdk.kotlin.services.codestar.endpoints.internal.EndpointResolverAdapter
import aws.sdk.kotlin.services.codestar.model.*
import aws.sdk.kotlin.services.codestar.transform.*
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.http.SdkHttpClient
import aws.smithy.kotlin.runtime.http.auth.HttpAuthScheme
import aws.smithy.kotlin.runtime.http.auth.SigV4AuthScheme
import aws.smithy.kotlin.runtime.http.operation.OperationAuthConfig
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.sdkRequestId
import aws.smithy.kotlin.runtime.io.SdkManagedGroup
import aws.smithy.kotlin.runtime.io.addIfManaged
import aws.smithy.kotlin.runtime.operation.ExecutionContext
import aws.smithy.kotlin.runtime.tracing.withRootTraceSpan
import aws.smithy.kotlin.runtime.util.putIfAbsent
import kotlin.coroutines.coroutineContext
public const val ServiceId: String = "CodeStar"
public const val ServiceApiVersion: String = "2017-04-19"
public const val SdkVersion: String = "0.27.0-beta"
internal class DefaultCodeStarClient(override val config: CodeStarClient.Config) : CodeStarClient {
private val managedResources = SdkManagedGroup()
private val client = SdkHttpClient(config.httpClient)
private val identityProviderConfig = IdentityProviderConfigAdapter(config)
private val configuredAuthSchemes = with(config.authSchemes.associateBy(HttpAuthScheme::schemeId).toMutableMap()){
getOrPut(AuthSchemeId.AwsSigV4){
SigV4AuthScheme(DefaultAwsSigner, "codestar")
}
toMap()
}
init {
managedResources.addIfManaged(config.httpClient)
managedResources.addIfManaged(config.credentialsProvider)
}
private val awsUserAgentMetadata = AwsUserAgentMetadata.fromEnvironment(ApiMetadata(ServiceId, SdkVersion))
/**
* Adds an IAM user to the team for an AWS CodeStar project.
*/
override suspend fun associateTeamMember(input: AssociateTeamMemberRequest): AssociateTeamMemberResponse {
val op = SdkHttpOperation.build {
serializer = AssociateTeamMemberOperationSerializer()
deserializer = AssociateTeamMemberOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "AssociateTeamMember"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("AssociateTeamMember-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates a project, including project resources. This action creates a project based on a submitted project request. A set of source code files and a toolchain template file can be included with the project request. If these are not provided, an empty project is created.
*/
override suspend fun createProject(input: CreateProjectRequest): CreateProjectResponse {
val op = SdkHttpOperation.build {
serializer = CreateProjectOperationSerializer()
deserializer = CreateProjectOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "CreateProject"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("CreateProject-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates a profile for a user that includes user preferences, such as the display name and email address assocciated with the user, in AWS CodeStar. The user profile is not project-specific. Information in the user profile is displayed wherever the user's information appears to other users in AWS CodeStar.
*/
override suspend fun createUserProfile(input: CreateUserProfileRequest): CreateUserProfileResponse {
val op = SdkHttpOperation.build {
serializer = CreateUserProfileOperationSerializer()
deserializer = CreateUserProfileOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "CreateUserProfile"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("CreateUserProfile-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes a project, including project resources. Does not delete users associated with the project, but does delete the IAM roles that allowed access to the project.
*/
override suspend fun deleteProject(input: DeleteProjectRequest): DeleteProjectResponse {
val op = SdkHttpOperation.build {
serializer = DeleteProjectOperationSerializer()
deserializer = DeleteProjectOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DeleteProject"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DeleteProject-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes a user profile in AWS CodeStar, including all personal preference data associated with that profile, such as display name and email address. It does not delete the history of that user, for example the history of commits made by that user.
*/
override suspend fun deleteUserProfile(input: DeleteUserProfileRequest): DeleteUserProfileResponse {
val op = SdkHttpOperation.build {
serializer = DeleteUserProfileOperationSerializer()
deserializer = DeleteUserProfileOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DeleteUserProfile"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DeleteUserProfile-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Describes a project and its resources.
*/
override suspend fun describeProject(input: DescribeProjectRequest): DescribeProjectResponse {
val op = SdkHttpOperation.build {
serializer = DescribeProjectOperationSerializer()
deserializer = DescribeProjectOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribeProject"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribeProject-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Describes a user in AWS CodeStar and the user attributes across all projects.
*/
override suspend fun describeUserProfile(input: DescribeUserProfileRequest): DescribeUserProfileResponse {
val op = SdkHttpOperation.build {
serializer = DescribeUserProfileOperationSerializer()
deserializer = DescribeUserProfileOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribeUserProfile"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribeUserProfile-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Removes a user from a project. Removing a user from a project also removes the IAM policies from that user that allowed access to the project and its resources. Disassociating a team member does not remove that user's profile from AWS CodeStar. It does not remove the user from IAM.
*/
override suspend fun disassociateTeamMember(input: DisassociateTeamMemberRequest): DisassociateTeamMemberResponse {
val op = SdkHttpOperation.build {
serializer = DisassociateTeamMemberOperationSerializer()
deserializer = DisassociateTeamMemberOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DisassociateTeamMember"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DisassociateTeamMember-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Lists all projects in AWS CodeStar associated with your AWS account.
*/
override suspend fun listProjects(input: ListProjectsRequest): ListProjectsResponse {
val op = SdkHttpOperation.build {
serializer = ListProjectsOperationSerializer()
deserializer = ListProjectsOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "ListProjects"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("ListProjects-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Lists resources associated with a project in AWS CodeStar.
*/
override suspend fun listResources(input: ListResourcesRequest): ListResourcesResponse {
val op = SdkHttpOperation.build {
serializer = ListResourcesOperationSerializer()
deserializer = ListResourcesOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "ListResources"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("ListResources-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Gets the tags for a project.
*/
override suspend fun listTagsForProject(input: ListTagsForProjectRequest): ListTagsForProjectResponse {
val op = SdkHttpOperation.build {
serializer = ListTagsForProjectOperationSerializer()
deserializer = ListTagsForProjectOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "ListTagsForProject"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("ListTagsForProject-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Lists all team members associated with a project.
*/
override suspend fun listTeamMembers(input: ListTeamMembersRequest): ListTeamMembersResponse {
val op = SdkHttpOperation.build {
serializer = ListTeamMembersOperationSerializer()
deserializer = ListTeamMembersOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "ListTeamMembers"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("ListTeamMembers-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Lists all the user profiles configured for your AWS account in AWS CodeStar.
*/
override suspend fun listUserProfiles(input: ListUserProfilesRequest): ListUserProfilesResponse {
val op = SdkHttpOperation.build {
serializer = ListUserProfilesOperationSerializer()
deserializer = ListUserProfilesOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "ListUserProfiles"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("ListUserProfiles-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Adds tags to a project.
*/
override suspend fun tagProject(input: TagProjectRequest): TagProjectResponse {
val op = SdkHttpOperation.build {
serializer = TagProjectOperationSerializer()
deserializer = TagProjectOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "TagProject"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("TagProject-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Removes tags from a project.
*/
override suspend fun untagProject(input: UntagProjectRequest): UntagProjectResponse {
val op = SdkHttpOperation.build {
serializer = UntagProjectOperationSerializer()
deserializer = UntagProjectOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "UntagProject"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("UntagProject-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Updates a project in AWS CodeStar.
*/
override suspend fun updateProject(input: UpdateProjectRequest): UpdateProjectResponse {
val op = SdkHttpOperation.build {
serializer = UpdateProjectOperationSerializer()
deserializer = UpdateProjectOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "UpdateProject"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("UpdateProject-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Updates a team member's attributes in an AWS CodeStar project. For example, you can change a team member's role in the project, or change whether they have remote access to project resources.
*/
override suspend fun updateTeamMember(input: UpdateTeamMemberRequest): UpdateTeamMemberResponse {
val op = SdkHttpOperation.build {
serializer = UpdateTeamMemberOperationSerializer()
deserializer = UpdateTeamMemberOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "UpdateTeamMember"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("UpdateTeamMember-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Updates a user's profile in AWS CodeStar. The user profile is not project-specific. Information in the user profile is displayed wherever the user's information appears to other users in AWS CodeStar.
*/
override suspend fun updateUserProfile(input: UpdateUserProfileRequest): UpdateUserProfileResponse {
val op = SdkHttpOperation.build {
serializer = UpdateUserProfileOperationSerializer()
deserializer = UpdateUserProfileOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "UpdateUserProfile"
}
execution.auth = OperationAuthConfig(AuthSchemeProviderAdapter, configuredAuthSchemes, identityProviderConfig)
execution.endpointResolver = EndpointResolverAdapter(config)
execution.retryStrategy = config.retryStrategy
}
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("CodeStar_20170419", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("UpdateUserProfile-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
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 suspend fun mergeServiceDefaults(ctx: ExecutionContext) {
ctx.putIfAbsent(AwsClientOption.Region, config.region)
ctx.putIfAbsent(SdkClientOption.ClientName, config.clientName)
ctx.putIfAbsent(SdkClientOption.LogMode, config.logMode)
ctx.putIfAbsent(AwsSigningAttributes.SigningService, "codestar")
ctx.putIfAbsent(AwsSigningAttributes.SigningRegion, config.region)
ctx.putIfAbsent(AwsSigningAttributes.CredentialsProvider, config.credentialsProvider)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy