14 lines
812 B
JavaScript
14 lines
812 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.validateSsoProfile = void 0;
|
|
const property_provider_1 = require("@smithy/property-provider");
|
|
const validateSsoProfile = (profile) => {
|
|
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
|
|
if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
|
|
throw new property_provider_1.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
|
|
`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, false);
|
|
}
|
|
return profile;
|
|
};
|
|
exports.validateSsoProfile = validateSsoProfile;
|