import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Ram extends PolicyStatement { public servicePrefix = 'ram' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to accept the specified resource share invitation
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifShareOwnerAccountId()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_AcceptResourceShareInvitation.html
     */ public toAcceptResourceShareInvitation ( ) { return this . to ( 'AcceptResourceShareInvitation' ) ; } /**
     * Grants permission to associate resource(s) and/or principal(s) to a resource share
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     * - .ifResourceShareName()
     * - .ifAllowsExternalPrincipals()
     * - .ifPrincipal()
     * - .ifRequestedResourceType()
     * - .ifResourceArn()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_AssociateResourceShare.html
     */ public toAssociateResourceShare ( ) { return this . to ( 'AssociateResourceShare' ) ; } /**
     * Grants permission to associate a Permission with a Resource Share
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_AssociateResourceSharePermission.html
     */ public toAssociateResourceSharePermission ( ) { return this . to ( 'AssociateResourceSharePermission' ) ; } /**
     * Grants permission to create a resource share with provided resource(s) and/or principal(s)
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     * - .ifRequestedResourceType()
     * - .ifResourceArn()
     * - .ifRequestedAllowsExternalPrincipals()
     * - .ifPrincipal()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html
     */ public toCreateResourceShare ( ) { return this . to ( 'CreateResourceShare' ) ; } /**
     * Grants permission to delete resource share
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     * - .ifResourceShareName()
     * - .ifAllowsExternalPrincipals()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_DeleteResourceShare.html
     */ public toDeleteResourceShare ( ) { return this . to ( 'DeleteResourceShare' ) ; } /**
     * Grants permission to disassociate resource(s) and/or principal(s) from a resource share
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     * - .ifResourceShareName()
     * - .ifAllowsExternalPrincipals()
     * - .ifPrincipal()
     * - .ifRequestedResourceType()
     * - .ifResourceArn()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_DisassociateResourceShare.html
     */ public toDisassociateResourceShare ( ) { return this . to ( 'DisassociateResourceShare' ) ; } /**
     * Grants permission to disassociate a Permission from a Resource Share
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_DisassociateResourceSharePermission.html
     */ public toDisassociateResourceSharePermission ( ) { return this . to ( 'DisassociateResourceSharePermission' ) ; } /**
     * Grants permission to access customer's organization and create a SLR in the customer's account
     *
     * Access Level: Permissions management
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_EnableSharingWithAwsOrganization.html
     */ public toEnableSharingWithAwsOrganization ( ) { return this . to ( 'EnableSharingWithAwsOrganization' ) ; } /**
     * Grants permission to get the contents of an AWS RAM permission
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifPermissionArn()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_GetPermission.html
     */ public toGetPermission ( ) { return this . to ( 'GetPermission' ) ; } /**
     * Grants permission to get the policies for the specified resources that you own and have shared
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_GetResourcePolicies.html
     */ public toGetResourcePolicies ( ) { return this . to ( 'GetResourcePolicies' ) ; } /**
     * Grants permission to get a set of resource share associations from a provided list or with a specified status of the specified type
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_GetResourceShareAssociations.html
     */ public toGetResourceShareAssociations ( ) { return this . to ( 'GetResourceShareAssociations' ) ; } /**
     * Grants permission to get resource share invitations by the specified invitation arn or those for the resource share
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_GetResourceShareInvitations.html
     */ public toGetResourceShareInvitations ( ) { return this . to ( 'GetResourceShareInvitations' ) ; } /**
     * Grants permission to get a set of resource shares from a provided list or with a specified status
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_GetResourceShares.html
     */ public toGetResourceShares ( ) { return this . to ( 'GetResourceShares' ) ; } /**
     * Grants permission to list the resources in a resource share that is shared with you but that the invitation is still pending for
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_ListPendingInvitationResources.html
     */ public toListPendingInvitationResources ( ) { return this . to ( 'ListPendingInvitationResources' ) ; } /**
     * Grants permission to list the AWS RAM permissions
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_ListPermissions.html
     */ public toListPermissions ( ) { return this . to ( 'ListPermissions' ) ; } /**
     * Grants permission to list the principals that you have shared resources with or that have shared resources with you
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_ListPrincipals.html
     */ public toListPrincipals ( ) { return this . to ( 'ListPrincipals' ) ; } /**
     * Grants permission to list the Permissions associated with a Resource Share
     *
     * Access Level: List
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     * - .ifResourceShareName()
     * - .ifAllowsExternalPrincipals()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_ListResourceSharePermissions.html
     */ public toListResourceSharePermissions ( ) { return this . to ( 'ListResourceSharePermissions' ) ; } /**
     * Grants permission to list the shareable resource types supported by AWS RAM
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_ListResourceTypes.html
     */ public toListResourceTypes ( ) { return this . to ( 'ListResourceTypes' ) ; } /**
     * Grants permission to list the resources that you added to resource shares or the resources that are shared with you
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_ListResources.html
     */ public toListResources ( ) { return this . to ( 'ListResources' ) ; } /**
     * Grants permission to promote the specified resource share
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html
     */ public toPromoteResourceShareCreatedFromPolicy ( ) { return this . to ( 'PromoteResourceShareCreatedFromPolicy' ) ; } /**
     * Grants permission to reject the specified resource share invitation
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifShareOwnerAccountId()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_RejectResourceShareInvitation.html
     */ public toRejectResourceShareInvitation ( ) { return this . to ( 'RejectResourceShareInvitation' ) ; } /**
     * Grants permission to tag the specified resource share
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to untag the specified resource share
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update attributes of the resource share
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     * - .ifResourceShareName()
     * - .ifAllowsExternalPrincipals()
     * - .ifRequestedAllowsExternalPrincipals()
     *
     * https://docs.aws.amazon.com/ram/latest/APIReference/API_UpdateResourceShare.html
     */ public toUpdateResourceShare ( ) { return this . to ( 'UpdateResourceShare' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'AcceptResourceShareInvitation' , 'AssociateResourceShare' , 'AssociateResourceSharePermission' , 'CreateResourceShare' , 'DeleteResourceShare' , 'DisassociateResourceShare' , 'DisassociateResourceSharePermission' , 'PromoteResourceShareCreatedFromPolicy' , 'RejectResourceShareInvitation' , 'UpdateResourceShare' ] , 'Permissions management' : [ 'EnableSharingWithAwsOrganization' ] , Read : [ 'GetPermission' , 'GetResourcePolicies' , 'GetResourceShareAssociations' , 'GetResourceShareInvitations' , 'GetResourceShares' , 'ListPendingInvitationResources' ] , List : [ 'ListPermissions' , 'ListPrincipals' , 'ListResourceSharePermissions' , 'ListResourceTypes' , 'ListResources' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param resourcePath param account param region param partition public onResourceShare ( resourcePath , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:ram:${ region || '*' }:${ account || '*' }:resource-share/${ resourcePath }` ) ; } param resourcePath param account param region param partition public onResourceShareInvitation ( resourcePath , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:ram:${ region || '*' }:${ account || '*' }:resource-share-invitation/${ resourcePath }` ) ; } param resourcePath param account param partition public onPermission ( resourcePath , account ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:ram::${ account || '*' }:permission/${ resourcePath }` ) ; } param value public ifAllowsExternalPrincipals ( value ? ) { return this . if ( `AllowsExternalPrincipals` , ( typeof value !== 'undefined' ? value : true ) , 'Bool' ) ; } param value param operator public ifPermissionArn ( value , operator ? ) { return this . if ( `PermissionArn` , value , operator || 'ArnLike' ) ; } param value param operator public ifPermissionResourceType ( value , operator ? ) { return this . if ( `PermissionResourceType` , value , operator || 'StringLike' ) ; } param value param operator public ifPrincipal ( value , operator ? ) { return this . if ( `Principal` , value , operator || 'StringLike' ) ; } param value public ifRequestedAllowsExternalPrincipals ( value ? ) { return this . if ( `RequestedAllowsExternalPrincipals` , ( typeof value !== 'undefined' ? value : true ) , 'Bool' ) ; } param value param operator public ifRequestedResourceType ( value , operator ? ) { return this . if ( `RequestedResourceType` , value , operator || 'StringLike' ) ; } param value param operator public ifResourceArn ( value , operator ? ) { return this . if ( `ResourceArn` , value , operator || 'ArnLike' ) ; } param value param operator public ifResourceShareName ( value , operator ? ) { return this . if ( `ResourceShareName` , value , operator || 'StringLike' ) ; } param value param operator public ifShareOwnerAccountId ( value , operator ? ) { return this . if ( `ShareOwnerAccountId` , value , operator || 'StringLike' ) ; } }