class DomainGrants
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Elasticsearch.DomainGrants |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awselasticsearch#DomainGrants |
Java | software.amazon.awscdk.services.elasticsearch.DomainGrants |
Python | aws_cdk.aws_elasticsearch.DomainGrants |
TypeScript | aws-cdk-lib » aws_elasticsearch » DomainGrants |
Collection of grant methods for a IDomainRef.
Example
// 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_aws_elasticsearch } from 'aws-cdk-lib/interfaces';
declare const domainRef: interfaces_aws_elasticsearch.IDomainRef;
const domainGrants = elasticsearch.DomainGrants.fromDomain(domainRef);
Properties
| Name | Type | Description |
|---|---|---|
| resource | IDomain |
resource
Type:
IDomain
Methods
| Name | Description |
|---|---|
| read(grantee) | Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User). |
| read | Grant read/write permissions for this domain and its contents to an IAM principal (Role/Group/User). |
| write(grantee) | Grant write permissions for this domain and its contents to an IAM principal (Role/Group/User). |
| static from | Creates grants for DomainGrants. |
read(grantee)
public read(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User).
readWrite(grantee)
public readWrite(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant read/write permissions for this domain and its contents to an IAM principal (Role/Group/User).
write(grantee)
public write(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant write permissions for this domain and its contents to an IAM principal (Role/Group/User).
static fromDomain(resource)
public static fromDomain(resource: IDomainRef): DomainGrants
Parameters
- resource
IDomainRef
Returns
Creates grants for DomainGrants.

.NET
Go
Java
Python
TypeScript