mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-03 06:05:04 +09:00
chore: Update dist
This commit is contained in:
+1
@@ -13,4 +13,5 @@ export declare function verifyKeys(creds: Partial<Credentials> | undefined): boo
|
||||
export declare function retryAndBackoff<T>(fn: () => Promise<T>, isRetryable: boolean, maxRetries?: number, retries?: number, base?: number): Promise<T>;
|
||||
export declare function errorMessage(error: unknown): string;
|
||||
export declare function isDefined<T>(i: T | undefined | null): i is T;
|
||||
export declare function areCredentialsValid(credentialsClient: CredentialsClient): Promise<boolean>;
|
||||
export {};
|
||||
|
||||
+14
@@ -46279,6 +46279,7 @@ exports.verifyKeys = verifyKeys;
|
||||
exports.retryAndBackoff = retryAndBackoff;
|
||||
exports.errorMessage = errorMessage;
|
||||
exports.isDefined = isDefined;
|
||||
exports.areCredentialsValid = areCredentialsValid;
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const client_sts_1 = __nccwpck_require__(1695);
|
||||
const MAX_TAG_VALUE_LENGTH = 256;
|
||||
@@ -46403,6 +46404,19 @@ function isDefined(i) {
|
||||
return i !== undefined && i !== null;
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
async function areCredentialsValid(credentialsClient) {
|
||||
const client = credentialsClient.stsClient;
|
||||
try {
|
||||
const identity = await client.send(new client_sts_1.GetCallerIdentityCommand({}));
|
||||
if (identity.Account) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch (_) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
Reference in New Issue
Block a user