ClusterGrants Facade
Collection of grant methods for a IClusterRef.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_ecs as interfaces_ecs } from 'aws-cdk-lib/interfaces';
declare const clusterRef: interfaces_ecs.IClusterRef;
const clusterGrants = ecs.ClusterGrants.fromCluster(clusterRef);
Methods
fromCluster(resource: IClusterRef): ClusterGrants // chainable@staticmethod def from_cluster(resource: IClusterRef) -> ClusterGrantspublic static ClusterGrants fromCluster(IClusterRef resource)public static ClusterGrants FromCluster(IClusterRef resource)func FromCluster(Resource IClusterRef) ClusterGrantsstatic#Creates grants for ClusterGrants.
taskProtection(grantee: IGrantable): Grantdef task_protection(self, grantee: IGrantable) -> Grantpublic Grant taskProtection(IGrantable grantee)public Grant TaskProtection(IGrantable grantee)func TaskProtection(Grantee IGrantable) Grant#Grants an ECS Task Protection API permission to the specified grantee.
This method provides a streamlined way to assign the 'ecs:UpdateTaskProtection' permission, enabling the grantee to manage task protection in the ECS cluster.