class DistributionGrants
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CloudFront.DistributionGrants |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#DistributionGrants |
Java | software.amazon.awscdk.services.cloudfront.DistributionGrants |
Python | aws_cdk.aws_cloudfront.DistributionGrants |
TypeScript | aws-cdk-lib » aws_cloudfront » DistributionGrants |
Collection of grant methods for a IDistributionRef.
Example
// 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_aws_cloudfront } from 'aws-cdk-lib/interfaces';
declare const distributionRef: interfaces_aws_cloudfront.IDistributionRef;
const distributionGrants = cloudfront.DistributionGrants.fromDistribution(distributionRef);
Properties
| Name | Type | Description |
|---|---|---|
| resource | IDistribution |
resource
Type:
IDistribution
Methods
| Name | Description |
|---|---|
| create | Grant to create invalidations for this bucket to an IAM principal (Role/Group/User). |
| static from | Creates grants for DistributionGrants. |
createInvalidation(grantee)
public createInvalidation(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant to create invalidations for this bucket to an IAM principal (Role/Group/User).
static fromDistribution(resource)
public static fromDistribution(resource: IDistributionRef): DistributionGrants
Parameters
- resource
IDistributionRef
Returns
Creates grants for DistributionGrants.

.NET
Go
Java
Python
TypeScript