updateDomainConfig method

Future<UpdateDomainConfigResponse> updateDomainConfig({
  1. required String domainName,
  2. String? accessPolicies,
  3. Map<String, String>? advancedOptions,
  4. AdvancedSecurityOptionsInput? advancedSecurityOptions,
  5. AutoTuneOptions? autoTuneOptions,
  6. ClusterConfig? clusterConfig,
  7. CognitoOptions? cognitoOptions,
  8. DomainEndpointOptions? domainEndpointOptions,
  9. bool? dryRun,
  10. EBSOptions? eBSOptions,
  11. EncryptionAtRestOptions? encryptionAtRestOptions,
  12. Map<LogType, LogPublishingOption>? logPublishingOptions,
  13. NodeToNodeEncryptionOptions? nodeToNodeEncryptionOptions,
  14. SnapshotOptions? snapshotOptions,
  15. VPCOptions? vPCOptions,
})

Modifies the cluster configuration of the specified domain, such as setting the instance type and the number of instances.

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 you're updating.

Parameter accessPolicies : IAM access policy as a JSON-formatted string.

Parameter advancedOptions : Modifies the advanced option to allow references to indices in an HTTP request body. Must be false when configuring access to individual sub-resources. By default, the value is true. See Advanced options for more information.

Parameter advancedSecurityOptions : Specifies advanced security options.

Parameter autoTuneOptions : Specifies Auto-Tune options.

Parameter clusterConfig : The type and number of instances to instantiate for the domain cluster.

Parameter cognitoOptions : Options to specify the Cognito user and identity pools for OpenSearch Dashboards authentication. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.

Parameter domainEndpointOptions : Options to specify configuration that will be applied to the domain endpoint.

Parameter dryRun : This flag, when set to True, specifies whether the UpdateDomain request should return the results of validation checks (DryRunResults) without actually applying the change.

Parameter eBSOptions : Specify the type and size of the EBS volume to use.

Parameter encryptionAtRestOptions : Specifies encryption of data at rest options.

Parameter logPublishingOptions : Map of LogType and LogPublishingOption, each containing options to publish a given type of OpenSearch log.

Parameter nodeToNodeEncryptionOptions : Specifies node-to-node encryption options.

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

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

Implementation

Future<UpdateDomainConfigResponse> updateDomainConfig({
  required String domainName,
  String? accessPolicies,
  Map<String, String>? advancedOptions,
  AdvancedSecurityOptionsInput? advancedSecurityOptions,
  AutoTuneOptions? autoTuneOptions,
  ClusterConfig? clusterConfig,
  CognitoOptions? cognitoOptions,
  DomainEndpointOptions? domainEndpointOptions,
  bool? dryRun,
  EBSOptions? eBSOptions,
  EncryptionAtRestOptions? encryptionAtRestOptions,
  Map<LogType, LogPublishingOption>? logPublishingOptions,
  NodeToNodeEncryptionOptions? nodeToNodeEncryptionOptions,
  SnapshotOptions? snapshotOptions,
  VPCOptions? vPCOptions,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  _s.validateStringLength(
    'accessPolicies',
    accessPolicies,
    0,
    102400,
  );
  final $payload = <String, dynamic>{
    if (accessPolicies != null) 'AccessPolicies': accessPolicies,
    if (advancedOptions != null) 'AdvancedOptions': advancedOptions,
    if (advancedSecurityOptions != null)
      'AdvancedSecurityOptions': advancedSecurityOptions,
    if (autoTuneOptions != null) 'AutoTuneOptions': autoTuneOptions,
    if (clusterConfig != null) 'ClusterConfig': clusterConfig,
    if (cognitoOptions != null) 'CognitoOptions': cognitoOptions,
    if (domainEndpointOptions != null)
      'DomainEndpointOptions': domainEndpointOptions,
    if (dryRun != null) 'DryRun': dryRun,
    if (eBSOptions != null) 'EBSOptions': eBSOptions,
    if (encryptionAtRestOptions != null)
      'EncryptionAtRestOptions': encryptionAtRestOptions,
    if (logPublishingOptions != null)
      'LogPublishingOptions':
          logPublishingOptions.map((k, e) => MapEntry(k.toValue(), e)),
    if (nodeToNodeEncryptionOptions != null)
      'NodeToNodeEncryptionOptions': nodeToNodeEncryptionOptions,
    if (snapshotOptions != null) 'SnapshotOptions': snapshotOptions,
    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);
}