ConsumableResourceGrants Facade Added in v2.273.0
Collection of grant methods for a IConsumableResourceRef.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
import { aws_batch as interfaces_batch } from 'aws-cdk-lib/interfaces';
declare const consumableResourceRef: interfaces_batch.IConsumableResourceRef;
const consumableResourceGrants = batch.ConsumableResourceGrants.fromConsumableResource(consumableResourceRef);
Methods
actions(grantee: IGrantable, actions: string[], options?: PermissionsOptions): Grantdef actions(self, grantee: IGrantable, actions: typing.List[str], options: typing.Optional[PermissionsOptions] = None) -> Grantpublic Grant actions(IGrantable grantee, List<String> actions, PermissionsOptions options)public Grant Actions(IGrantable grantee, string[] actions, PermissionsOptions? options = null)func Actions(Grantee IGrantable, Actions *[]*string, Options PermissionsOptions) Grant#Grant the given identity custom permissions.
fromConsumableResource(resource: IConsumableResourceRef): ConsumableResourceGrants // chainable@staticmethod def from_consumable_resource(resource: IConsumableResourceRef) -> ConsumableResourceGrantspublic static ConsumableResourceGrants fromConsumableResource(IConsumableResourceRef resource)public static ConsumableResourceGrants FromConsumableResource(IConsumableResourceRef resource)func FromConsumableResource(Resource IConsumableResourceRef) ConsumableResourceGrantsstatic#Creates grants for ConsumableResourceGrants.
read(grantee: IGrantable): Grantdef read(self, grantee: IGrantable) -> Grantpublic Grant read(IGrantable grantee)public Grant Read(IGrantable grantee)func Read(Grantee IGrantable) Grant#Grant permission to describe this consumable resource and list the jobs that use it.
This will grant the following permissions:
- batch:DescribeConsumableResource
- batch:ListJobsByConsumableResource
update(grantee: IGrantable): Grantdef update(self, grantee: IGrantable) -> Grantpublic Grant update(IGrantable grantee)public Grant Update(IGrantable grantee)func Update(Grantee IGrantable) Grant#Grant permission to change the total quantity of this consumable resource.
This will grant the following permissions:
- batch:UpdateConsumableResource