Class: Permission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:37
Helper class to create DepotPermission objects.
Constructors
Constructor
new Permission():
Permission
Returns
Permission
Methods
anonymous()
staticanonymous():DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:39
Permission to allow any user to access the resource.
Returns
authenticated()
staticauthenticated():DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:47
Permission to allow only authenticated users to access the resource.
Returns
callerWithAnyOfClaims()
staticcallerWithAnyOfClaims(claim, ...values):DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:68
Permission to allow only callers with at least one of the specified claims to access the resource.
Parameters
claim
string
values
...string[]
Returns
callerWithAnyOfPassRoles()
staticcallerWithAnyOfPassRoles(...roleNames):DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:88
Permission to allow only callers with at least one of the specified Pass role memberships to access the resource.
Parameters
roleNames
...string[]
Returns
callerWithClaim()
staticcallerWithClaim(claim,value):DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:63
Permission to allow only callers with the specified claim to access the resource.
Parameters
claim
string
value
string
Returns
callerWithCognitoGroup()
staticcallerWithCognitoGroup(groupName):DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:95
Permission to allow only callers with the specified Cognito group membership to access the resource.
Parameters
groupName
string
Returns
Deprecated
Use callerWithPassRole instead.
callerWithPassRole()
staticcallerWithPassRole(roleName):DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:83
Permission to allow only callers with the specified Pass role membership to access the resource.
Parameters
roleName
string
Returns
none()
staticnone():DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:55
Permission to disallow API access for any user, anonymous or not.
Returns
withExpression()
staticwithExpression(expression):DepotPermission
Defined in: packages/depot-cdk/src/stage-depot-dataset-permission.ts:75
Permission to allow access only if the expression evaluates to true.
Parameters
expression
string