ConsumableResourceGrants Facade
Collection of grant methods for a IConsumableResourceRef.
| Source | |
|---|---|
| Type last changed |
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);
python
# 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)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.batch.*;
import software.amazon.awscdk.interfaces.batch.*;
IConsumableResourceRef consumableResourceRef;
ConsumableResourceGrants consumableResourceGrants = ConsumableResourceGrants.fromConsumableResource(consumableResourceRef);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Batch;
using Amazon.CDK.Interfaces.Batch;
IConsumableResourceRef consumableResourceRef;
var consumableResourceGrants = ConsumableResourceGrants.FromConsumableResource(consumableResourceRef);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var consumableResourceRef IConsumableResourceRef
consumableResourceGrants := awscdk.Aws_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) ConsumableResourceGrants static #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