associateHostedZone method

Future<AssociateHostedZoneOutput> associateHostedZone({
  1. required String hostedZoneId,
  2. required String name,
  3. required String resourceArn,
})

Associates a Route 53 private hosted zone with a Route 53 Global Resolver resource. This allows the resolver to resolve DNS queries for the private hosted zone from anywhere globally.

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

Parameter hostedZoneId : The ID of the Route 53 private hosted zone to associate with the Route 53 Global Resolver resource.

Parameter name : Name for the private hosted zone association.

Parameter resourceArn : An Amazon Resource Name (ARN) of the Route 53 Global Resolver the private hosted zone will be associated to.

Implementation

Future<AssociateHostedZoneOutput> associateHostedZone({
  required String hostedZoneId,
  required String name,
  required String resourceArn,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'resourceArn': resourceArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/hosted-zone-associations/${Uri.encodeComponent(hostedZoneId)}',
    exceptionFnMap: _exceptionFns,
  );
  return AssociateHostedZoneOutput.fromJson(response);
}