createDomainName method
Future<CreateDomainNameResponse>
createDomainName({
- required String domainName,
- List<
DomainNameConfiguration> ? domainNameConfigurations, - MutualTlsAuthenticationInput? mutualTlsAuthentication,
- Map<
String, String> ? tags,
Creates a domain name.
May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException. May throw ConflictException. May throw AccessDeniedException.
Parameter domainName
:
The domain name.
Parameter domainNameConfigurations
:
The domain name configurations.
Parameter mutualTlsAuthentication
:
The mutual TLS authentication configuration for a custom domain name.
Parameter tags
:
The collection of tags associated with a domain name.
Implementation
Future<CreateDomainNameResponse> createDomainName({
required String domainName,
List<DomainNameConfiguration>? domainNameConfigurations,
MutualTlsAuthenticationInput? mutualTlsAuthentication,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(domainName, 'domainName');
final $payload = <String, dynamic>{
'domainName': domainName,
if (domainNameConfigurations != null)
'domainNameConfigurations': domainNameConfigurations,
if (mutualTlsAuthentication != null)
'mutualTlsAuthentication': mutualTlsAuthentication,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/domainnames',
exceptionFnMap: _exceptionFns,
);
return CreateDomainNameResponse.fromJson(response);
}