updateDomainConfig method

Future<UpdateDomainConfigResponse> updateDomainConfig({
  1. required String domainName,
  2. AIMLOptionsInput? aIMLOptions,
  3. String? accessPolicies,
  4. Map<String, String>? advancedOptions,
  5. AdvancedSecurityOptionsInput? advancedSecurityOptions,
  6. AutoTuneOptions? autoTuneOptions,
  7. AutomatedSnapshotPauseRequestOptions? automatedSnapshotPauseOptions,
  8. ClusterConfig? clusterConfig,
  9. CognitoOptions? cognitoOptions,
  10. DeploymentStrategyOptions? deploymentStrategyOptions,
  11. DomainEndpointOptions? domainEndpointOptions,
  12. bool? dryRun,
  13. DryRunMode? dryRunMode,
  14. EBSOptions? eBSOptions,
  15. EncryptionAtRestOptions? encryptionAtRestOptions,
  16. IPAddressType? iPAddressType,
  17. IdentityCenterOptionsInput? identityCenterOptions,
  18. Map<LogType, LogPublishingOption>? logPublishingOptions,
  19. NodeToNodeEncryptionOptions? nodeToNodeEncryptionOptions,
  20. OffPeakWindowOptions? offPeakWindowOptions,
  21. SnapshotOptions? snapshotOptions,
  22. SoftwareUpdateOptions? softwareUpdateOptions,
  23. VPCOptions? vPCOptions,
})

Modifies the cluster configuration of the specified Amazon OpenSearch Service domain.

May throw BaseException. May throw InternalException. May throw InvalidTypeException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainName : The name of the domain that you're updating.

Parameter aIMLOptions : Options for all machine learning features for the specified domain.

Parameter accessPolicies : Identity and Access Management (IAM) access policy as a JSON-formatted string.

Parameter advancedOptions : Key-value pairs to specify advanced configuration options. The following key-value pairs are supported:

  • "rest.action.multi.allow_explicit_index": "true" | "false" - Note the use of a string rather than a boolean. Specifies whether explicit references to indexes are allowed inside the body of HTTP requests. If you want to configure access policies for domain sub-resources, such as specific indexes and domain APIs, you must disable this property. Default is true.
  • "indices.fielddata.cache.size": "80" - Note the use of a string rather than a boolean. Specifies the percentage of heap space allocated to field data. Default is unbounded.
  • "indices.query.bool.max_clause_count": "1024" - Note the use of a string rather than a boolean. Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024. Queries with more than the permitted number of clauses result in a TooManyClauses error.
For more information, see Advanced cluster parameters.

Parameter advancedSecurityOptions : Options for fine-grained access control.

Parameter autoTuneOptions : Options for Auto-Tune.

Parameter automatedSnapshotPauseOptions : Specifies the automated snapshot pause options for the domain. Maximum suspension duration: 3 days.

Parameter clusterConfig : Changes that you want to make to the cluster configuration, such as the instance type and number of EC2 instances.

Parameter cognitoOptions : Key-value pairs to configure Amazon Cognito authentication for OpenSearch Dashboards.

Parameter deploymentStrategyOptions : Specifies the deployment strategy options for the domain.

Parameter domainEndpointOptions : Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.

Parameter dryRun : This flag, when set to True, specifies whether the UpdateDomain request should return the results of a dry run analysis without actually applying the change. A dry run determines what type of deployment the update will cause.

Parameter dryRunMode : The type of dry run to perform.

  • Basic only returns the type of deployment (blue/green or dynamic) that the update will cause.
  • Verbose runs an additional check to validate the changes you're making. For more information, see Validating a domain update.

Parameter eBSOptions : The type and size of the EBS volume to attach to instances in the domain.

Parameter encryptionAtRestOptions : Encryption at rest options for the domain.

Parameter 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 your IP address type is currently set to dual stack, you can't change it.

Parameter logPublishingOptions : Options to publish OpenSearch logs to Amazon CloudWatch Logs.

Parameter nodeToNodeEncryptionOptions : Node-to-node encryption options for the domain.

Parameter offPeakWindowOptions : Off-peak window options for the domain.

Parameter snapshotOptions : Option to set the time, in UTC format, for the daily automated snapshot. Default value is 0 hours.

Parameter softwareUpdateOptions : Service software update options for the domain.

Parameter vPCOptions : Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your Amazon OpenSearch Service domains using a VPC.

Implementation

Future<UpdateDomainConfigResponse> updateDomainConfig({
  required String domainName,
  AIMLOptionsInput? aIMLOptions,
  String? accessPolicies,
  Map<String, String>? advancedOptions,
  AdvancedSecurityOptionsInput? advancedSecurityOptions,
  AutoTuneOptions? autoTuneOptions,
  AutomatedSnapshotPauseRequestOptions? automatedSnapshotPauseOptions,
  ClusterConfig? clusterConfig,
  CognitoOptions? cognitoOptions,
  DeploymentStrategyOptions? deploymentStrategyOptions,
  DomainEndpointOptions? domainEndpointOptions,
  bool? dryRun,
  DryRunMode? dryRunMode,
  EBSOptions? eBSOptions,
  EncryptionAtRestOptions? encryptionAtRestOptions,
  IPAddressType? iPAddressType,
  IdentityCenterOptionsInput? identityCenterOptions,
  Map<LogType, LogPublishingOption>? logPublishingOptions,
  NodeToNodeEncryptionOptions? nodeToNodeEncryptionOptions,
  OffPeakWindowOptions? offPeakWindowOptions,
  SnapshotOptions? snapshotOptions,
  SoftwareUpdateOptions? softwareUpdateOptions,
  VPCOptions? vPCOptions,
}) async {
  final $payload = <String, dynamic>{
    if (aIMLOptions != null) 'AIMLOptions': aIMLOptions,
    if (accessPolicies != null) 'AccessPolicies': accessPolicies,
    if (advancedOptions != null) 'AdvancedOptions': advancedOptions,
    if (advancedSecurityOptions != null)
      'AdvancedSecurityOptions': advancedSecurityOptions,
    if (autoTuneOptions != null) 'AutoTuneOptions': autoTuneOptions,
    if (automatedSnapshotPauseOptions != null)
      'AutomatedSnapshotPauseOptions': automatedSnapshotPauseOptions,
    if (clusterConfig != null) 'ClusterConfig': clusterConfig,
    if (cognitoOptions != null) 'CognitoOptions': cognitoOptions,
    if (deploymentStrategyOptions != null)
      'DeploymentStrategyOptions': deploymentStrategyOptions,
    if (domainEndpointOptions != null)
      'DomainEndpointOptions': domainEndpointOptions,
    if (dryRun != null) 'DryRun': dryRun,
    if (dryRunMode != null) 'DryRunMode': dryRunMode.value,
    if (eBSOptions != null) 'EBSOptions': eBSOptions,
    if (encryptionAtRestOptions != null)
      'EncryptionAtRestOptions': encryptionAtRestOptions,
    if (iPAddressType != null) 'IPAddressType': iPAddressType.value,
    if (identityCenterOptions != null)
      'IdentityCenterOptions': identityCenterOptions,
    if (logPublishingOptions != null)
      'LogPublishingOptions':
          logPublishingOptions.map((k, e) => MapEntry(k.value, e)),
    if (nodeToNodeEncryptionOptions != null)
      'NodeToNodeEncryptionOptions': nodeToNodeEncryptionOptions,
    if (offPeakWindowOptions != null)
      'OffPeakWindowOptions': offPeakWindowOptions,
    if (snapshotOptions != null) 'SnapshotOptions': snapshotOptions,
    if (softwareUpdateOptions != null)
      'SoftwareUpdateOptions': softwareUpdateOptions,
    if (vPCOptions != null) 'VPCOptions': vPCOptions,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}/config',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDomainConfigResponse.fromJson(response);
}