associateResourceToProfile method

Future<AssociateResourceToProfileResponse> associateResourceToProfile({
  1. required String name,
  2. required String profileId,
  3. required String resourceArn,
  4. String? resourceProperties,
})

Associates a DNS reource configuration to a Route 53 Profile.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServiceErrorException. May throw InvalidParameterException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter name : Name for the resource association.

Parameter profileId : ID of the Profile.

Parameter resourceArn : Amazon resource number, ARN, of the DNS resource.

Parameter resourceProperties : If you are adding a DNS Firewall rule group, include also a priority. The priority indicates the processing order for the rule groups, starting with the priority assinged the lowest value.

The allowed values for priority are between 100 and 9900.

Implementation

Future<AssociateResourceToProfileResponse> associateResourceToProfile({
  required String name,
  required String profileId,
  required String resourceArn,
  String? resourceProperties,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'ProfileId': profileId,
    'ResourceArn': resourceArn,
    if (resourceProperties != null) 'ResourceProperties': resourceProperties,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/profileresourceassociation',
    exceptionFnMap: _exceptionFns,
  );
  return AssociateResourceToProfileResponse.fromJson(response);
}