{ "smithy": "2.0", "shapes": { "com.amazonaws.marketplacereporting#AWSMarketplaceReporting": { "type": "service", "version": "2018-05-10", "resources": [ { "target": "com.amazonaws.marketplacereporting#Dashboard" } ], "traits": { "aws.api#service": { "sdkId": "Marketplace Reporting", "cloudTrailEventSource": "reporting-marketplace.amazonaws.com", "arnNamespace": "aws-marketplace", "endpointPrefix": "reporting-marketplace" }, "aws.auth#sigv4": { "name": "aws-marketplace" }, "aws.protocols#restJson1": {}, "smithy.api#cors": { "additionalExposedHeaders": [ "x-amzn-requestid", "x-amzn-errortype", "x-amzn-errormessage", "date" ] }, "smithy.api#documentation": "

The Amazon Web Services Marketplace GetBuyerDashboard API enables you to get a procurement insights\n dashboard programmatically. The API gets the agreement and cost analysis dashboards with\n data for all of the Amazon Web Services accounts in your Amazon Web Services Organization.

\n

To use the Amazon Web Services Marketplace Reporting API, you must complete the following prerequisites:

\n ", "smithy.api#title": "AWS Marketplace Reporting Service", "smithy.rules#endpointBdd": { "version": "1.1", "parameters": { "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" }, "UseDualStack": { "builtIn": "AWS::UseDualStack", "required": true, "default": false, "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", "type": "boolean" }, "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" } }, "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] }, { "fn": "isSet", "argv": [ { "ref": "Region" } ] }, { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" }, { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] }, { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] }, { "fn": "booleanEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsDualStack" ] }, true ] }, { "fn": "booleanEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsFIPS" ] }, true ] } ], "results": [ { "conditions": [], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [], "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://reporting-marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "FIPS and DualStack are enabled, but this partition does not support one or both", "type": "error" }, { "conditions": [], "endpoint": { "url": "https://reporting-marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" }, { "conditions": [], "endpoint": { "url": "https://reporting-marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "DualStack is enabled but this partition does not support DualStack", "type": "error" }, { "conditions": [], "endpoint": { "url": "https://reporting-marketplace.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ], "root": 2, "nodeCount": 13, "nodes": "/////wAAAAH/////AAAAAAAAAAwAAAADAAAAAQAAAAQF9eELAAAAAgAAAAUF9eELAAAAAwAAAAgAAAAGAAAABAAAAAcF9eEKAAAABQX14QgF9eEJAAAABAAAAAoAAAAJAAAABgX14QYF9eEHAAAABQAAAAsF9eEFAAAABgX14QQF9eEFAAAAAwX14QEAAAANAAAABAX14QIF9eED" }, "smithy.rules#endpointRuleSet": { "version": "1.0", "parameters": { "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" }, "UseDualStack": { "builtIn": "AWS::UseDualStack", "required": true, "default": false, "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", "type": "boolean" }, "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" } }, "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] } ], "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Region" } ] } ], "rules": [ { "conditions": [ { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] }, { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsFIPS" ] } ] }, { "fn": "booleanEquals", "argv": [ true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsDualStack" ] } ] } ], "rules": [ { "conditions": [], "rules": [ { "conditions": [], "endpoint": { "url": "https://reporting-marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "error": "FIPS and DualStack are enabled, but this partition does not support one or both", "type": "error" } ], "type": "tree" }, { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsFIPS" ] }, true ] } ], "rules": [ { "conditions": [], "rules": [ { "conditions": [], "endpoint": { "url": "https://reporting-marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" } ], "type": "tree" }, { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsDualStack" ] } ] } ], "rules": [ { "conditions": [], "rules": [ { "conditions": [], "endpoint": { "url": "https://reporting-marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "error": "DualStack is enabled but this partition does not support DualStack", "type": "error" } ], "type": "tree" }, { "conditions": [], "rules": [ { "conditions": [], "endpoint": { "url": "https://reporting-marketplace.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ], "type": "tree" } ] }, "smithy.rules#endpointTests": { "testCases": [ { "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": true, "UseDualStack": true } }, { "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.us-east-1.amazonaws.com" } }, "params": { "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true } }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.us-east-1.amazonaws.com" } }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": true, "UseDualStack": true } }, { "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.cn-north-1.amazonaws.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": false, "UseDualStack": true } }, { "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.cn-north-1.amazonaws.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.us-gov-east-1.api.aws" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": true } }, { "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.us-gov-east-1.amazonaws.com" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.us-gov-east-1.api.aws" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": true } }, { "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.us-gov-east-1.amazonaws.com" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { "Region": "us-iso-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.us-iso-east-1.c2s.ic.gov" } }, "params": { "Region": "us-iso-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace-fips.us-isob-east-1.sc2s.sgov.gov" } }, "params": { "Region": "us-isob-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://reporting-marketplace.us-isob-east-1.sc2s.sgov.gov" } }, "params": { "Region": "us-isob-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } }, { "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } }, { "documentation": "For custom endpoint with fips enabled and dualstack disabled", "expect": { "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } }, { "documentation": "For custom endpoint with fips disabled and dualstack enabled", "expect": { "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } }, { "documentation": "Missing region", "expect": { "error": "Invalid Configuration: Missing Region" } } ], "version": "1.0" } } }, "com.amazonaws.marketplacereporting#AccessDeniedException": { "type": "structure", "members": { "message": { "target": "smithy.api#String" } }, "traits": { "smithy.api#documentation": "

You do not have sufficient access to perform this action.

", "smithy.api#error": "client", "smithy.api#httpError": 403 } }, "com.amazonaws.marketplacereporting#BadRequestException": { "type": "structure", "members": { "message": { "target": "smithy.api#String" } }, "traits": { "smithy.api#documentation": "

The request is malformed, or it contains an error such as an invalid parameter. Ensure the request has all required parameters.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.marketplacereporting#Dashboard": { "type": "resource", "identifiers": { "dashboardIdentifier": { "target": "com.amazonaws.marketplacereporting#DashboardIdentifier" } }, "operations": [ { "target": "com.amazonaws.marketplacereporting#GetBuyerDashboard" } ], "traits": { "aws.api#arn": { "template": "{dashboardIdentifier}", "absolute": true, "noRegion": true } } }, "com.amazonaws.marketplacereporting#DashboardIdentifier": { "type": "string", "traits": { "aws.api#arnReference": { "service": "com.amazonaws.marketplacereporting#AWSMarketplaceReporting", "resource": "com.amazonaws.marketplacereporting#Dashboard", "type": "AWS::Service::Resource" }, "smithy.api#length": { "min": 1, "max": 1023 }, "smithy.api#pattern": "^arn:aws:aws-marketplace::[0-9]{12}:AWSMarketplace/ReportingData/(Agreement_V1/Dashboard/AgreementSummary_V1|BillingEvent_V1/Dashboard/CostAnalysis_V1)$" } }, "com.amazonaws.marketplacereporting#EmbeddingDomain": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 2000 }, "smithy.api#pattern": "^(https://[a-zA-Z\\.\\*0-9\\-_]+[\\.]{1}[a-zA-Z]{1,}[a-zA-Z0-9&?/-_=]*[a-zA-Z\\*0-9/]+|http[s]*://localhost(:[0-9]{1,5})?)$" } }, "com.amazonaws.marketplacereporting#EmbeddingDomains": { "type": "list", "member": { "target": "com.amazonaws.marketplacereporting#EmbeddingDomain" }, "traits": { "smithy.api#length": { "min": 1, "max": 2 } } }, "com.amazonaws.marketplacereporting#GetBuyerDashboard": { "type": "operation", "input": { "target": "com.amazonaws.marketplacereporting#GetBuyerDashboardInput" }, "output": { "target": "com.amazonaws.marketplacereporting#GetBuyerDashboardOutput" }, "errors": [ { "target": "com.amazonaws.marketplacereporting#AccessDeniedException" }, { "target": "com.amazonaws.marketplacereporting#BadRequestException" }, { "target": "com.amazonaws.marketplacereporting#InternalServerException" }, { "target": "com.amazonaws.marketplacereporting#UnauthorizedException" } ], "traits": { "smithy.api#documentation": "

Generates an embedding URL for an Amazon QuickSight dashboard for an anonymous user.

\n \n

This API is available only to Amazon Web Services Organization management accounts or\n delegated administrators registered for the procurement insights\n (procurement-insights.marketplace.amazonaws.com) feature.

\n
\n

The following rules apply to a generated URL:

\n ", "smithy.api#examples": [ { "title": "Getting an agreements dashboard", "documentation": "The following example shows how to obtain a dashboard for active agreements", "input": { "dashboardIdentifier": "arn:aws:aws-marketplace::123456789012:AWSMarketplace/ReportingData/Agreement_V1/Dashboard/AgreementSummary_V1", "embeddingDomains": [ "https://*.amazon.com" ] }, "output": { "dashboardIdentifier": "arn:aws:aws-marketplace::123456789012:AWSMarketplace/ReportingData/Agreement_V1/Dashboard/AgreementSummary_V1", "embedUrl": "https://us-east-1.quicksight.aws.amazon.com/embed/1235asdbffffbbasdf123/dashboards/8a66afa6-f316-4e71-a1ed-0a5bea07a314?code=abcdefghijklmn&identityprovider=quicksight&isauthcode=true", "embeddingDomains": [ "https://*.amazon.com" ] } }, { "title": "Getting a cost-analysis dashboard", "documentation": "The following example shows how to obtain a dashboard for cost analysis", "input": { "dashboardIdentifier": "arn:aws:aws-marketplace::123456789012:AWSMarketplace/ReportingData/BillingEvent_V1/Dashboard/CostAnalysis_V1", "embeddingDomains": [ "https://*.amazon.com" ] }, "output": { "dashboardIdentifier": "arn:aws:aws-marketplace::123456789012:AWSMarketplace/ReportingData/BillingEvent_V1/Dashboard/CostAnalysis_V1", "embedUrl": "https://us-east-1.quicksight.aws.amazon.com/embed/1235asdbffffbbasdf123/dashboards/8a66afa6-f316-4e71-a1ed-0a5bea07a314?code=abcdefghijklmn&identityprovider=quicksight&isauthcode=true", "embeddingDomains": [ "https://*.amazon.com" ] } } ], "smithy.api#http": { "code": 200, "method": "POST", "uri": "/getBuyerDashboard" }, "smithy.api#readonly": {}, "smithy.test#smokeTests": [ { "id": "GetBuyerDashboardUnauthorized", "params": { "dashboardIdentifier": "arn:aws:aws-marketplace::021234567890:AWSMarketplace/ReportingData/Agreement_V1/Dashboard/AgreementSummary_V1", "embeddingDomains": [ "https://localhost:8080" ] }, "expect": { "failure": {} }, "vendorParamsShape": "aws.test#AwsVendorParams", "vendorParams": { "region": "us-east-1" } } ] } }, "com.amazonaws.marketplacereporting#GetBuyerDashboardInput": { "type": "structure", "members": { "dashboardIdentifier": { "target": "com.amazonaws.marketplacereporting#DashboardIdentifier", "traits": { "smithy.api#documentation": "

The ARN of the requested dashboard.

", "smithy.api#required": {} } }, "embeddingDomains": { "target": "com.amazonaws.marketplacereporting#EmbeddingDomains", "traits": { "smithy.api#documentation": "

Fully qualified domains that you add to the allow list for access to the generated URL that is then embedded. You can list up to two domains or subdomains in each API call.\n To include all subdomains under a specific domain, use *. For example, https://*.amazon.com includes all subdomains under \n https://aws.amazon.com.

", "smithy.api#required": {} } } }, "traits": { "smithy.api#input": {}, "smithy.api#references": [ { "resource": "com.amazonaws.marketplacereporting#Dashboard", "ids": { "dashboardIdentifier": "dashboardIdentifier" } } ] } }, "com.amazonaws.marketplacereporting#GetBuyerDashboardOutput": { "type": "structure", "members": { "embedUrl": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The dashboard's embedding URL.

", "smithy.api#required": {} } }, "dashboardIdentifier": { "target": "com.amazonaws.marketplacereporting#DashboardIdentifier", "traits": { "smithy.api#documentation": "

The ARN of the returned dashboard.

", "smithy.api#required": {} } }, "embeddingDomains": { "target": "com.amazonaws.marketplacereporting#EmbeddingDomains", "traits": { "smithy.api#documentation": "

The fully qualified domains specified in the request. The domains enable access to the generated URL that is then embedded. You can list up to two domains or subdomains in each API call.\n To include all subdomains under a specific domain, use *. For example, https://*.amazon.com includes all subdomains under \n https://aws.amazon.com.

", "smithy.api#required": {} } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.marketplacereporting#InternalServerException": { "type": "structure", "members": { "message": { "target": "smithy.api#String" } }, "traits": { "smithy.api#documentation": "

The operation failed due to a server error.

", "smithy.api#error": "server", "smithy.api#httpError": 500 } }, "com.amazonaws.marketplacereporting#UnauthorizedException": { "type": "structure", "members": { "message": { "target": "smithy.api#String" } }, "traits": { "smithy.api#documentation": "

You do not have permission to perform this action.

", "smithy.api#error": "client", "smithy.api#httpError": 401 } } } }