ConsumableResourceGrants
- class aws_cdk.aws_batch.ConsumableResourceGrants(*args: Any, **kwargs)
Bases:
objectCollection of grant methods for a IConsumableResourceRef.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_batch as batch from aws_cdk.interfaces import aws_batch as interfaces_batch # consumable_resource_ref: interfaces_batch.IConsumableResourceRef consumable_resource_grants = batch.ConsumableResourceGrants.from_consumable_resource(consumable_resource_ref)
Methods
- actions(grantee, actions, *, resource_arns=None)
Grant the given identity custom permissions.
- Parameters:
grantee (
IGrantable)actions (
Sequence[str])resource_arns (
Optional[Sequence[str]]) – The ARNs of the resources to grant permissions on. Default: - The ARN of the resource associated with the grant is used.
- Return type:
- read(grantee)
Grant permission to describe this consumable resource and list the jobs that use it.
This will grant the following permissions:
batch:DescribeConsumableResource
batch:ListJobsByConsumableResource
- Parameters:
grantee (
IGrantable)- Return type:
- update(grantee)
Grant permission to change the total quantity of this consumable resource.
This will grant the following permissions:
batch:UpdateConsumableResource
- Parameters:
grantee (
IGrantable)- Return type:
Static Methods
- classmethod from_consumable_resource(resource)
Creates grants for ConsumableResourceGrants.
- Parameters:
resource (
IConsumableResourceRef)- Return type: