updateGatewayTarget method
- required String gatewayIdentifier,
- required String name,
- required TargetConfiguration targetConfiguration,
- required String targetId,
- List<
CredentialProviderConfiguration> ? credentialProviderConfigurations, - String? description,
- MetadataConfiguration? metadataConfiguration,
- PrivateEndpoint? privateEndpoint,
Updates an existing gateway target.
You cannot update a target that is in a pending authorization state
(CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or
SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to
complete or fail before updating the target.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter gatewayIdentifier :
The unique identifier of the gateway associated with the target.
Parameter name :
The updated name for the gateway target.
Parameter targetId :
The unique identifier of the gateway target to update.
Parameter credentialProviderConfigurations :
The updated credential provider configurations for the gateway target.
Parameter description :
The updated description for the gateway target.
Parameter metadataConfiguration :
Configuration for HTTP header and query parameter propagation to the
gateway target.
Parameter privateEndpoint :
The private endpoint configuration for the gateway target. Use this to
connect the gateway to private resources in your VPC.
Implementation
Future<UpdateGatewayTargetResponse> updateGatewayTarget({
required String gatewayIdentifier,
required String name,
required TargetConfiguration targetConfiguration,
required String targetId,
List<CredentialProviderConfiguration>? credentialProviderConfigurations,
String? description,
MetadataConfiguration? metadataConfiguration,
PrivateEndpoint? privateEndpoint,
}) async {
final $payload = <String, dynamic>{
'name': name,
'targetConfiguration': targetConfiguration,
if (credentialProviderConfigurations != null)
'credentialProviderConfigurations': credentialProviderConfigurations,
if (description != null) 'description': description,
if (metadataConfiguration != null)
'metadataConfiguration': metadataConfiguration,
if (privateEndpoint != null) 'privateEndpoint': privateEndpoint,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/gateways/${Uri.encodeComponent(gatewayIdentifier)}/targets/${Uri.encodeComponent(targetId)}/',
exceptionFnMap: _exceptionFns,
);
return UpdateGatewayTargetResponse.fromJson(response);
}