@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:59.255Z") public class CfnDomain extends CfnResource implements IInspectable
The AWS::OpenSearchService::Domain resource creates an Amazon OpenSearch Service domain.
The
AWS::OpenSearchService::Domain
resource replaces the legacy AWS::Elasticsearch::Domain resource. While the 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 engines. 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.opensearchservice.*; Object accessPolicies; CfnDomain cfnDomain = CfnDomain.Builder.create(this, "MyCfnDomain") .accessPolicies(accessPolicies) .advancedOptions(Map.of( "advancedOptionsKey", "advancedOptions")) .advancedSecurityOptions(AdvancedSecurityOptionsInputProperty.builder() .enabled(false) .internalUserDatabaseEnabled(false) .masterUserOptions(MasterUserOptionsProperty.builder() .masterUserArn("masterUserArn") .masterUserName("masterUserName") .masterUserPassword("masterUserPassword") .build()) .build()) .clusterConfig(ClusterConfigProperty.builder() .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()) .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()) .encryptionAtRestOptions(EncryptionAtRestOptionsProperty.builder() .enabled(false) .kmsKeyId("kmsKeyId") .build()) .engineVersion("engineVersion") .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.ClusterConfigProperty
The cluster configuration for the OpenSearch Service domain.
|
static interface |
CfnDomain.CognitoOptionsProperty
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.
|
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.EncryptionAtRestOptionsProperty
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.
|
static interface |
CfnDomain.LogPublishingOptionProperty
Specifies whether the OpenSearch Service domain publishes application, search slow logs, or index slow logs to Amazon CloudWatch.
|
static interface |
CfnDomain.MasterUserOptionsProperty
Specifies information about the master user.
|
static interface |
CfnDomain.NodeToNodeEncryptionOptionsProperty
Specifies options for node-to-node encryption.
|
static interface |
CfnDomain.SnapshotOptionsProperty
*DEPRECATED* .
|
static interface |
CfnDomain.VPCOptionsProperty
The virtual private cloud (VPC) configuration for the OpenSearch Service domain.
|
static interface |
CfnDomain.ZoneAwarenessConfigProperty
Specifies zone awareness configuration options.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDomain(Construct scope,
java.lang.String id)
Create a new `AWS::OpenSearchService::Domain`.
|
|
CfnDomain(Construct scope,
java.lang.String id,
CfnDomainProps props)
Create a new `AWS::OpenSearchService::Domain`.
|
protected |
CfnDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDomain(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAccessPolicies()
An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions.
|
java.lang.Object |
getAdvancedOptions()
Additional options to specify for the OpenSearch Service domain.
|
java.lang.Object |
getAdvancedSecurityOptions()
Specifies options for fine-grained access control.
|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the domain, such as `arn:aws:es:us-west-2:123456789012:domain/mystack-1ab2cdefghij` .
|
java.lang.String |
getAttrDomainEndpoint()
The domain-specific endpoint used for requests to the OpenSearch APIs, such as `search-mystack-1ab2cdefghij-ab1c2deckoyb3hofw7wpqa3cm.us-west-1.es.amazonaws.com` .
|
java.lang.String |
getAttrId()
The resource ID.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getClusterConfig()
`ClusterConfig` is a property of the AWS::OpenSearchService::Domain resource that configures an Amazon OpenSearch Service cluster.
|
java.lang.Object |
getCognitoOptions()
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.
|
java.lang.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.
|
java.lang.String |
getDomainName()
A name for the OpenSearch Service domain.
|
java.lang.Object |
getEbsOptions()
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.
|
java.lang.Object |
getEncryptionAtRestOptions()
Whether the domain should encrypt data at rest, and if so, the AWS KMS key to use.
|
java.lang.String |
getEngineVersion()
The version of OpenSearch to use.
|
java.lang.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.
|
java.lang.Object |
getNodeToNodeEncryptionOptions()
Specifies whether node-to-node encryption is enabled.
|
java.lang.Object |
getSnapshotOptions()
*DEPRECATED* .
|
TagManager |
getTags()
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAccessPolicies(java.lang.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(java.util.Map<java.lang.String,java.lang.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 |
setClusterConfig(CfnDomain.ClusterConfigProperty value)
`ClusterConfig` is a property of the AWS::OpenSearchService::Domain resource that configures an Amazon OpenSearch Service cluster.
|
void |
setClusterConfig(IResolvable value)
`ClusterConfig` is a property of the AWS::OpenSearchService::Domain resource that configures an Amazon OpenSearch Service cluster.
|
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(java.lang.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 |
setEncryptionAtRestOptions(CfnDomain.EncryptionAtRestOptionsProperty value)
Whether the domain should encrypt data at rest, and if so, the AWS KMS key to use.
|
void |
setEncryptionAtRestOptions(IResolvable value)
Whether the domain should encrypt data at rest, and if so, the AWS KMS key to use.
|
void |
setEngineVersion(java.lang.String value)
The version of OpenSearch 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(java.util.Map<java.lang.String,java.lang.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, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDomain(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDomain(Construct scope, java.lang.String id, 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.public CfnDomain(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrDomainEndpoint()
public java.lang.String getAttrId()
For example, 123456789012/my-domain
.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getAccessPolicies()
For more information, see Configuring access policies in the Amazon OpenSearch Service Developer Guide .
public void setAccessPolicies(java.lang.Object value)
For more information, see Configuring access policies in the Amazon OpenSearch Service Developer Guide .
public java.lang.Object getAdvancedOptions()
For more information, see AdvancedOptions in the OpenSearch Service configuration API reference.
public void setAdvancedOptions(IResolvable value)
For more information, see AdvancedOptions in the OpenSearch Service configuration API reference.
public void setAdvancedOptions(java.util.Map<java.lang.String,java.lang.String> value)
For more information, see AdvancedOptions in the OpenSearch Service configuration API reference.
public java.lang.Object getAdvancedSecurityOptions()
public void setAdvancedSecurityOptions(IResolvable value)
public void setAdvancedSecurityOptions(CfnDomain.AdvancedSecurityOptionsInputProperty value)
public java.lang.Object getClusterConfig()
public void setClusterConfig(IResolvable value)
public void setClusterConfig(CfnDomain.ClusterConfigProperty value)
public java.lang.Object getCognitoOptions()
public void setCognitoOptions(IResolvable value)
public void setCognitoOptions(CfnDomain.CognitoOptionsProperty value)
public java.lang.Object getDomainEndpointOptions()
public void setDomainEndpointOptions(IResolvable value)
public void setDomainEndpointOptions(CfnDomain.DomainEndpointOptionsProperty value)
public java.lang.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 .
Required when creating a new domain.
If you specify a name, you can't 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.
public void setDomainName(java.lang.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 .
Required when creating a new domain.
If you specify a name, you can't 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.
public java.lang.Object getEbsOptions()
For more information, see EBS volume size limits in the Amazon OpenSearch Service Developer Guide .
public void setEbsOptions(IResolvable value)
For more information, see EBS volume size limits in the Amazon OpenSearch Service Developer Guide .
public void setEbsOptions(CfnDomain.EBSOptionsProperty value)
For more information, see EBS volume size limits in the Amazon OpenSearch Service Developer Guide .
public java.lang.Object getEncryptionAtRestOptions()
See Encryption of data at rest for Amazon OpenSearch Service .
public void setEncryptionAtRestOptions(IResolvable value)
See Encryption of data at rest for Amazon OpenSearch Service .
public void setEncryptionAtRestOptions(CfnDomain.EncryptionAtRestOptionsProperty value)
See Encryption of data at rest for Amazon OpenSearch Service .
public java.lang.String getEngineVersion()
The value must be in the format OpenSearch_X.Y
or Elasticsearch_X.Y
. If not specified, the latest version of OpenSearch is used. For information about the versions that OpenSearch Service supports, see Supported versions of OpenSearch and Elasticsearch in the Amazon OpenSearch Service Developer Guide .
If you set the EnableVersionUpgrade update policy to true
, you can update EngineVersion
without interruption. When EnableVersionUpgrade
is set to false
, or is not specified, updating EngineVersion
results in replacement .
public void setEngineVersion(java.lang.String value)
The value must be in the format OpenSearch_X.Y
or Elasticsearch_X.Y
. If not specified, the latest version of OpenSearch is used. For information about the versions that OpenSearch Service supports, see Supported versions of OpenSearch and Elasticsearch in the Amazon OpenSearch Service Developer Guide .
If you set the EnableVersionUpgrade update policy to true
, you can update EngineVersion
without interruption. When EnableVersionUpgrade
is set to false
, or is not specified, updating EngineVersion
results in replacement .
public java.lang.Object getLogPublishingOptions()
Each key needs a valid LogPublishingOption
value. For the full syntax, see the examples .
public void setLogPublishingOptions(IResolvable value)
Each key needs a valid LogPublishingOption
value. For the full syntax, see the examples .
public void setLogPublishingOptions(java.util.Map<java.lang.String,java.lang.Object> value)
Each key needs a valid LogPublishingOption
value. For the full syntax, see the examples .
public java.lang.Object getNodeToNodeEncryptionOptions()
public void setNodeToNodeEncryptionOptions(IResolvable value)
public void setNodeToNodeEncryptionOptions(CfnDomain.NodeToNodeEncryptionOptionsProperty value)
public java.lang.Object getSnapshotOptions()
The automated snapshot configuration for the OpenSearch Service domain indices.
public void setSnapshotOptions(IResolvable value)
The automated snapshot configuration for the OpenSearch Service domain indices.
public void setSnapshotOptions(CfnDomain.SnapshotOptionsProperty value)
The automated snapshot configuration for the OpenSearch Service domain indices.
public java.lang.Object getVpcOptions()
For more information, see Launching your Amazon OpenSearch Service domains within a VPC in the Amazon OpenSearch Service Developer Guide .
public void setVpcOptions(IResolvable value)
For more information, see Launching your Amazon OpenSearch Service domains within a VPC in the Amazon OpenSearch Service Developer Guide .
public void setVpcOptions(CfnDomain.VPCOptionsProperty value)
For more information, see Launching your Amazon OpenSearch Service domains within a VPC in the Amazon OpenSearch Service Developer Guide .