createProfile method

Future<CreateProfileResponse> createProfile({
  1. required String name,
  2. String? clientToken,
  3. List<Tag>? tags,
})

Creates an empty Route 53 Profile.

May throw AccessDeniedException. May throw InvalidParameterException. May throw LimitExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter name : A name for the Profile.

Parameter clientToken : ClientToken is an idempotency token that ensures a call to CreateProfile completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from CreateProfile. In this case, safely retry your call to CreateProfile by using the same CreateProfile parameter value.

Parameter tags : A list of the tag keys and values that you want to associate with the Route 53 Profile.

Implementation

Future<CreateProfileResponse> createProfile({
  required String name,
  String? clientToken,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/profile',
    exceptionFnMap: _exceptionFns,
  );
  return CreateProfileResponse.fromJson(response);
}