updateDomainConfiguration method
- required String domainConfigurationName,
- ApplicationProtocol? applicationProtocol,
- AuthenticationType? authenticationType,
- AuthorizerConfig? authorizerConfig,
- ClientCertificateConfig? clientCertificateConfig,
- DomainConfigurationStatus? domainConfigurationStatus,
- bool? removeAuthorizerConfig,
- ServerCertificateConfig? serverCertificateConfig,
- TlsConfig? tlsConfig,
Updates values stored in the domain configuration. Domain configurations for default endpoints can't be updated.
Requires permission to access the UpdateDomainConfiguration action.
May throw CertificateValidationException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
Parameter domainConfigurationName :
The name of the domain configuration to be updated.
Parameter applicationProtocol :
An enumerated string that specifies the application-layer protocol.
-
SECURE_MQTT- MQTT over TLS.
-
MQTT_WSS- MQTT over WebSocket.
-
HTTPS- HTTP over TLS.
-
DEFAULT- Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol. For more information, see Device communication protocols.
Parameter authenticationType :
An enumerated string that specifies the authentication type.
-
CUSTOM_AUTH_X509- Use custom authentication and authorization with additional details from the X.509 client certificate.
-
CUSTOM_AUTH- Use custom authentication and authorization. For more information, see Custom authentication and authorization.
-
AWS_X509- Use X.509 client certificates without custom authentication and authorization. For more information, see X.509 client certificates.
-
AWS_SIGV4- Use Amazon Web Services Signature Version 4. For more information, see IAM users, groups, and roles.
-
DEFAULT- Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see Device communication protocols.
Parameter authorizerConfig :
An object that specifies the authorization service for a domain.
Parameter clientCertificateConfig :
An object that specifies the client certificate configuration for a domain.
Parameter domainConfigurationStatus :
The status to which the domain configuration should be updated.
Parameter removeAuthorizerConfig :
Removes the authorization configuration from a domain.
Parameter serverCertificateConfig :
The server certificate configuration.
Parameter tlsConfig :
An object that specifies the TLS configuration for a domain.
Implementation
Future<UpdateDomainConfigurationResponse> updateDomainConfiguration({
required String domainConfigurationName,
ApplicationProtocol? applicationProtocol,
AuthenticationType? authenticationType,
AuthorizerConfig? authorizerConfig,
ClientCertificateConfig? clientCertificateConfig,
DomainConfigurationStatus? domainConfigurationStatus,
bool? removeAuthorizerConfig,
ServerCertificateConfig? serverCertificateConfig,
TlsConfig? tlsConfig,
}) async {
final $payload = <String, dynamic>{
if (applicationProtocol != null)
'applicationProtocol': applicationProtocol.value,
if (authenticationType != null)
'authenticationType': authenticationType.value,
if (authorizerConfig != null) 'authorizerConfig': authorizerConfig,
if (clientCertificateConfig != null)
'clientCertificateConfig': clientCertificateConfig,
if (domainConfigurationStatus != null)
'domainConfigurationStatus': domainConfigurationStatus.value,
if (removeAuthorizerConfig != null)
'removeAuthorizerConfig': removeAuthorizerConfig,
if (serverCertificateConfig != null)
'serverCertificateConfig': serverCertificateConfig,
if (tlsConfig != null) 'tlsConfig': tlsConfig,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/domainConfigurations/${Uri.encodeComponent(domainConfigurationName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDomainConfigurationResponse.fromJson(response);
}