Skip to content
v2.274.0

DomainGrants Facade ​

Collection of grant methods for a IDomainRef.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticsearch as elasticsearch } from 'aws-cdk-lib';
import { aws_elasticsearch as interfaces_elasticsearch } from 'aws-cdk-lib/interfaces';

declare const domainRef: interfaces_elasticsearch.IDomainRef;
const domainGrants = elasticsearch.DomainGrants.fromDomain(domainRef);

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.
fromDomain(resource: IDomainRef): DomainGrants // chainable@staticmethod def from_domain(resource: IDomainRef) -> DomainGrantspublic static DomainGrants fromDomain(IDomainRef resource)public static DomainGrants FromDomain(IDomainRef resource)func FromDomain(Resource IDomainRef) DomainGrantsstatic#
Creates grants for DomainGrants.
read(grantee: IGrantable): Grantdef read(self, grantee: IGrantable) -> Grantpublic Grant read(IGrantable grantee)public Grant Read(IGrantable grantee)func Read(Grantee IGrantable) Grant#
Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User).
readWrite(grantee: IGrantable): Grantdef read_write(self, grantee: IGrantable) -> Grantpublic Grant readWrite(IGrantable grantee)public Grant ReadWrite(IGrantable grantee)func ReadWrite(Grantee IGrantable) Grant#
Grant read/write permissions for this domain and its contents to an IAM principal (Role/Group/User).
write(grantee: IGrantable): Grantdef write(self, grantee: IGrantable) -> Grantpublic Grant write(IGrantable grantee)public Grant Write(IGrantable grantee)func Write(Grantee IGrantable) Grant#
Grant write permissions for this domain and its contents to an IAM principal (Role/Group/User).