@cloud-copilot/iam-collect 0.1.157 → 0.1.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/aws/ClientPool.d.ts +2 -2
- package/dist/cjs/aws/ClientPool.js +2 -2
- package/dist/cjs/aws/ClientPool.js.map +1 -1
- package/dist/cjs/aws/auth.d.ts +2 -2
- package/dist/cjs/aws/coreAuth.d.ts +20 -3
- package/dist/cjs/aws/coreAuth.d.ts.map +1 -1
- package/dist/cjs/aws/coreAuth.js +11 -6
- package/dist/cjs/aws/coreAuth.js.map +1 -1
- package/dist/cjs/awsConfigClients/AwsConfigClientContext.d.ts +2 -2
- package/dist/cjs/awsConfigClients/AwsConfigClientPool.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigAccountClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigApiGatewayClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigBackupClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigDynamoDBClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigEC2Client.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigEcrClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigEfsClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigEventBridgeClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigGlueClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigIamClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigKafkaClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigKinesisClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigKmsClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigLambdaClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigOpenSearchClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigOrganizationsClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigS3Client.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigS3ControlClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigSNSClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigSQSClient.d.ts +2 -2
- package/dist/cjs/awsConfigClients/clients/AwsConfigSecretsManagerClient.d.ts +2 -2
- package/dist/cjs/config/version.d.ts +1 -1
- package/dist/cjs/config/version.js +1 -1
- package/dist/cjs/customClients/AbstractClient.d.ts +3 -3
- package/dist/cjs/customClients/AbstractClientPool.d.ts +4 -4
- package/dist/cjs/customClients/AbstractClientPool.js +1 -1
- package/dist/cjs/customClients/AbstractClientPool.js.map +1 -1
- package/dist/cjs/customClients/AbstractCommand.d.ts +2 -2
- package/dist/cjs/download/download.js +4 -4
- package/dist/cjs/download/download.js.map +1 -1
- package/dist/cjs/regions.d.ts +2 -2
- package/dist/cjs/syncs/s3outposts/s3OutpostsSyncs.js +1 -1
- package/dist/cjs/syncs/s3outposts/s3OutpostsSyncs.js.map +1 -1
- package/dist/cjs/syncs/sync.d.ts +2 -2
- package/dist/cjs/syncs/typedSync.d.ts +2 -2
- package/dist/cjs/utils/strings.d.ts +8 -0
- package/dist/cjs/utils/strings.d.ts.map +1 -1
- package/dist/cjs/utils/strings.js +20 -0
- package/dist/cjs/utils/strings.js.map +1 -1
- package/dist/esm/aws/ClientPool.d.ts +2 -2
- package/dist/esm/aws/ClientPool.js +2 -2
- package/dist/esm/aws/ClientPool.js.map +1 -1
- package/dist/esm/aws/auth.d.ts +2 -2
- package/dist/esm/aws/coreAuth.d.ts +20 -3
- package/dist/esm/aws/coreAuth.d.ts.map +1 -1
- package/dist/esm/aws/coreAuth.js +12 -7
- package/dist/esm/aws/coreAuth.js.map +1 -1
- package/dist/esm/awsConfigClients/AwsConfigClientContext.d.ts +2 -2
- package/dist/esm/awsConfigClients/AwsConfigClientPool.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigAccountClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigApiGatewayClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigBackupClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigDynamoDBClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigEC2Client.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigEcrClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigEfsClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigEventBridgeClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigGlueClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigIamClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigKafkaClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigKinesisClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigKmsClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigLambdaClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigOpenSearchClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigOrganizationsClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigS3Client.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigS3ControlClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigSNSClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigSQSClient.d.ts +2 -2
- package/dist/esm/awsConfigClients/clients/AwsConfigSecretsManagerClient.d.ts +2 -2
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/customClients/AbstractClient.d.ts +3 -3
- package/dist/esm/customClients/AbstractClientPool.d.ts +4 -4
- package/dist/esm/customClients/AbstractClientPool.js +1 -1
- package/dist/esm/customClients/AbstractClientPool.js.map +1 -1
- package/dist/esm/customClients/AbstractCommand.d.ts +2 -2
- package/dist/esm/download/download.js +4 -4
- package/dist/esm/download/download.js.map +1 -1
- package/dist/esm/regions.d.ts +2 -2
- package/dist/esm/syncs/s3outposts/s3OutpostsSyncs.js +1 -1
- package/dist/esm/syncs/s3outposts/s3OutpostsSyncs.js.map +1 -1
- package/dist/esm/syncs/sync.d.ts +2 -2
- package/dist/esm/syncs/typedSync.d.ts +2 -2
- package/dist/esm/utils/strings.d.ts +8 -0
- package/dist/esm/utils/strings.d.ts.map +1 -1
- package/dist/esm/utils/strings.js +16 -0
- package/dist/esm/utils/strings.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from '@smithy/smithy-client';
|
|
2
2
|
import { AwsService } from '../services.js';
|
|
3
|
-
import {
|
|
3
|
+
import { AwsCredentialProviderWithMetaData } from './coreAuth.js';
|
|
4
4
|
export type ClientConstructor<T> = new (args: any) => T;
|
|
5
5
|
export type AnyClient = Client<any, any, any, any>;
|
|
6
6
|
export declare class AwsClientPool {
|
|
@@ -17,7 +17,7 @@ export declare class AwsClientPool {
|
|
|
17
17
|
* @param region The region to use for the client.
|
|
18
18
|
* @returns A client of the specified type with the specified credentials and region.
|
|
19
19
|
*/
|
|
20
|
-
client<T extends AnyClient>(ClientType: ClientConstructor<T>, credentials:
|
|
20
|
+
client<T extends AnyClient>(ClientType: ClientConstructor<T>, credentials: AwsCredentialProviderWithMetaData, region: string | undefined, endpoint: string | undefined): T;
|
|
21
21
|
private getCacheKey;
|
|
22
22
|
/**
|
|
23
23
|
* Destroys all clients in the pool and empties the cache.
|
|
@@ -37,7 +37,7 @@ class AwsClientPool {
|
|
|
37
37
|
const cacheKey = this.getCacheKey(ClientType, credentials, region, endpoint);
|
|
38
38
|
if (!this.clientCache.has(cacheKey)) {
|
|
39
39
|
const client = new ClientType({
|
|
40
|
-
credentials,
|
|
40
|
+
credentials: credentials.provider,
|
|
41
41
|
region,
|
|
42
42
|
maxAttempts: 10,
|
|
43
43
|
requestHandler: new node_http_handler_1.NodeHttpHandler({
|
|
@@ -51,7 +51,7 @@ class AwsClientPool {
|
|
|
51
51
|
return this.clientCache.get(cacheKey);
|
|
52
52
|
}
|
|
53
53
|
getCacheKey(ClientType, credentials, region, endpoint) {
|
|
54
|
-
return `${ClientType.name}:${credentials.accountId}:${credentials.
|
|
54
|
+
return `${ClientType.name}:${credentials.accountId}:${credentials.cacheKey}:${region}:${endpoint}`;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Destroys all clients in the pool and empties the cache.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientPool.js","sourceRoot":"","sources":["../../../src/aws/ClientPool.ts"],"names":[],"mappings":";;;AAAA,0DAAqD;AAErD,iEAA2D;AAE3D,mDAI2B;AAO3B,MAAM,aAAa,GAA8C;IAC/D,CAAC,4BAAY,CAAC,IAAI,CAAC,EAAE;QACnB,IAAI,EAAE,GAAG,EAAE,uCAAuC;QAClD,WAAW,EAAE,GAAG,EAAE,mCAAmC;QACrD,aAAa,EAAE,GAAG,EAAE,kCAAkC;QACtD,MAAM,EAAE,GAAG,CAAC,qCAAqC;KAClD;CACF,CAAA;AAED,MAAa,aAAa;IACjB,MAAM,CAAC,eAAe,GAAG,IAAI,aAAa,EAAE,CAAA;IAE3C,WAAW,GAAG,IAAI,GAAG,EAAqB,CAAA;IAC1C,oBAAoB,CAAiB;IAC7C;QACE,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,CAAC;YACjD,IAAI,EAAE,GAAG,EAAE,uCAAuC;YAClD,WAAW,EAAE,IAAI,EAAE,mCAAmC;YACtD,aAAa,EAAE,GAAG,EAAE,kCAAkC;YACtD,M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AAA;IACb,CAAC;IAED;;;;;;;OAOG;IACI,eAAe,CAAC,OAAmB,EAAE,QAAgB,EAAE,MAAc;QAC1E,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,sBAAsB,CAAC,MAA8B;QAC3D,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA;QACzC,CAAC;QACD,OAAO,IAAI,CAAC,oBAAoB,CAAA;IAClC,CAAC;IAEO,iBAAiB,CAAC,kBAA6C;QACrE,OAAO,IAAI,kCAAqB,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,EAAE;YAC/C,WAAW,EAAE,IAAI,+BAAkB,CAAC,kBAAkB,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC;;AA5GH,sCA6GC"}
|
package/dist/cjs/aws/auth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthConfig } from '../config/config.js';
|
|
2
|
-
import {
|
|
2
|
+
import { AwsCredentialProviderWithMetaData } from './coreAuth.js';
|
|
3
3
|
/**
|
|
4
4
|
* Get credentials for the given account ID and auth configuration.
|
|
5
5
|
*
|
|
@@ -7,5 +7,5 @@ import { AwsCredentialIdentityWithMetaData } from './coreAuth.js';
|
|
|
7
7
|
* @param authConfig the authentication configuration to use for the account
|
|
8
8
|
* @returns new or cached credentials based on the provided account ID and auth configuration
|
|
9
9
|
*/
|
|
10
|
-
export declare function getCredentials(accountId: string, authConfig: AuthConfig | undefined): Promise<
|
|
10
|
+
export declare function getCredentials(accountId: string, authConfig: AuthConfig | undefined): Promise<AwsCredentialProviderWithMetaData>;
|
|
11
11
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AwsCredentialIdentity } from '@aws-sdk/types';
|
|
1
|
+
import { AwsCredentialIdentity, IdentityProvider, RuntimeConfigIdentityProvider } from '@aws-sdk/types';
|
|
2
2
|
import { AuthConfig } from '../config/config.js';
|
|
3
3
|
/**
|
|
4
4
|
* Credentials with additional metadata, including the AWS account ID and partition.
|
|
@@ -13,6 +13,22 @@ export interface AwsCredentialIdentityWithMetaData extends AwsCredentialIdentity
|
|
|
13
13
|
*/
|
|
14
14
|
accountId: string;
|
|
15
15
|
}
|
|
16
|
+
type AwsCredentialProviders = IdentityProvider<AwsCredentialIdentity> | RuntimeConfigIdentityProvider<AwsCredentialIdentity>;
|
|
17
|
+
export type AwsCredentialProviderWithMetaData = {
|
|
18
|
+
provider: AwsCredentialProviders;
|
|
19
|
+
/**
|
|
20
|
+
* The AWS partition (e.g., 'aws', 'aws-cn', 'aws-us-gov').
|
|
21
|
+
*/
|
|
22
|
+
partition: string;
|
|
23
|
+
/**
|
|
24
|
+
* The AWS account ID associated with these credentials.
|
|
25
|
+
*/
|
|
26
|
+
accountId: string;
|
|
27
|
+
/**
|
|
28
|
+
* A unique cache key for these credentials.
|
|
29
|
+
*/
|
|
30
|
+
cacheKey: string;
|
|
31
|
+
};
|
|
16
32
|
/**
|
|
17
33
|
* What time is it now?
|
|
18
34
|
*
|
|
@@ -30,7 +46,7 @@ export declare function now(): number;
|
|
|
30
46
|
* @param authConfig the authentication configuration to use for the account
|
|
31
47
|
* @returns new credentials based on the provided account ID and auth configuration
|
|
32
48
|
*/
|
|
33
|
-
export declare function getNewCredentials(accountId: string, authConfig: AuthConfig | undefined): Promise<
|
|
49
|
+
export declare function getNewCredentials(accountId: string, authConfig: AuthConfig | undefined): Promise<AwsCredentialProviderWithMetaData>;
|
|
34
50
|
/**
|
|
35
51
|
* This gets a new set of initial credentials for an auth configuration. These are the initial
|
|
36
52
|
* credentials that are the default credentials are used to then assume a role if one is specified.
|
|
@@ -41,7 +57,7 @@ export declare function getNewCredentials(accountId: string, authConfig: AuthCon
|
|
|
41
57
|
* @param logInfo any additional information to log while getting the credentials
|
|
42
58
|
* @returns new credentials based on the provided auth configuration
|
|
43
59
|
*/
|
|
44
|
-
export declare function getNewInitialCredentials(authConfig: AuthConfig | undefined, logInfo?: Record<string, unknown>): Promise<
|
|
60
|
+
export declare function getNewInitialCredentials(authConfig: AuthConfig | undefined, logInfo?: Record<string, unknown>): Promise<AwsCredentialProviderWithMetaData>;
|
|
45
61
|
/**
|
|
46
62
|
* Get the ARN for an IAM role.
|
|
47
63
|
*
|
|
@@ -51,4 +67,5 @@ export declare function getNewInitialCredentials(authConfig: AuthConfig | undefi
|
|
|
51
67
|
* @returns The ARN of the role.
|
|
52
68
|
*/
|
|
53
69
|
export declare function buildRoleArn(partition: string, accountId: string, rolePathAndName: string): string;
|
|
70
|
+
export {};
|
|
54
71
|
//# sourceMappingURL=coreAuth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreAuth.d.ts","sourceRoot":"","sources":["../../../src/aws/coreAuth.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"coreAuth.d.ts","sourceRoot":"","sources":["../../../src/aws/coreAuth.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,6BAA6B,EAC9B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAKhD;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,qBAAqB;IAC9E;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,KAAK,sBAAsB,GACvB,gBAAgB,CAAC,qBAAqB,CAAC,GACvC,6BAA6B,CAAC,qBAAqB,CAAC,CAAA;AAExD,MAAM,MAAM,iCAAiC,GAAG;IAC9C,QAAQ,EAAE,sBAAsB,CAAA;IAEhC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,IAAI,MAAM,CAE5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,GAAG,SAAS,GACjC,OAAO,CAAC,iCAAiC,CAAC,CAyC5C;AAED;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,OAAO,CAAC,iCAAiC,CAAC,CAqD5C;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,GACtB,MAAM,CAKR"}
|
package/dist/cjs/aws/coreAuth.js
CHANGED
|
@@ -28,6 +28,7 @@ function now() {
|
|
|
28
28
|
* @returns new credentials based on the provided account ID and auth configuration
|
|
29
29
|
*/
|
|
30
30
|
async function getNewCredentials(accountId, authConfig) {
|
|
31
|
+
const cacheKey = await (0, strings_js_1.shortHash)(JSON.stringify({ accountId, authConfig }));
|
|
31
32
|
const baseCredentials = await getNewInitialCredentials(authConfig, {
|
|
32
33
|
accountId
|
|
33
34
|
});
|
|
@@ -36,16 +37,16 @@ async function getNewCredentials(accountId, authConfig) {
|
|
|
36
37
|
const roleArn = buildRoleArn(baseCredentials.partition, accountId, authConfig.role.pathAndName);
|
|
37
38
|
log_js_1.log.trace({ accountId, roleArn, sourceAccount: baseCredentials.accountId }, 'Assuming role for account with credentials');
|
|
38
39
|
const roleProvider = (0, credential_providers_1.fromTemporaryCredentials)({
|
|
39
|
-
masterCredentials: baseCredentials,
|
|
40
|
+
masterCredentials: baseCredentials.provider,
|
|
40
41
|
params: {
|
|
41
42
|
RoleArn: roleArn,
|
|
42
43
|
ExternalId: authConfig.role.externalId,
|
|
43
44
|
RoleSessionName: authConfig.role.sessionName || `iam-collect-${(0, strings_js_1.randomCharacters)()}`
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
|
-
const roleCredentials = await roleProvider();
|
|
47
47
|
credentials = {
|
|
48
|
-
|
|
48
|
+
cacheKey,
|
|
49
|
+
provider: roleProvider,
|
|
49
50
|
accountId: accountId,
|
|
50
51
|
partition: baseCredentials.partition
|
|
51
52
|
};
|
|
@@ -72,15 +73,17 @@ async function getNewCredentials(accountId, authConfig) {
|
|
|
72
73
|
* @returns new credentials based on the provided auth configuration
|
|
73
74
|
*/
|
|
74
75
|
async function getNewInitialCredentials(authConfig, logInfo = {}) {
|
|
76
|
+
let provider;
|
|
75
77
|
let credentials;
|
|
78
|
+
const cacheKey = await (0, strings_js_1.shortHash)(JSON.stringify({ authConfig }));
|
|
76
79
|
if (authConfig?.profile) {
|
|
77
80
|
log_js_1.log.trace({ ...logInfo, profile: authConfig.profile }, 'Using profile for credentials');
|
|
78
|
-
|
|
81
|
+
provider = (0, credential_providers_1.fromIni)({ profile: authConfig.profile });
|
|
79
82
|
credentials = await provider();
|
|
80
83
|
}
|
|
81
84
|
else {
|
|
82
85
|
log_js_1.log.trace(logInfo, 'Using default SDK credential chain');
|
|
83
|
-
|
|
86
|
+
provider = (0, credential_providers_1.fromNodeProviderChain)();
|
|
84
87
|
credentials = await provider();
|
|
85
88
|
}
|
|
86
89
|
let tokenInfo = await (0, tokens_js_1.getTokenInfo)(credentials);
|
|
@@ -102,11 +105,13 @@ async function getNewInitialCredentials(authConfig, logInfo = {}) {
|
|
|
102
105
|
RoleSessionName: authConfig.initialRole.sessionName || `iam-collect-${(0, strings_js_1.randomCharacters)()}`
|
|
103
106
|
}
|
|
104
107
|
});
|
|
108
|
+
provider = roleProvider;
|
|
105
109
|
credentials = await roleProvider();
|
|
106
110
|
tokenInfo = await (0, tokens_js_1.getTokenInfo)(credentials);
|
|
107
111
|
}
|
|
108
112
|
return {
|
|
109
|
-
|
|
113
|
+
cacheKey,
|
|
114
|
+
provider,
|
|
110
115
|
accountId: tokenInfo.accountId,
|
|
111
116
|
partition: tokenInfo.partition
|
|
112
117
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreAuth.js","sourceRoot":"","sources":["../../../src/aws/coreAuth.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"coreAuth.js","sourceRoot":"","sources":["../../../src/aws/coreAuth.ts"],"names":[],"mappings":";;AA4DA,kBAEC;AAWD,8CA4CC;AAYD,4DAwDC;AAUD,oCASC;AA5MD,wEAIsC;AAOtC,4CAAqC;AACrC,oDAAiE;AACjE,2CAA0C;AAwC1C;;;;;;GAMG;AACH,SAAgB,GAAG;IACjB,OAAO,IAAI,CAAC,GAAG,EAAE,CAAA;AACnB,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,iBAAiB,CACrC,SAAiB,EACjB,UAAkC;IAElC,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAS,EAAC,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA;IAC3E,MAAM,eAAe,GAAG,MAAM,wBAAwB,CAAC,UAAU,EAAE;QACjE,SAAS;KACV,CAAC,CAAA;IAEF,IAAI,WAAW,GAAG,eAAe,CAAA;IACjC,IAAI,UAAU,EAAE,IAAI,EAAE,CAAC;QACrB,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC/F,YAAG,CAAC,KAAK,CACP,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,CAAC,SAAS,EAAE,EAChE,4CAA4C,CAC7C,CAAA;QACD,MAAM,YAAY,GAAG,IAAA,+CAAwB,EAAC;YAC5C,iBAAiB,EAAE,eAAe,CAAC,QAAQ;YAC3C,MAAM,EAAE;gBACN,OAAO,EAAE,OAAO;gBACh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AAS,CAAC,SAAS;KAC/B,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC1B,SAAiB,EACjB,SAAiB,EACjB,eAAuB;IAEvB,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrC,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA;IACzC,CAAC;IACD,OAAO,OAAO,SAAS,SAAS,SAAS,QAAQ,eAAe,EAAE,CAAA;AACpE,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ConfigServiceClient } from '@aws-sdk/client-config-service';
|
|
2
|
-
import {
|
|
2
|
+
import { AwsCredentialProviderWithMetaData } from '../aws/coreAuth.js';
|
|
3
3
|
/**
|
|
4
4
|
* Custom client context for AWS Config-based implementations
|
|
5
5
|
*/
|
|
6
6
|
export interface AwsConfigClientContext {
|
|
7
7
|
configClient: ConfigServiceClient;
|
|
8
8
|
aggregatorName: string;
|
|
9
|
-
configCredentials:
|
|
9
|
+
configCredentials: AwsCredentialProviderWithMetaData;
|
|
10
10
|
}
|
|
11
11
|
export declare const awsConfigCommand: <const Cmd extends import("../syncs/typedSync.js").CommandConstructors>(options: {
|
|
12
12
|
command: Cmd;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../aws/coreAuth.js';
|
|
2
2
|
import { AuthConfig } from '../config/config.js';
|
|
3
3
|
import { ClientConstructor } from '../customClients/AbstractClient.js';
|
|
4
4
|
import { AbstractClientPool } from '../customClients/AbstractClientPool.js';
|
|
@@ -33,7 +33,7 @@ export declare class AwsConfigClientPool extends AbstractClientPool<AwsConfigCli
|
|
|
33
33
|
/**
|
|
34
34
|
* Get custom client context for Config-based implementations
|
|
35
35
|
*/
|
|
36
|
-
protected getClientContext(ClientType: ClientConstructor<any>, credentials:
|
|
36
|
+
protected getClientContext(ClientType: ClientConstructor<any>, credentials: AwsCredentialProviderWithMetaData, region: string | undefined, endpoint: string | undefined): AwsConfigClientContext;
|
|
37
37
|
isSyncSupported(service: AwsService, syncName: string, region: string): boolean;
|
|
38
38
|
}
|
|
39
39
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigAccountClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
10
10
|
export declare class AwsConfigApiGatewayClient extends AbstractClient<AwsConfigClientContext> {
|
|
11
11
|
static readonly clientName: string;
|
|
12
12
|
constructor(options: {
|
|
13
|
-
credentials:
|
|
13
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
14
14
|
region: string | undefined;
|
|
15
15
|
}, customContext: AwsConfigClientContext);
|
|
16
16
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigBackupClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
10
10
|
export declare class AwsConfigDynamoDBClient extends AbstractClient<AwsConfigClientContext> {
|
|
11
11
|
static readonly clientName: string;
|
|
12
12
|
constructor(options: {
|
|
13
|
-
credentials:
|
|
13
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
14
14
|
region: string | undefined;
|
|
15
15
|
}, customContext: AwsConfigClientContext);
|
|
16
16
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigEC2Client extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigEcrClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigEfsClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -8,7 +8,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
8
8
|
export declare class AwsConfigEventBridgeClient extends AbstractClient<AwsConfigClientContext> {
|
|
9
9
|
static readonly clientName: string;
|
|
10
10
|
constructor(options: {
|
|
11
|
-
credentials:
|
|
11
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
12
12
|
region: string | undefined;
|
|
13
13
|
}, customContext: AwsConfigClientContext);
|
|
14
14
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
10
10
|
export declare class AwsConfigGlueClient extends AbstractClient<AwsConfigClientContext> {
|
|
11
11
|
static readonly clientName: string;
|
|
12
12
|
constructor(options: {
|
|
13
|
-
credentials:
|
|
13
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
14
14
|
region: string | undefined;
|
|
15
15
|
}, customContext: AwsConfigClientContext);
|
|
16
16
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigIamClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigKafkaClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -11,7 +11,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
11
11
|
export declare class AwsConfigKinesisClient extends AbstractClient<AwsConfigClientContext> {
|
|
12
12
|
static readonly clientName: string;
|
|
13
13
|
constructor(options: {
|
|
14
|
-
credentials:
|
|
14
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
15
15
|
region: string | undefined;
|
|
16
16
|
}, customContext: AwsConfigClientContext);
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigKmsClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -11,7 +11,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
11
11
|
export declare class AwsConfigLambdaClient extends AbstractClient<AwsConfigClientContext> {
|
|
12
12
|
static readonly clientName: string;
|
|
13
13
|
constructor(options: {
|
|
14
|
-
credentials:
|
|
14
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
15
15
|
region: string | undefined;
|
|
16
16
|
}, customContext: AwsConfigClientContext);
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigOpenSearchClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -11,7 +11,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
11
11
|
export declare class AwsConfigOrganizationsClient extends AbstractClient<AwsConfigClientContext> {
|
|
12
12
|
static readonly clientName: string;
|
|
13
13
|
constructor(options: {
|
|
14
|
-
credentials:
|
|
14
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
15
15
|
region: string | undefined;
|
|
16
16
|
}, customContext: AwsConfigClientContext);
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigS3Client extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
protected registerCommands(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -17,7 +17,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
17
17
|
export declare class AwsConfigS3ControlClient extends AbstractClient<AwsConfigClientContext> {
|
|
18
18
|
static readonly clientName: string;
|
|
19
19
|
constructor(options: {
|
|
20
|
-
credentials:
|
|
20
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
21
21
|
region: string | undefined;
|
|
22
22
|
}, customContext: AwsConfigClientContext);
|
|
23
23
|
protected registerCommands(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigSNSClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
7
7
|
export declare class AwsConfigSQSClient extends AbstractClient<AwsConfigClientContext> {
|
|
8
8
|
static readonly clientName: string;
|
|
9
9
|
constructor(options: {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
11
11
|
region: string | undefined;
|
|
12
12
|
}, customContext: AwsConfigClientContext);
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../../aws/coreAuth.js';
|
|
2
2
|
import { AbstractClient } from '../../customClients/AbstractClient.js';
|
|
3
3
|
import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ import { AwsConfigClientContext } from '../AwsConfigClientContext.js';
|
|
|
10
10
|
export declare class AwsConfigSecretsManagerClient extends AbstractClient<AwsConfigClientContext> {
|
|
11
11
|
static readonly clientName: string;
|
|
12
12
|
constructor(options: {
|
|
13
|
-
credentials:
|
|
13
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
14
14
|
region: string | undefined;
|
|
15
15
|
}, customContext: AwsConfigClientContext);
|
|
16
16
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AwsCredentialProviderWithMetaData } from '../aws/coreAuth.js';
|
|
2
2
|
import { CustomCommand } from './AbstractCommand.js';
|
|
3
3
|
export type ClientConstructor<T> = new (args: any) => T;
|
|
4
4
|
export interface CustomClientMetadata {
|
|
@@ -15,13 +15,13 @@ export declare abstract class AbstractClient<CustomClientContext = {}> {
|
|
|
15
15
|
config: any;
|
|
16
16
|
middlewareStack: any;
|
|
17
17
|
protected commandRegistry: Map<string, CustomCommand<any, CustomClientContext>>;
|
|
18
|
-
protected credentials:
|
|
18
|
+
protected credentials: AwsCredentialProviderWithMetaData;
|
|
19
19
|
protected region: string | undefined;
|
|
20
20
|
protected detailsCache: Record<string, Partial<Record<string, any>>>;
|
|
21
21
|
protected cache(resourceId: string, type: string, data: any): void;
|
|
22
22
|
protected getCached(resourceId: string, type: string): any;
|
|
23
23
|
constructor(options: {
|
|
24
|
-
credentials:
|
|
24
|
+
credentials: AwsCredentialProviderWithMetaData;
|
|
25
25
|
region: string | undefined;
|
|
26
26
|
}, customContext: CustomClientContext);
|
|
27
27
|
/**
|