AWS Marketplace SDK for Python(Boto3)을 사용한 카탈로그 API 예제 - AWS SDK 코드 예제

Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. AWS

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

AWS Marketplace SDK for Python(Boto3)을 사용한 카탈로그 API 예제

다음 코드 예제에서는 AWS Marketplace Catalog API와 AWS SDK for Python (Boto3) 함께를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

AMI 제품

다음 코드 예제에서는 기존 AMI 제품에 차원을 추가하고 제안 요금 조건을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "AddDimensions", "Entity": { "Identifier": "prod-1111111111111", "Type": "AmiProduct@1.0" }, "DetailsDocument": [ { "Key": "m7g.8xlarge", "Description": "m7g.8xlarge", "Name": "m7g.8xlarge", "Types": [ "Metered" ], "Unit": "Hrs" } ] }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "m5.large", "Price": "0.15" }, { "DimensionKey": "m7g.4xlarge", "Price": "0.45" }, { "DimensionKey": "m7g.2xlarge", "Price": "0.45" }, { "DimensionKey": "m7g.8xlarge", "Price": "0.55" } ] } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 add a dimension to an existing AMI product and update the offer pricing terms. CAPI-23 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "Add dimension for AMI product") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI 제품이 배포되는 리전을 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "AddRegions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "Regions": [ "us-east-2", "us-west-2" ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 add a region where my AMI product is deployed CAPI-25A """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Add a region where my AMI product is deployed", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 퍼블릭 또는 제한된 AMI 제품과 시간당 연간 요금으로 퍼블릭 제안을 생성하는 방법을 보여줍니다. 이 예제에서는 표준 또는 사용자 지정 EULA를 생성합니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "AmiProduct@1.0" }, "DetailsDocument": {} }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "ProductTitle": "Sample product", "ShortDescription": "Brief description", "LongDescription": "Detailed description", "Highlights": [ "Sample highlight" ], "SearchKeywords": [ "Sample keyword" ], "Categories": [ "Operating Systems" ], "LogoUrl": "https://s3.amazonaws.com/logos/sample.png", "VideoUrls": [ "https://sample.amazonaws.com/awsmp-video-1" ], "AdditionalResources": [] } }, { "ChangeType": "AddRegions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "Regions": [ "us-east-1" ] } }, { "ChangeType": "AddInstanceTypes", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "InstanceTypes": [ "t2.micro" ] } }, { "ChangeType": "AddDeliveryOptions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "Version": { "VersionTitle": "Test AMI Version1.0", "ReleaseNotes": "Test AMI Version" }, "DeliveryOptions": [ { "Details": { "AmiDeliveryOptionDetails": { "AmiSource": { "AmiId": "ami-11111111111111111", "AccessRoleArn": "arn:aws:iam::111111111111:role/AWSMarketplaceAmiIngestion", "UserName": "ec2-user", "OperatingSystemName": "AMAZONLINUX", "OperatingSystemVersion": "10.0.14393", "ScanningPort": 22 }, "UsageInstructions": "Test AMI Version", "RecommendedInstanceType": "t2.micro", "SecurityGroups": [ { "IpProtocol": "tcp", "IpRanges": [ "0.0.0.0/0" ], "FromPort": 10, "ToPort": 22 } ] } } } ] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "t2.micro", "Description": "t2.micro", "Name": "t2.micro", "Types": [ "Metered" ], "Unit": "Hrs" } ] }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test public offer for AmiProduct using AWS Marketplace API Reference Code", "Description": "Test public offer with hourly-annual pricing for AmiProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "t2.micro", "Price": "0.15" } ] } ] }, { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P365D" }, "RateCard": [ { "DimensionKey": "t2.micro", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Absolutely no refund, period." } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a public or limited AMI product and public offer with hourly-annual pricing and standard or custom EULA CAPI-06 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create limited AMI product and public offer with hourly-annual pricing and standard EULA", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 시간당 월별 요금으로 공개 또는 제한된 AMI 제품 및 공개 제안을 생성하는 방법을 보여줍니다. 이 예제에서는 표준 또는 사용자 지정 EULA를 생성합니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "AmiProduct@1.0" }, "DetailsDocument": {} }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "ProductTitle": "Sample product", "ShortDescription": "Brief description", "LongDescription": "Detailed description", "Highlights": [ "Sample highlight" ], "SearchKeywords": [ "Sample keyword" ], "Categories": [ "Operating Systems" ], "LogoUrl": "https://s3.amazonaws.com/logos/sample.png", "VideoUrls": [ "https://sample.amazonaws.com/awsmp-video-1" ], "AdditionalResources": [] } }, { "ChangeType": "AddRegions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "Regions": [ "us-east-1" ] } }, { "ChangeType": "AddInstanceTypes", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "InstanceTypes": [ "t2.micro" ] } }, { "ChangeType": "AddDeliveryOptions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "Version": { "VersionTitle": "Test AMI Version1.0", "ReleaseNotes": "Test AMI Version" }, "DeliveryOptions": [ { "Details": { "AmiDeliveryOptionDetails": { "AmiSource": { "AmiId": "ami-11111111111111111", "AccessRoleArn": "arn:aws:iam::111111111111:role/AWSMarketplaceAmiIngestion", "UserName": "ec2-user", "OperatingSystemName": "AMAZONLINUX", "OperatingSystemVersion": "10.0.14393", "ScanningPort": 22 }, "UsageInstructions": "Test AMI Version", "RecommendedInstanceType": "t2.micro", "SecurityGroups": [ { "IpProtocol": "tcp", "IpRanges": [ "0.0.0.0/0" ], "FromPort": 10, "ToPort": 22 } ] } } } ] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "t2.micro", "Description": "t2.micro", "Name": "t2.micro", "Types": [ "Metered" ], "Unit": "Hrs" } ] }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test public offer for AmiProduct using AWS Marketplace API Reference Code", "Description": "Test public offer with hourly-monthly pricing for AmiProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "t2.micro", "Price": "0.15" } ] } ] }, { "Type": "RecurringPaymentTerm", "CurrencyCode": "USD", "BillingPeriod": "Monthly", "Price": "15.0" } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Absolutely no refund, period." } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a public or limited AMI product and public offer with hourly-monthly pricing and standard or custom EULA CAPI-08 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 limited AMI product and public offer with hourly-monthly pricing and standard EULA", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 시간당 요금으로 공개 또는 제한된 AMI 제품 및 공개 제안을 생성하는 방법을 보여줍니다. 이 예제에서는 및 표준 또는 사용자 지정 EULA를 생성합니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "AmiProduct@1.0" }, "DetailsDocument": {} }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "ProductTitle": "Sample product", "ShortDescription": "Brief description", "LongDescription": "Detailed description", "Highlights": [ "Sample highlight" ], "SearchKeywords": [ "Sample keyword" ], "Categories": [ "Operating Systems" ], "LogoUrl": "https://s3.amazonaws.com/logos/sample.png", "VideoUrls": [ "https://sample.amazonaws.com/awsmp-video-1" ], "AdditionalResources": [] } }, { "ChangeType": "AddRegions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "Regions": [ "us-east-1" ] } }, { "ChangeType": "AddInstanceTypes", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "InstanceTypes": [ "t2.micro" ] } }, { "ChangeType": "AddDeliveryOptions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "Version": { "VersionTitle": "Test AMI Version1.0", "ReleaseNotes": "Test AMI Version" }, "DeliveryOptions": [ { "Details": { "AmiDeliveryOptionDetails": { "AmiSource": { "AmiId": "ami-11111111111111111", "AccessRoleArn": "arn:aws:iam::111111111111:role/AWSMarketplaceAmiIngestion", "UserName": "ec2-user", "OperatingSystemName": "AMAZONLINUX", "OperatingSystemVersion": "10.0.14393", "ScanningPort": 22 }, "UsageInstructions": "Test AMI Version", "RecommendedInstanceType": "t2.micro", "SecurityGroups": [ { "IpProtocol": "tcp", "IpRanges": [ "0.0.0.0/0" ], "FromPort": 10, "ToPort": 22 } ] } } } ] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "t2.micro", "Description": "t2.micro", "Name": "t2.micro", "Types": [ "Metered" ], "Unit": "Hrs" } ] }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test public offer for AmiProduct using AWS Marketplace API Reference Code", "Description": "Test public offer with hourly pricing for AmiProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "t2.micro", "Price": "0.15" } ] } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Absolutely no refund, period." } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a public or limited AMI product and public offer with hourly pricing and standard or custom EULA CAPI-07 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create limited AMI product and public offer with hourly pricing and standard EULA", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 초안 공개 제안으로 초안 AMI 제품을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "AmiProduct@1.0" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier", "Name": "Test Offer" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 an AMI draft product with a draft public offer. CAPI-02 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "AMI draft product with draft public offer", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI 제품이 배포되는 리전을 제한하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "RestrictRegions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "Regions": [ "us-west-2" ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 restrict a region where my AMI product is deployed CAPI-25B """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Add a region where my AMI product is deployed", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 제품 가시성을 제한하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateVisibility", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "TargetVisibility": "Restricted" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 change a product visibility to restricted CAPI-17 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "Restrict existing AMI") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 향후 리전을 지원하기 AWS 위해에서 빌드한 새 리전에 AMI 자산을 배포할지 여부를 지정하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateFutureRegionSupport", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "FutureRegionSupport": { "SupportedRegions": [ "All" ] } } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 modify a product to support all future regions CAPI-26 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 future region support") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

채널 파트너 제안

다음 코드 예제는 구매자에게 게시하기 전에 내부적으로 검토할 수 있도록 모든 제품 유형에 대한 초안 CPPO를 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ResaleAuthorizationId": "11111111-1111-1111-1111-111111111111", "Name": "Test Offer name" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 계약 요금이 적용되는 기존 계약에서 재판매 권한 부여 대체 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType" : "CreateReplacementOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateReplacementOfferResaleAuth", "DetailsDocument": { "AgreementId": "agmt-1111111111111111111111111", "ResaleAuthorizationId": "resaleauthz-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOfferResaleAuth.Entity.Identifier" }, "DetailsDocument": { "Name": "Test replacement offer for SaaSProduct using AWS Marketplace API Reference Codes", "Description": "Test private resale replacement offer with contract pricing for SaaSProduct" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOfferResaleAuth.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "FixedUpfrontPricingTerm", "CurrencyCode": "USD", "Price": "0.0", "Duration": "P12M", "Grants": [ { "DimensionKey": "BasicService", "MaxQuantity": 2 } ] } ] } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOfferResaleAuth.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementEndDate": "2024-01-30" } ] } }, { "ChangeType": "UpdatePaymentScheduleTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOfferResaleAuth.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "PaymentScheduleTerm", "CurrencyCode": "USD", "Schedule": [ { "ChargeDate": "2024-01-01", "ChargeAmount": "0" } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOfferResaleAuth.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOfferResaleAuth.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOfferResaleAuth.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a resale authorization replacement private offer from an existing agreement with contract pricing CAPI-96 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create resale authorization replacement private offer with contract pricing", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 채널 파트너가 생성한 모든 CPPOs를 나열하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

# 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 list all Channel Partner Offers in an account Program executed with no arguments: ie. python3 list_all_cppo_offers.py CAPI-93 """ import json import logging import boto3 from botocore.exceptions import ClientError mp_client = boto3.client("marketplace-catalog") def get_offer_entities(): """ Returns a list of all offers in the account """ next_token = "" # nosec: B105 response_list = [] try: response = mp_client.list_entities(Catalog="AWSMarketplace", EntityType="Offer") except ClientError as e: logging.exception(f"Couldn't list entities. {e}") raise response_list.append(response) # Results are paginated depending on number of entities returned while "NextToken" in response: next_token = response["NextToken"] try: response = mp_client.list_entities( Catalog="AWSMarketplace", EntityType="Offer", NextToken=next_token, ) except ClientError as e: logging.exception(f"Couldn't list entities. {e}") raise if "NextToken" in response: response_list.append(response) return response_list def build_offer_list(response_list): """ Cleans up list_entities response list with just list of offer IDs """ offer_list = [] for response in response_list: for entity in response["EntitySummaryList"]: offer_list.append(entity["EntityId"]) return offer_list def check_offer_resaleauth(offer_id): """ Checks to see if an offer is based on a resale authorization """ offer_response = describe_entity(offer_id) offer_details = json.loads(offer_response["Details"]) if offer_details is None: offer_details = offer_response["DetailsDocument"] if "ResaleAuthorizationId" in offer_details and offer_details["ResaleAuthorizationId"] is not None: return offer_id else: return None def describe_entity(entity_id): """ General purpose describe entity call """ try: response = mp_client.describe_entity( Catalog="AWSMarketplace", EntityId=entity_id, ) except ClientError as e: logging.exception(f"Couldn't describe entity. {e}") raise return response def get_resaleauth_offers(): """ Returns a list of all offers in the account that are based on a resale authorization """ resale_offer_list = [] response_list = get_offer_entities() offer_list = build_offer_list(response_list) for offer in offer_list: print ("offer id " + offer) offer_info = check_offer_resaleauth(offer) if offer_info is not None: resale_offer_list.append(offer_info) return resale_offer_list if __name__ == "__main__": print(get_resaleauth_offers())
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조ListEntities를 참조하세요.

다음 코드 예제는 채널 파트너가 사용할 수 있는 모든 공유 재판매 권한을 나열하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

# 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 list all resale authorizations shared to an account Program executed with no arguments: ie. python3 list_all_resale_authorizations.py CAPI-94 """ import logging import boto3 import utils.helpers as hlp # noqa: E402 from botocore.exceptions import ClientError mp_client = boto3.client("marketplace-catalog") def get_shared_entities(): next_token = "" # nosec: B105 response_list = [] try: response = mp_client.list_entities( Catalog="AWSMarketplace", EntityType="ResaleAuthorization", OwnershipType="SHARED", ) except ClientError as e: logging.exception(f"Couldn't list entities. {e}") raise response_list.append(response) # Results can be paginated depending on number of entities returned while "NextToken" in response: next_token = response["NextToken"] try: response = mp_client.list_entities( Catalog="AWSMarketplace", EntityType="ResaleAuthorization", OwnershipType="SHARED", NextToken=next_token, ) except ClientError as e: logging.exception(f"Couldn't list entities. {e}") raise if "NextToken" in response: response_list.append(response) return response_list if __name__ == "__main__": response_list = get_shared_entities() hlp.pretty_print_datetime(response_list)
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조ListEntities를 참조하세요.

다음 코드 예제는 CPPO를 게시하고 구매자 EULA를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType" : "CreateOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateCPPOoffer", "DetailsDocument": { "ResaleAuthorizationId":"resaleauthz-1111111111111", "Name": "Test Offer", "Description":"Test product" } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPOoffer.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPOoffer.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": ["222222222222"] } } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPOoffer.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-07-31" } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPOoffer.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementDuration": "P450D" } ] } }, { "ChangeType":"ReleaseOffer", "Entity":{ "Type": "Offer@1.0", "Identifier": "$CreateCPPOoffer.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 publish CPPO for any product type (AMI/SaaS/Container) and append buyer EULA """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Publish CPPO for any product type and append buyer EULA", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI, SaaS 또는 컨테이너 제품에 대한 일회성 재판매 권한 부여를 사용하여 CPPO를 게시하고 가격 인상을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType" : "CreateOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateCPPO", "DetailsDocument": { "ResaleAuthorizationId":"resaleauthz-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "Name": "Test Offer name", "Description":"Test Offer description" } }, { "ChangeType": "UpdateMarkup", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "Percentage" : "5.0" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": ["111111111111"] } } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType":"ReleaseOffer", "Entity":{ "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 CPPO using one-time resale authorization on AMI, SaaS or Container products and update price markup CAPI-63 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create CPPO using one-time resale authorization and update price markup" ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 초안 CPPO를 게시하고 가격 인상을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType" : "CreateOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateCPPO", "DetailsDocument": { "ResaleAuthorizationId":"resaleauthz-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "Name": "Test Offer name", "Description":"Test Offer description" } }, { "ChangeType": "UpdateMarkup", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "Percentage" : "5.0" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": ["111111111111"] } } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-05-31" } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementDuration": "P450D" } ] } }, { "ChangeType":"ReleaseOffer", "Entity":{ "Type": "Offer@1.0", "Identifier": "$CreateCPPO.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 publish “draft” CPPO for any product type (AMI/SaaS/Container) and update price markup CAPI-72 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Publish draft CPPO for any product type adn update price markup" ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 구매자에게 제안을 평가하고 수락할 시간을 더 주기 위해 CPPO의 만료 날짜를 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "AvailabilityEndDate": "2025-07-31" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 the expiry date of a CPPO offer """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Update the expiry date of a CPPO offer" ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

컨테이너 제품

다음 코드 예제는 초안 공개 제안으로 초안 컨테이너 제품을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog":"AWSMarketplace", "ChangeSet":[ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "ContainerProduct@1.0" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier", "Name": "Test Offer" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 an container draft product with a draft public offer. CAPI-03 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create a draft container product with a draft public offer", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 공개 제안, 계약 요금 및 표준 EULA를 사용하여 제한된 컨테이너 제품을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "Entity": { "Type": "ContainerProduct@1.0" }, "DetailsDocument": {}, "ChangeName": "CreateProductChange" }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "ContainerProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "LogoUrl": "https://s3.amazonaws.com/logos/sample.png", "Categories": [ "Streaming solutions" ], "ProductTitle": "ContainerProduct", "AdditionalResources": [], "LongDescription": "Long description goes here", "SearchKeywords": [ "container streaming" ], "ShortDescription": "Description1", "Highlights": [ "Highlight 1", "Highlight 2" ], "SupportDescription": "No support available", "VideoUrls": [] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "ContainerProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "Cores", "Description": "Cores per cluster", "Name": "Cores", "Types": [ "Entitled" ], "Unit": "Units" } ] }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "ContainerProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111" ] } } }, { "ChangeType": "AddRepositories", "Entity": { "Type": "ContainerProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "Repositories": [ { "RepositoryName": "uniquerepositoryname", "RepositoryType": "ECR" } ] } }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "ContainerProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" }, "ChangeName": "CreateOfferChange" }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "Constraints": { "MultipleDimensionSelection": "Disallowed", "QuantityConfiguration": "Disallowed" }, "RateCard": [ { "DimensionKey": "Cores", "Price": "0.25" } ] } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "No refunds" } ] } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Some container offer Name", "Description": "Some interesting container offer description" } }, { "ChangeType": "UpdateRenewalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "RenewalTerm" } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 limited container product with public offer, contract pricing and standard EULA CAPI-15 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create limited container product with public offer contract pricing and standard EULA", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

개체

다음 코드 예제는 단일 호출에서 모든 엔터티를 설명하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

""" Purpose Shows how to use the AWS SDK for Python (Boto3) to describe for multiple entities information in the AWS Marketplace Catalog CAPI-98 """ import json import logging import boto3 from botocore.exceptions import ClientError logger = logging.getLogger(__name__) PRODUCT_ID = "prod-1111111111111" OFFER_ID = "offer-1111111111111" MARKETPLACE_CATALOG = "AWSMarketplace" def pretty_print(response): json_object = json.dumps(response, indent=4) print(json_object) def get_entities_information(mp_client): """ Returns information about a given product Args: entity_id str: Entity to return Returns: dict: Dictionary of product information """ entity_request_list_param = [ {'EntityId': PRODUCT_ID, 'Catalog': MARKETPLACE_CATALOG}, {'EntityId': OFFER_ID, 'Catalog': MARKETPLACE_CATALOG} ] try: response = mp_client.batch_describe_entities( EntityRequestList=entity_request_list_param ) return response except ClientError as e: logger.exception("Unexpected error: %s", e) raise def usage_demo(): logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") print("-" * 88) print("Looking for entities in the AWS Marketplace Catalog.") print("-" * 88) mp_client = boto3.client("marketplace-catalog") response = get_entities_information(mp_client) print("Successful entities response -") pretty_print(response["EntityDetails"]) print("Failed entities response -") pretty_print(response["Errors"]) if __name__ == "__main__": usage_demo()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조BatchDescribeEntities를 참조하세요.

다음 코드 예제는 제품과 관련된 모든 제안을 나열하고 설명하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

""" Purpose Shows how to use the AWS SDK for Python (Boto3) to retrieve all offer information related to a single product CAPI-97 """ import argparse import logging import boto3 from botocore.exceptions import ClientError from utils import helpers logger = logging.getLogger(__name__) mp_client = boto3.client("marketplace-catalog") def get_entity_information(entity_id): """ Returns information about a given entity Args: entity_id str: Entity to return Returns: dict: Dictionary of entity information """ try: response = mp_client.describe_entity( Catalog="AWSMarketplace", EntityId=entity_id, ) return response except ClientError as e: if e.response["Error"]["Code"] == "ResourceNotFoundException": logger.error("Entity with ID %s not found.", entity_id) else: logger.error("Unexpected error: %s", e) def list_entity_details(entity_type, entity_id): """ Returns details about a given entity and entity type """ entity_summary_list = [] # filter will return details for given entity_id with BuyerAccounts targeting filter_list_param = { 'OfferFilters':{ 'ProductId':{ 'ValueList':[entity_id] }, 'Targeting': { 'ValueList': ["BuyerAccounts"] } } } try: response = mp_client.list_entities( Catalog="AWSMarketplace", EntityType=entity_type, EntityTypeFilters = filter_list_param, MaxResults=10 ) except ClientError as e: if e.response["Error"]["Code"] == "ResourceNotFoundException": logger.error("Entity ID %s not found.", entity_id) else: logger.error("Unexpected error: %s", e) # add results to entity_summary_list entity_summary_list.extend(response["EntitySummaryList"]) # if there are more than 10 offers, paginate through the results while "NextToken" in response and response["NextToken"] is not None: try: response = mp_client.list_entities( Catalog="AWSMarketplace", EntityType=entity_type, EntityTypeFilters = filter_list_param, NextToken=response["NextToken"], MaxResults=10 ) except ClientError as e: if e.response["Error"]["Code"] == "ResourceNotFoundException": logger.error("Entity ID %s not found.", entity_id) else: logger.error("Unexpected error: %s", e) # add results to entity_summary_list entity_summary_list.extend(response["EntitySummaryList"]) return entity_summary_list if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--entity-id", "-eid", help="Provide Entity ID corresponding to a product to filter offers on", required=True, ) args = parser.parse_args() # Gets a offers associated with the entity_id response = list_entity_details( "Offer", entity_id=args.entity_id ) if response: # if response is not empty # list_entity_details returns a list of offers for offer in response: print("-"*128) print(f"Terms for Offer ID: {offer['EntityId']}") print("-"*128) #retrieve offer information for each offer entity_information = get_entity_information(offer["EntityId"]) helpers.pretty_print_datetime(entity_information) else: print(f"No information found for Entity ID: {args.entity_id}")

제안

다음 코드 예제에서는 SaaS 제품에 대한 사용자 지정 차원을 생성하고 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "AddDimensions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": [ { "Types": [ "Entitled" ], "Description": "Custom Pricing 4 w/ terms and coverage to be defined in Private Offer", "Unit": "Units", "Key": "Custom4", "Name": "Custom Pricing 4" } ] }, { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111" }, "ChangeName": "CreateOfferChange" }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Private Test Offer - SaaS Contract Product", "Description": "Private Test Offer - SaaS Contract Product" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111" ] } } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" }, "RateCard": [ { "DimensionKey": "Custom4", "Price": "300.0" } ], "Selector": { "Type": "Duration", "Value": "P36M" } } ] } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ], "ChangeSetName": "PrivateOfferWithCustomDimension" }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a SaaS product custom dimension and private offer CAPI-91 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 SaaS product custom dimension and private offer" ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 구매자에게 게시하기 전에 내부적으로 검토할 수 있도록 AMI 또는 SaaS 제품에 대한 비공개 제안 초안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "Test Private Offer" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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” Private Offer for any AMI or SAAS product type that can be reviewed internally before publishing to buyers CAPI-30 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "Private offer for AMI product") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 SaaS 제품에 대한 계약 및 Pay-As-You-Go 요금으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with subscription pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "WorkloadSmall", "Price": "0.15" }, { "DimensionKey": "WorkloadMedium", "Price": "0.25" } ] } ] }, { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "150" }, { "DimensionKey": "PremiumService", "Price": "300" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with contract with PAYG pricing for my SaaS product CAPI-34 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 private offer with contract with PAYG pricing for my SaaS product", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 SaaS 제품에 대한 계약 요금 및 유연한 결제 일정으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with subscription pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111" ] } } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "FixedUpfrontPricingTerm", "CurrencyCode": "USD", "Price": "0.0", "Grants": [ { "DimensionKey": "BasicService", "MaxQuantity": 1 } ] } ] } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementDuration": "P12M" } ] } }, { "ChangeType": "UpdatePaymentScheduleTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "PaymentScheduleTerm", "CurrencyCode": "USD", "Schedule": [ { "ChargeDate": "2024-01-01", "ChargeAmount": "200.00" }, { "ChargeDate": "2024-02-01", "ChargeAmount": "170.00" } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Some kind of refund policy description" } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with contract pricing and flexible payment schedule for my SaaS product CAPI-39 """ import os import utils.start_changeset as sc import utils.stringify_details as sd fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) change_set = sd.stringify_changeset(change_set_file) def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create private offer with contract pricing and flexible payment schedule for my SaaS product", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 컨테이너 제품에 대한 계약 요금으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for Container product using AWS Marketplace API Reference Code", "Description": "Test private offer for Container product with contract pricing using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111" ] } } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "Constraints": { "MultipleDimensionSelection": "Disallowed", "QuantityConfiguration": "Disallowed" }, "RateCard": [ { "DimensionKey": "ReqPerHour", "Price": "0.25" } ] } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer (target buyers) for my Container product with contract pricing CAPI-36 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "publish a private offer for my Container product with contract pricing", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI 제품에 대한 계약 요금으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for AmiProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with hourly annual pricing for AmiProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "ReadOnlyUsers", "Price": "220.00" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with contract pricing for my AMI product CAPI-35 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 private offer with contract pricing for my AMI product" ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI 제품에 대한 시간당 연간 요금과 유연한 결제 일정으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for AmiProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with hourly annual pricing for AmiProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "t2.micro", "Price": "0.17" } ] } ] }, { "Type": "FixedUpfrontPricingTerm", "CurrencyCode": "USD", "Price": "0.0", "Duration": "P365D", "Grants": [ { "DimensionKey": "t2.micro", "MaxQuantity": 1 } ] } ] } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementDuration": "P650D" } ] } }, { "ChangeType": "UpdatePaymentScheduleTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "PaymentScheduleTerm", "CurrencyCode": "USD", "Schedule": [ { "ChargeDate": "2024-01-01", "ChargeAmount": "200.00" }, { "ChargeDate": "2024-02-01", "ChargeAmount": "170.00" } ] } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with hourly annual pricing and flexible payment schedule for my AMI product CAPI-XX """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 private offer with hourly annual pricing and flexible payment schedule for my AMI product", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI 제품에 대한 시간당 연간 요금으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for AmiProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with hourly annual pricing for AmiProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "t2.micro", "Price": "0.17" } ] } ] }, { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P365D" }, "RateCard": [ { "DimensionKey": "t2.micro", "Price": "220.00" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementDuration": "P650D" } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with hourly annual pricing for my AMI product CAPI-31 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 private offer with hourly annual pricing for my AMI product" ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI 제품에 대한 시간당 요금으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for AmiProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with hourly pricing for AmiProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2025-01-01" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "t2.micro", "Price": "0.15" } ] } ] } ] } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementDuration": "P30D" } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with hourly pricing for my AMI product CAPI-32 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 private offer with hourly pricing for my AMI product" ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 SaaS 제품에 대한 구독 요금으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with subscription pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "WorkloadSmall", "Price": "0.13" }, { "DimensionKey": "WorkloadMedium", "Price": "0.22" } ] } ] } ] } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementDuration": "P30D" } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with subscription pricing for my SaaS product CAPI-33 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 private offer with subscription pricing for my SaaS product" ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 SaaS 제품에 대한 계층형 계약 요금으로 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test private offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test private offer with subscription pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "120.00" }, { "DimensionKey": "PremiumService", "Price": "200.00" } ], "Constraints": { "MultipleDimensionSelection": "Disallowed", "QuantityConfiguration": "Disallowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a private offer with tiered contract pricing for my SaaS product CAPI-XX """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 private offer with tiered contract pricing for my SaaS product", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 SaaS 제품에 대한 구독 요금으로 공개 무료 평가판 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "prod-1111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test public free trial offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test public free trial offer with subscription pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Free", "Terms": [ { "Type": "FreeTrialPricingTerm", "Duration": "P20D", "Grants": [ { "DimensionKey": "WorkloadSmall" }, { "DimensionKey": "WorkloadMedium" } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a public free trial offer with subscription pricing for SaaS product CAPI-13 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 public free trial offer with subscription pricing for SaaS product", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 계약 요금이 적용되는 기존 계약에서 대체 비공개 제안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType" : "CreateReplacementOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateReplacementOffer", "DetailsDocument": { "AgreementId": "agmt-1111111111111111111111111" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOffer.Entity.Identifier" }, "DetailsDocument": { "Name": "Test replacement offer for SaaSProduct using AWS Marketplace API Reference Codes", "Description": "Test private replacement offer with contract pricing for SaaSProduct" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOffer.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "FixedUpfrontPricingTerm", "CurrencyCode": "USD", "Price": "0.0", "Grants": [ { "DimensionKey": "BasicService", "MaxQuantity": 2 } ] } ] } }, { "ChangeType": "UpdateValidityTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOffer.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ValidityTerm", "AgreementEndDate": "2024-01-30" } ] } }, { "ChangeType": "UpdatePaymentScheduleTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOffer.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "PaymentScheduleTerm", "CurrencyCode": "USD", "Schedule": [ { "ChargeDate": "2024-01-01", "ChargeAmount": "0" } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOffer.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOffer.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateReplacementOffer.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a replacement private offer from an existing agreement with contract pricing CAPI-95 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create replacement private offer with contract pricing..", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 공개 제안을 설명하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

# 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) search for offer information in the AWS Marketplace Catalog CAPI-29 """ import json import logging import boto3 from botocore.exceptions import ClientError logger = logging.getLogger(__name__) OFFER_ID = "offer-1111111111111" def pretty_print(response): json_object = json.dumps(response, indent=4) print(json_object) def get_offer_information(mp_client, entity_id): """ Returns information about a given offer Args: entity_id str: Entity to return Returns: dict: Dictionary of offer information """ try: response = mp_client.describe_entity( Catalog="AWSMarketplace", EntityId=entity_id, ) return response except ClientError as e: if e.response["Error"]["Code"] == "ResourceNotFoundException": logger.error("Offer with ID %s not found.", entity_id) else: logger.error("Unexpected error: %s", e) def usage_demo(): logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") print("-" * 88) print("Looking for an offer in the AWS Marketplace Catalog.") print("-" * 88) mp_client = boto3.client("marketplace-catalog") pretty_print(get_offer_information(mp_client, OFFER_ID)) if __name__ == "__main__": usage_demo()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조DescribeEntity를 참조하세요.

다음 코드 예제는 구매자가 더 이상 제안을 볼 수 없도록 비공개 제안의 만료 날짜를 과거 날짜로 설정하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "Test Private Offer" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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” Private Offer for any AMI or SAAS product type that can be reviewed internally before publishing to buyers CAPI-30 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "Private offer for AMI product") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 모든 비공개 제안을 나열하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

# 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) for listing offers in the AWS Marketplace Catalog CAPI-40 """ import json import logging import boto3 from botocore.exceptions import ClientError logger = logging.getLogger(__name__) # Constants MAX_RESULTS = 10 CATALOG = "AWSMarketplace" ENTITY_TYPE = "Offer" def pretty_print(response): json_object = json.dumps(response, indent=4) print(json_object) def list_private_offers(mp_client, return_all_private_offers): """ This method retrieves list of all Private Offers for this account. """ entity_summary_list = [] filter_list_param = { 'OfferFilters': { 'Targeting': { 'ValueList': ["BuyerAccounts"] } } } try: response = mp_client.list_entities( Catalog=CATALOG, EntityType=ENTITY_TYPE, EntityTypeFilters=filter_list_param, MaxResults=MAX_RESULTS ) except ClientError as e: logger.error("Could not complete list_entities request: %s", e) raise entity_summary_list.extend(response["EntitySummaryList"]) logger.info("Number of results in first iteration: %d " % len(entity_summary_list)) # Get subsequent pages of results if previous response contained a NextToken while "NextToken" in response and return_all_private_offers: try: logger.info("Getting Next Token results: %s " % response["NextToken"]) response = mp_client.list_entities( Catalog=CATALOG, EntityType=ENTITY_TYPE, EntityTypeFilters=filter_list_param, MaxResults=MAX_RESULTS, NextToken=response["NextToken"] ) except ClientError as e: logger.error("Could not complete list_entities request: %s", e) raise entity_summary_list.extend(response["EntitySummaryList"]) logger.info( "Number of results in the current iteration: %d " % len(response["EntitySummaryList"]) ) return entity_summary_list def get_offer_details(mp_client, offer): """ Describe the details of the Offer. """ try: response = mp_client.describe_entity( Catalog="AWSMarketplace", EntityId=offer["EntityId"] ) return response except ClientError: logger.exception("Error: Couldn't get details of the Offer.") raise def usage_demo(): logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") print("-" * 88) print("Demo - List Private offers.") print("-" * 88) mp_client = boto3.client("marketplace-catalog") # Get list of all Offers. private_offers = list_private_offers(mp_client, False) count = len(private_offers) logger.info("Number of Offers: %d " % count) offer_counter = 0 # Display details of each Offer. for offer in private_offers: print("-" * 88) offer_counter += 1 print("Displaying Offer details for Offer# %d" % offer_counter) entity = get_offer_details(mp_client, offer) pretty_print(entity) print("-" * 88) if __name__ == "__main__": usage_demo()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 Pay-As-You-Go 요금 계약을 적용하도록 제안을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "WorkloadSmall", "Price": "0.15" }, { "DimensionKey": "WorkloadMedium", "Price": "0.25" } ] } ] }, { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "150" }, { "DimensionKey": "PremiumService", "Price": "300" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 an offer to apply contract with PAYG pricing CAPI-21 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 offer to apply contract with PAYG pricing") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 시간당 연간 요금을 적용하도록 제안을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "m5.large", "Price": "0.13" } ] } ] }, { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P365D" }, "RateCard": [ { "DimensionKey": "m5.large", "Price": "20.03" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 an offer to apply hourly annual pricing CAPI-20 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 offer with hourly annual pricing") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 특정 지리적 리전에 대상 지정을 적용하도록 제안을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "PositiveTargeting": { "CountryCodes": [ "US", "ES", "FR", "AU" ] } } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 an offer to apply targeting to certain geographic regions. CAPI-19 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 offer targeting") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 공개 제안의 이름과 설명을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "Name": "New offer name", "Description": "New offer description" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 name and description 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 name and description of my offer") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 제안의 EULA를 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "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" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 비공개 제안의 만료 날짜를 향후 날짜로 업데이트하여 구매자에게 제안을 평가하고 수락할 시간을 더 많이 제공하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "AvailabilityEndDate": "2026-01-01" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 set expiry date of a private offer to a date in the future so that my buyers get more time to evaluate and accept the offer. CAPI-37 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 offer expiration date") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 SaaS 제품에 대한 공개 무료 평가판 제안의 무료 평가판 기간을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "FreeTrialPricingTerm", "Duration": "P21D", "Grants": [ { "DimensionKey": "WorkloadSmall" }, { "DimensionKey": "WorkloadMedium" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 change free trial duration for my SaaS product by modifying my free trial public offer CAPI-14 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "Change free trial duration for SaaS product") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 제안의 환불 정책을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Updated refund policy description" } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 refund policy 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 refund policy of my public offer") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

Products

다음 코드 예제는 AMI, SaaS 또는 컨테이너 제품을 설명하고 제품에 대해 알고 싶은 모든 정보가 포함되어 있는지 확인하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

""" Purpose Shows how to use the AWS SDK for Python (Boto3) search for product information in the AWS Marketplace Catalog CAPI-28 """ import json import logging import boto3 from botocore.exceptions import ClientError logger = logging.getLogger(__name__) PRODUCT_ID = "prod-1111111111111" def pretty_print(response): json_object = json.dumps(response, indent=4) print(json_object) def get_product_information(mp_client, entity_id): """ Returns information about a given product Args: entity_id str: Entity to return Returns: dict: Dictionary of product information """ try: response = mp_client.describe_entity( Catalog="AWSMarketplace", EntityId=entity_id, ) return response except ClientError as e: if e.response["Error"]["Code"] == "ResourceNotFoundException": logger.error("Product with ID %s not found.", entity_id) else: logger.error("Unexpected error: %s", e) def usage_demo(): logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") print("-" * 88) print("Looking for a product in the AWS Marketplace Catalog.") print("-" * 88) mp_client = boto3.client("marketplace-catalog") pretty_print(get_product_information(mp_client, PRODUCT_ID)) if __name__ == "__main__": usage_demo()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조DescribeEntity를 참조하세요.

다음 코드 예제는 모든 AMI, SaaS 또는 컨테이너 제품 및 관련 공개 제안을 나열하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

""" Purpose Shows how to use the AWS SDK for Python (Boto3) to display information about AMI products and their associated offers in the AWS Marketplace Catalog CAPI-27 """ import json import logging import boto3 from botocore.exceptions import ClientError logger = logging.getLogger(__name__) MAX_PAGE_RESULTS = 10 try: mp_client = boto3.client("marketplace-catalog") except ClientError as e: logger.error("Could not create boto3 client.") raise def pretty_print(response): json_object = json.dumps(response, indent=4) print(json_object) def describe_entity(entity_id): """ Returns entity details Args: entity_id str: The entity ID of the product or offer Returns: dict: The entity details """ try: response = mp_client.describe_entity( Catalog="AWSMarketplace", EntityId=entity_id ) except ClientError as e: logger.error("Could not complete describe_entity request.") raise # De-stringify the details response["Details"] = json.loads(response["Details"]) return response def get_entities(entity_type, visibility=None): """ Returns list of entities for provided entity_type Args: entity_type str: Type of entity list to return, in our case AmiProduct or Offer Returns: list: Abbreviated list of entity information """ EntitySummaryList = [] # Get the first page of results try: response = mp_client.list_entities( Catalog="AWSMarketplace", EntityType=entity_type, MaxResults=MAX_PAGE_RESULTS, ) except ClientError as e: logger.error("Could not complete list_entities request.") raise EntitySummaryList.extend(response["EntitySummaryList"]) # Get subsequent pages of results if previous response contained a NextToken while "NextToken" in response: try: response = mp_client.list_entities( Catalog="AWSMarketplace", EntityType=entity_type, MaxResults=MAX_PAGE_RESULTS, NextToken=response["NextToken"], ) except ClientError as e: logger.error("Could not complete list_entities request.") raise EntitySummaryList.extend(response["EntitySummaryList"]) # if visibility is provided, filter the list to only include entities with that visibility if visibility is not None: EntitySummaryList = [ entity for entity in EntitySummaryList if entity["Visibility"] == visibility ] return EntitySummaryList def get_enhanced_product_list(entity_type): """ Returns an enhanced list of products with product details and offer details Args: entity_type str: Type of entity list to return, in our case AmiProduct Returns: list: Enhanced list of dictionary objects containing product and offer details """ product_list = get_entities(entity_type) # Loop through product list and append product details to each product for product in product_list: # appends product details to product dictionary product["ProductDetails"] = describe_entity(product["EntityId"])["Details"] # creating an empty list for offer details product["OfferDetailsList"] = [] return product_list def attach_offer_details(product_list): """ Loops through offer information and appends offer details to product list Args: product_list list: List of product dictionaries Returns: list: Enhanced list of dictionary objects containing product and offer details """ offer_list = get_entities("Offer", "Public") # Loop through offer list and append offer details to each product for offer in offer_list: offer["OfferDetails"] = describe_entity(offer["EntityId"])["Details"] # Extracts product-id from offer product_id = offer["OfferDetails"]["ProductId"] # Determines if product-id referenced in offer matches product-id in product list product_dict = next( filter(lambda product: product["EntityId"] == product_id, product_list), None, ) # If product-id matches, appends offer details to product dictionary if product_dict is not None: # logger.info(f"Offer product Id {offer['OfferDetails']['ProductId']} found in product dictionary. Updating product dictionary with offer details") product_dict["OfferDetailsList"].append(offer["OfferDetails"]) else: # logger.info("Offer product Id {offer['OfferDetails']['ProductId']} not found. Skipping offer details update") pass return product_list def usage_demo(): logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") print("-" * 88) print("Retrieving products and public offer information....") print("-" * 88) # Builds a list of products and their details product_list = get_enhanced_product_list("AmiProduct") # Queries offer information and attaches it to the product list product_offer_list = attach_offer_details(product_list) pretty_print(product_offer_list) return product_offer_list if __name__ == "__main__": usage_demo()

재판매 권한 부여

다음 코드 예제에서는 채널 파트너에게 게시하기 전에 내부적으로 검토할 수 있도록 모든 제품 유형에 대한 재판매 권한 부여 초안을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a one-time resale authorization on my SaaS/AMI/Container product so my CP can use that to create Channel Partner Private Offer (CPPO) CAPI-41 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "draft resale auth") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 재판매 권한 부여를 설명하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

# 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) search for product information in the AWS Marketplace Catalog """ import json import logging import boto3 from botocore.exceptions import ClientError logger = logging.getLogger(__name__) resaleAuthorizationId = "resaleauthz-1111111111111" def pretty_print(response): json_object = json.dumps(response, indent=4) print(json_object) def get_product_information(mp_client, entity_id): """ Returns information about a given product Args: entity_id str: Entity to return Returns: dict: Dictionary of product information """ try: response = mp_client.describe_entity( Catalog="AWSMarketplace", EntityId=entity_id, ) return response except ClientError as e: if e.response["Error"]["Code"] == "ResourceNotFoundException": logger.error("Product with ID %s not found.", entity_id) else: logger.error("Unexpected error: %s", e) def usage_demo(): logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") print("-" * 88) print("Looking for a product in the AWS Marketplace Catalog.") print("-" * 88) mp_client = boto3.client("marketplace-catalog") pretty_print(get_product_information(mp_client, resaleAuthorizationId)) if __name__ == "__main__": usage_demo()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조DescribeEntity를 참조하세요.

다음 코드 예제는 채널 파트너가 이를 사용하여 채널 파트너 비공개 제안(CPPO)을 생성할 수 있도록 비공개 제안으로 일회성 재판매 권한을 게시하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "OffersMaxQuantity": 1 } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a one-time resale authorization on my SaaS/AMI/Container product so my CP can use that to create Channel Partner Private Offer (CPPO) CAPI-42 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "onetime resale auth with private offer" ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 채널 파트너가 이를 사용하여 CPPO를 생성할 수 있도록 시간당 연간 요금이 적용되는 AMI 제품의 만료 날짜가 포함된 다중 사용 재판매 권한을 게시하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-05-31" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a multi-use resale authorization with expiry date on my SaaS/AMI product so my CP can use that to create Channel Partner Private Offer (CPPO) CAPI-48 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "multi-use resale auth with expiry date") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 모든 제품 유형에 대한 만료 날짜가 있는 다중 사용 재판매 권한을 게시하고 구매자에게 보낼 사용자 지정 EULA를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-05-31" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a multi-use resale authorization with expiry date on my SaaS/AMI/Container product and add custom EULA to be sent to the buyer CAPI-56 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "multiuse resale auth with expiry date and custom EULA") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 모든 제품 유형에 대한 만료 날짜가 있는 다중 사용 재판매 권한을 게시하고 ISV와 채널 파트너 간에 리셀러 계약 설명서를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-12-31" } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] }, { "Type": "ResaleLegalTerm", "Documents": [ { "Type": "CustomResellerContract", "Url": "https://s3.amazonaws.com/aws-mp-standard-contracts/Standard-Contact-for-AWS-Marketplace-2022-07-14.pdf"} ] } ] } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleUsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "t2.micro", "Price": "150" } ] } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a multi-use resale authorization with expiry date on my SaaS/AMI/Container product and add reseller contract documentation between the ISV and channel partner CAPI-57 """ import os import utils.start_changeset as sc import utils.stringify_details as sd fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) change_set = sd.stringify_changeset(change_set_file) def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "multi use resale auth with contract doc", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 모든 제품 유형에 대한 만료 날짜가 있는 다중 사용 재판매 권한을 게시하고 재판매에 대한 특정 구매자 계정을 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-05-31" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateBuyerTargetingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerTargetingTerm", "PositiveTargeting": { "BuyerAccounts": [ "111111111111" ] } } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish multi-use resale authorization with expiry date for any product type (AMI/SaaS/Container) and add specific buyer account for the resale CAPI-82 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "Publish multi-use resale authorization with expiry date and add specific buyer account", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 CP가 이를 사용하여 CPPO를 생성할 수 있도록 시간당 연간 요금이 적용되는 AMI 제품의 만료 날짜 없이 다중 사용 재판매 권한을 게시하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a multi-use resale authorization with no expiry date on my SaaS/AMI product so my CP can use that to create Channel Partner Private Offer (CPPO) CAPI-52 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "multi use resale auth with no expiry date") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 모든 제품 유형에 대한 만료 날짜 없이 다중 사용 재판매 권한을 게시하고 구매자에게 보낼 사용자 지정 EULA를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a multi-use resale authorization with no expiry date on my SaaS/AMI/Container product and add custom EULA to be sent to the buyer CAPI-58 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "multi use resale auth with no expiry date and custom EULA" ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 모든 제품 유형에 대한 만료 날짜 없이 다중 사용 재판매 권한을 게시하고 ISV와 채널 파트너 간에 리셀러 계약 설명서를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] }, { "Type": "ResaleLegalTerm", "Documents": [ { "Type": "CustomResellerContract", "Url": "https://s3.amazonaws.com/aws-mp-standard-contracts/Standard-Contact-for-AWS-Marketplace-2022-07-14.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a multi-use resale authorization with no expiry date on my SaaS/AMI/Container product and add reseller contract documentation between the ISV and channel partner CAPI-59 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "multi use resale auth with no expiry date and contract doc" ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 모든 제품 유형에 대한 만료 날짜 없이 다중 사용 재판매 권한을 게시하고 재판매에 대한 특정 구매자 계정을 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateBuyerTargetingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerTargetingTerm", "PositiveTargeting": { "BuyerAccounts": [ "111111111111" ] } } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish multi-use resale authorization without expiry date for any product type (AMI/SaaS/Container) and add specific buyer account for the resale CAPI-83 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "publish multi-use resale authorization without expiry date and add specific buyer account", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 모든 제품 유형에 대한 일회성 재판매 권한을 게시하고 유연한 결제 일정을 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleFixedUpfrontPricingTerm", "CurrencyCode": "USD", "Price": "0.00", "Duration": "P12M", "Grants": [ { "DimensionKey": "Users", "MaxQuantity": 10 } ] } ] } }, { "ChangeType": "UpdatePaymentScheduleTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "ResalePaymentScheduleTerm", "CurrencyCode": "USD", "Schedule": [ { "ChargeDate": "2023-09-01", "ChargeAmount": "200.00" }, { "ChargeDate": "2023-12-01", "ChargeAmount": "250.00" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "AvailabilityEndDate": "2023-06-30", "OffersMaxQuantity": 1 } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add Flexible payment schedule CAPI-78 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "onetime resale auth with flexible payment schedule") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 모든 제품 유형에 대한 일회성 재판매 권한을 게시하고 구매자에게 보낼 사용자 지정 EULA를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "OffersMaxQuantity": 1 } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a one-time resale authorization on my SaaS/AMI/Container product and add custom EULA to be sent to the buyer """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "onetime resale auth with custom EULA") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 모든 제품 유형에 대한 일회성 재판매 권한을 게시하고 재판매에 대한 특정 구매자 계정을 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "OffersMaxQuantity": 1 } }, { "ChangeType": "UpdateBuyerTargetingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerTargetingTerm", "PositiveTargeting": { "BuyerAccounts": [ "111111111111" ] } } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add specific buyer account for the resale CAPI-81 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "onetime resale authorization for specific buyer account") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 모든 제품 유형에 대한 일회성 재판매 권한을 게시하고 ISV와 채널 파트너 간에 리셀러 계약 설명서를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "ReleaseResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "OffersMaxQuantity": 1 } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerLegalTerm", "Documents": [ { "Type": "CustomEula", "Url": "https://s3.amazonaws.com/sample-bucket/custom-eula.pdf" } ] }, { "Type": "ResaleLegalTerm", "Documents": [ { "Type": "CustomResellerContract", "Url": "https://s3.amazonaws.com/aws-mp-standard-contracts/Standard-Contact-for-AWS-Marketplace-2022-07-14.pdf" } ] } ] } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish a one-time resale authorization on my SaaS/AMI/Container product and add reseller contract documentation between the ISV and channel partner CAPI-47 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "onetime resale auth with reseller contract doc") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제에서는 모든 제품 유형에 대한 일회성 재판매 권한을 게시하고 갱신 여부를 추가하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateResaleAuthorization", "ChangeName": "ResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "ResellerAccountId": "111111111111" } }, { "ChangeType": "UpdateBuyerTargetingTerms", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "BuyerTargetingTerm", "PositiveTargeting": { "BuyerAccounts": [ "222222222222" ] } } ] } }, { "ChangeType": "UpdateAvailability", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "OffersMaxQuantity": 1 } }, { "ChangeType":"UpdateInformation", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "$ResaleAuthorization.Entity.Identifier" }, "DetailsDocument": { "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product", "PreExistingBuyerAgreement": { "AcquisitionChannel": "AwsMarketplace", "PricingModel": "Contract" } } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add whether it is renewal or not CAPI-90 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo(stringified_change_set, "onetime resale auth renewal") return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 재판매 권한 부여를 제한하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "RestrictResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "resaleauthz-1111111111111" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Restrict a authorization for any product type (AMI/SaaS/Container) CAPI-84 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "Restrict resale authorization") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 모든 제품 유형에 대해 게시하기 전에 일회용 또는 다중 사용 재판매 권한 부여의 이름과 설명을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType":"UpdateInformation", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "resaleauthz-1111111111111" }, "DetailsDocument": { "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Update name/description of one-time or multi-use resale authorization before publishing for any product type (AMI/SaaS/Container) CAPI-77 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 name and description of one-time or multi-use resale authorization before publishing", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

SaaS 제품

다음 코드 예제는 초안 공개 제안으로 초안 SaaS 제품을 생성하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog":"AWSMarketplace", "ChangeSet":[ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "SaaSProduct@1.0" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier", "Name": "Test Offer" } } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 an SaaS draft product with a draft public offer. CAPI-04 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Create a draft saas product with a draft public offer", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 계약 요금으로 퍼블릭 또는 제한된 SaaS 제품 및 퍼블릭 제안을 생성하는 방법을 보여줍니다. 이 예제에서는 표준 또는 사용자 지정 EULA를 생성합니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "Entity": { "Type": "SaaSProduct@1.0" }, "ChangeName": "CreateProductChange", "DetailsDocument": {} }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "ProductTitle": "Sample product", "ShortDescription": "Brief description", "LongDescription": "Detailed description", "Highlights": [ "Sample highlight" ], "SearchKeywords": [ "Sample keyword" ], "Categories": [ "Data Catalogs" ], "LogoUrl": "https://s3.amazonaws.com/logos/sample.png", "VideoUrls": [ "https://sample.amazonaws.com/awsmp-video-1" ], "AdditionalResources": [] } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "AddDeliveryOptions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "DeliveryOptions": [ { "Details": { "SaaSUrlDeliveryOptionDetails": { "FulfillmentUrl":"https://sample.amazonaws.com/sample-saas-fulfillment-url" } } } ] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "BasicService", "Description": "Basic Service", "Name": "Basic Service", "Types": [ "Entitled" ], "Unit": "Units" }, { "Key": "PremiumService", "Description": "Premium Service", "Name": "Premium Service", "Types": [ "Entitled" ], "Unit": "Units" } ] }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test public offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test public offer with contract pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P1M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "20" }, { "DimensionKey": "PremiumService", "Price": "25" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } }, { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "150" }, { "DimensionKey": "PremiumService", "Price": "300" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Absolutely no refund, period." } ] } }, { "ChangeType": "UpdateRenewalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "RenewalTerm" } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a public or limited SaaS product and public offer with contract pricing and standard EULA CAPI-11 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 limited saas product with a public offer with contract pricing", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 Pay-As-You-Go 요금 계약으로 퍼블릭 또는 제한된 SaaS 제품 및 퍼블릭 제안을 생성하는 방법을 보여줍니다. 이 예제에서는 표준 또는 사용자 지정 EULA를 생성합니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "Entity": { "Type": "SaaSProduct@1.0" }, "ChangeName": "CreateProductChange", "DetailsDocument": {} }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "ProductTitle": "Sample product", "ShortDescription": "Brief description", "LongDescription": "Detailed description", "Highlights": [ "Sample highlight" ], "SearchKeywords": [ "Sample keyword" ], "Categories": [ "Data Catalogs" ], "LogoUrl": "https://s3.amazonaws.com/logos/sample.png", "VideoUrls": [ "https://sample.amazonaws.com/awsmp-video-1" ], "AdditionalResources": [] } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "AddDeliveryOptions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "DeliveryOptions": [ { "Details": { "SaaSUrlDeliveryOptionDetails": { "FulfillmentUrl":"https://sample.amazonaws.com/sample-saas-fulfillment-url" } } } ] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "BasicService", "Description": "Basic Service", "Name": "Basic Service", "Types": [ "Entitled" ], "Unit": "Units" }, { "Key": "PremiumService", "Description": "Premium Service", "Name": "Premium Service", "Types": [ "Entitled" ], "Unit": "Units" }, { "Key": "WorkloadSmall", "Description": "Workload: Per medium instance", "Name": "Workload: Per medium instance", "Types": [ "ExternallyMetered" ], "Unit": "Units" }, { "Key": "WorkloadMedium", "Description": "Workload: Per large instance", "Name": "Workload: Per large instance", "Types": [ "ExternallyMetered" ], "Unit": "Units" } ] }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test public offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test public offer with contract pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "WorkloadSmall", "Price": "0.15" }, { "DimensionKey": "WorkloadMedium", "Price": "0.25" } ] } ] }, { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "150" }, { "DimensionKey": "PremiumService", "Price": "300" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Absolutely no refund, period." } ] } }, { "ChangeType": "UpdateRenewalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "RenewalTerm" } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a public or limited SaaS product and public offer with contract with PAYG pricing and standard EULA CAPI-10 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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 limited SaaS product with public offer with contract with payg pricing", ) if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 구독 요금으로 퍼블릭 또는 제한된 SaaS 제품 및 퍼블릭 제안을 생성하는 방법을 보여줍니다. 이 예제에서는 표준 또는 사용자 지정 EULA를 생성합니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "Entity": { "Type": "SaaSProduct@1.0" }, "ChangeName": "CreateProductChange", "DetailsDocument": {} }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "ProductTitle": "Sample product", "ShortDescription": "Brief description", "LongDescription": "Detailed description", "Highlights": [ "Sample highlight" ], "SearchKeywords": [ "Sample keyword" ], "Categories": [ "Data Catalogs" ], "LogoUrl": "https://s3.amazonaws.com/logos/sample.png", "VideoUrls": [ "https://sample.amazonaws.com/awsmp-video-1" ], "AdditionalResources": [] } }, { "ChangeType": "UpdateTargeting", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "PositiveTargeting": { "BuyerAccounts": [ "111111111111", "222222222222" ] } } }, { "ChangeType": "AddDeliveryOptions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "DeliveryOptions": [ { "Details": { "SaaSUrlDeliveryOptionDetails": { "FulfillmentUrl":"https://sample.amazonaws.com/sample-saas-fulfillment-url" } } } ] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "WorkloadSmall", "Description": "Workload: Per medium instance", "Name": "Workload: Per medium instance", "Types": [ "ExternallyMetered" ], "Unit": "Units" }, { "Key": "WorkloadMedium", "Description": "Workload: Per large instance", "Name": "Workload: Per large instance", "Types": [ "ExternallyMetered" ], "Unit": "Units" } ] }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateOfferChange", "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "Test public offer for SaaSProduct using AWS Marketplace API Reference Code", "Description": "Test public offer with contract pricing for SaaSProduct using AWS Marketplace API Reference Code" } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Usage", "Terms": [ { "Type": "UsageBasedPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "RateCard": [ { "DimensionKey": "WorkloadSmall", "Price": "0.15" }, { "DimensionKey": "WorkloadMedium", "Price": "0.25" } ] } ] } ] } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Absolutely no refund, period." } ] } }, { "ChangeType": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 a public or limited SaaS product and public offer with subscription(usage) pricing and standard EULA CAPI-09 """ import os import utils.start_changeset as sc import utils.stringify_details as sd 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, "public saas public offer with subscription pricing") if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 SaaS 제품 및 관련 공개 제안을 게시하는 방법을 보여줍니다. 제품은 기본적으로 제한된 상태입니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog":"AWSMarketplace", "ChangeSet":[ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "SaaSProduct@1.0" }, "DetailsDocument": {} }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "ProductTitle": "Sample product", "ShortDescription": "Brief description", "LongDescription": "Detailed description", "Highlights": [ "Sample highlight" ], "SearchKeywords": [ "Sample keyword" ], "Categories": [ "Data Catalogs" ], "LogoUrl": "https://bucketname.s3.amazonaws.com/logo.png", "VideoUrls": [ "https://sample.amazonaws.com/awsmp-video-1" ], "AdditionalResources": [] } }, { "ChangeType": "AddDimensions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": [ { "Key": "BasicService", "Description": "Basic Service", "Name": "Basic Service", "Types": [ "Entitled" ], "Unit": "Units" }, { "Key": "PremiumService", "Description": "Premium Service", "Name": "Premium Service", "Types": [ "Entitled" ], "Unit": "Units" } ] }, { "ChangeType": "AddDeliveryOptions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": { "DeliveryOptions": [ { "Details": { "SaaSUrlDeliveryOptionDetails": { "FulfillmentUrl": "https://www.aws.amazon.com/marketplace/management" } } } ] } }, { "ChangeType": "ReleaseProduct", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "$CreateProductChange.Entity.Identifier" }, "DetailsDocument": {} }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier" } }, { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Name": "New Test Offer", "Description": "New offer description" } }, { "ChangeType": "UpdateLegalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "LegalTerm", "Documents": [ { "Type": "StandardEula", "Version": "2022-07-14" } ] } ] } }, { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Updated refund policy description" } ] } }, { "ChangeType": "UpdatePricingTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "PricingModel": "Contract", "Terms": [ { "Type": "ConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P1M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "20" }, { "DimensionKey": "PremiumService", "Price": "25" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } }, { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "BasicService", "Price": "150" }, { "DimensionKey": "PremiumService", "Price": "300" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } }, { "ChangeType": "UpdateRenewalTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": { "Terms": [ { "Type": "RenewalTerm" } ] } }, { "ChangeType":"ReleaseOffer", "Entity":{ "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Publish my SaaS product and associated public offer (product will be in limited state by default) CAPI-05A """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset1.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "publish saas product and associated public offer", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

다음 코드 예제는 AMI 또는 SaaS 제품의 차원을 업데이트하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateDimensions", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "prod-111111111111" }, "DetailsDocument": [ { "Key": "BasicService", "Types": [ "Entitled" ], "Name": "Some new name", "Description": "Some new description" } ] } ] }

이 스크립트를 실행하여 변경 세트를 시작합니다. 헬퍼 함수는 유틸리티 섹션에서 변경 세트를 시작하기 위해 유틸리티에 정의됩니다.

# 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 (e.g name) dimensions on my AMI or SaaS product CAPI-24 """ import os import utils.start_changeset as sc import utils.stringify_details as sd def main(change_set=None): if change_set is None: fname = "changeset.json" change_set_file = os.path.join(os.path.dirname(__file__), fname) stringified_change_set = sd.stringify_changeset(change_set_file) else: stringified_change_set = change_set response = sc.usage_demo( stringified_change_set, "Update name dimensions on my AMI or SaaS product", ) return response if __name__ == "__main__": main()
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.

유틸리티

다음 코드 예제에서는 유틸리티를 정의하여 변경 세트를 시작하는 방법을 보여줍니다.

SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서를 설정하고 실행하는 방법을 알아봅니다.

변경 세트를 시작하는 유틸리티입니다.

""" Purpose: Generic function to start a changeset """ import logging import boto3 from botocore.exceptions import ClientError logger = logging.getLogger(__name__) def generate_changeset(mp_client, change_set, change_set_name): """ Start changeset """ try: response = mp_client.start_change_set( Catalog="AWSMarketplace", ChangeSet=change_set, ChangeSetName=change_set_name, ) logger.info("Changeset created!") logger.info("ChangeSet ID: %s", response["ChangeSetId"]) logger.info("ChangeSet ARN: %s", response["ChangeSetArn"]) return response except ClientError as e: logger.exception("Unexpected error: %s", e) raise def usage_demo(change_set, change_set_name): logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") print("-" * 88) print("Executing changeset: " + change_set_name) print("-" * 88) mp_client = boto3.client("marketplace-catalog") response = generate_changeset(mp_client, change_set, change_set_name) return response print("-" * 88)

JSON 파일에서 변경 세트를 로드하는 유틸리티입니다.

""" Purpose: This module will stringify the details sections of a changeset file. """ import json def pretty_print(response): json_object = json.dumps(response, indent=4) print(json_object) # open json file from path def open_json_file(filename): with open(filename, "r") as f: return json.load(f) def stringify_details_sections(json_object): """ Loops through every change type in the changeset to look for non-empty details section and stringifies them """ for change_type in json_object["ChangeSet"]: # Only stringify details section if it is not empty if "Details" in change_type and change_type["Details"] != "{}": string_details = json.dumps(change_type["Details"]) change_type["Details"] = string_details else: pass return json_object["ChangeSet"] def stringify_changeset(file_path): changeset_file = open_json_file(file_path) changeset_stringified = stringify_details_sections(changeset_file) return changeset_stringified
  • API 세부 정보는 AWS SDK for Python (Boto3) API 참조StartChangeSet를 참조하세요.