Class Domain
- All Implemented Interfaces:
IResource
,IConnectable
,IDomain
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
Example:
Domain domain = Domain.Builder.create(this, "Domain") .version(EngineVersion.OPENSEARCH_1_0) .ebs(EbsOptions.builder() .volumeSize(100) .volumeType(EbsDeviceVolumeType.GENERAL_PURPOSE_SSD) .build()) .nodeToNodeEncryption(true) .encryptionAtRest(EncryptionAtRestOptions.builder() .enabled(true) .build()) .build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.opensearchservice.IDomain
IDomain.Jsii$Default, IDomain.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Domain
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Domain
(software.amazon.jsii.JsiiObjectRef objRef) Domain
(software.constructs.Construct scope, String id, DomainProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccessPolicies
(@NotNull PolicyStatement... accessPolicyStatements) Add policy statements to the domain access policy.static IDomain
fromDomainAttributes
(software.constructs.Construct scope, String id, DomainAttributes attrs) Creates a domain construct that represents an external domain.static IDomain
fromDomainEndpoint
(software.constructs.Construct scope, String id, String domainEndpoint) Creates a domain construct that represents an external domain via domain endpoint.Log group that application logs are logged to.Log group that audit logs are logged to.Manages network connections to the domain.Arn of the Amazon OpenSearch Service domain.Endpoint of the Amazon OpenSearch Service domain.Identifier of the Amazon OpenSearch Service domain.Domain name of the Amazon OpenSearch Service domain.Master user password if fine grained access control is configured.Log group that slow indices are logged to.Log group that slow searches are logged to.grantIndexRead
(String index, IGrantable identity) Grant read permissions for an index in this domain to an IAM principal (Role/Group/User).grantIndexReadWrite
(String index, IGrantable identity) Grant read/write permissions for an index in this domain to an IAM principal (Role/Group/User).grantIndexWrite
(String index, IGrantable identity) Grant write permissions for an index in this domain to an IAM principal (Role/Group/User).grantPathRead
(String path, IGrantable identity) Grant read permissions for a specific path in this domain to an IAM principal (Role/Group/User).grantPathReadWrite
(String path, IGrantable identity) Grant read/write permissions for a specific path in this domain to an IAM principal (Role/Group/User).grantPathWrite
(String path, IGrantable identity) Grant write permissions for a specific path in this domain to an IAM principal (Role/Group/User).grantRead
(IGrantable identity) Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User).grantReadWrite
(IGrantable identity) Grant read/write permissions for this domain and its contents to an IAM principal (Role/Group/User).grantWrite
(IGrantable identity) Grant write permissions for this domain and its contents to an IAM principal (Role/Group/User).Return the given named metric for this domain.metric
(String metricName, MetricOptions props) Return the given named metric for this domain.Metric for automated snapshot failures.Metric for automated snapshot failures.Metric for the cluster blocking index writes.Metric for the cluster blocking index writes.Metric for the time the cluster status is red.Metric for the time the cluster status is red.Metric for the time the cluster status is yellow.Metric for the time the cluster status is yellow.Metric for CPU utilization.Metric for CPU utilization.Metric for the storage space of nodes in the cluster.Metric for the storage space of nodes in the cluster.Metric for indexing latency.Metric for indexing latency.Metric for JVM memory pressure.Metric for JVM memory pressure.Metric for KMS key errors.metricKMSKeyError
(MetricOptions props) Metric for KMS key errors.Metric for KMS key being inaccessible.Metric for KMS key being inaccessible.Metric for master CPU utilization.Metric for master CPU utilization.Metric for master JVM memory pressure.Metric for master JVM memory pressure.Metric for the number of nodes.metricNodes
(MetricOptions props) Metric for the number of nodes.Metric for number of searchable documents.Metric for number of searchable documents.Metric for search latency.metricSearchLatency
(MetricOptions props) Metric for search latency.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Domain
protected Domain(software.amazon.jsii.JsiiObjectRef objRef) -
Domain
protected Domain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Domain
@Stability(Stable) public Domain(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DomainProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromDomainAttributes
@Stability(Stable) @NotNull public static IDomain fromDomainAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DomainAttributes attrs) Creates a domain construct that represents an external domain.- Parameters:
scope
- The parent creating construct (usuallythis
). This parameter is required.id
- The construct's name. This parameter is required.attrs
- ADomainAttributes
object. This parameter is required.
-
fromDomainEndpoint
@Stability(Stable) @NotNull public static IDomain fromDomainEndpoint(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String domainEndpoint) Creates a domain construct that represents an external domain via domain endpoint.- Parameters:
scope
- The parent creating construct (usuallythis
). This parameter is required.id
- The construct's name. This parameter is required.domainEndpoint
- The domain's endpoint. This parameter is required.
-
addAccessPolicies
@Stability(Stable) public void addAccessPolicies(@NotNull @NotNull PolicyStatement... accessPolicyStatements) Add policy statements to the domain access policy.- Parameters:
accessPolicyStatements
- This parameter is required.
-
grantIndexRead
@Stability(Stable) @NotNull public Grant grantIndexRead(@NotNull String index, @NotNull IGrantable identity) Grant read permissions for an index in this domain to an IAM principal (Role/Group/User).- Specified by:
grantIndexRead
in interfaceIDomain
- Parameters:
index
- The index to grant permissions for. This parameter is required.identity
- The principal. This parameter is required.
-
grantIndexReadWrite
@Stability(Stable) @NotNull public Grant grantIndexReadWrite(@NotNull String index, @NotNull IGrantable identity) Grant read/write permissions for an index in this domain to an IAM principal (Role/Group/User).- Specified by:
grantIndexReadWrite
in interfaceIDomain
- Parameters:
index
- The index to grant permissions for. This parameter is required.identity
- The principal. This parameter is required.
-
grantIndexWrite
@Stability(Stable) @NotNull public Grant grantIndexWrite(@NotNull String index, @NotNull IGrantable identity) Grant write permissions for an index in this domain to an IAM principal (Role/Group/User).- Specified by:
grantIndexWrite
in interfaceIDomain
- Parameters:
index
- The index to grant permissions for. This parameter is required.identity
- The principal. This parameter is required.
-
grantPathRead
@Stability(Stable) @NotNull public Grant grantPathRead(@NotNull String path, @NotNull IGrantable identity) Grant read permissions for a specific path in this domain to an IAM principal (Role/Group/User).- Specified by:
grantPathRead
in interfaceIDomain
- Parameters:
path
- The path to grant permissions for. This parameter is required.identity
- The principal. This parameter is required.
-
grantPathReadWrite
@Stability(Stable) @NotNull public Grant grantPathReadWrite(@NotNull String path, @NotNull IGrantable identity) Grant read/write permissions for a specific path in this domain to an IAM principal (Role/Group/User).- Specified by:
grantPathReadWrite
in interfaceIDomain
- Parameters:
path
- The path to grant permissions for. This parameter is required.identity
- The principal. This parameter is required.
-
grantPathWrite
@Stability(Stable) @NotNull public Grant grantPathWrite(@NotNull String path, @NotNull IGrantable identity) Grant write permissions for a specific path in this domain to an IAM principal (Role/Group/User).- Specified by:
grantPathWrite
in interfaceIDomain
- Parameters:
path
- The path to grant permissions for. This parameter is required.identity
- The principal. This parameter is required.
-
grantRead
Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User). -
grantReadWrite
Grant read/write permissions for this domain and its contents to an IAM principal (Role/Group/User).- Specified by:
grantReadWrite
in interfaceIDomain
- Parameters:
identity
- The principal. This parameter is required.
-
grantWrite
Grant write permissions for this domain and its contents to an IAM principal (Role/Group/User).- Specified by:
grantWrite
in interfaceIDomain
- Parameters:
identity
- The principal. This parameter is required.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this domain. -
metric
Return the given named metric for this domain. -
metricAutomatedSnapshotFailure
@Stability(Stable) @NotNull public Metric metricAutomatedSnapshotFailure(@Nullable MetricOptions props) Metric for automated snapshot failures.Default: maximum over 5 minutes
- Specified by:
metricAutomatedSnapshotFailure
in interfaceIDomain
- Parameters:
props
-
-
metricAutomatedSnapshotFailure
Metric for automated snapshot failures.Default: maximum over 5 minutes
- Specified by:
metricAutomatedSnapshotFailure
in interfaceIDomain
-
metricClusterIndexWritesBlocked
@Stability(Stable) @NotNull public Metric metricClusterIndexWritesBlocked(@Nullable MetricOptions props) Metric for the cluster blocking index writes.Default: maximum over 1 minute
- Specified by:
metricClusterIndexWritesBlocked
in interfaceIDomain
- Parameters:
props
-
-
metricClusterIndexWritesBlocked
Metric for the cluster blocking index writes.Default: maximum over 1 minute
- Specified by:
metricClusterIndexWritesBlocked
in interfaceIDomain
-
metricClusterStatusRed
Metric for the time the cluster status is red.Default: maximum over 5 minutes
- Specified by:
metricClusterStatusRed
in interfaceIDomain
- Parameters:
props
-
-
metricClusterStatusRed
Metric for the time the cluster status is red.Default: maximum over 5 minutes
- Specified by:
metricClusterStatusRed
in interfaceIDomain
-
metricClusterStatusYellow
Metric for the time the cluster status is yellow.Default: maximum over 5 minutes
- Specified by:
metricClusterStatusYellow
in interfaceIDomain
- Parameters:
props
-
-
metricClusterStatusYellow
Metric for the time the cluster status is yellow.Default: maximum over 5 minutes
- Specified by:
metricClusterStatusYellow
in interfaceIDomain
-
metricCPUUtilization
Metric for CPU utilization.Default: maximum over 5 minutes
- Specified by:
metricCPUUtilization
in interfaceIDomain
- Parameters:
props
-
-
metricCPUUtilization
Metric for CPU utilization.Default: maximum over 5 minutes
- Specified by:
metricCPUUtilization
in interfaceIDomain
-
metricFreeStorageSpace
Metric for the storage space of nodes in the cluster.Default: minimum over 5 minutes
- Specified by:
metricFreeStorageSpace
in interfaceIDomain
- Parameters:
props
-
-
metricFreeStorageSpace
Metric for the storage space of nodes in the cluster.Default: minimum over 5 minutes
- Specified by:
metricFreeStorageSpace
in interfaceIDomain
-
metricIndexingLatency
Metric for indexing latency.Default: p99 over 5 minutes
- Specified by:
metricIndexingLatency
in interfaceIDomain
- Parameters:
props
-
-
metricIndexingLatency
Metric for indexing latency.Default: p99 over 5 minutes
- Specified by:
metricIndexingLatency
in interfaceIDomain
-
metricJVMMemoryPressure
Metric for JVM memory pressure.Default: maximum over 5 minutes
- Specified by:
metricJVMMemoryPressure
in interfaceIDomain
- Parameters:
props
-
-
metricJVMMemoryPressure
Metric for JVM memory pressure.Default: maximum over 5 minutes
- Specified by:
metricJVMMemoryPressure
in interfaceIDomain
-
metricKMSKeyError
Metric for KMS key errors.Default: maximum over 5 minutes
- Specified by:
metricKMSKeyError
in interfaceIDomain
- Parameters:
props
-
-
metricKMSKeyError
Metric for KMS key errors.Default: maximum over 5 minutes
- Specified by:
metricKMSKeyError
in interfaceIDomain
-
metricKMSKeyInaccessible
Metric for KMS key being inaccessible.Default: maximum over 5 minutes
- Specified by:
metricKMSKeyInaccessible
in interfaceIDomain
- Parameters:
props
-
-
metricKMSKeyInaccessible
Metric for KMS key being inaccessible.Default: maximum over 5 minutes
- Specified by:
metricKMSKeyInaccessible
in interfaceIDomain
-
metricMasterCPUUtilization
Metric for master CPU utilization.Default: maximum over 5 minutes
- Specified by:
metricMasterCPUUtilization
in interfaceIDomain
- Parameters:
props
-
-
metricMasterCPUUtilization
Metric for master CPU utilization.Default: maximum over 5 minutes
- Specified by:
metricMasterCPUUtilization
in interfaceIDomain
-
metricMasterJVMMemoryPressure
@Stability(Stable) @NotNull public Metric metricMasterJVMMemoryPressure(@Nullable MetricOptions props) Metric for master JVM memory pressure.Default: maximum over 5 minutes
- Specified by:
metricMasterJVMMemoryPressure
in interfaceIDomain
- Parameters:
props
-
-
metricMasterJVMMemoryPressure
Metric for master JVM memory pressure.Default: maximum over 5 minutes
- Specified by:
metricMasterJVMMemoryPressure
in interfaceIDomain
-
metricNodes
Metric for the number of nodes.Default: minimum over 1 hour
- Specified by:
metricNodes
in interfaceIDomain
- Parameters:
props
-
-
metricNodes
Metric for the number of nodes.Default: minimum over 1 hour
- Specified by:
metricNodes
in interfaceIDomain
-
metricSearchableDocuments
Metric for number of searchable documents.Default: maximum over 5 minutes
- Specified by:
metricSearchableDocuments
in interfaceIDomain
- Parameters:
props
-
-
metricSearchableDocuments
Metric for number of searchable documents.Default: maximum over 5 minutes
- Specified by:
metricSearchableDocuments
in interfaceIDomain
-
metricSearchLatency
Metric for search latency.Default: p99 over 5 minutes
- Specified by:
metricSearchLatency
in interfaceIDomain
- Parameters:
props
-
-
metricSearchLatency
Metric for search latency.Default: p99 over 5 minutes
- Specified by:
metricSearchLatency
in interfaceIDomain
-
getConnections
Manages network connections to the domain.This will throw an error in case the domain is not placed inside a VPC.
- Specified by:
getConnections
in interfaceIConnectable
-
getDomainArn
Arn of the Amazon OpenSearch Service domain.- Specified by:
getDomainArn
in interfaceIDomain
-
getDomainEndpoint
Endpoint of the Amazon OpenSearch Service domain.- Specified by:
getDomainEndpoint
in interfaceIDomain
-
getDomainId
Identifier of the Amazon OpenSearch Service domain.- Specified by:
getDomainId
in interfaceIDomain
-
getDomainName
Domain name of the Amazon OpenSearch Service domain.- Specified by:
getDomainName
in interfaceIDomain
-
getAppLogGroup
Log group that application logs are logged to. -
getAuditLogGroup
Log group that audit logs are logged to. -
getMasterUserPassword
Master user password if fine grained access control is configured. -
getSlowIndexLogGroup
Log group that slow indices are logged to. -
getSlowSearchLogGroup
Log group that slow searches are logged to.
-