File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/auth/credentials Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+ * SPDX-License-Identifier: Apache-2.0.
4+ */
5+
6+ package aws.sdk.kotlin.runtime.auth.credentials
7+
8+ import aws.sdk.kotlin.crt.auth.credentials.build
9+ import aws.sdk.kotlin.runtime.crt.SdkDefaultIO
10+ import aws.sdk.kotlin.crt.auth.credentials.EcsCredentialsProvider as EcsCredentialsProviderCrt
11+
12+ /* *
13+ * A provider that gets credentials from an ECS environment
14+ *
15+ * @param host The host component of the URL to query credentials from
16+ * @param pathAndQuery The path and query components of the URI, concatenated, to query credentials from
17+ * @param authToken The token to pass to ECS credential service
18+ */
19+ public class EcsCredentialsProvider public constructor(
20+ host : String? = null ,
21+ pathAndQuery : String? = null ,
22+ authToken : String? = null ,
23+ ) : CrtCredentialsProvider {
24+ override val crtProvider: EcsCredentialsProviderCrt = EcsCredentialsProviderCrt .build {
25+ clientBootstrap = SdkDefaultIO .ClientBootstrap
26+ tlsContext = SdkDefaultIO .TlsContext
27+ this .host = host
28+ this .pathAndQuery = pathAndQuery
29+ this .authToken = authToken
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments