updateDomain method

Future<UpdateDomainOutput> updateDomain({
  1. required String identifier,
  2. String? clientToken,
  3. String? description,
  4. String? domainExecutionRole,
  5. String? name,
  6. String? serviceRole,
  7. SingleSignOn? singleSignOn,
})

Updates a Amazon DataZone domain.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter identifier : The ID of the Amazon Web Services domain that is to be updated.

Parameter clientToken : A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Parameter description : The description to be updated as part of the UpdateDomain action.

Parameter domainExecutionRole : The domain execution role to be updated as part of the UpdateDomain action.

Parameter name : The name to be updated as part of the UpdateDomain action.

Parameter serviceRole : The service role of the domain.

Parameter singleSignOn : The single sign-on option to be updated as part of the UpdateDomain action.

Implementation

Future<UpdateDomainOutput> updateDomain({
  required String identifier,
  String? clientToken,
  String? description,
  String? domainExecutionRole,
  String? name,
  String? serviceRole,
  SingleSignOn? singleSignOn,
}) async {
  final $query = <String, List<String>>{
    if (clientToken != null) 'clientToken': [clientToken],
  };
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (domainExecutionRole != null)
      'domainExecutionRole': domainExecutionRole,
    if (name != null) 'name': name,
    if (serviceRole != null) 'serviceRole': serviceRole,
    if (singleSignOn != null) 'singleSignOn': singleSignOn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v2/domains/${Uri.encodeComponent(identifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDomainOutput.fromJson(response);
}