Class DomainProps.Builder
java.lang.Object
software.amazon.awscdk.services.opensearchservice.DomainProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DomainProps>
- Enclosing interface:
DomainProps
@Stability(Stable)
public static final class DomainProps.Builder
extends Object
implements software.amazon.jsii.Builder<DomainProps>
A builder for
DomainProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessPolicies
(List<? extends PolicyStatement> accessPolicies) Sets the value ofDomainProps.getAccessPolicies()
advancedOptions
(Map<String, String> advancedOptions) Sets the value ofDomainProps.getAdvancedOptions()
automatedSnapshotStartHour
(Number automatedSnapshotStartHour) Sets the value ofDomainProps.getAutomatedSnapshotStartHour()
build()
Builds the configured instance.capacity
(CapacityConfig capacity) Sets the value ofDomainProps.getCapacity()
cognitoDashboardsAuth
(CognitoOptions cognitoDashboardsAuth) Sets the value ofDomainProps.getCognitoDashboardsAuth()
customEndpoint
(CustomEndpointOptions customEndpoint) Sets the value ofDomainProps.getCustomEndpoint()
domainName
(String domainName) Sets the value ofDomainProps.getDomainName()
ebs
(EbsOptions ebs) Sets the value ofDomainProps.getEbs()
enableVersionUpgrade
(Boolean enableVersionUpgrade) Sets the value ofDomainProps.getEnableVersionUpgrade()
encryptionAtRest
(EncryptionAtRestOptions encryptionAtRest) Sets the value ofDomainProps.getEncryptionAtRest()
enforceHttps
(Boolean enforceHttps) Sets the value ofDomainProps.getEnforceHttps()
fineGrainedAccessControl
(AdvancedSecurityOptions fineGrainedAccessControl) Sets the value ofDomainProps.getFineGrainedAccessControl()
logging
(LoggingOptions logging) Sets the value ofDomainProps.getLogging()
nodeToNodeEncryption
(Boolean nodeToNodeEncryption) Sets the value ofDomainProps.getNodeToNodeEncryption()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofDomainProps.getRemovalPolicy()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofDomainProps.getSecurityGroups()
tlsSecurityPolicy
(TLSSecurityPolicy tlsSecurityPolicy) Sets the value ofDomainProps.getTlsSecurityPolicy()
useUnsignedBasicAuth
(Boolean useUnsignedBasicAuth) Sets the value ofDomainProps.getUseUnsignedBasicAuth()
version
(EngineVersion version) Sets the value ofDomainProps.getVersion()
Sets the value ofDomainProps.getVpc()
vpcSubnets
(List<? extends SubnetSelection> vpcSubnets) Sets the value ofDomainProps.getVpcSubnets()
zoneAwareness
(ZoneAwarenessConfig zoneAwareness) Sets the value ofDomainProps.getZoneAwareness()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
version
Sets the value ofDomainProps.getVersion()
- Parameters:
version
- The Elasticsearch/OpenSearch version that your domain will leverage. This parameter is required.- Returns:
this
-
accessPolicies
@Stability(Stable) public DomainProps.Builder accessPolicies(List<? extends PolicyStatement> accessPolicies) Sets the value ofDomainProps.getAccessPolicies()
- Parameters:
accessPolicies
- Domain access policies.- Returns:
this
-
advancedOptions
Sets the value ofDomainProps.getAdvancedOptions()
- Parameters:
advancedOptions
- Additional options to specify for the Amazon OpenSearch Service domain.- Returns:
this
-
automatedSnapshotStartHour
@Stability(Stable) public DomainProps.Builder automatedSnapshotStartHour(Number automatedSnapshotStartHour) Sets the value ofDomainProps.getAutomatedSnapshotStartHour()
- Parameters:
automatedSnapshotStartHour
- The hour in UTC during which the service takes an automated daily snapshot of the indices in the Amazon OpenSearch Service domain. Only applies for Elasticsearch versions below 5.3.- Returns:
this
-
capacity
Sets the value ofDomainProps.getCapacity()
- Parameters:
capacity
- The cluster capacity configuration for the Amazon OpenSearch Service domain.- Returns:
this
-
cognitoDashboardsAuth
@Stability(Stable) public DomainProps.Builder cognitoDashboardsAuth(CognitoOptions cognitoDashboardsAuth) Sets the value ofDomainProps.getCognitoDashboardsAuth()
- Parameters:
cognitoDashboardsAuth
- Configures Amazon OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.- Returns:
this
-
customEndpoint
Sets the value ofDomainProps.getCustomEndpoint()
- Parameters:
customEndpoint
- To configure a custom domain configure these options. If you specify a Route53 hosted zone it will create a CNAME record and use DNS validation for the certificate- Returns:
this
-
domainName
Sets the value ofDomainProps.getDomainName()
- Parameters:
domainName
- Enforces a particular physical domain name.- Returns:
this
-
ebs
Sets the value ofDomainProps.getEbs()
- Parameters:
ebs
- The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the Amazon OpenSearch Service domain.- Returns:
this
-
enableVersionUpgrade
Sets the value ofDomainProps.getEnableVersionUpgrade()
- Parameters:
enableVersionUpgrade
- To upgrade an Amazon OpenSearch Service domain to a new version, rather than replacing the entire domain resource, use the EnableVersionUpgrade update policy.- Returns:
this
-
encryptionAtRest
@Stability(Stable) public DomainProps.Builder encryptionAtRest(EncryptionAtRestOptions encryptionAtRest) Sets the value ofDomainProps.getEncryptionAtRest()
- Parameters:
encryptionAtRest
- Encryption at rest options for the cluster.- Returns:
this
-
enforceHttps
Sets the value ofDomainProps.getEnforceHttps()
- Parameters:
enforceHttps
- True to require that all traffic to the domain arrive over HTTPS.- Returns:
this
-
fineGrainedAccessControl
@Stability(Stable) public DomainProps.Builder fineGrainedAccessControl(AdvancedSecurityOptions fineGrainedAccessControl) Sets the value ofDomainProps.getFineGrainedAccessControl()
- Parameters:
fineGrainedAccessControl
- Specifies options for fine-grained access control. Requires Elasticsearch version 6.7 or later or OpenSearch version 1.0 or later. Enabling fine-grained access control also requires encryption of data at rest and node-to-node encryption, along with enforced HTTPS.- Returns:
this
-
logging
Sets the value ofDomainProps.getLogging()
- Parameters:
logging
- Configuration log publishing configuration options.- Returns:
this
-
nodeToNodeEncryption
Sets the value ofDomainProps.getNodeToNodeEncryption()
- Parameters:
nodeToNodeEncryption
- Specify true to enable node to node encryption. Requires Elasticsearch version 6.0 or later or OpenSearch version 1.0 or later.- Returns:
this
-
removalPolicy
Sets the value ofDomainProps.getRemovalPolicy()
- Parameters:
removalPolicy
- Policy to apply when the domain is removed from the stack.- Returns:
this
-
securityGroups
@Stability(Stable) public DomainProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofDomainProps.getSecurityGroups()
- Parameters:
securityGroups
- The list of security groups that are associated with the VPC endpoints for the domain. Only used ifvpc
is specified.- Returns:
this
-
tlsSecurityPolicy
@Stability(Stable) public DomainProps.Builder tlsSecurityPolicy(TLSSecurityPolicy tlsSecurityPolicy) Sets the value ofDomainProps.getTlsSecurityPolicy()
- Parameters:
tlsSecurityPolicy
- The minimum TLS version required for traffic to the domain.- Returns:
this
-
useUnsignedBasicAuth
Sets the value ofDomainProps.getUseUnsignedBasicAuth()
- Parameters:
useUnsignedBasicAuth
- Configures the domain so that unsigned basic auth is enabled. If no master user is provided a default master user with usernameadmin
and a dynamically generated password stored in KMS is created. The password can be retrieved by gettingmasterUserPassword
from the domain instance.Setting this to true will also add an access policy that allows unsigned access, enable node to node encryption, encryption at rest. If conflicting settings are encountered (like disabling encryption at rest) enabling this setting will cause a failure.
- Returns:
this
-
vpc
Sets the value ofDomainProps.getVpc()
- Parameters:
vpc
- Place the domain inside this VPC.- Returns:
this
-
vpcSubnets
@Stability(Stable) public DomainProps.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets) Sets the value ofDomainProps.getVpcSubnets()
- Parameters:
vpcSubnets
- The specific vpc subnets the domain will be placed in. You must provide one subnet for each Availability Zone that your domain uses. For example, you must specify three subnet IDs for a three Availability Zone domain.Only used if
vpc
is specified.- Returns:
this
-
zoneAwareness
Sets the value ofDomainProps.getZoneAwareness()
- Parameters:
zoneAwareness
- The cluster zone awareness configuration for the Amazon OpenSearch Service domain.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DomainProps>
- Returns:
- a new instance of
DomainProps
- Throws:
NullPointerException
- if any required attribute was not provided
-