amazon-cognito-identity-js-typescript
Version:
Amazon Cognito Identity Provider JavaScript SDK
20 lines (18 loc) • 260 kB
JavaScript
/**
* Copyright 2016 Amazon.com,
* Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Amazon Software License (the "License").
* You may not use this file except in compliance with the
* License. A copy of the License is located at
*
* http://aws.amazon.com/asl/
*
* or in the "license" file accompanying this file. This file is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, express or implied. See the License
* for the specific language governing permissions and
* limitations under the License.
*/
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){b.exports={version:"2.0",metadata:{apiVersion:"2014-06-30",endpointPrefix:"cognito-identity",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon Cognito Identity",signatureVersion:"v4",targetPrefix:"AWSCognitoIdentityService"},operations:{CreateIdentityPool:{input:{type:"structure",required:["IdentityPoolName","AllowUnauthenticatedIdentities"],members:{IdentityPoolName:{},AllowUnauthenticatedIdentities:{type:"boolean"},SupportedLoginProviders:{shape:"S4"},DeveloperProviderName:{},OpenIdConnectProviderARNs:{shape:"S8"},CognitoIdentityProviders:{shape:"Sa"},SamlProviderARNs:{shape:"Se"}}},output:{shape:"Sf"}},DeleteIdentities:{input:{type:"structure",required:["IdentityIdsToDelete"],members:{IdentityIdsToDelete:{type:"list",member:{}}}},output:{type:"structure",members:{UnprocessedIdentityIds:{type:"list",member:{type:"structure",members:{IdentityId:{},ErrorCode:{}}}}}}},DeleteIdentityPool:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}}},DescribeIdentity:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{}}},output:{shape:"Sq"}},DescribeIdentityPool:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}},output:{shape:"Sf"}},GetCredentialsForIdentity:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{},Logins:{shape:"Sv"},CustomRoleArn:{}}},output:{type:"structure",members:{IdentityId:{},Credentials:{type:"structure",members:{AccessKeyId:{},SecretKey:{},SessionToken:{},Expiration:{type:"timestamp"}}}}}},GetId:{input:{type:"structure",required:["IdentityPoolId"],members:{AccountId:{},IdentityPoolId:{},Logins:{shape:"Sv"}}},output:{type:"structure",members:{IdentityId:{}}}},GetIdentityPoolRoles:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}},output:{type:"structure",members:{IdentityPoolId:{},Roles:{shape:"S17"}}}},GetOpenIdToken:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{},Logins:{shape:"Sv"}}},output:{type:"structure",members:{IdentityId:{},Token:{}}}},GetOpenIdTokenForDeveloperIdentity:{input:{type:"structure",required:["IdentityPoolId","Logins"],members:{IdentityPoolId:{},IdentityId:{},Logins:{shape:"Sv"},TokenDuration:{type:"long"}}},output:{type:"structure",members:{IdentityId:{},Token:{}}}},ListIdentities:{input:{type:"structure",required:["IdentityPoolId","MaxResults"],members:{IdentityPoolId:{},MaxResults:{type:"integer"},NextToken:{},HideDisabled:{type:"boolean"}}},output:{type:"structure",members:{IdentityPoolId:{},Identities:{type:"list",member:{shape:"Sq"}},NextToken:{}}}},ListIdentityPools:{input:{type:"structure",required:["MaxResults"],members:{MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{IdentityPools:{type:"list",member:{type:"structure",members:{IdentityPoolId:{},IdentityPoolName:{}}}},NextToken:{}}}},LookupDeveloperIdentity:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{},IdentityId:{},DeveloperUserIdentifier:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{IdentityId:{},DeveloperUserIdentifierList:{type:"list",member:{}},NextToken:{}}}},MergeDeveloperIdentities:{input:{type:"structure",required:["SourceUserIdentifier","DestinationUserIdentifier","DeveloperProviderName","IdentityPoolId"],members:{SourceUserIdentifier:{},DestinationUserIdentifier:{},DeveloperProviderName:{},IdentityPoolId:{}}},output:{type:"structure",members:{IdentityId:{}}}},SetIdentityPoolRoles:{input:{type:"structure",required:["IdentityPoolId","Roles"],members:{IdentityPoolId:{},Roles:{shape:"S17"}}}},UnlinkDeveloperIdentity:{input:{type:"structure",required:["IdentityId","IdentityPoolId","DeveloperProviderName","DeveloperUserIdentifier"],members:{IdentityId:{},IdentityPoolId:{},DeveloperProviderName:{},DeveloperUserIdentifier:{}}}},UnlinkIdentity:{input:{type:"structure",required:["IdentityId","Logins","LoginsToRemove"],members:{IdentityId:{},Logins:{shape:"Sv"},LoginsToRemove:{shape:"Sr"}}}},UpdateIdentityPool:{input:{shape:"Sf"},output:{shape:"Sf"}}},shapes:{S4:{type:"map",key:{},value:{}},S8:{type:"list",member:{}},Sa:{type:"list",member:{type:"structure",members:{ProviderName:{},ClientId:{}}}},Se:{type:"list",member:{}},Sf:{type:"structure",required:["IdentityPoolId","IdentityPoolName","AllowUnauthenticatedIdentities"],members:{IdentityPoolId:{},IdentityPoolName:{},AllowUnauthenticatedIdentities:{type:"boolean"},SupportedLoginProviders:{shape:"S4"},DeveloperProviderName:{},OpenIdConnectProviderARNs:{shape:"S8"},CognitoIdentityProviders:{shape:"Sa"},SamlProviderARNs:{shape:"Se"}}},Sq:{type:"structure",members:{IdentityId:{},Logins:{shape:"Sr"},CreationDate:{type:"timestamp"},LastModifiedDate:{type:"timestamp"}}},Sr:{type:"list",member:{}},Sv:{type:"map",key:{},value:{}},S17:{type:"map",key:{},value:{}}}}},{}],2:[function(a,b,c){b.exports={version:"2.0",metadata:{apiVersion:"2016-04-18",endpointPrefix:"cognito-idp",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon Cognito Identity Provider",signatureVersion:"v4",targetPrefix:"AWSCognitoIdentityProviderService"},operations:{AddCustomAttributes:{input:{type:"structure",required:["UserPoolId","CustomAttributes"],members:{UserPoolId:{},CustomAttributes:{type:"list",member:{shape:"S4"}}}},output:{type:"structure",members:{}}},AdminConfirmSignUp:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminDeleteUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}}},AdminDeleteUserAttributes:{input:{type:"structure",required:["UserPoolId","Username","UserAttributeNames"],members:{UserPoolId:{},Username:{shape:"Sd"},UserAttributeNames:{shape:"Sh"}}},output:{type:"structure",members:{}}},AdminDisableUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminEnableUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminForgetDevice:{input:{type:"structure",required:["UserPoolId","Username","DeviceKey"],members:{UserPoolId:{},Username:{shape:"Sd"},DeviceKey:{}}}},AdminGetDevice:{input:{type:"structure",required:["DeviceKey","UserPoolId","Username"],members:{DeviceKey:{},UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",required:["Device"],members:{Device:{shape:"Ss"}}}},AdminGetUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",required:["Username"],members:{Username:{shape:"Sd"},UserAttributes:{shape:"St"},UserCreateDate:{type:"timestamp"},UserLastModifiedDate:{type:"timestamp"},Enabled:{type:"boolean"},UserStatus:{},MFAOptions:{shape:"S10"}}}},AdminInitiateAuth:{input:{type:"structure",required:["UserPoolId","ClientId","AuthFlow"],members:{UserPoolId:{},ClientId:{shape:"S14"},AuthFlow:{},AuthParameters:{shape:"S16"},ClientMetadata:{shape:"S17"}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1b"},AuthenticationResult:{shape:"S1c"}}}},AdminListDevices:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"},Limit:{type:"integer"},PaginationToken:{}}},output:{type:"structure",members:{Devices:{shape:"S1k"},PaginationToken:{}}}},AdminResetUserPassword:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminRespondToAuthChallenge:{input:{type:"structure",required:["UserPoolId","ClientId","ChallengeName"],members:{UserPoolId:{},ClientId:{shape:"S14"},ChallengeName:{},ChallengeResponses:{shape:"S1o"},Session:{}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1b"},AuthenticationResult:{shape:"S1c"}}}},AdminSetUserSettings:{input:{type:"structure",required:["UserPoolId","Username","MFAOptions"],members:{UserPoolId:{},Username:{shape:"Sd"},MFAOptions:{shape:"S10"}}},output:{type:"structure",members:{}}},AdminUpdateDeviceStatus:{input:{type:"structure",required:["UserPoolId","Username","DeviceKey"],members:{UserPoolId:{},Username:{shape:"Sd"},DeviceKey:{},DeviceRememberedStatus:{}}},output:{type:"structure",members:{}}},AdminUpdateUserAttributes:{input:{type:"structure",required:["UserPoolId","Username","UserAttributes"],members:{UserPoolId:{},Username:{shape:"Sd"},UserAttributes:{shape:"St"}}},output:{type:"structure",members:{}}},AdminUserGlobalSignOut:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},ChangePassword:{input:{type:"structure",required:["PreviousPassword","ProposedPassword"],members:{PreviousPassword:{shape:"S20"},ProposedPassword:{shape:"S20"},AccessToken:{shape:"S1d"}}},output:{type:"structure",members:{}},authtype:"none"},ConfirmDevice:{input:{type:"structure",required:["AccessToken","DeviceKey"],members:{AccessToken:{shape:"S1d"},DeviceKey:{},DeviceSecretVerifierConfig:{type:"structure",members:{PasswordVerifier:{},Salt:{}}},DeviceName:{}}},output:{type:"structure",members:{UserConfirmationNecessary:{type:"boolean"}}}},ConfirmForgotPassword:{input:{type:"structure",required:["ClientId","Username","ConfirmationCode","Password"],members:{ClientId:{shape:"S14"},SecretHash:{shape:"S27"},Username:{shape:"Sd"},ConfirmationCode:{},Password:{shape:"S20"}}},output:{type:"structure",members:{}},authtype:"none"},ConfirmSignUp:{input:{type:"structure",required:["ClientId","Username","ConfirmationCode"],members:{ClientId:{shape:"S14"},SecretHash:{shape:"S27"},Username:{shape:"Sd"},ConfirmationCode:{},ForceAliasCreation:{type:"boolean"}}},output:{type:"structure",members:{}},authtype:"none"},CreateUserImportJob:{input:{type:"structure",required:["JobName","UserPoolId","CloudWatchLogsRoleArn"],members:{JobName:{},UserPoolId:{},CloudWatchLogsRoleArn:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S2h"}}}},CreateUserPool:{input:{type:"structure",required:["PoolName"],members:{PoolName:{},Policies:{shape:"S2p"},LambdaConfig:{shape:"S2s"},AutoVerifiedAttributes:{shape:"S2t"},AliasAttributes:{shape:"S2v"},SmsVerificationMessage:{},EmailVerificationMessage:{},EmailVerificationSubject:{},SmsAuthenticationMessage:{},MfaConfiguration:{},DeviceConfiguration:{shape:"S31"},EmailConfiguration:{shape:"S32"},SmsConfiguration:{shape:"S34"}}},output:{type:"structure",members:{UserPool:{shape:"S36"}}}},CreateUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientName"],members:{UserPoolId:{},ClientName:{},GenerateSecret:{type:"boolean"},RefreshTokenValidity:{type:"integer"},ReadAttributes:{shape:"S3d"},WriteAttributes:{shape:"S3d"},ExplicitAuthFlows:{shape:"S3f"}}},output:{type:"structure",members:{UserPoolClient:{shape:"S3i"}}}},DeleteUser:{input:{type:"structure",members:{AccessToken:{shape:"S1d"}}},authtype:"none"},DeleteUserAttributes:{input:{type:"structure",required:["UserAttributeNames"],members:{UserAttributeNames:{shape:"Sh"},AccessToken:{shape:"S1d"}}},output:{type:"structure",members:{}},authtype:"none"},DeleteUserPool:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}}},DeleteUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientId"],members:{UserPoolId:{},ClientId:{shape:"S14"}}}},DescribeUserImportJob:{input:{type:"structure",required:["UserPoolId","JobId"],members:{UserPoolId:{},JobId:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S2h"}}}},DescribeUserPool:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}},output:{type:"structure",members:{UserPool:{shape:"S36"}}}},DescribeUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientId"],members:{UserPoolId:{},ClientId:{shape:"S14"}}},output:{type:"structure",members:{UserPoolClient:{shape:"S3i"}}}},ForgetDevice:{input:{type:"structure",required:["DeviceKey"],members:{AccessToken:{shape:"S1d"},DeviceKey:{}}}},ForgotPassword:{input:{type:"structure",required:["ClientId","Username"],members:{ClientId:{shape:"S14"},SecretHash:{shape:"S27"},Username:{shape:"Sd"}}},output:{type:"structure",members:{CodeDeliveryDetails:{shape:"S3y"}}},authtype:"none"},GetCSVHeader:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}},output:{type:"structure",members:{UserPoolId:{},CSVHeader:{type:"list",member:{}}}}},GetDevice:{input:{type:"structure",required:["DeviceKey"],members:{DeviceKey:{},AccessToken:{shape:"S1d"}}},output:{type:"structure",required:["Device"],members:{Device:{shape:"Ss"}}}},GetUser:{input:{type:"structure",members:{AccessToken:{shape:"S1d"}}},output:{type:"structure",required:["Username","UserAttributes"],members:{Username:{shape:"Sd"},UserAttributes:{shape:"St"},MFAOptions:{shape:"S10"}}},authtype:"none"},GetUserAttributeVerificationCode:{input:{type:"structure",required:["AttributeName"],members:{AccessToken:{shape:"S1d"},AttributeName:{}}},output:{type:"structure",members:{CodeDeliveryDetails:{shape:"S3y"}}},authtype:"none"},GlobalSignOut:{input:{type:"structure",members:{AccessToken:{shape:"S1d"}}},output:{type:"structure",members:{}}},InitiateAuth:{input:{type:"structure",required:["AuthFlow","ClientId"],members:{AuthFlow:{},AuthParameters:{shape:"S16"},ClientMetadata:{shape:"S17"},ClientId:{shape:"S14"}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1b"},AuthenticationResult:{shape:"S1c"}}}},ListDevices:{input:{type:"structure",required:["AccessToken"],members:{AccessToken:{shape:"S1d"},Limit:{type:"integer"},PaginationToken:{}}},output:{type:"structure",members:{Devices:{shape:"S1k"},PaginationToken:{}}}},ListUserImportJobs:{input:{type:"structure",required:["UserPoolId","MaxResults"],members:{UserPoolId:{},MaxResults:{type:"integer"},PaginationToken:{}}},output:{type:"structure",members:{UserImportJobs:{type:"list",member:{shape:"S2h"}},PaginationToken:{}}}},ListUserPoolClients:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{UserPoolClients:{type:"list",member:{type:"structure",members:{ClientId:{shape:"S14"},UserPoolId:{},ClientName:{}}}},NextToken:{}}}},ListUserPools:{input:{type:"structure",required:["MaxResults"],members:{NextToken:{},MaxResults:{type:"integer"}}},output:{type:"structure",members:{UserPools:{type:"list",member:{type:"structure",members:{Id:{},Name:{},LambdaConfig:{shape:"S2s"},Status:{},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"}}}},NextToken:{}}}},ListUsers:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},AttributesToGet:{type:"list",member:{}},Limit:{type:"integer"},PaginationToken:{},Filter:{}}},output:{type:"structure",members:{Users:{type:"list",member:{type:"structure",members:{Username:{shape:"Sd"},Attributes:{shape:"St"},UserCreateDate:{type:"timestamp"},UserLastModifiedDate:{type:"timestamp"},Enabled:{type:"boolean"},UserStatus:{}}}},PaginationToken:{}}}},ResendConfirmationCode:{input:{type:"structure",required:["ClientId","Username"],members:{ClientId:{shape:"S14"},SecretHash:{shape:"S27"},Username:{shape:"Sd"}}},output:{type:"structure",members:{CodeDeliveryDetails:{shape:"S3y"}}},authtype:"none"},RespondToAuthChallenge:{input:{type:"structure",required:["ClientId","ChallengeName"],members:{ClientId:{shape:"S14"},ChallengeName:{},Session:{},ChallengeResponses:{shape:"S1o"}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1b"},AuthenticationResult:{shape:"S1c"}}}},SetUserSettings:{input:{type:"structure",required:["AccessToken","MFAOptions"],members:{AccessToken:{shape:"S1d"},MFAOptions:{shape:"S10"}}},output:{type:"structure",members:{}},authtype:"none"},SignUp:{input:{type:"structure",required:["ClientId","Username","Password"],members:{ClientId:{shape:"S14"},SecretHash:{shape:"S27"},Username:{shape:"Sd"},Password:{shape:"S20"},UserAttributes:{shape:"St"},ValidationData:{shape:"St"}}},output:{type:"structure",members:{UserConfirmed:{type:"boolean"},CodeDeliveryDetails:{shape:"S3y"},UserSub:{}}},authtype:"none"},StartUserImportJob:{input:{type:"structure",required:["UserPoolId","JobId"],members:{UserPoolId:{},JobId:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S2h"}}}},StopUserImportJob:{input:{type:"structure",required:["UserPoolId","JobId"],members:{UserPoolId:{},JobId:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S2h"}}}},UpdateDeviceStatus:{input:{type:"structure",required:["AccessToken","DeviceKey"],members:{AccessToken:{shape:"S1d"},DeviceKey:{},DeviceRememberedStatus:{}}},output:{type:"structure",members:{}}},UpdateUserAttributes:{input:{type:"structure",required:["UserAttributes"],members:{UserAttributes:{shape:"St"},AccessToken:{shape:"S1d"}}},output:{type:"structure",members:{CodeDeliveryDetailsList:{type:"list",member:{shape:"S3y"}}}},authtype:"none"},UpdateUserPool:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},Policies:{shape:"S2p"},LambdaConfig:{shape:"S2s"},AutoVerifiedAttributes:{shape:"S2t"},SmsVerificationMessage:{},EmailVerificationMessage:{},EmailVerificationSubject:{},SmsAuthenticationMessage:{},MfaConfiguration:{},DeviceConfiguration:{shape:"S31"},EmailConfiguration:{shape:"S32"},SmsConfiguration:{shape:"S34"}}},output:{type:"structure",members:{}}},UpdateUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientId"],members:{UserPoolId:{},ClientId:{shape:"S14"},ClientName:{},RefreshTokenValidity:{type:"integer"},ReadAttributes:{shape:"S3d"},WriteAttributes:{shape:"S3d"},ExplicitAuthFlows:{shape:"S3f"}}},output:{type:"structure",members:{UserPoolClient:{shape:"S3i"}}}},VerifyUserAttribute:{input:{type:"structure",required:["AttributeName","Code"],members:{AccessToken:{shape:"S1d"},AttributeName:{},Code:{}}},output:{type:"structure",members:{}},authtype:"none"}},shapes:{S4:{type:"structure",members:{Name:{},AttributeDataType:{},DeveloperOnlyAttribute:{type:"boolean"},Mutable:{type:"boolean"},Required:{type:"boolean"},NumberAttributeConstraints:{type:"structure",members:{MinValue:{},MaxValue:{}}},StringAttributeConstraints:{type:"structure",members:{MinLength:{},MaxLength:{}}}}},Sd:{type:"string",sensitive:!0},Sh:{type:"list",member:{}},Ss:{type:"structure",members:{DeviceKey:{},DeviceAttributes:{shape:"St"},DeviceCreateDate:{type:"timestamp"},DeviceLastModifiedDate:{type:"timestamp"},DeviceLastAuthenticatedDate:{type:"timestamp"}}},St:{type:"list",member:{type:"structure",required:["Name"],members:{Name:{},Value:{type:"string",sensitive:!0}}}},S10:{type:"list",member:{type:"structure",members:{DeliveryMedium:{},AttributeName:{}}}},S14:{type:"string",sensitive:!0},S16:{type:"map",key:{},value:{}},S17:{type:"map",key:{},value:{}},S1b:{type:"map",key:{},value:{}},S1c:{type:"structure",members:{AccessToken:{shape:"S1d"},ExpiresIn:{type:"integer"},TokenType:{},RefreshToken:{shape:"S1d"},IdToken:{shape:"S1d"},NewDeviceMetadata:{type:"structure",members:{DeviceKey:{},DeviceGroupKey:{}}}}},S1d:{type:"string",sensitive:!0},S1k:{type:"list",member:{shape:"Ss"}},S1o:{type:"map",key:{},value:{}},S20:{type:"string",sensitive:!0},S27:{type:"string",sensitive:!0},S2h:{type:"structure",members:{JobName:{},JobId:{},UserPoolId:{},PreSignedUrl:{},CreationDate:{type:"timestamp"},StartDate:{type:"timestamp"},CompletionDate:{type:"timestamp"},Status:{},CloudWatchLogsRoleArn:{},ImportedUsers:{type:"long"},SkippedUsers:{type:"long"},FailedUsers:{type:"long"},CompletionMessage:{}}},S2p:{type:"structure",members:{PasswordPolicy:{type:"structure",members:{MinimumLength:{type:"integer"},RequireUppercase:{type:"boolean"},RequireLowercase:{type:"boolean"},RequireNumbers:{type:"boolean"},RequireSymbols:{type:"boolean"}}}}},S2s:{type:"structure",members:{PreSignUp:{},CustomMessage:{},PostConfirmation:{},PreAuthentication:{},PostAuthentication:{},DefineAuthChallenge:{},CreateAuthChallenge:{},VerifyAuthChallengeResponse:{}}},S2t:{type:"list",member:{}},S2v:{type:"list",member:{}},S31:{type:"structure",members:{ChallengeRequiredOnNewDevice:{type:"boolean"},DeviceOnlyRememberedOnUserPrompt:{type:"boolean"}}},S32:{type:"structure",members:{SourceArn:{},ReplyToEmailAddress:{}}},S34:{type:"structure",members:{SnsCallerArn:{},ExternalId:{}}},S36:{type:"structure",members:{Id:{},Name:{},Policies:{shape:"S2p"},LambdaConfig:{shape:"S2s"},Status:{},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"},SchemaAttributes:{type:"list",member:{shape:"S4"}},AutoVerifiedAttributes:{shape:"S2t"},AliasAttributes:{shape:"S2v"},SmsVerificationMessage:{},EmailVerificationMessage:{},EmailVerificationSubject:{},SmsAuthenticationMessage:{},MfaConfiguration:{},DeviceConfiguration:{shape:"S31"},EstimatedNumberOfUsers:{type:"integer"},EmailConfiguration:{shape:"S32"},SmsConfiguration:{shape:"S34"},SmsConfigurationFailure:{},EmailConfigurationFailure:{}}},S3d:{type:"list",member:{}},S3f:{type:"list",member:{}},S3i:{type:"structure",members:{UserPoolId:{},ClientName:{},ClientId:{shape:"S14"},ClientSecret:{type:"string",sensitive:!0},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"},RefreshTokenValidity:{type:"integer"},ReadAttributes:{shape:"S3d"},WriteAttributes:{shape:"S3d"},ExplicitAuthFlows:{shape:"S3f"}}},S3y:{type:"structure",members:{Destination:{},DeliveryMedium:{},AttributeName:{}}}}}},{}],3:[function(a,b,c){b.exports={acm:{name:"ACM",cors:!0},apigateway:{name:"APIGateway",cors:!0},applicationautoscaling:{prefix:"application-autoscaling",name:"ApplicationAutoScaling",cors:!0},autoscaling:{name:"AutoScaling",cors:!0},cloudformation:{name:"CloudFormation",cors:!0},cloudfront:{name:"CloudFront",versions:["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*"],cors:!0},cloudhsm:{name:"CloudHSM",cors:!0},cloudsearch:{name:"CloudSearch"},cloudsearchdomain:{name:"CloudSearchDomain"},cloudtrail:{name:"CloudTrail",cors:!0},cloudwatch:{prefix:"monitoring",name:"CloudWatch",cors:!0},cloudwatchevents:{prefix:"events",name:"CloudWatchEvents",versions:["2014-02-03*"],cors:!0},cloudwatchlogs:{prefix:"logs",name:"CloudWatchLogs",cors:!0},codecommit:{name:"CodeCommit",cors:!0},codedeploy:{name:"CodeDeploy",cors:!0},codepipeline:{name:"CodePipeline",cors:!0},cognitoidentity:{prefix:"cognito-identity",name:"CognitoIdentity",cors:!0},cognitoidentityserviceprovider:{prefix:"cognito-idp",name:"CognitoIdentityServiceProvider",cors:!0},cognitosync:{prefix:"cognito-sync",name:"CognitoSync",cors:!0},configservice:{prefix:"config",name:"ConfigService",cors:!0},datapipeline:{name:"DataPipeline"},devicefarm:{name:"DeviceFarm",cors:!0},directconnect:{name:"DirectConnect",cors:!0},directoryservice:{prefix:"ds",name:"DirectoryService"},discovery:{name:"Discovery"},dms:{name:"DMS"},dynamodb:{name:"DynamoDB",cors:!0},dynamodbstreams:{prefix:"streams.dynamodb",name:"DynamoDBStreams",cors:!0},ec2:{name:"EC2",versions:["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*"],cors:!0},ecr:{name:"ECR",cors:!0},ecs:{name:"ECS",cors:!0},efs:{prefix:"elasticfilesystem",name:"EFS"},elasticache:{name:"ElastiCache",versions:["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],cors:!0},elasticbeanstalk:{name:"ElasticBeanstalk",cors:!0},elb:{prefix:"elasticloadbalancing",name:"ELB",cors:!0},elbv2:{prefix:"elasticloadbalancingv2",name:"ELBv2",cors:!0},emr:{prefix:"elasticmapreduce",name:"EMR",cors:!0},es:{name:"ES"},elastictranscoder:{name:"ElasticTranscoder",cors:!0},firehose:{name:"Firehose",cors:!0},gamelift:{name:"GameLift",cors:!0},glacier:{name:"Glacier"},iam:{name:"IAM"},importexport:{name:"ImportExport"},inspector:{name:"Inspector",versions:["2015-08-18*"],cors:!0},iot:{name:"Iot",cors:!0},iotdata:{prefix:"iot-data",name:"IotData",cors:!0},kinesis:{name:"Kinesis",cors:!0},kinesisanalytics:{name:"KinesisAnalytics"},kms:{name:"KMS",cors:!0},lambda:{name:"Lambda",cors:!0},machinelearning:{name:"MachineLearning",cors:!0},marketplacecommerceanalytics:{name:"MarketplaceCommerceAnalytics",cors:!0},marketplacemetering:{prefix:"meteringmarketplace",name:"MarketplaceMetering"},mobileanalytics:{name:"MobileAnalytics",cors:!0},opsworks:{name:"OpsWorks",cors:!0},rds:{name:"RDS",versions:["2014-09-01*"],cors:!0},redshift:{name:"Redshift",cors:!0},route53:{name:"Route53",cors:!0},route53domains:{name:"Route53Domains",cors:!0},s3:{name:"S3",dualstackAvailable:!0,cors:!0},servicecatalog:{name:"ServiceCatalog",cors:!0},ses:{prefix:"email",name:"SES",cors:!0},simpledb:{prefix:"sdb",name:"SimpleDB"},snowball:{name:"Snowball"},sns:{name:"SNS",cors:!0},sqs:{name:"SQS",cors:!0},ssm:{name:"SSM",cors:!0},storagegateway:{name:"StorageGateway",cors:!0},sts:{name:"STS",cors:!0},support:{name:"Support"},swf:{name:"SWF"},waf:{name:"WAF",cors:!0},workspaces:{name:"WorkSpaces"}}},{}],4:[function(a,b,c){b.exports={version:"2.0",metadata:{apiVersion:"2011-06-15",endpointPrefix:"sts",globalEndpoint:"sts.amazonaws.com",protocol:"query",serviceAbbreviation:"AWS STS",serviceFullName:"AWS Security Token Service",signatureVersion:"v4",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/"},operations:{AssumeRole:{input:{type:"structure",required:["RoleArn","RoleSessionName"],members:{RoleArn:{},RoleSessionName:{},Policy:{},DurationSeconds:{type:"integer"},ExternalId:{},SerialNumber:{},TokenCode:{}}},output:{resultWrapper:"AssumeRoleResult",type:"structure",members:{Credentials:{shape:"Sa"},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"}}}},AssumeRoleWithSAML:{input:{type:"structure",required:["RoleArn","PrincipalArn","SAMLAssertion"],members:{RoleArn:{},PrincipalArn:{},SAMLAssertion:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithSAMLResult",type:"structure",members:{Credentials:{shape:"Sa"},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"},Subject:{},SubjectType:{},Issuer:{},Audience:{},NameQualifier:{}}}},AssumeRoleWithWebIdentity:{input:{type:"structure",required:["RoleArn","RoleSessionName","WebIdentityToken"],members:{RoleArn:{},RoleSessionName:{},WebIdentityToken:{},ProviderId:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithWebIdentityResult",type:"structure",members:{Credentials:{shape:"Sa"},SubjectFromWebIdentityToken:{},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"},Provider:{},Audience:{}}}},DecodeAuthorizationMessage:{input:{type:"structure",required:["EncodedMessage"],members:{EncodedMessage:{}}},output:{resultWrapper:"DecodeAuthorizationMessageResult",type:"structure",members:{DecodedMessage:{}}}},GetCallerIdentity:{input:{type:"structure",members:{}},output:{resultWrapper:"GetCallerIdentityResult",type:"structure",members:{UserId:{},Account:{},Arn:{}}}},GetFederationToken:{input:{type:"structure",required:["Name"],members:{Name:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"GetFederationTokenResult",type:"structure",members:{Credentials:{shape:"Sa"},FederatedUser:{type:"structure",required:["FederatedUserId","Arn"],members:{FederatedUserId:{},Arn:{}}},PackedPolicySize:{type:"integer"}}}},GetSessionToken:{input:{type:"structure",members:{DurationSeconds:{type:"integer"},SerialNumber:{},TokenCode:{}}},output:{resultWrapper:"GetSessionTokenResult",type:"structure",members:{Credentials:{shape:"Sa"}}}}},shapes:{Sa:{type:"structure",required:["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],members:{AccessKeyId:{},SecretAccessKey:{},SessionToken:{},Expiration:{type:"timestamp"}}},Sf:{type:"structure",required:["AssumedRoleId","Arn"],members:{AssumedRoleId:{},Arn:{}}}}}},{}],5:[function(a,b,c){a("../lib/node_loader");var d=a("../lib/core"),e=a("../lib/service"),f=a("../lib/api_loader");f.services.cognitoidentity={},d.CognitoIdentity=e.defineService("cognitoidentity",["2014-06-30"]),a("../lib/services/cognitoidentity"),Object.defineProperty(f.services.cognitoidentity,"2014-06-30",{get:function(){var b=a("../apis/cognito-identity-2014-06-30.min.json");return b},enumerable:!0,configurable:!0}),b.exports=d.CognitoIdentity},{"../apis/cognito-identity-2014-06-30.min.json":1,"../lib/api_loader":7,"../lib/core":11,"../lib/node_loader":9,"../lib/service":42,"../lib/services/cognitoidentity":43}],6:[function(a,b,c){a("../lib/node_loader");var d=a("../lib/core"),e=a("../lib/service"),f=a("../lib/api_loader");f.services.sts={},d.STS=e.defineService("sts",["2011-06-15"]),a("../lib/services/sts"),Object.defineProperty(f.services.sts,"2011-06-15",{get:function(){var b=a("../apis/sts-2011-06-15.min.json");return b},enumerable:!0,configurable:!0}),b.exports=d.STS},{"../apis/sts-2011-06-15.min.json":4,"../lib/api_loader":7,"../lib/core":11,"../lib/node_loader":9,"../lib/service":42,"../lib/services/sts":44}],7:[function(a,b,c){var d=a("./core");d.apiLoader=function(a,b){if(!d.apiLoader.services.hasOwnProperty(a))throw new Error("InvalidService: Failed to load api for "+a);return d.apiLoader.services[a][b]},d.apiLoader.services={},b.exports=d.apiLoader},{"./core":11}],8:[function(a,b,c){a("./browser_loader");var d=a("./core");"undefined"!=typeof window&&(window.AWSCognito=d),"undefined"!=typeof b&&(b.exports=d),"undefined"!=typeof self&&(self.AWSCognito=d),Object.prototype.hasOwnProperty.call(d,"CognitoIdentityServiceProvider")||(d.apiLoader.services.cognitoidentityserviceprovider={},d.CognitoIdentityServiceProvider=d.Service.defineService("cognitoidentityserviceprovider",["2016-04-18"])),d.apiLoader.services.cognitoidentityserviceprovider["2016-04-18"]=a("../apis/cognito-idp-2016-04-18.min"),Object.prototype.hasOwnProperty.call(d,"STS")||(d.apiLoader.services.sts={},d.STS=d.Service.defineService("sts",["2011-06-15"]),a("./services/sts")),d.apiLoader.services.sts["2011-06-15"]=a("../apis/sts-2011-06-15.min")},{"../apis/cognito-idp-2016-04-18.min":2,"../apis/sts-2011-06-15.min":4,"./browser_loader":9,"./core":11,"./services/sts":44}],9:[function(a,b,c){(function(b){var c=a("./util");c.crypto.lib=a("crypto-browserify"),c.Buffer=a("buffer/").Buffer,c.url=a("url/"),c.querystring=a("querystring/");var d=a("./core");a("./api_loader"),d.XML.Parser=a("./xml/browser_parser"),a("./http/xhr"),"undefined"==typeof b&&(b={browser:!0})}).call(this,a("FWaASH"))},{"./api_loader":7,"./core":11,"./http/xhr":20,"./util":53,"./xml/browser_parser":54,FWaASH:62,"buffer/":69,"crypto-browserify":74,"querystring/":82,"url/":83}],10:[function(a,b,c){var d=a("./core");a("./credentials"),a("./credentials/credential_provider_chain"),d.Config=d.util.inherit({constructor:function(a){void 0===a&&(a={}),a=this.extractCredentials(a),d.util.each.call(this,this.keys,function(b,c){this.set(b,a[b],c)})},getCredentials:function(a){function b(b){a(b,b?null:g.credentials)}function c(a,b){return new d.util.error(b||new Error,{code:"CredentialsError",message:a})}function e(){g.credentials.get(function(a){if(a){var d="Could not load credentials from "+g.credentials.constructor.name;a=c(d,a)}b(a)})}function f(){var a=null;g.credentials.accessKeyId&&g.credentials.secretAccessKey||(a=c("Missing credentials")),b(a)}var g=this;g.credentials?"function"==typeof g.credentials.get?e():f():g.credentialProvider?g.credentialProvider.resolve(function(a,d){a&&(a=c("Could not load credentials from any providers",a)),
g.credentials=d,b(a)}):b(c("No credentials to load"))},update:function(a,b){b=b||!1,a=this.extractCredentials(a),d.util.each.call(this,a,function(a,c){(b||Object.prototype.hasOwnProperty.call(this.keys,a)||d.Service.hasService(a))&&this.set(a,c)})},loadFromPath:function(a){this.clear();var b=JSON.parse(d.util.readFileSync(a)),c=new d.FileSystemCredentials(a),e=new d.CredentialProviderChain;return e.providers.unshift(c),e.resolve(function(a,c){if(a)throw a;b.credentials=c}),this.constructor(b),this},clear:function(){d.util.each.call(this,this.keys,function(a){delete this[a]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(a,b,c){void 0===b?(void 0===c&&(c=this.keys[a]),"function"==typeof c?this[a]=c.call(this):this[a]=c):"httpOptions"===a&&this[a]?this[a]=d.util.merge(this[a],b):this[a]=b},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{base:100},useAccelerateEndpoint:!1},extractCredentials:function(a){return a.accessKeyId&&a.secretAccessKey&&(a=d.util.copy(a),a.credentials=new d.Credentials(a)),a},setPromisesDependency:function(a){d.util.addPromisesToRequests(d.Request,a)}}),d.config=new d.Config},{"./core":11,"./credentials":12,"./credentials/credential_provider_chain":14}],11:[function(a,b,c){var d={util:a("./util")},e={};e.toString(),b.exports=d,d.util.update(d,{VERSION:"2.6.4",Signers:{},Protocol:{Json:a("./protocol/json"),Query:a("./protocol/query"),Rest:a("./protocol/rest"),RestJson:a("./protocol/rest_json"),RestXml:a("./protocol/rest_xml")},XML:{Builder:a("./xml/builder"),Parser:null},JSON:{Builder:a("./json/builder"),Parser:a("./json/parser")},Model:{Api:a("./model/api"),Operation:a("./model/operation"),Shape:a("./model/shape"),Paginator:a("./model/paginator"),ResourceWaiter:a("./model/resource_waiter")},util:a("./util"),apiLoader:function(){throw new Error("No API loader set")}}),a("./service"),a("./credentials"),a("./credentials/credential_provider_chain"),a("./credentials/temporary_credentials"),a("./credentials/web_identity_credentials"),a("./credentials/cognito_identity_credentials"),a("./credentials/saml_credentials"),a("./config"),a("./http"),a("./sequential_executor"),a("./event_listeners"),a("./request"),a("./response"),a("./resource_waiter"),a("./signers/request_signer"),a("./param_validator"),d.events=new d.SequentialExecutor},{"./config":10,"./credentials":12,"./credentials/cognito_identity_credentials":13,"./credentials/credential_provider_chain":14,"./credentials/saml_credentials":15,"./credentials/temporary_credentials":16,"./credentials/web_identity_credentials":17,"./event_listeners":18,"./http":19,"./json/builder":21,"./json/parser":22,"./model/api":23,"./model/operation":25,"./model/paginator":26,"./model/resource_waiter":27,"./model/shape":28,"./param_validator":29,"./protocol/json":30,"./protocol/query":31,"./protocol/rest":32,"./protocol/rest_json":33,"./protocol/rest_xml":34,"./request":38,"./resource_waiter":39,"./response":40,"./sequential_executor":41,"./service":42,"./signers/request_signer":46,"./util":53,"./xml/builder":55}],12:[function(a,b,c){var d=a("./core");d.Credentials=d.util.inherit({constructor:function(){if(d.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,1===arguments.length&&"object"==typeof arguments[0]){var a=arguments[0].credentials||arguments[0];this.accessKeyId=a.accessKeyId,this.secretAccessKey=a.secretAccessKey,this.sessionToken=a.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var a=d.util.date.getDate().getTime(),b=new Date(a+1e3*this.expiryWindow);return this.expireTime&&b>this.expireTime?!0:this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(a){var b=this;this.needsRefresh()?this.refresh(function(c){c||(b.expired=!1),a&&a(c)}):a&&a()},refresh:function(a){this.expired=!1,a()}})},{"./core":11}],13:[function(a,b,c){var d=a("../core"),e=a("../../clients/cognitoidentity"),f=a("../../clients/sts");d.CognitoIdentityCredentials=d.util.inherit(d.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(a){d.Credentials.call(this),this.expired=!0,this.params=a,this.data=null,this.identityId=null,this.loadCachedId()},refresh:function(a){var b=this;b.createClients(),b.data=null,b.identityId=null,b.getId(function(c){c?(b.clearIdOnNotAuthorized(c),a(c)):b.params.RoleArn?b.getCredentialsFromSTS(a):b.getCredentialsForIdentity(a)})},clearCachedId:function(){this.identityId=null,delete this.params.IdentityId;var a=this.params.IdentityPoolId,b=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+a+b],delete this.storage[this.localStorageKey.providers+a+b]},clearIdOnNotAuthorized:function(a){var b=this;"NotAuthorizedException"==a.code&&b.clearCachedId()},getId:function(a){var b=this;return"string"==typeof b.params.IdentityId?a(null,b.params.IdentityId):void b.cognito.getId(function(c,d){!c&&d.IdentityId?(b.params.IdentityId=d.IdentityId,a(null,d.IdentityId)):a(c)})},loadCredentials:function(a,b){a&&b&&(b.expired=!1,b.accessKeyId=a.Credentials.AccessKeyId,b.secretAccessKey=a.Credentials.SecretKey,b.sessionToken=a.Credentials.SessionToken,b.expireTime=a.Credentials.Expiration)},getCredentialsForIdentity:function(a){var b=this;b.cognito.getCredentialsForIdentity(function(c,d){c?b.clearIdOnNotAuthorized(c):(b.cacheId(d),b.data=d,b.loadCredentials(b.data,b)),a(c)})},getCredentialsFromSTS:function(a){var b=this;b.cognito.getOpenIdToken(function(c,d){c?(b.clearIdOnNotAuthorized(c),a(c)):(b.cacheId(d),b.params.WebIdentityToken=d.Token,b.webIdentityCredentials.refresh(function(c){c||(b.data=b.webIdentityCredentials.data,b.sts.credentialsFrom(b.data,b)),a(c)}))})},loadCachedId:function(){var a=this;if(d.util.isBrowser()&&!a.params.IdentityId){var b=a.getStorage("id");if(b&&a.params.Logins){var c=Object.keys(a.params.Logins),e=(a.getStorage("providers")||"").split(","),f=e.filter(function(a){return-1!==c.indexOf(a)});0!==f.length&&(a.params.IdentityId=b)}else b&&(a.params.IdentityId=b)}},createClients:function(){this.webIdentityCredentials=this.webIdentityCredentials||new d.WebIdentityCredentials(this.params),this.cognito=this.cognito||new e({params:this.params}),this.sts=this.sts||new f},cacheId:function(a){this.identityId=a.IdentityId,this.params.IdentityId=this.identityId,d.util.isBrowser()&&(this.setStorage("id",a.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(a){return this.storage[this.localStorageKey[a]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(a,b){try{this.storage[this.localStorageKey[a]+this.params.IdentityPoolId+(this.params.LoginId||"")]=b}catch(c){}},storage:function(){try{return window.localStorage.setItem("aws.test-storage","foobar"),window.localStorage.removeItem("aws.test-storage"),d.util.isBrowser()?window.localStorage:{}}catch(a){return{}}}()})},{"../../clients/cognitoidentity":5,"../../clients/sts":6,"../core":11}],14:[function(a,b,c){var d=a("../core");d.CredentialProviderChain=d.util.inherit(d.Credentials,{constructor:function(a){a?this.providers=a:this.providers=d.CredentialProviderChain.defaultProviders.slice(0)},resolve:function(a){function b(e,f){if(!e&&f||c===d.length)return void a(e,f);var g=d[c++];f="function"==typeof g?g.call():g,f.get?f.get(function(a){b(a,a?null:f)}):b(null,f)}if(0===this.providers.length)return a(new Error("No providers")),this;var c=0,d=this.providers.slice(0);return b(),this}}),d.CredentialProviderChain.defaultProviders=[]},{"../core":11}],15:[function(a,b,c){var d=a("../core"),e=a("../../clients/sts");d.SAMLCredentials=d.util.inherit(d.Credentials,{constructor:function(a){d.Credentials.call(this),this.expired=!0,this.params=a},refresh:function(a){var b=this;b.createClients(),a||(a=function(a){if(a)throw a}),b.service.assumeRoleWithSAML(function(c,d){c||b.service.credentialsFrom(d,b),a(c)})},createClients:function(){this.service=this.service||new e({params:this.params})}})},{"../../clients/sts":6,"../core":11}],16:[function(a,b,c){var d=a("../core"),e=a("../../clients/sts");d.TemporaryCredentials=d.util.inherit(d.Credentials,{constructor:function(a){d.Credentials.call(this),this.loadMasterCredentials(),this.expired=!0,this.params=a||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(a){var b=this;b.createClients(),a||(a=function(a){if(a)throw a}),b.service.config.credentials=b.masterCredentials;var c=b.params.RoleArn?b.service.assumeRole:b.service.getSessionToken;c.call(b.service,function(c,d){c||b.service.credentialsFrom(d,b),a(c)})},loadMasterCredentials:function(){for(this.masterCredentials=d.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials},createClients:function(){this.service=this.service||new e({params:this.params})}})},{"../../clients/sts":6,"../core":11}],17:[function(a,b,c){var d=a("../core"),e=a("../../clients/sts");d.WebIdentityCredentials=d.util.inherit(d.Credentials,{constructor:function(a){d.Credentials.call(this),this.expired=!0,this.params=a,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null},refresh:function(a){var b=this;b.createClients(),a||(a=function(a){if(a)throw a}),b.service.assumeRoleWithWebIdentity(function(c,d){b.data=null,c||(b.data=d,b.service.credentialsFrom(d,b)),a(c)})},createClients:function(){this.service=this.service||new e({params:this.params})}})},{"../../clients/sts":6,"../core":11}],18:[function(a,b,c){var d=a("./core"),e=a("./sequential_executor");d.EventListeners={Core:{}},d.EventListeners={Core:(new e).addNamedListeners(function(a,b){b("VALIDATE_CREDENTIALS","validate",function(a,b){return a.service.api.signatureVersion?void a.service.config.getCredentials(function(c){c&&(a.response.error=d.util.error(c,{code:"CredentialsError",message:"Missing credentials in config"})),b()}):b()}),a("VALIDATE_REGION","validate",function(a){a.service.config.region||a.service.isGlobalEndpoint||(a.response.error=d.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))}),a("VALIDATE_PARAMETERS","validate",function(a){var b=a.service.api.operations[a.operation].input,c=a.service.config.paramValidation;new d.ParamValidator(c).validate(b,a.params)}),b("COMPUTE_SHA256","afterBuild",function(a,b){if(a.haltHandlersOnError(),!a.service.api.signatureVersion)return b();if(a.service.getSignerClass(a)===d.Signers.V4){var c=a.httpRequest.body||"";d.util.computeSha256(c,function(c,d){c?b(c):(a.httpRequest.headers["X-Amz-Content-Sha256"]=d,b())})}else b()}),a("SET_CONTENT_LENGTH","afterBuild",function(a){if(void 0===a.httpRequest.headers["Content-Length"]){var b=d.util.string.byteLength(a.httpRequest.body);a.httpRequest.headers["Content-Length"]=b}}),a("SET_HTTP_HOST","afterBuild",function(a){a.httpRequest.headers.Host=a.httpRequest.endpoint.host}),a("RESTART","restart",function(){var a=this.response.error;a&&a.retryable&&(this.httpRequest=new d.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)}),b("SIGN","sign",function(a,b){var c=a.service;return c.api.signatureVersion?void c.config.getCredentials(function(e,f){if(e)return a.response.error=e,b();try{var g=d.util.date.getDate(),h=c.getSignerClass(a),i=new h(a.httpRequest,c.api.signingName||c.api.endpointPrefix,c.config.signatureCache);i.setServiceClientId(c._clientId),delete a.httpRequest.headers.Authorization,delete a.httpRequest.headers.Date,delete a.httpRequest.headers["X-Amz-Date"],i.addAuthorization(f,g),a.signedAt=g}catch(j){a.response.error=j}b()}):b()}),a("VALIDATE_RESPONSE","validateResponse",function(a){this.service.successfulResponse(a,this)?(a.data={},a.error=null):(a.data=null,a.error=d.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),b("SEND","send",function(a,b){function c(c){a.httpResponse.stream=c,c.on("headers",function(b,e){a.request.emit("httpHeaders",[b,e,a]),a.httpResponse.streaming||(2===d.HttpClient.streamsApiVersion?c.on("readable",function(){var b=c.read();null!==b&&a.request.emit("httpData",[b,a])}):c.on("data",function(b){a.request.emit("httpData",[b,a])}))}),c.on("end",function(){a.request.emit("httpDone"),b()})}function e(b){b.on("sendProgress",function(b){a.request.emit("httpUploadProgress",[b,a])}),b.on("receiveProgress",function(b){a.request.emit("httpDownloadProgress",[b,a])})}function f(c){a.error=d.util.error(c,{code:"NetworkingError",region:a.request.httpRequest.region,hostname:a.request.httpRequest.endpoint.hostname,retryable:!0}),a.request.emit("httpError",[a.error,a],function(){b()})}function g(){var b=d.HttpClient.getInstance(),g=a.request.service.config.httpOptions||{};try{var h=b.handleRequest(a.request.httpRequest,g,c,f);e(h)}catch(i){f(i)}}a.httpResponse._abortCallback=b,a.error=null,a.data=null;var h=(d.util.date.getDate()-this.signedAt)/1e3;h>=600?this.emit("sign",[this],function(a){a?b(a):g()}):g()}),a("HTTP_HEADERS","httpHeaders",function(a,b,c){c.httpResponse.statusCode=a,c.httpResponse.headers=b,c.httpResponse.body=new d.util.Buffer(""),c.httpResponse.buffers=[],c.httpResponse.numBytes=0;var e=b.date||b.Date;if(e){var f=Date.parse(e);c.request.service.config.correctClockSkew&&d.util.isClockSkewed(f)&&d.util.applyClockOffset(f)}}),a("HTTP_DATA","httpData",function(a,b){if(a){if(d.util.isNode()){b.httpResponse.numBytes+=a.length;var c=b.httpResponse.headers["content-length"],e={loaded:b.httpResponse.numBytes,total:c};b.request.emit("httpDownloadProgress",[e,b])}b.httpResponse.buffers.push(new d.util.Buffer(a))}}),a("HTTP_DONE","httpDone",function(a){if(a.httpResponse.buffers&&a.httpResponse.buffers.length>0){var b=d.util.buffer.concat(a.httpResponse.buffers);a.httpResponse.body=b}delete a.httpResponse.numBytes,delete a.httpResponse.buffers}),a("FINALIZE_ERROR","retry",function(a){a.httpResponse.statusCode&&(a.error.statusCode=a.httpResponse.statusCode,void 0===a.error.retryable&&(a.error.retryable=this.service.retryableError(a.error,this)))}),a("INVALIDATE_CREDENTIALS","retry",function(a){if(a.error)switch(a.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":a.error.retryable=!0,a.request.service.config.credentials.expired=!0}}),a("EXPIRED_SIGNATURE","retry",function(a){var b=a.error;b&&"string"==typeof b.code&&"string"==typeof b.message&&b.code.match(/Signature/)&&b.message.match(/expired/)&&(a.error.retryable=!0)}),a("CLOCK_SKEWED","retry",function(a){a.error&&this.service.clockSkewError(a.error)&&this.service.config.correctClockSkew&&d.config.isClockSkewed&&(a.error.retryable=!0)}),a("REDIRECT","retry",function(a){a.error&&a.error.statusCode>=300&&a.error.statusCode<400&&a.httpResponse.headers.location&&(this.httpRequest.endpoint=new d.Endpoint(a.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,a.error.redirect=!0,a.error.retryable=!0)}),a("RETRY_CHECK","retry",function(a){a.error&&(a.error.redirect&&a.redirectCount<a.maxRedirects?a.error.retryDelay=0:a.retryCount<a.maxRetries&&(a.error.retryDelay=this.service.retryDelays(a.retryCount)||0))}),b("RESET_RETRY_STATE","afterRetry",function(a,b){var c,d=!1;a.error&&(c=a.error.retryDelay||0,a.error.retryable&&a.retryCount<a.maxRetries?(a.retryCount++,d=!0):a.error.redirect&&a.redirectCount<a.maxRedirects&&(a.redirectCount++,d=!0)),d?(a.error=null,setTimeout(b,c)):b()})}),CorePost:(new e).addNamedListeners(function(a){a("EXTRACT_REQUEST_ID","extractData",d.util.extractRequestId),a("EXTRACT_REQUEST_ID","extractError",d.util.extractRequestId),a("ENOTFOUND_ERROR","httpError",function(a){if("NetworkingError"===a.code&&"ENOTFOUND"===a.errno){var b="Inaccessible host: `"+a.hostname+"'. This service may not be available in the `"+a.region+"' region.";this.response.error=d.util.error(new Error(b),{code:"UnknownEndpoint",region:a.region,hostname:a.hostname,retryable:!0,originalError:a})}})}),Logger:(new e).addNamedListeners(function(b){b("LOG_REQUEST","complete",function(b){function c(){var c=d.util.date.getDate().getTime(),g=(c-e.startTime.getTime())/1e3,h=!!f.isTTY,i=b.httpResponse.statusCode,j=a("util").inspect(e.params,!0,null),k="";return h&&(k+="[33m"),k+="[AWS "+e.service.serviceIdentifier+" "+i,k+=" "+g.toString()+"s "+b.retryCount+" retries]",h&&(k+="[0;1m"),k+=" "+d.util.string.lowerFirst(e.operation),k+="("+j+")",h&&(k+="[0m"),k}var e=b.request,f=e.service.config.logger;if(f){var g=c();"function"==typeof f.log?f.log(g):"function"==typeof f.write&&f.write(g+"\n")}})}),Json:(new e).addNamedListeners(function(b){var c=a("./protocol/json");b("BUILD","build",c.buildRequest),b("EXTRACT_DATA","extractData",c.extractData),b("EXTRACT_ERROR","extractError",c.extractError)}),Rest:(new e).addNamedListeners(function(b){var c=a("./protocol/r