putDeploymentParameter method
Creates or updates a deployment parameter and is targeted by
catalog and agreementId.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agreementId :
The unique identifier of the agreement.
Parameter catalog :
The catalog related to the request. Fixed value:
AWSMarketplace
Parameter deploymentParameter :
The deployment parameter targeted to the acceptor of an agreement for
which to create the AWS Secret Manager resource.
Parameter productId :
The product for which AWS Marketplace will save secrets for the buyer’s
account.
Parameter clientToken :
The idempotency token for deployment parameters. A unique identifier for
the new version.
Parameter expirationDate :
The date when deployment parameters expire and are scheduled for deletion.
Parameter tags :
A map of key-value pairs, where each pair represents a tag saved to the
resource. Tags will only be applied for create operations, and they'll be
ignored if the resource already exists.
Implementation
Future<PutDeploymentParameterResponse> putDeploymentParameter({
required String agreementId,
required String catalog,
required DeploymentParameterInput deploymentParameter,
required String productId,
String? clientToken,
DateTime? expirationDate,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'agreementId': agreementId,
'deploymentParameter': deploymentParameter,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (expirationDate != null)
'expirationDate': iso8601ToJson(expirationDate),
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/catalogs/${Uri.encodeComponent(catalog)}/products/${Uri.encodeComponent(productId)}/deployment-parameters',
exceptionFnMap: _exceptionFns,
);
return PutDeploymentParameterResponse.fromJson(response);
}