put_deployment_parameter
async
¶
put_deployment_parameter(
catalog: Catalog,
product_id: ResourceId,
agreement_id: ResourceId,
deployment_parameter: DeploymentParameterInput,
*,
config_overrides: Optional[AsyncMarketplaceDeploymentClientConfig] = 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 Secrets 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.
>>> await 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.
>>> await 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/async_marketplace_deployment.py
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 | |