put_deployment_parameter
¶
put_deployment_parameter(
catalog: Catalog,
product_id: ResourceId,
agreement_id: ResourceId,
deployment_parameter: DeploymentParameterInput,
*,
config_overrides: Optional[MarketplaceDeploymentClientConfig] = None,
tags: Optional[TagsMap] = None,
expiration_date: Optional[datetime] = None,
client_token: Optional[ClientToken] = None,
) -> PutDeploymentParameterResponse
Creates or updates a deployment parameter and is targeted by catalog and agreementId.
Parameters:
-
catalog(Catalog) –The catalog related to the request. Fixed value:
AWSMarketplace -
product_id(ResourceId) –The product for which AWS Marketplace will save secrets for the buyer’s account.
-
agreement_id(ResourceId) –The unique identifier of the agreement.
-
deployment_parameter(DeploymentParameterInput) –The deployment parameter targeted to the acceptor of an agreement for which to create the AWS Secret Manager resource.
-
tags(Optional[TagsMap], default:None) –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.
-
expiration_date(Optional[datetime], default:None) –The date when deployment parameters expire and are scheduled for deletion.
-
client_token(Optional[ClientToken], default:None) –The idempotency token for deployment parameters. A unique identifier for the new version.
This field is not required if you're calling using an AWS SDK. Otherwise, a
clientTokenmust be provided with the request.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request configuration has conflicts. For details, see the accompanying error message.
-
InternalServerException–There was an internal service exception.
-
ResourceNotFoundException–The specified resource wasn't found.
-
ServiceQuotaExceededException–The maximum number of requests per account has been exceeded.
-
ThrottlingException–Too many requests.
-
ValidationException–An error occurred during validation.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Creating or updating a deployment parameter
The following example demonstrates creating or updating a deployment parameter named "ExampleDeploymentParameterName". The secret will be saved in the Buyer account associated with the passed agreementId, with the value set to the provided secretString. Note that the deployment parameter secretString can be passed in JSON string format, allowing json-key specific CloudFormation dynamic references from a single deployment parameter.
>>> client.put_deployment_parameter(agreement_id='agmt-1234', catalog='AWSMarketplace', product_id='product-1234', deployment_parameter={'name': 'ExampleDeploymentParameterName', 'secretString': '{"apiKey": "helloWorldApiKey", "entityId": "fooBarEntityId"}'}, client_token='some-unique-uuid-between-32-and-64-characters')
Creating a simple deployment parameter, with tags and expiration.
The following example demonstrates creating a simple deployment parameter named "ExampleSimpleDeploymentParameterName". If multiple secrets are not required, the `secretString` may be provided in String format. The provided tags are only applied on resource creation and will be ignored if the operation results in an update. The API response includes the tags present on the resource after completion of the operation.
>>> client.put_deployment_parameter(agreement_id='agmt-1234', catalog='AWSMarketplace', product_id='product-1234', deployment_parameter={'name': 'ExampleSimpleDeploymentParameterName', 'secretString': 'MySimpleValue'}, client_token='some-unique-uuid-between-32-and-64-characters', expiration_date='2099-11-18T08:52:46.397Z', tags={'FooKey': 'BarValue', 'HelloKey': 'WorldValue'})
Source code in docs_src/capo_marketplace_deployment/_services/marketplace_deployment.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | |