import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Sts extends PolicyStatement { public servicePrefix = 'sts' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to obtain a set of temporary security credentials that you can use to access AWS resources that you might not normally have access to
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsPrincipalTag()
     * - .ifAwsRequestTag()
     * - .ifTransitiveTagKeys()
     * - .ifExternalId()
     * - .ifRoleSessionName()
     * - .ifIamResourceTag()
     * - .ifSourceIdentity()
     * - .ifAwsSourceIdentity()
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html
     */ public toAssumeRole ( ) { return this . to ( 'AssumeRole' ) ; } /**
     * Grants permission to obtain a set of temporary security credentials for users who have been authenticated via a SAML authentication response
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifSamlNamequalifier()
     * - .ifSamlSub()
     * - .ifSamlSubType()
     * - .ifSamlAud()
     * - .ifSamlIss()
     * - .ifSamlDoc()
     * - .ifSamlCn()
     * - .ifSamlCommonName()
     * - .ifSamlEduorghomepageuri()
     * - .ifSamlEduorgidentityauthnpolicyuri()
     * - .ifSamlEduorglegalname()
     * - .ifSamlEduorgsuperioruri()
     * - .ifSamlEduorgwhitepagesuri()
     * - .ifSamlEdupersonaffiliation()
     * - .ifSamlEdupersonassurance()
     * - .ifSamlEdupersonentitlement()
     * - .ifSamlEdupersonnickname()
     * - .ifSamlEdupersonorgdn()
     * - .ifSamlEdupersonorgunitdn()
     * - .ifSamlEdupersonprimaryaffiliation()
     * - .ifSamlEdupersonprimaryorgunitdn()
     * - .ifSamlEdupersonprincipalname()
     * - .ifSamlEdupersonscopedaffiliation()
     * - .ifSamlEdupersontargetedid()
     * - .ifSamlGivenName()
     * - .ifSamlMail()
     * - .ifSamlName()
     * - .ifSamlOrganizationStatus()
     * - .ifSamlPrimaryGroupSID()
     * - .ifSamlSurname()
     * - .ifSamlUid()
     * - .ifSamlX500UniqueIdentifier()
     * - .ifAwsTagKeys()
     * - .ifAwsPrincipalTag()
     * - .ifAwsRequestTag()
     * - .ifTransitiveTagKeys()
     * - .ifSourceIdentity()
     * - .ifRoleSessionName()
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithSAML.html
     */ public toAssumeRoleWithSAML ( ) { return this . to ( 'AssumeRoleWithSAML' ) ; } /**
     * Grants permission to obtain a set of temporary security credentials for users who have been authenticated in a mobile or web application with a web identity provider
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifCognitoAmr()
     * - .ifCognitoAud()
     * - .ifCognitoSub()
     * - .ifAmazonAppId()
     * - .ifAmazonUserId()
     * - .ifFacebookAppId()
     * - .ifFacebookId()
     * - .ifGoogleAud()
     * - .ifGoogleOaud()
     * - .ifGoogleSub()
     * - .ifAwsTagKeys()
     * - .ifAwsPrincipalTag()
     * - .ifAwsRequestTag()
     * - .ifTransitiveTagKeys()
     * - .ifSourceIdentity()
     * - .ifRoleSessionName()
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html
     */ public toAssumeRoleWithWebIdentity ( ) { return this . to ( 'AssumeRoleWithWebIdentity' ) ; } /**
     * Grants permission to decode additional information about the authorization status of a request from an encoded message returned in response to an AWS request
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_DecodeAuthorizationMessage.html
     */ public toDecodeAuthorizationMessage ( ) { return this . to ( 'DecodeAuthorizationMessage' ) ; } /**
     * Grants permission to obtain details about the access key id passed as a parameter to the request
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_GetAccessKeyInfo.html
     */ public toGetAccessKeyInfo ( ) { return this . to ( 'GetAccessKeyInfo' ) ; } /**
     * Grants permission to obtain details about the IAM identity whose credentials are used to call the API
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html
     */ public toGetCallerIdentity ( ) { return this . to ( 'GetCallerIdentity' ) ; } /**
     * Grants permission to obtain a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) for a federated user
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsPrincipalTag()
     * - .ifAwsRequestTag()
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_GetFederationToken.html
     */ public toGetFederationToken ( ) { return this . to ( 'GetFederationToken' ) ; } /**
     * Grants permission to obtain a STS bearer token for an AWS root user, IAM role, or an IAM user
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAWSServiceName()
     *
     * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_bearer.html
     */ public toGetServiceBearerToken ( ) { return this . to ( 'GetServiceBearerToken' ) ; } /**
     * Grants permission to obtain a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) for an AWS account or IAM user
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html
     */ public toGetSessionToken ( ) { return this . to ( 'GetSessionToken' ) ; } /**
     * Grants permission to set a source identity on a STS session
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifSourceIdentity()
     * - .ifAwsSourceIdentity()
     *
     * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html#id_credentials_temp_control-access_monitor-perms
     */ public toSetSourceIdentity ( ) { return this . to ( 'SetSourceIdentity' ) ; } /**
     * Grants permission to add tags to a STS session
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsPrincipalTag()
     * - .ifAwsRequestTag()
     * - .ifTransitiveTagKeys()
     *
     * https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
     */ public toTagSession ( ) { return this . to ( 'TagSession' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'AssumeRole' , 'AssumeRoleWithSAML' , 'AssumeRoleWithWebIdentity' , 'DecodeAuthorizationMessage' , 'SetSourceIdentity' ] , Read : [ 'GetAccessKeyInfo' , 'GetCallerIdentity' , 'GetFederationToken' , 'GetServiceBearerToken' , 'GetSessionToken' ] , Tagging : [ 'TagSession' ] } ; param roleNameWithPath param account param partition public onRole ( roleNameWithPath , account ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:iam::${ account || '*' }:role/${ roleNameWithPath }` ) ; } param userNameWithPath param account param partition public onUser ( userNameWithPath , account ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:iam::${ account || '*' }:user/${ userNameWithPath }` ) ; } param value param operator public ifGoogleAud ( value , operator ? ) { return this . if ( `accounts.google.com:aud` , value , operator || 'StringLike' ) ; } param value param operator public ifGoogleOaud ( value , operator ? ) { return this . if ( `accounts.google.com:oaud` , value , operator || 'StringLike' ) ; } param value param operator public ifGoogleSub ( value , operator ? ) { return this . if ( `accounts.google.com:sub` , value , operator || 'StringLike' ) ; } param value param operator public ifAwsFederatedProvider ( value , operator ? ) { return this . if ( `aws:FederatedProvider` , value , operator || 'StringLike' ) ; } param value param operator public ifCognitoAmr ( value , operator ? ) { return this . if ( `cognito-identity.amazonaws.com:amr` , value , operator || 'StringLike' ) ; } param value param operator public ifCognitoAud ( value , operator ? ) { return this . if ( `cognito-identity.amazonaws.com:aud` , value , operator || 'StringLike' ) ; } param value param operator public ifCognitoSub ( value , operator ? ) { return this . if ( `cognito-identity.amazonaws.com:sub` , value , operator || 'StringLike' ) ; } param value param operator public ifFacebookAppId ( value , operator ? ) { return this . if ( `graph.facebook.com:app_id` , value , operator || 'StringLike' ) ; } param value param operator public ifFacebookId ( value , operator ? ) { return this . if ( `graph.facebook.com:id` , value , operator || 'StringLike' ) ; } param tagKey param value param operator public ifIamResourceTag ( tagKey , value , operator ? ) { return this . if ( `iam:ResourceTag/${ tagKey }` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlAud ( value , operator ? ) { return this . if ( `saml:aud` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlCn ( value , operator ? ) { return this . if ( `saml:cn` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlCommonName ( value , operator ? ) { return this . if ( `saml:commonName` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlDoc ( value , operator ? ) { return this . if ( `saml:doc` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEduorghomepageuri ( value , operator ? ) { return this . if ( `saml:eduorghomepageuri` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEduorgidentityauthnpolicyuri ( value , operator ? ) { return this . if ( `saml:eduorgidentityauthnpolicyuri` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEduorglegalname ( value , operator ? ) { return this . if ( `saml:eduorglegalname` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEduorgsuperioruri ( value , operator ? ) { return this . if ( `saml:eduorgsuperioruri` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEduorgwhitepagesuri ( value , operator ? ) { return this . if ( `saml:eduorgwhitepagesuri` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonaffiliation ( value , operator ? ) { return this . if ( `saml:edupersonaffiliation` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonassurance ( value , operator ? ) { return this . if ( `saml:edupersonassurance` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonentitlement ( value , operator ? ) { return this . if ( `saml:edupersonentitlement` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonnickname ( value , operator ? ) { return this . if ( `saml:edupersonnickname` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonorgdn ( value , operator ? ) { return this . if ( `saml:edupersonorgdn` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonorgunitdn ( value , operator ? ) { return this . if ( `saml:edupersonorgunitdn` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonprimaryaffiliation ( value , operator ? ) { return this . if ( `saml:edupersonprimaryaffiliation` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonprimaryorgunitdn ( value , operator ? ) { return this . if ( `saml:edupersonprimaryorgunitdn` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonprincipalname ( value , operator ? ) { return this . if ( `saml:edupersonprincipalname` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersonscopedaffiliation ( value , operator ? ) { return this . if ( `saml:edupersonscopedaffiliation` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlEdupersontargetedid ( value , operator ? ) { return this . if ( `saml:edupersontargetedid` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlGivenName ( value , operator ? ) { return this . if ( `saml:givenName` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlIss ( value , operator ? ) { return this . if ( `saml:iss` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlMail ( value , operator ? ) { return this . if ( `saml:mail` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlName ( value , operator ? ) { return this . if ( `saml:name` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlNamequalifier ( value , operator ? ) { return this . if ( `saml:namequalifier` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlOrganizationStatus ( value , operator ? ) { return this . if ( `saml:organizationStatus` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlPrimaryGroupSID ( value , operator ? ) { return this . if ( `saml:primaryGroupSID` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlSub ( value , operator ? ) { return this . if ( `saml:sub` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlSubType ( value , operator ? ) { return this . if ( `saml:sub_type` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlSurname ( value , operator ? ) { return this . if ( `saml:surname` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlUid ( value , operator ? ) { return this . if ( `saml:uid` , value , operator || 'StringLike' ) ; } param value param operator public ifSamlX500UniqueIdentifier ( value , operator ? ) { return this . if ( `saml:x500UniqueIdentifier` , value , operator || 'StringLike' ) ; } param value param operator public ifAWSServiceName ( value , operator ? ) { return this . if ( `AWSServiceName` , value , operator || 'StringLike' ) ; } param value param operator public ifExternalId ( value , operator ? ) { return this . if ( `ExternalId` , value , operator || 'StringLike' ) ; } param value param operator public ifRoleSessionName ( value , operator ? ) { return this . if ( `RoleSessionName` , value , operator || 'StringLike' ) ; } param value param operator public ifSourceIdentity ( value , operator ? ) { return this . if ( `SourceIdentity` , value , operator || 'StringLike' ) ; } param value param operator public ifTransitiveTagKeys ( value , operator ? ) { return this . if ( `TransitiveTagKeys` , value , operator || 'StringLike' ) ; } param value param operator public ifAmazonAppId ( value , operator ? ) { return this . if ( `www.amazon.com:app_id` , value , operator || 'StringLike' ) ; } param value param operator public ifAmazonUserId ( value , operator ? ) { return this . if ( `www.amazon.com:user_id` , value , operator || 'StringLike' ) ; } }