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
    • coldStorageEnabled

      @Stability(Stable) public DomainProps.Builder coldStorageEnabled(Boolean coldStorageEnabled)
      Parameters:
      coldStorageEnabled - Whether to enable or disable cold storage on the domain. You must enable UltraWarm storage to enable cold storage.
      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
    • enableAutoSoftwareUpdate

      @Stability(Stable) public DomainProps.Builder enableAutoSoftwareUpdate(Boolean enableAutoSoftwareUpdate)
      Parameters:
      enableAutoSoftwareUpdate - Specifies whether automatic service software updates are enabled for the 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
    • ipAddressType

      @Stability(Stable) public DomainProps.Builder ipAddressType(IpAddressType ipAddressType)
      Parameters:
      ipAddressType - Specify either dual stack or IPv4 as your IP address type. Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option.

      If you set your IP address type to dual stack, you can't change your address type later.

      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
    • offPeakWindowEnabled

      @Stability(Stable) public DomainProps.Builder offPeakWindowEnabled(Boolean offPeakWindowEnabled)
      Parameters:
      offPeakWindowEnabled - Options for enabling a domain's off-peak window, during which OpenSearch Service can perform mandatory configuration changes on the domain. Off-peak windows were introduced on February 16, 2023. All domains created before this date have the off-peak window disabled by default. You must manually enable and configure the off-peak window for these domains. All domains created after this date will have the off-peak window enabled by default. You can't disable the off-peak window for a domain after it's enabled.
      Returns:
      this
    • offPeakWindowStart

      @Stability(Stable) public DomainProps.Builder offPeakWindowStart(WindowStartTime offPeakWindowStart)
      Parameters:
      offPeakWindowStart - Start time for the off-peak window, in Coordinated Universal Time (UTC). The window length will always be 10 hours, so you can't specify an end time. For example, if you specify 11:00 P.M. UTC as a start time, the end time will automatically be set to 9:00 A.M.
      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
    • suppressLogsResourcePolicy

      @Stability(Stable) public DomainProps.Builder suppressLogsResourcePolicy(Boolean suppressLogsResourcePolicy)
      Parameters:
      suppressLogsResourcePolicy - Specify whether to create a CloudWatch Logs resource policy or not. When logging is enabled for the domain, a CloudWatch Logs resource policy is created by default. However, CloudWatch Logs supports only 10 resource policies per region. If you enable logging for several domains, it may hit the quota and cause an error. By setting this property to true, creating a resource policy is suppressed, allowing you to avoid this problem.

      If you set this option to true, you must create a resource policy before deployment.

      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