Class CfnDomain
- All Implemented Interfaces:
IInspectable,IDomainRef,IEnvironmentAware,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
The
AWS::Elasticsearch::Domainresource is being replaced by the AWS::OpenSearchService::Domain resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and legacy Elasticsearch. For instructions to upgrade domains defined within CloudFormation from Elasticsearch to OpenSearch, see Remarks .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticsearch.*;
Object accessPolicies;
CfnDomain cfnDomain = CfnDomain.Builder.create(this, "MyCfnDomain")
.accessPolicies(accessPolicies)
.advancedOptions(Map.of(
"advancedOptionsKey", "advancedOptions"))
.advancedSecurityOptions(AdvancedSecurityOptionsInputProperty.builder()
.anonymousAuthEnabled(false)
.enabled(false)
.internalUserDatabaseEnabled(false)
.masterUserOptions(MasterUserOptionsProperty.builder()
.masterUserArn("masterUserArn")
.masterUserName("masterUserName")
.masterUserPassword("masterUserPassword")
.build())
.build())
.cognitoOptions(CognitoOptionsProperty.builder()
.enabled(false)
.identityPoolId("identityPoolId")
.roleArn("roleArn")
.userPoolId("userPoolId")
.build())
.domainArn("domainArn")
.domainEndpointOptions(DomainEndpointOptionsProperty.builder()
.customEndpoint("customEndpoint")
.customEndpointCertificateArn("customEndpointCertificateArn")
.customEndpointEnabled(false)
.enforceHttps(false)
.tlsSecurityPolicy("tlsSecurityPolicy")
.build())
.domainName("domainName")
.ebsOptions(EBSOptionsProperty.builder()
.ebsEnabled(false)
.iops(123)
.volumeSize(123)
.volumeType("volumeType")
.build())
.elasticsearchClusterConfig(ElasticsearchClusterConfigProperty.builder()
.coldStorageOptions(ColdStorageOptionsProperty.builder()
.enabled(false)
.build())
.dedicatedMasterCount(123)
.dedicatedMasterEnabled(false)
.dedicatedMasterType("dedicatedMasterType")
.instanceCount(123)
.instanceType("instanceType")
.warmCount(123)
.warmEnabled(false)
.warmType("warmType")
.zoneAwarenessConfig(ZoneAwarenessConfigProperty.builder()
.availabilityZoneCount(123)
.build())
.zoneAwarenessEnabled(false)
.build())
.elasticsearchVersion("elasticsearchVersion")
.encryptionAtRestOptions(EncryptionAtRestOptionsProperty.builder()
.enabled(false)
.kmsKeyId("kmsKeyId")
.build())
.logPublishingOptions(Map.of(
"logPublishingOptionsKey", LogPublishingOptionProperty.builder()
.cloudWatchLogsLogGroupArn("cloudWatchLogsLogGroupArn")
.enabled(false)
.build()))
.nodeToNodeEncryptionOptions(NodeToNodeEncryptionOptionsProperty.builder()
.enabled(false)
.build())
.snapshotOptions(SnapshotOptionsProperty.builder()
.automatedSnapshotStartHour(123)
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcOptions(VPCOptionsProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnetIds(List.of("subnetIds"))
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies options for fine-grained access control.static final classA fluent builder forCfnDomain.static interfaceConfigures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.static interfaceSpecifies options for cold storage.static interfaceSpecifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.static interfaceThe configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.static interfaceThe cluster configuration for the OpenSearch Service domain.static interfaceWhether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.static interfacestatic interfaceSpecifies information about the master user.static interfaceSpecifies whether node-to-node encryption is enabled.static interfacestatic interfaceThe virtual private cloud (VPC) configuration for the OpenSearch Service domain.static interfaceSpecifies zone awareness configuration options.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.elasticsearch.IDomainRef
IDomainRef.Jsii$Default, IDomainRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDomain(software.amazon.jsii.JsiiObjectRef objRef) Create a newAWS::Elasticsearch::Domain.CfnDomain(software.constructs.Construct scope, String id, CfnDomainProps props) Create a newAWS::Elasticsearch::Domain. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForDomain(IDomainRef resource) An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions.Additional options to specify for the OpenSearch Service domain.Specifies options for fine-grained access control.The Amazon Resource Name (ARN) of the domain, such asarn:aws:es:us-west-2:123456789012:domain/mystack-elasti-1ab2cdefghij.The domain-specific endpoint that's used for requests to the OpenSearch APIs, such assearch-mystack-elasti-1ab2cdefghij-ab1c2deckoyb3hofw7wpqa3cm---us-west-1---es.amazonaws.com.rproxy.govskope.ca.Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.A name for the OpenSearch Service domain.A reference to a Domain resource.The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.The version of Elasticsearch to use, such as 2.3.Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.An object with one or more of the following keys:SEARCH_SLOW_LOGS,ES_APPLICATION_LOGS,INDEX_SLOW_LOGS,AUDIT_LOGS, depending on the types of logs you want to publish.Specifies whether node-to-node encryption is enabled.DEPRECATED .getTags()Tag Manager which manages the tags for this resource.An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain.The virtual private cloud (VPC) configuration for the OpenSearch Service domain.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnDomain.renderProperties(Map<String, Object> props) voidsetAccessPolicies(Object value) An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions.voidsetAdvancedOptions(Map<String, String> value) Additional options to specify for the OpenSearch Service domain.voidsetAdvancedOptions(IResolvable value) Additional options to specify for the OpenSearch Service domain.voidSpecifies options for fine-grained access control.voidSpecifies options for fine-grained access control.voidsetCognitoOptions(IResolvable value) Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.voidConfigures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.voidsetDomainArn(String value) voidSpecifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.voidSpecifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.voidsetDomainName(String value) A name for the OpenSearch Service domain.voidsetEbsOptions(IResolvable value) The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.voidThe configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.voidElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.voidElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.voidsetElasticsearchVersion(String value) The version of Elasticsearch to use, such as 2.3.voidWhether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.voidWhether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.voidsetLogPublishingOptions(Map<String, Object> value) An object with one or more of the following keys:SEARCH_SLOW_LOGS,ES_APPLICATION_LOGS,INDEX_SLOW_LOGS,AUDIT_LOGS, depending on the types of logs you want to publish.voidAn object with one or more of the following keys:SEARCH_SLOW_LOGS,ES_APPLICATION_LOGS,INDEX_SLOW_LOGS,AUDIT_LOGS, depending on the types of logs you want to publish.voidSpecifies whether node-to-node encryption is enabled.voidSpecifies whether node-to-node encryption is enabled.voidsetSnapshotOptions(IResolvable value) DEPRECATED .voidDEPRECATED .voidsetTagsRaw(List<CfnTag> value) An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain.voidsetVpcOptions(IResolvable value) The virtual private cloud (VPC) configuration for the OpenSearch Service domain.voidThe virtual private cloud (VPC) configuration for the OpenSearch Service domain.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDomain
protected CfnDomain(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDomain
protected CfnDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDomain
@Stability(Stable) public CfnDomain(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnDomainProps props) Create a newAWS::Elasticsearch::Domain.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnDomain
@Stability(Stable) public CfnDomain(@NotNull software.constructs.Construct scope, @NotNull String id) Create a newAWS::Elasticsearch::Domain.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
arnForDomain
- Parameters:
resource- This parameter is required.
-
isCfnDomain
Checks whether the given object is a CfnDomain.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the domain, such asarn:aws:es:us-west-2:123456789012:domain/mystack-elasti-1ab2cdefghij.This returned value is the same as the one returned by
AWS::Elasticsearch::Domain.DomainArn. -
getAttrDomainEndpoint
The domain-specific endpoint that's used for requests to the OpenSearch APIs, such assearch-mystack-elasti-1ab2cdefghij-ab1c2deckoyb3hofw7wpqa3cm.us-west-1.es.amazonaws.com. -
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDomainRef
A reference to a Domain resource.- Specified by:
getDomainRefin interfaceIDomainRef
-
getTags
Tag Manager which manages the tags for this resource. -
getAccessPolicies
An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions. -
setAccessPolicies
An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions. -
getAdvancedOptions
Additional options to specify for the OpenSearch Service domain.Returns union: either Mapinvalid input: '<'String,
String> orIResolvable -
setAdvancedOptions
Additional options to specify for the OpenSearch Service domain. -
setAdvancedOptions
Additional options to specify for the OpenSearch Service domain. -
getAdvancedSecurityOptions
Specifies options for fine-grained access control.Returns union: either
IResolvableorCfnDomain.AdvancedSecurityOptionsInputProperty -
setAdvancedSecurityOptions
Specifies options for fine-grained access control. -
setAdvancedSecurityOptions
@Stability(Stable) public void setAdvancedSecurityOptions(@Nullable CfnDomain.AdvancedSecurityOptionsInputProperty value) Specifies options for fine-grained access control. -
getCognitoOptions
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.Returns union: either
IResolvableorCfnDomain.CognitoOptionsProperty -
setCognitoOptions
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards. -
setCognitoOptions
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards. -
getDomainArn
-
setDomainArn
-
getDomainEndpointOptions
Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.Returns union: either
IResolvableorCfnDomain.DomainEndpointOptionsProperty -
setDomainEndpointOptions
Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint. -
setDomainEndpointOptions
@Stability(Stable) public void setDomainEndpointOptions(@Nullable CfnDomain.DomainEndpointOptionsProperty value) Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint. -
getDomainName
A name for the OpenSearch Service domain. -
setDomainName
A name for the OpenSearch Service domain. -
getEbsOptions
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.Returns union: either
IResolvableorCfnDomain.EBSOptionsProperty -
setEbsOptions
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain. -
setEbsOptions
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain. -
getElasticsearchClusterConfig
ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.Returns union: either
IResolvableorCfnDomain.ElasticsearchClusterConfigProperty -
setElasticsearchClusterConfig
ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain. -
setElasticsearchClusterConfig
@Stability(Stable) public void setElasticsearchClusterConfig(@Nullable CfnDomain.ElasticsearchClusterConfigProperty value) ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain. -
getElasticsearchVersion
The version of Elasticsearch to use, such as 2.3. If not specified, 1.5 is used as the default. For information about the versions that OpenSearch Service supports, see Supported versions of OpenSearch and Elasticsearch in the Amazon OpenSearch Service Developer Guide . -
setElasticsearchVersion
The version of Elasticsearch to use, such as 2.3. If not specified, 1.5 is used as the default. For information about the versions that OpenSearch Service supports, see Supported versions of OpenSearch and Elasticsearch in the Amazon OpenSearch Service Developer Guide . -
getEncryptionAtRestOptions
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.Returns union: either
IResolvableorCfnDomain.EncryptionAtRestOptionsProperty -
setEncryptionAtRestOptions
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use. -
setEncryptionAtRestOptions
@Stability(Stable) public void setEncryptionAtRestOptions(@Nullable CfnDomain.EncryptionAtRestOptionsProperty value) Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use. -
getLogPublishingOptions
An object with one or more of the following keys:SEARCH_SLOW_LOGS,ES_APPLICATION_LOGS,INDEX_SLOW_LOGS,AUDIT_LOGS, depending on the types of logs you want to publish.Returns union: either
IResolvableor Mapinvalid input: '<'String, eitherIResolvableorCfnDomain.LogPublishingOptionProperty> -
setLogPublishingOptions
An object with one or more of the following keys:SEARCH_SLOW_LOGS,ES_APPLICATION_LOGS,INDEX_SLOW_LOGS,AUDIT_LOGS, depending on the types of logs you want to publish. -
setLogPublishingOptions
An object with one or more of the following keys:SEARCH_SLOW_LOGS,ES_APPLICATION_LOGS,INDEX_SLOW_LOGS,AUDIT_LOGS, depending on the types of logs you want to publish. -
getNodeToNodeEncryptionOptions
Specifies whether node-to-node encryption is enabled.Returns union: either
IResolvableorCfnDomain.NodeToNodeEncryptionOptionsProperty -
setNodeToNodeEncryptionOptions
Specifies whether node-to-node encryption is enabled. -
setNodeToNodeEncryptionOptions
@Stability(Stable) public void setNodeToNodeEncryptionOptions(@Nullable CfnDomain.NodeToNodeEncryptionOptionsProperty value) Specifies whether node-to-node encryption is enabled. -
getSnapshotOptions
DEPRECATED .Returns union: either
IResolvableorCfnDomain.SnapshotOptionsProperty -
setSnapshotOptions
DEPRECATED . -
setSnapshotOptions
@Stability(Stable) public void setSnapshotOptions(@Nullable CfnDomain.SnapshotOptionsProperty value) DEPRECATED . -
getTagsRaw
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain. -
setTagsRaw
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain. -
getVpcOptions
The virtual private cloud (VPC) configuration for the OpenSearch Service domain.Returns union: either
IResolvableorCfnDomain.VPCOptionsProperty -
setVpcOptions
The virtual private cloud (VPC) configuration for the OpenSearch Service domain. -
setVpcOptions
The virtual private cloud (VPC) configuration for the OpenSearch Service domain.
-