putAttachmentRoutingPolicyLabel method
Applies a routing policy label to an attachment for traffic routing decisions.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter attachmentId :
The ID of the attachment to apply the routing policy label to.
Parameter coreNetworkId :
The ID of the core network containing the attachment.
Parameter routingPolicyLabel :
The routing policy label to apply to the attachment.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Implementation
Future<PutAttachmentRoutingPolicyLabelResponse>
putAttachmentRoutingPolicyLabel({
required String attachmentId,
required String coreNetworkId,
required String routingPolicyLabel,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'AttachmentId': attachmentId,
'CoreNetworkId': coreNetworkId,
'RoutingPolicyLabel': routingPolicyLabel,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/routing-policy-label',
exceptionFnMap: _exceptionFns,
);
return PutAttachmentRoutingPolicyLabelResponse.fromJson(response);
}