@Generated(value="jsii-pacmak/1.71.0 (build f1f58ae)", date="2022-12-07T17:24:44.921Z") @Stability(value=Stable) public class CfnDomain extends CfnResource implements IInspectable
The AWS::Elasticsearch::Domain resource creates an Amazon OpenSearch Service domain.
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())
.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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnDomain.AdvancedSecurityOptionsInputProperty
Specifies options for fine-grained access control.
|
static class |
CfnDomain.Builder
A fluent builder for
CfnDomain. |
static interface |
CfnDomain.CognitoOptionsProperty
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.
|
static interface |
CfnDomain.ColdStorageOptionsProperty
Specifies options for cold storage.
|
static interface |
CfnDomain.DomainEndpointOptionsProperty
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.
|
static interface |
CfnDomain.EBSOptionsProperty
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.
|
static interface |
CfnDomain.ElasticsearchClusterConfigProperty
The cluster configuration for the OpenSearch Service domain.
|
static interface |
CfnDomain.EncryptionAtRestOptionsProperty
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.
|
static interface |
CfnDomain.LogPublishingOptionProperty
> The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource.
|
static interface |
CfnDomain.MasterUserOptionsProperty
Specifies information about the master user.
|
static interface |
CfnDomain.NodeToNodeEncryptionOptionsProperty
Specifies whether node-to-node encryption is enabled.
|
static interface |
CfnDomain.SnapshotOptionsProperty
> The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource.
|
static interface |
CfnDomain.VPCOptionsProperty
The virtual private cloud (VPC) configuration for the OpenSearch Service domain.
|
static interface |
CfnDomain.ZoneAwarenessConfigProperty
Specifies zone awareness configuration options.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnDomain(Construct scope,
String id)
Create a new `AWS::Elasticsearch::Domain`.
|
|
CfnDomain(Construct scope,
String id,
CfnDomainProps props)
Create a new `AWS::Elasticsearch::Domain`.
|
protected |
CfnDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDomain(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAccessPolicies()
An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions.
|
Object |
getAdvancedOptions()
Additional options to specify for the OpenSearch Service domain.
|
Object |
getAdvancedSecurityOptions()
Specifies options for fine-grained access control.
|
String |
getAttrArn()
The Amazon Resource Name (ARN) of the domain, such as `arn:aws:es:us-west-2:123456789012:domain/mystack-elasti-1ab2cdefghij` .
|
String |
getAttrDomainEndpoint()
The domain-specific endpoint that's used for requests to the OpenSearch APIs, such as `search-mystack-elasti-1ab2cdefghij-ab1c2deckoyb3hofw7wpqa3cm.us-west-1.es.amazonaws.com` .
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getCognitoOptions()
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.
|
Object |
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.
|
String |
getDomainName()
A name for the OpenSearch Service domain.
|
Object |
getEbsOptions()
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.
|
Object |
getElasticsearchClusterConfig()
ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.
|
String |
getElasticsearchVersion()
The version of Elasticsearch to use, such as 2.3.
|
Object |
getEncryptionAtRestOptions()
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.
|
Object |
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.
|
Object |
getNodeToNodeEncryptionOptions()
Specifies whether node-to-node encryption is enabled.
|
Object |
getSnapshotOptions()
*DEPRECATED* .
|
TagManager |
getTags()
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain.
|
Object |
getVpcOptions()
The virtual private cloud (VPC) configuration for the OpenSearch Service domain.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAccessPolicies(Object value)
An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions.
|
void |
setAdvancedOptions(IResolvable value)
Additional options to specify for the OpenSearch Service domain.
|
void |
setAdvancedOptions(Map<String,String> value)
Additional options to specify for the OpenSearch Service domain.
|
void |
setAdvancedSecurityOptions(CfnDomain.AdvancedSecurityOptionsInputProperty value)
Specifies options for fine-grained access control.
|
void |
setAdvancedSecurityOptions(IResolvable value)
Specifies options for fine-grained access control.
|
void |
setCognitoOptions(CfnDomain.CognitoOptionsProperty value)
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.
|
void |
setCognitoOptions(IResolvable value)
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.
|
void |
setDomainEndpointOptions(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.
|
void |
setDomainEndpointOptions(IResolvable 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.
|
void |
setDomainName(String value)
A name for the OpenSearch Service domain.
|
void |
setEbsOptions(CfnDomain.EBSOptionsProperty value)
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.
|
void |
setEbsOptions(IResolvable value)
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.
|
void |
setElasticsearchClusterConfig(CfnDomain.ElasticsearchClusterConfigProperty value)
ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.
|
void |
setElasticsearchClusterConfig(IResolvable value)
ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.
|
void |
setElasticsearchVersion(String value)
The version of Elasticsearch to use, such as 2.3.
|
void |
setEncryptionAtRestOptions(CfnDomain.EncryptionAtRestOptionsProperty value)
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.
|
void |
setEncryptionAtRestOptions(IResolvable value)
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.
|
void |
setLogPublishingOptions(IResolvable 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.
|
void |
setLogPublishingOptions(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.
|
void |
setNodeToNodeEncryptionOptions(CfnDomain.NodeToNodeEncryptionOptionsProperty value)
Specifies whether node-to-node encryption is enabled.
|
void |
setNodeToNodeEncryptionOptions(IResolvable value)
Specifies whether node-to-node encryption is enabled.
|
void |
setSnapshotOptions(CfnDomain.SnapshotOptionsProperty value)
*DEPRECATED* .
|
void |
setSnapshotOptions(IResolvable value)
*DEPRECATED* .
|
void |
setVpcOptions(CfnDomain.VPCOptionsProperty value)
The virtual private cloud (VPC) configuration for the OpenSearch Service domain.
|
void |
setVpcOptions(IResolvable value)
The virtual private cloud (VPC) configuration for the OpenSearch Service domain.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnDomain(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnDomain(@NotNull
Construct scope,
@NotNull
String id,
@Nullable
CfnDomainProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
This returned value is the same as the one returned by AWS::Elasticsearch::Domain.DomainArn .
@Stability(value=Stable) @NotNull public String getAttrDomainEndpoint()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public Object getAccessPolicies()
For more information, see Configuring access policies in the Amazon OpenSearch Service Developer Guid e.
@Stability(value=Stable)
public void setAccessPolicies(@NotNull
Object value)
For more information, see Configuring access policies in the Amazon OpenSearch Service Developer Guid e.
@Stability(value=Stable) @Nullable public Object getAdvancedOptions()
For more information, see Advanced cluster parameters in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable)
public void setAdvancedOptions(@Nullable
IResolvable value)
For more information, see Advanced cluster parameters in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable)
public void setAdvancedOptions(@Nullable
Map<String,String> value)
For more information, see Advanced cluster parameters in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable) @Nullable public Object getAdvancedSecurityOptions()
@Stability(value=Stable)
public void setAdvancedSecurityOptions(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setAdvancedSecurityOptions(@Nullable
CfnDomain.AdvancedSecurityOptionsInputProperty value)
@Stability(value=Stable) @Nullable public Object getCognitoOptions()
@Stability(value=Stable)
public void setCognitoOptions(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setCognitoOptions(@Nullable
CfnDomain.CognitoOptionsProperty value)
@Stability(value=Stable) @Nullable public Object getDomainEndpointOptions()
@Stability(value=Stable)
public void setDomainEndpointOptions(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setDomainEndpointOptions(@Nullable
CfnDomain.DomainEndpointOptionsProperty value)
@Stability(value=Stable) @Nullable public String getDomainName()
For valid values, see the DomainName data type in the Amazon OpenSearch Service Developer Guide . If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the domain name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
@Stability(value=Stable)
public void setDomainName(@Nullable
String value)
For valid values, see the DomainName data type in the Amazon OpenSearch Service Developer Guide . If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the domain name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
@Stability(value=Stable) @Nullable public Object getEbsOptions()
For more information, see EBS volume size limits in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable)
public void setEbsOptions(@Nullable
IResolvable value)
For more information, see EBS volume size limits in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable)
public void setEbsOptions(@Nullable
CfnDomain.EBSOptionsProperty value)
For more information, see EBS volume size limits in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable) @Nullable public Object getElasticsearchClusterConfig()
@Stability(value=Stable)
public void setElasticsearchClusterConfig(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setElasticsearchClusterConfig(@Nullable
CfnDomain.ElasticsearchClusterConfigProperty value)
@Stability(value=Stable) @Nullable public String getElasticsearchVersion()
If you set the EnableVersionUpgrade update policy to true , you can update ElasticsearchVersion without interruption. When EnableVersionUpgrade is set to false , or is not specified, updating ElasticsearchVersion results in replacement .
@Stability(value=Stable)
public void setElasticsearchVersion(@Nullable
String value)
If you set the EnableVersionUpgrade update policy to true , you can update ElasticsearchVersion without interruption. When EnableVersionUpgrade is set to false , or is not specified, updating ElasticsearchVersion results in replacement .
@Stability(value=Stable) @Nullable public Object getEncryptionAtRestOptions()
See Encryption of data at rest for Amazon OpenSearch Service .
@Stability(value=Stable)
public void setEncryptionAtRestOptions(@Nullable
IResolvable value)
See Encryption of data at rest for Amazon OpenSearch Service .
@Stability(value=Stable)
public void setEncryptionAtRestOptions(@Nullable
CfnDomain.EncryptionAtRestOptionsProperty value)
See Encryption of data at rest for Amazon OpenSearch Service .
@Stability(value=Stable) @Nullable public Object getLogPublishingOptions()
Each key needs a valid LogPublishingOption value.
@Stability(value=Stable)
public void setLogPublishingOptions(@Nullable
IResolvable value)
Each key needs a valid LogPublishingOption value.
@Stability(value=Stable)
public void setLogPublishingOptions(@Nullable
Map<String,Object> value)
Each key needs a valid LogPublishingOption value.
@Stability(value=Stable) @Nullable public Object getNodeToNodeEncryptionOptions()
@Stability(value=Stable)
public void setNodeToNodeEncryptionOptions(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setNodeToNodeEncryptionOptions(@Nullable
CfnDomain.NodeToNodeEncryptionOptionsProperty value)
@Stability(value=Stable) @Nullable public Object getSnapshotOptions()
The automated snapshot configuration for the OpenSearch Service domain indices.
@Stability(value=Stable)
public void setSnapshotOptions(@Nullable
IResolvable value)
The automated snapshot configuration for the OpenSearch Service domain indices.
@Stability(value=Stable)
public void setSnapshotOptions(@Nullable
CfnDomain.SnapshotOptionsProperty value)
The automated snapshot configuration for the OpenSearch Service domain indices.
@Stability(value=Stable) @Nullable public Object getVpcOptions()
For more information, see Launching your Amazon OpenSearch Service domains within a VPC in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable)
public void setVpcOptions(@Nullable
IResolvable value)
For more information, see Launching your Amazon OpenSearch Service domains within a VPC in the Amazon OpenSearch Service Developer Guide .
@Stability(value=Stable)
public void setVpcOptions(@Nullable
CfnDomain.VPCOptionsProperty value)
For more information, see Launching your Amazon OpenSearch Service domains within a VPC in the Amazon OpenSearch Service Developer Guide .
Copyright © 2022. All rights reserved.