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 Details

    • Builder

      public Builder()
  • Method Details

    • version

      @Stability(Stable) public DomainProps.Builder version(EngineVersion version)
      Sets the value of DomainProps.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)
      Parameters:
      accessPolicies - Domain access policies.
      Returns:
      this
    • advancedOptions

      @Stability(Stable) public DomainProps.Builder advancedOptions(Map<String,String> advancedOptions)
      Parameters:
      advancedOptions - Additional options to specify for the Amazon OpenSearch Service domain.
      Returns:
      this
    • automatedSnapshotStartHour

      @Stability(Stable) public DomainProps.Builder automatedSnapshotStartHour(Number automatedSnapshotStartHour)
      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

      @Stability(Stable) public DomainProps.Builder capacity(CapacityConfig capacity)
      Sets the value of DomainProps.getCapacity()
      Parameters:
      capacity - The cluster capacity configuration for the Amazon OpenSearch Service domain.
      Returns:
      this
    • cognitoDashboardsAuth

      @Stability(Stable) public DomainProps.Builder cognitoDashboardsAuth(CognitoOptions cognitoDashboardsAuth)
      Parameters:
      cognitoDashboardsAuth - Configures Amazon OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.
      Returns:
      this
    • customEndpoint

      @Stability(Stable) public DomainProps.Builder customEndpoint(CustomEndpointOptions customEndpoint)
      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

      @Stability(Stable) public DomainProps.Builder domainName(String domainName)
      Sets the value of DomainProps.getDomainName()
      Parameters:
      domainName - Enforces a particular physical domain name.
      Returns:
      this
    • ebs

      @Stability(Stable) public DomainProps.Builder ebs(EbsOptions ebs)
      Sets the value of DomainProps.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

      @Stability(Stable) public DomainProps.Builder enableVersionUpgrade(Boolean enableVersionUpgrade)
      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)
      Parameters:
      encryptionAtRest - Encryption at rest options for the cluster.
      Returns:
      this
    • enforceHttps

      @Stability(Stable) public DomainProps.Builder enforceHttps(Boolean enforceHttps)
      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)
      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

      @Stability(Stable) public DomainProps.Builder logging(LoggingOptions logging)
      Sets the value of DomainProps.getLogging()
      Parameters:
      logging - Configuration log publishing configuration options.
      Returns:
      this
    • nodeToNodeEncryption

      @Stability(Stable) public DomainProps.Builder nodeToNodeEncryption(Boolean nodeToNodeEncryption)
      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

      @Stability(Stable) public DomainProps.Builder removalPolicy(RemovalPolicy removalPolicy)
      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)
      Parameters:
      securityGroups - The list of security groups that are associated with the VPC endpoints for the domain. Only used if vpc is specified.
      Returns:
      this
    • tlsSecurityPolicy

      @Stability(Stable) public DomainProps.Builder tlsSecurityPolicy(TLSSecurityPolicy tlsSecurityPolicy)
      Parameters:
      tlsSecurityPolicy - The minimum TLS version required for traffic to the domain.
      Returns:
      this
    • useUnsignedBasicAuth

      @Stability(Stable) public DomainProps.Builder useUnsignedBasicAuth(Boolean useUnsignedBasicAuth)
      Parameters:
      useUnsignedBasicAuth - Configures the domain so that unsigned basic auth is enabled. If no master user is provided a default master user with username admin and a dynamically generated password stored in KMS is created. The password can be retrieved by getting masterUserPassword 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

      @Stability(Stable) public DomainProps.Builder vpc(IVpc vpc)
      Sets the value of DomainProps.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 of DomainProps.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

      @Stability(Stable) public DomainProps.Builder zoneAwareness(ZoneAwarenessConfig zoneAwareness)
      Parameters:
      zoneAwareness - The cluster zone awareness configuration for the Amazon OpenSearch Service domain.
      Returns:
      this
    • build

      @Stability(Stable) public DomainProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<DomainProps>
      Returns:
      a new instance of DomainProps
      Throws:
      NullPointerException - if any required attribute was not provided