

Sono disponibili altri esempi AWS SDK nel repository [AWS Doc SDK](https://github.com/awsdocs/aws-doc-sdk-examples) Examples. GitHub 

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à.

# Crea una bozza di CPPO per qualsiasi tipo di prodotto utilizzando un SDK AWS
<a name="marketplace-catalog_example_marketplace-catalog_CreateDraftCppoOffer_section"></a>

Gli esempi di codice seguenti mostrano come creare una bozza di offerta CPPO per qualsiasi tipo di prodotto in modo da poterla esaminare internamente prima della pubblicazione per gli acquirenti.

------
#### [ Java ]

**SDK per Java 2.x**  
 C'è altro da fare. GitHub Trova l’esempio completo e scopri come eseguire la configurazione e l’esecuzione nel [repository di esempi di codice dell’API Marketplace AWS](https://github.com/aws-samples/aws-marketplace-reference-code/tree/main/java#catalog-api-reference-code). 
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": "CreateOfferUsingResaleAuthorization",
            "Entity": {
                "Type": "Offer@1.0"
            },
            "DetailsDocument": {
                "ResaleAuthorizationId": "11111111-1111-1111-1111-111111111111",
                "Name": "Test Offer",
                "Description": "Test product"
            }
        }
    ]
}
```
+  Per i dettagli sull'API, [StartChangeSet](https://docs.aws.amazon.com/goto/SdkForJavaV2/marketplace-catalog-2018-09-17/StartChangeSet)consulta *AWS SDK for Java 2.x API Reference*. 

------
#### [ Python ]

**SDK per Python (Boto3)**  
 C'è altro su GitHub. Trova l’esempio completo e scopri come eseguire la configurazione e l’esecuzione nel [repository di esempi di codice dell’API Marketplace AWS](https://github.com/aws-samples/aws-marketplace-reference-code/blob/main/python##catalog-api-reference-code). 

```
{
    "Catalog": "AWSMarketplace",
    "ChangeSet": [
        {
            "ChangeType": "CreateOfferUsingResaleAuthorization",
            "Entity": {
                "Type": "Offer@1.0"
            },
            "DetailsDocument": {
                "ResaleAuthorizationId": "11111111-1111-1111-1111-111111111111",
                "Name": "Test Offer name"
            }
        }
    ]
}
```
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 create “draft” CPPO
for any product type (AMI/SaaS/Container) that can be reviewed internally
before publishing to buyers
CAPI-60
"""
import os

import utils.start_changeset as sc  # noqa: E402
import utils.stringify_details as sd  # noqa: E402

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, "Create a draft CPPO offer for a product")


if __name__ == "__main__":
    main()
```
+  Per i dettagli sull'API, consulta [StartChangeSet AWS](https://docs.aws.amazon.com/goto/boto3/marketplace-catalog-2018-09-17/StartChangeSet)*SDK for Python (Boto3) API Reference*. 

------