createOutpostResolver method

Future<CreateOutpostResolverResponse> createOutpostResolver({
  1. required String creatorRequestId,
  2. required String name,
  3. required String outpostArn,
  4. required String preferredInstanceType,
  5. int? instanceCount,
  6. List<Tag>? tags,
})

Creates a Route 53 Resolver on an Outpost.

May throw AccessDeniedException. May throw InternalServiceErrorException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter creatorRequestId : A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice.

CreatorRequestId can be any unique string, for example, a date/time stamp.

Parameter name : A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console.

Parameter outpostArn : The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the PreferredInstanceType.

Parameter preferredInstanceType : The Amazon EC2 instance type. If you specify this, you must also specify a value for the OutpostArn.

Parameter instanceCount : Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.

Parameter tags : A string that helps identify the Route 53 Resolvers on Outpost.

Implementation

Future<CreateOutpostResolverResponse> createOutpostResolver({
  required String creatorRequestId,
  required String name,
  required String outpostArn,
  required String preferredInstanceType,
  int? instanceCount,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.CreateOutpostResolver'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CreatorRequestId': creatorRequestId,
      'Name': name,
      'OutpostArn': outpostArn,
      'PreferredInstanceType': preferredInstanceType,
      if (instanceCount != null) 'InstanceCount': instanceCount,
      if (tags != null) 'Tags': tags,
    },
  );

  return CreateOutpostResolverResponse.fromJson(jsonResponse.body);
}