createDomainNameAccessAssociation method

Future<DomainNameAccessAssociation> createDomainNameAccessAssociation({
  1. required String accessAssociationSource,
  2. required AccessAssociationSourceType accessAssociationSourceType,
  3. required String domainNameArn,
  4. Map<String, String>? tags,
})

Creates a domain name access association resource between an access association source and a private custom domain name.

May throw BadRequestException. May throw ConflictException. May throw LimitExceededException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter accessAssociationSource : The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.

Parameter accessAssociationSourceType : The type of the domain name access association source.

Parameter domainNameArn : The ARN of the domain name.

Parameter tags : The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.

Implementation

Future<DomainNameAccessAssociation> createDomainNameAccessAssociation({
  required String accessAssociationSource,
  required AccessAssociationSourceType accessAssociationSourceType,
  required String domainNameArn,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'accessAssociationSource': accessAssociationSource,
    'accessAssociationSourceType': accessAssociationSourceType.value,
    'domainNameArn': domainNameArn,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/domainnameaccessassociations',
    exceptionFnMap: _exceptionFns,
  );
  return DomainNameAccessAssociation.fromJson(response);
}