AWS Marketplace Java 2.xSDK용 카탈로그 API 예제 - AWS SDK 코드 예제

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

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

AWS Marketplace Java 2.xSDK용 카탈로그 API 예제

다음 코드 예제에서는 AWS Marketplace 카탈로그 와 AWS SDK for Java 2.x 함께 를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다API.

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

AMI 제품

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "AddRegions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "Regions": [ "us-east-2", "us-west-2" ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

에 대한 자세한 내용은 를 참조하세요 GitHub. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서 설정 및 실행하는 방법을 알아봅니다.

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "AmiProduct@1.0" }, "DetailsDocument": { "ProductTitle": "Sample product" } }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier", "Name": "Test Offer" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "RestrictRegions", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "Regions": [ "us-west-2" ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateVisibility", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "TargetVisibility": "Restricted" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateFutureRegionSupport", "Entity": { "Type": "AmiProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "FutureRegionSupport": { "SupportedRegions": [ "All" ] } } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

채널 파트너 제안

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ResaleAuthorizationId": "11111111-1111-1111-1111-111111111111", "Name": "Test Offer", "Description": "Test product" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

package com.example.awsmarketplace.catalogapi; import java.util.ArrayList; import java.util.List; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.core.document.Document; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityRequest; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityResponse; import software.amazon.awssdk.services.marketplacecatalog.model.EntitySummary; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesRequest; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesResponse; public class ListAllCppoOffers { /* * List all CPPOs created by a channel partner */ public static void main(String[] args) { List<String> cppoOfferIds = getAllCppoOfferIds(); ReferenceCodesUtils.formatOutput(cppoOfferIds); } public static List<String> getAllCppoOfferIds() { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); // get all offer entity ids List<String> entityIdList = new ArrayList<String>(); ListEntitiesRequest listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER) .maxResults(10) .nextToken(null) .build(); ListEntitiesResponse listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); for (EntitySummary entitySummary : listEntitiesResponse.entitySummaryList()) { entityIdList.add(entitySummary.entityId()); } while (listEntitiesResponse.nextToken() != null) { listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER) .maxResults(10) .nextToken(listEntitiesResponse.nextToken()) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); for (EntitySummary entitySummary : listEntitiesResponse.entitySummaryList()) { entityIdList.add(entitySummary.entityId()); } } // filter for CPPO offers: ResaleAuthorizationId exists in Details List<String> cppoOfferIds = new ArrayList<String>(); for (String entityId : entityIdList) { DescribeEntityRequest describeEntityRequest = DescribeEntityRequest.builder() .catalog(AWS_MP_CATALOG) .entityId(entityId) .build(); DescribeEntityResponse describeEntityResponse = marketplaceCatalogClient.describeEntity(describeEntityRequest); Document resaleAuthorizationDocument = describeEntityResponse.detailsDocument().asMap().get(ATTRIBUTE_RESALE_AUTHORIZATION_ID); String resaleAuthorizationId = resaleAuthorizationDocument != null ? resaleAuthorizationDocument.asString() : ""; if (!resaleAuthorizationId.isEmpty()) { cppoOfferIds.add(resaleAuthorizationId); } } return cppoOfferIds; } }
  • 자세한 API 내용은 참조ListEntities의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

package com.example.awsmarketplace.catalogapi; import java.util.ArrayList; import java.util.List; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesRequest; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesResponse; public class ListAllSharedResaleAuthorizations { /* * list all resale authorizations shared to an account */ public static void main(String[] args) { List<ListEntitiesResponse> responseList = getListEntityResponseList(); ReferenceCodesUtils.formatOutput(responseList); } public static List<ListEntitiesResponse> getListEntityResponseList() { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); List<ListEntitiesResponse> responseList = new ArrayList<ListEntitiesResponse>(); ListEntitiesRequest listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_RESALE_AUTHORIZATION) .maxResults(10) .ownershipType(OWNERSHIP_TYPE_SHARED) .nextToken(null) .build(); ListEntitiesResponse listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); responseList.add(listEntitiesResponse); while (listEntitiesResponse.nextToken() != null) { listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_RESALE_AUTHORIZATION) .maxResults(10) .ownershipType(OWNERSHIP_TYPE_SHARED) .nextToken(listEntitiesResponse.nextToken()) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); responseList.add(listEntitiesResponse); } return responseList; } }
  • 자세한 API 내용은 참조ListEntities의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType" : "CreateOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateCPPOoffer", "DetailsDocument": { "ResaleAuthorizationId":"resaleauthz-1111111111111", "Name": "Test Offer", "Description":"Test product" } }, { "ChangeType": "UpdateMarkup", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPOoffer.Entity.Identifier" }, "DetailsDocument": { "Percentage" : "5.0" } }, { "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType" : "CreateOfferUsingResaleAuthorization", "Entity": { "Type": "Offer@1.0" }, "ChangeName": "CreateCPPOoffer", "DetailsDocument": { "ResaleAuthorizationId":"resaleauthz-1111111111111", "Name": "Test Offer", "Description":"Test product" } }, { "ChangeType": "UpdateMarkup", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateCPPOoffer.Entity.Identifier" }, "DetailsDocument": { "Percentage" : "5.0" } }, { "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "AvailabilityEndDate": "2025-07-31" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

컨테이너 제품

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog":"AWSMarketplace", "changeSet":[ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "ContainerProduct@1.0" }, "DetailsDocument": { "ProductTitle": "Sample product" } }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier", "Name": "Test Offer" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

개체

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

SDK Java 2.x용
참고

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

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package com.example.awsmarketplace.catalogapi; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.BatchDescribeEntitiesRequest; import software.amazon.awssdk.services.marketplacecatalog.model.EntityRequest; import software.amazon.awssdk.services.marketplacecatalog.model.BatchDescribeEntitiesResponse; import software.amazon.awssdk.services.marketplacecatalog.model.EntityDetail; import software.amazon.awssdk.services.marketplacecatalog.model.BatchDescribeErrorDetail; import java.util.Arrays; import java.util.Map; public class BatchDescribeEntities { /* * BatchDescribe my entities in a single call and * check if it contains all the information I need to know about the entities. */ public static void main(String[] args) { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); BatchDescribeEntitiesRequest batchDescribeEntitiesRequest = BatchDescribeEntitiesRequest.builder() .entityRequestList(Arrays.asList( EntityRequest.builder() .catalog(AWS_MP_CATALOG).entityId(OFFER_ID) .build(), EntityRequest.builder() .catalog(AWS_MP_CATALOG).entityId(PRODUCT_ID) .build())) .build(); BatchDescribeEntitiesResponse batchDescribeEntitiesResponse = marketplaceCatalogClient.batchDescribeEntities(batchDescribeEntitiesRequest); // Reading the successful entities response Map<String, EntityDetail> entityDetailsMap = batchDescribeEntitiesResponse.entityDetails(); for (Map.Entry<String, EntityDetail> entry : entityDetailsMap.entrySet()) { System.out.println("EntityId: " + entry.getKey()); ReferenceCodesUtils.formatOutput(entry.getValue()); } // Logging the failed entities error details Map<String, BatchDescribeErrorDetail> entityErrorsMap = batchDescribeEntitiesResponse.errors(); for (Map.Entry<String, BatchDescribeErrorDetail> entry : entityErrorsMap.entrySet()) { System.out.println(String.format("EntityId: %s, ErrorCode: %s, ErrorMessage: %s", entry.getKey(), entry.getValue().errorCode(), entry.getValue().errorMessage())); } } }
  • 자세한 API 내용은 참조BatchDescribeEntities의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

package com.example.awsmarketplace.catalogapi; import java.util.ArrayList; import java.util.List; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityRequest; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityResponse; import software.amazon.awssdk.services.marketplacecatalog.model.EntitySummary; import software.amazon.awssdk.services.marketplacecatalog.model.EntityTypeFilters; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesRequest; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesResponse; import software.amazon.awssdk.services.marketplacecatalog.model.OfferFilters; import software.amazon.awssdk.services.marketplacecatalog.model.OfferProductIdFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferTargetingFilter; public class ListProductPrivateOffers { private static MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); /* * retrieve all private offer information related to a single product */ public static void main(String[] args) { List<EntitySummary> entitySummaryList = getEntitySummaryList(); // for each offer id, output the offer detail using DescribeEntity API for (EntitySummary entitySummary : entitySummaryList) { DescribeEntityRequest describeEntityRequest = DescribeEntityRequest.builder() .catalog(AWS_MP_CATALOG) .entityId(entitySummary.entityId()) .build(); DescribeEntityResponse describeEntityResponse = marketplaceCatalogClient.describeEntity(describeEntityRequest); ReferenceCodesUtils.formatOutput(describeEntityResponse); } } public static List<EntitySummary> getEntitySummaryList() { // define list entities filters EntityTypeFilters entityTypeFilters = EntityTypeFilters.builder() .offerFilters(OfferFilters.builder() .targeting(OfferTargetingFilter.builder() .valueListWithStrings(OFFER_TARGETING_BUYERACCOUNTS) .build()) .productId(OfferProductIdFilter.builder() .valueList(PRODUCT_ID) .build()) .build()) .build(); ListEntitiesRequest listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER).maxResults(50) .entityTypeFilters(entityTypeFilters) .nextToken(null) .build(); ListEntitiesResponse listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); // save all entitySummary of the results into entitySummaryList List<EntitySummary> entitySummaryList = new ArrayList<EntitySummary>(); entitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); while ( listEntitiesResponse.nextToken() != null && listEntitiesResponse.nextToken().length() > 0) { listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER).maxResults(50) .entityTypeFilters(entityTypeFilters) .nextToken(listEntitiesResponse.nextToken()) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); entitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); } return entitySummaryList; } }

제안

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateOffer", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "prod-1111111111111", "Name": "Test Private Offer" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": "FixedUpfrontPricingTerm", "CurrencyCode": "USD", "Price": "0.0", "Grants": [ { "DimensionKey": "BasicService", "MaxQuantity": 1 }, { "DimensionKey": "PremiumService", "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": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 컨테이너 제품에 대한 계약 가격으로 프라이빗 제안을 생성하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 AMI 제품의 계약 가격으로 프라이빗 제안을 생성하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 시간당 연간 요금과 AMI 유연한 제품 결제 일정으로 프라이빗 제안을 생성하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 AMI 제품의 시간별 연간 요금으로 프라이빗 제안을 생성하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 AMI 제품의 시간당 요금으로 프라이빗 제안을 생성하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 SaaS 제품에 대한 계층형 계약 가격으로 프라이빗 제안을 생성하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

에 대한 자세한 내용은 를 참조하세요 GitHub. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서 설정 및 실행하는 방법을 알아봅니다.

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 집합을 전달하여 유틸리티 섹션에서 변경 집합을 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package com.example.awsmarketplace.catalogapi; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityRequest; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityResponse; public class DescribeEntity { /* * Describe my AMI or SaaS or Container product and check if it contains all the information I need to know about the product */ public static void main(String[] args) { String offerId = args.length > 0 ? args[0] : OFFER_ID; DescribeEntityResponse describeEntityResponse = getDescribeEntityResponse(offerId); ReferenceCodesUtils.formatOutput(describeEntityResponse); } public static DescribeEntityResponse getDescribeEntityResponse(String offerId) { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); DescribeEntityRequest describeEntityRequest = DescribeEntityRequest.builder() .catalog(AWS_MP_CATALOG) .entityId(offerId) .build(); DescribeEntityResponse describeEntityResponse = marketplaceCatalogClient.describeEntity(describeEntityRequest); return describeEntityResponse; } }
  • 자세한 API 내용은 참조DescribeEntity의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "AvailabilityEndDate": "2023-01-01" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제에서는 모든 프라이빗 제안을 나열하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

package com.example.awsmarketplace.catalogapi; import java.util.ArrayList; import java.util.List; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityRequest; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityResponse; import software.amazon.awssdk.services.marketplacecatalog.model.EntitySummary; import software.amazon.awssdk.services.marketplacecatalog.model.EntityTypeFilters; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesRequest; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesResponse; import software.amazon.awssdk.services.marketplacecatalog.model.OfferAvailabilityEndDateFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferAvailabilityEndDateFilterDateRange; import software.amazon.awssdk.services.marketplacecatalog.model.OfferBuyerAccountsFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferFilters; import software.amazon.awssdk.services.marketplacecatalog.model.OfferReleaseDateFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferReleaseDateFilterDateRange; import software.amazon.awssdk.services.marketplacecatalog.model.OfferTargetingFilter; public class ListAllPrivateOffers { /* * List all my private offers and sort or filter them by Offer Publish Date, Offer Expiry Date and Buyer IDs * * OfferTargetingFilter = BuyerAccounts (private offer); * OfferBuyerAccountsFilter: Buyer IDs filter * OfferAvailabilityEndDateFilter : Offer Expiry Date filter * OfferReleaseDateFilter : Offer Publish Date filter */ private static MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); public static void main(String[] args) { String offerReleaseDateAfterValue = "2023-01-01T23:59:59Z"; String offerAvailableEndDateAfterValue = "2040-12-24T23:59:59Z"; List<EntitySummary> entitySummaryList = getEntitySummaryList(offerReleaseDateAfterValue, offerAvailableEndDateAfterValue); // for each offer id, output the offer detail using DescribeEntity API for (EntitySummary entitySummary : entitySummaryList) { DescribeEntityRequest describeEntityRequest = DescribeEntityRequest.builder() .catalog(AWS_MP_CATALOG) .entityId(entitySummary.entityId()) .build(); DescribeEntityResponse describeEntityResponse = marketplaceCatalogClient.describeEntity(describeEntityRequest); ReferenceCodesUtils.formatOutput(describeEntityResponse); } } public static List<EntitySummary> getEntitySummaryList (String offerReleaseDateAfterValue, String offerAvailableEndDateAfterValue) { EntityTypeFilters entityTypeFilters = EntityTypeFilters.builder() .offerFilters(OfferFilters.builder() .targeting(OfferTargetingFilter.builder() .valueListWithStrings(OFFER_TARGETING_BUYERACCOUNTS) .build()) .buyerAccounts(OfferBuyerAccountsFilter.builder() .wildCardValue(BUYER_ACCOUNT_ID) .build()) .availabilityEndDate(OfferAvailabilityEndDateFilter.builder() .dateRange(OfferAvailabilityEndDateFilterDateRange.builder() .afterValue(offerAvailableEndDateAfterValue).build()) .build()) .releaseDate(OfferReleaseDateFilter.builder() .dateRange(OfferReleaseDateFilterDateRange.builder() .afterValue(offerReleaseDateAfterValue) .build()) .build()) .build()) .build(); ListEntitiesRequest listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER).maxResults(10) .entityTypeFilters(entityTypeFilters) .nextToken(null) .build(); ListEntitiesResponse listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); List<EntitySummary> entitySummaryList = new ArrayList<EntitySummary>(); entitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); while ( listEntitiesResponse.nextToken() != null && listEntitiesResponse.nextToken().length() > 0) { listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER) .maxResults(10) .entityTypeFilters(entityTypeFilters) .nextToken(listEntitiesResponse.nextToken()) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); entitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); } return entitySummaryList; } }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 특정 제품 ID에 대해 릴리스된 퍼블릭 및 프라이빗 제안을 나열하는 방법을 보여줍니다.

SDK Java 2.x용
참고

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

package com.example.awsmarketplace.catalogapi; import java.util.ArrayList; import java.util.List; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.EntitySummary; import software.amazon.awssdk.services.marketplacecatalog.model.EntityTypeFilters; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesRequest; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesResponse; import software.amazon.awssdk.services.marketplacecatalog.model.OfferFilters; import software.amazon.awssdk.services.marketplacecatalog.model.OfferProductIdFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferStateFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferTargetingFilter; public class ListProductPublicOrPrivateReleasedOffers { /* * List released Public/Private offers for a specific product id. * Example below is to list released public offers. * To change to released private offers, change OFFER_TARGETING_NONE (None) to OFFER_TARGETING_BUYERACCOUNTS(BuyerAccounts) */ public static void main(String[] args) { List<EntitySummary> entitySummaryList = getEntitySummaryLIst(); ReferenceCodesUtils.formatOutput(entitySummaryList); } public static List<EntitySummary> getEntitySummaryLIst() { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); // define list entities filters EntityTypeFilters entityTypeFilters = EntityTypeFilters.builder() .offerFilters(OfferFilters.builder() .targeting(OfferTargetingFilter.builder() .valueListWithStrings(OFFER_TARGETING_NONE) .build()) .state(OfferStateFilter.builder() .valueListWithStrings(OFFER_STATE_RELEASED) .build()) .productId(OfferProductIdFilter.builder() .valueList(PRODUCT_ID) .build()) .build()) .build(); ListEntitiesRequest listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER) .maxResults(10) .entityTypeFilters(entityTypeFilters) .nextToken(null) .build(); ListEntitiesResponse listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); // save all entitySummary of the results into entitySummaryList List<EntitySummary> entitySummaryList = new ArrayList<EntitySummary>(); entitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); while ( listEntitiesResponse.nextToken() != null && listEntitiesResponse.nextToken().length() > 0) { listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER) .maxResults(10) .entityTypeFilters(entityTypeFilters) .nextToken(listEntitiesResponse.nextToken()) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); entitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); } return entitySummaryList; } }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티 섹션에서 다음 JSON 변경 집합을 유틸리티RunChangesets의 에 전달하여 변경 집합을 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateTargeting", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "PositiveTargeting": { "CountryCodes": [ "US", "ES", "FR", "AU" ] } } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateInformation", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "Name": "New offer name", "Description": "New offer description" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateAvailability", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "AvailabilityEndDate": "2026-01-01" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateSupportTerms", "Entity": { "Type": "Offer@1.0", "Identifier": "offer-1111111111111" }, "DetailsDocument": { "Terms": [ { "Type": "SupportTerm", "RefundPolicy": "Updated refund policy description" } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

제품

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

SDK Java 2.x용
참고

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

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package com.example.awsmarketplace.catalogapi; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityRequest; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityResponse; public class DescribeEntity { /* * Describe my AMI or SaaS or Container product and check if it contains all the information I need to know about the product */ public static void main(String[] args) { String offerId = args.length > 0 ? args[0] : OFFER_ID; DescribeEntityResponse describeEntityResponse = getDescribeEntityResponse(offerId); ReferenceCodesUtils.formatOutput(describeEntityResponse); } public static DescribeEntityResponse getDescribeEntityResponse(String offerId) { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); DescribeEntityRequest describeEntityRequest = DescribeEntityRequest.builder() .catalog(AWS_MP_CATALOG) .entityId(offerId) .build(); DescribeEntityResponse describeEntityResponse = marketplaceCatalogClient.describeEntity(describeEntityRequest); return describeEntityResponse; } }
  • 자세한 API 내용은 참조DescribeEntity의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

package com.example.awsmarketplace.catalogapi; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.EntitySummary; import software.amazon.awssdk.services.marketplacecatalog.model.EntityTypeFilters; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesRequest; import software.amazon.awssdk.services.marketplacecatalog.model.ListEntitiesResponse; import software.amazon.awssdk.services.marketplacecatalog.model.OfferFilters; import software.amazon.awssdk.services.marketplacecatalog.model.OfferProductIdFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferStateFilter; import software.amazon.awssdk.services.marketplacecatalog.model.OfferTargetingFilter; public class ListEntities { /* * List all my AMI or SaaS or Container products and associated public offers */ public static void main(String[] args) { Map<String, List<EntitySummary>> allProductsWithOffers = getAllProductsWithOffers(); ReferenceCodesUtils.formatOutput(allProductsWithOffers); } public static Map<String, List<EntitySummary>> getAllProductsWithOffers() { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); Map<String, List<EntitySummary>> allProductsWithOffers = new HashMap<String, List<EntitySummary>> (); // get all product entities List<EntitySummary> productEntityList = new ArrayList<EntitySummary>(); ListEntitiesRequest listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(PRODUCT_TYPE_AMI) .maxResults(10) .nextToken(null) .build(); ListEntitiesResponse listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); productEntityList.addAll(listEntitiesResponse.entitySummaryList()); while (listEntitiesResponse.nextToken() != null) { listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(PRODUCT_TYPE_AMI) .maxResults(10) .nextToken(listEntitiesResponse.nextToken()) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); productEntityList.addAll(listEntitiesResponse.entitySummaryList()); } // loop through each product entity and get the public released offers associated using product id filter for ( EntitySummary productEntitySummary : productEntityList) { EntityTypeFilters entityTypeFilters = EntityTypeFilters.builder() .offerFilters(OfferFilters.builder() .targeting(OfferTargetingFilter.builder() .valueListWithStrings(OFFER_TARGETING_NONE) .build()) .state(OfferStateFilter.builder() .valueListWithStrings(OFFER_STATE_RELEASED) .build()) .productId(OfferProductIdFilter.builder() .valueList(productEntitySummary.entityId()) .build()) .build()) .build(); listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER) .maxResults(10) .entityTypeFilters(entityTypeFilters) .nextToken(null) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); // save all entitySummary of the results into entitySummaryList List<EntitySummary> offerEntitySummaryList = new ArrayList<EntitySummary>(); offerEntitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); while ( listEntitiesResponse.nextToken() != null && listEntitiesResponse.nextToken().length() > 0) { listEntitiesRequest = ListEntitiesRequest.builder() .catalog(AWS_MP_CATALOG) .entityType(ENTITY_TYPE_OFFER) .maxResults(10) .entityTypeFilters(entityTypeFilters) .nextToken(listEntitiesResponse.nextToken()) .build(); listEntitiesResponse = marketplaceCatalogClient.listEntities(listEntitiesRequest); offerEntitySummaryList.addAll(listEntitiesResponse.entitySummaryList()); } // save final results into map; key = product id; value = offer entity summary list allProductsWithOffers.put(productEntitySummary.entityId(), offerEntitySummaryList); } return allProductsWithOffers; } }

재판매 권한 부여

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package com.example.awsmarketplace.catalogapi; import static com.example.awsmarketplace.utils.ReferenceCodesConstants.*; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityRequest; import software.amazon.awssdk.services.marketplacecatalog.model.DescribeEntityResponse; public class DescribeEntity { /* * Describe my AMI or SaaS or Container product and check if it contains all the information I need to know about the product */ public static void main(String[] args) { String offerId = args.length > 0 ? args[0] : OFFER_ID; DescribeEntityResponse describeEntityResponse = getDescribeEntityResponse(offerId); ReferenceCodesUtils.formatOutput(describeEntityResponse); } public static DescribeEntityResponse getDescribeEntityResponse(String offerId) { MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); DescribeEntityRequest describeEntityRequest = DescribeEntityRequest.builder() .catalog(AWS_MP_CATALOG) .entityId(offerId) .build(); DescribeEntityResponse describeEntityResponse = marketplaceCatalogClient.describeEntity(describeEntityRequest); return describeEntityResponse; } }
  • 자세한 API 내용은 참조DescribeEntity의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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 } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

에 대한 자세한 내용은 를 참조하세요 GitHub. 전체 예제를 찾아 AWS Marketplace API 참조 코드 라이브러리 리포지토리에서 설정 및 실행하는 방법을 알아봅니다.

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": "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": "ResaleConfigurableUpfrontPricingTerm", "CurrencyCode": "USD", "RateCards": [ { "Selector": { "Type": "Duration", "Value": "P12M" }, "RateCard": [ { "DimensionKey": "t2.small", "Price": "150" } ], "Constraints": { "MultipleDimensionSelection": "Allowed", "QuantityConfiguration": "Allowed" } } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티 섹션에서 다음 JSON 변경 집합을 유틸리티RunChangesets의 에 전달하여 변경 집합을 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" ] } } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티의 RunChangesets 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티 섹션에서 다음 JSON 변경 집합을 유틸리티RunChangesets의 에 전달하여 변경 집합을 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType": "RestrictResaleAuthorization", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "resaleauthz-1111111111111" }, "DetailsDocument": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog": "AWSMarketplace", "ChangeSet": [ { "ChangeType":"UpdateInformation", "Entity": { "Type": "ResaleAuthorization@1.0", "Identifier": "resaleauthz-1111111111111" }, "DetailsDocument": { "Name": "TestResaleAuthorization", "Description": "Worldwide ResaleAuthorization for Test Product" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

SaaS 제품

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "Catalog":"AWSMarketplace", "ChangeSet": [ { "ChangeType": "CreateProduct", "ChangeName": "CreateProductChange", "Entity": { "Type": "SaaSProduct@1.0" }, "DetailsDocument": { "ProductTitle": "Sample product" } }, { "ChangeType": "CreateOffer", "ChangeName": "CreateOfferChange", "Entity": { "Type": "Offer@1.0" }, "DetailsDocument": { "ProductId": "$CreateProductChange.Entity.Identifier", "Name": "Test Offer" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티 섹션에서 다음 JSON 변경 집합을 유틸리티RunChangesets의 에 전달하여 변경 집합을 시작합니다.

{ "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": "ReleaseOffer", "Entity": { "Type": "Offer@1.0", "Identifier": "$CreateOfferChange.Entity.Identifier" }, "DetailsDocument": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티 섹션에서 다음 JSON 변경 집합을 유틸리티RunChangesets의 에 전달하여 변경 집합을 시작합니다.

{ "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": {} } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

다음 코드 예제는 기존 초안에서 SaaS 제품 및 관련 퍼블릭 제안을 게시하는 방법을 보여줍니다. 제품은 기본적으로 제한된 상태입니다.

SDK Java 2.x용
참고

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

{ "Catalog":"AWSMarketplace", "ChangeSet": [ { "ChangeType": "UpdateVisibility", "ChangeName": "CreateProductChange", "Entity": { "Type": "SaaSProduct@1.0", "Identifier": "prod-1111111111111" }, "DetailsDocument": { "TargetVisibility": "Public" } } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

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

SDK Java 2.x용
참고

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

이 예제를 실행하려면 유틸리티RunChangesets의 에 다음 JSON 변경 세트를 전달하여 유틸리티 섹션에서 변경 세트를 시작합니다.

{ "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" } ] } ] }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API

유틸리티

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

SDK Java 2.x용
참고

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

JSON 파일에서 changeet을 로드하고 처리를 시작하는 유틸리티입니다.

package com.example.awsmarketplace.catalogapi; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.core.document.Document; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.protocols.json.internal.unmarshall.document.DocumentUnmarshaller; import software.amazon.awssdk.protocols.jsoncore.JsonNodeParser; import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient; import software.amazon.awssdk.services.marketplacecatalog.model.Change; import software.amazon.awssdk.services.marketplacecatalog.model.Entity; import software.amazon.awssdk.services.marketplacecatalog.model.StartChangeSetRequest; import software.amazon.awssdk.services.marketplacecatalog.model.StartChangeSetResponse; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.ToNumberPolicy; import com.example.awsmarketplace.catalogapi.Entity.ChangeSet; import com.example.awsmarketplace.catalogapi.Entity.ChangeSetEntity; import com.example.awsmarketplace.catalogapi.Entity.Root; import com.example.awsmarketplace.utils.ReferenceCodesUtils; import com.example.awsmarketplace.utils.StringSerializer; /** * Before running this Java V2 code example, convert all Details attribute to DetailsDocument if any */ public class RunChangesets { private static final Gson GSON = new GsonBuilder() .setObjectToNumberStrategy(ToNumberPolicy.LAZILY_PARSED_NUMBER) .registerTypeAdapter(String.class, new StringSerializer()) .create(); public static void main(String[] args) { // input json can be specified here or passed from input parameter String inputChangeSetFile = "changeSets/offers/CreateReplacementOfferFromAGWithContractPricingDetailDocument.json"; if (args.length > 0) inputChangeSetFile = args[0]; // parse the input changeset file to string for process String changeSetsInput = readChangeSetToString(inputChangeSetFile); // process the changeset request try { StartChangeSetResponse result = getChangeSetRequestResult(changeSetsInput); ReferenceCodesUtils.formatOutput(result); } catch (Exception e) { e.printStackTrace(); } } public static StartChangeSetResponse getChangeSetRequestResult(String changeSetsInput) throws IOException { //set up AWS credentials MarketplaceCatalogClient marketplaceCatalogClient = MarketplaceCatalogClient.builder() .httpClient(ApacheHttpClient.builder().build()) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); //changeset list to save all the changesets in the changesets file List<Change> changeSetLists = new ArrayList<Change>(); // read all changesets into object Root root = GSON.fromJson(changeSetsInput, Root.class); // process each changeset and add each changeset request to changesets list for (ChangeSet cs : root.changeSet) { ChangeSetEntity entity = cs.Entity; String entityType = entity.Type; String entityIdentifier = StringUtils.defaultIfBlank(entity.Identifier, null); Document detailsDocument = getDocumentFromObject(cs.DetailsDocument); Entity awsEntity = Entity.builder() .type(entityType) .identifier(entityIdentifier) .build(); Change inputChangeRequest = Change.builder() .changeType(cs.ChangeType) .changeName(cs.ChangeName) .entity(awsEntity) .detailsDocument(detailsDocument) .build(); changeSetLists.add(inputChangeRequest); } // process all changeset requests StartChangeSetRequest startChangeSetRequest = StartChangeSetRequest.builder() .catalog(root.catalog) .changeSet(changeSetLists) .build(); StartChangeSetResponse result = marketplaceCatalogClient.startChangeSet(startChangeSetRequest); return result; } public static Document getDocumentFromObject(Object detailsObject) { String detailsString = "{}"; try { detailsString = IOUtils.toString(new ByteArrayInputStream(GSON.toJson(detailsObject).getBytes()), "UTF-8"); } catch (IOException e) { e.printStackTrace(); } JsonNodeParser jsonNodeParser = JsonNodeParser.create(); Document doc = jsonNodeParser.parse(detailsString).visit(new DocumentUnmarshaller()); return doc; } public static String readChangeSetToString (String inputChangeSetFile) { InputStream changesetInputStream = RunChangesets.class.getClassLoader().getResourceAsStream(inputChangeSetFile); String changeSetsInput = null; try { changeSetsInput = IOUtils.toString(changesetInputStream, "UTF-8"); } catch (IOException e) { e.printStackTrace(); } return changeSetsInput; } }
  • 자세한 API 내용은 참조StartChangeSet의 섹션을 참조하세요. AWS SDK for Java 2.x API