L'API Reference di AWS Marketplace è stato ristrutturato. Per ulteriori informazioni sulle operazioni API supportate, consulta l'AWS Marketplace API Reference.
Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Aggiornare l'EULA di un'offerta utilizzando un AWS SDK
Gli esempi di codice seguenti mostrano come aggiornare il contratto di licenza con l’utente finale (EULA) di un’offerta.
- Java
-
- SDK per Java 2.x
-
Per eseguire questo esempio, passa il seguente set di modifiche JSON a RunChangesets in Utilità per l’avvio di un set di modifiche nella sezione Utilità.
{
"Catalog": "AWSMarketplace",
"ChangeSet": [
{
"ChangeType": "UpdateInformation",
"Entity": {
"Type": "Offer@1.0",
"Identifier": "offer-1111111111111"
},
"DetailsDocument": {
"Name": "New offer name",
"Description": "New offer description"
}
}
]
}
- Python
-
- SDK per Python (Boto3)
-
{
"Catalog": "AWSMarketplace",
"ChangeSet": [
{
"ChangeType": "UpdateLegalTerms",
"Entity": {
"Type": "Offer@1.0",
"Identifier": "offer-1111111111111"
},
"DetailsDocument": {
"Terms": [
{
"Type": "LegalTerm",
"Documents": [
{
"Type": "CustomEula",
"Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf"
}
]
}
]
}
}
]
}
Esegui questo script per avviare il set di modifiche. Le funzioni helper sono definite Utilità per l’avvio di un set di modifiche nella sezione Utilità.
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Purpose
Shows how to use the AWS SDK for Python (Boto3) to update EULA of my offer
CAPI-18
"""
import os
import utils.start_changeset as sc # type: ignore
import utils.stringify_details as sd # type: ignore
fname = "changeset.json"
change_set_file = os.path.join(os.path.dirname(__file__), fname)
change_set = sd.stringify_changeset(change_set_file)
def main():
sc.usage_demo(change_set, "Update EULA of my offer")
if __name__ == "__main__":
main()
Per un elenco completo delle guide per sviluppatori AWS SDK e degli esempi di codice, consulta. L'utilizzo di questo servizio con un AWS SDK Questo argomento include anche informazioni su come iniziare e dettagli sulle versioni precedenti dell’SDK.