DistributionGrants Facade
Collection of grant methods for a IDistributionRef.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
import { aws_cloudfront as interfaces_cloudfront } from 'aws-cdk-lib/interfaces';
declare const distributionRef: interfaces_cloudfront.IDistributionRef;
const distributionGrants = cloudfront.DistributionGrants.fromDistribution(distributionRef);
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.
createInvalidation(grantee: IGrantable): Grantdef create_invalidation(self, grantee: IGrantable) -> Grantpublic Grant createInvalidation(IGrantable grantee)public Grant CreateInvalidation(IGrantable grantee)func CreateInvalidation(Grantee IGrantable) Grant#Grant to create invalidations for this bucket to an IAM principal (Role/Group/User).
fromDistribution(resource: IDistributionRef): DistributionGrants // chainable@staticmethod def from_distribution(resource: IDistributionRef) -> DistributionGrantspublic static DistributionGrants fromDistribution(IDistributionRef resource)public static DistributionGrants FromDistribution(IDistributionRef resource)func FromDistribution(Resource IDistributionRef) DistributionGrantsstatic#Creates grants for DistributionGrants.