AWS marketplace documentation change
Summary
Removed detailed CloudTrail log entry examples for AWS Marketplace Metering API operations and replaced with a reference link to API documentation
Security assessment
The change removes specific logging examples but does not address a security vulnerability or weakness. It appears to be a documentation restructuring to reduce duplication by linking to external API reference material rather than maintaining examples inline. No security implications or vulnerabilities are mentioned in the diff.
Diff
diff --git a/marketplace/latest/userguide/cloudtrail-logging.md b/marketplace/latest/userguide/cloudtrail-logging.md index b0f214519..d807dca26 100644 --- a//marketplace/latest/userguide/cloudtrail-logging.md +++ b//marketplace/latest/userguide/cloudtrail-logging.md @@ -5,3 +5 @@ -AWS Marketplace Metering API log file entry examples - -# Logging AWS Marketplace Metering API calls with AWS CloudTrail +# Logging AWS Marketplace API calls with AWS CloudTrail @@ -24,214 +22 @@ Every event or log entry contains information about who generated the request. T -AWS Marketplace supports logging the `BatchMeterUsage` operation as events in CloudTrail log files. - -## AWS Marketplace Metering API log file entry examples - -### Example: `BatchMeterUsage` - -The following example shows a CloudTrail log entry that demonstrates the `BatchMeterUsage` action from the AWS Marketplace Metering Service. When the seller [sends metering records to report their customers' usage](https://docs.aws.amazon.com/marketplace/latest/userguide/metering-for-usage.html) for a software as a service (SaaS) product listed in AWS Marketplace, this CloudTrail log entry is logged in the seller's AWS account. - - - { - "eventVersion": "1.05", - "userIdentity": { - "type": "IAMUser", - "principalId": "EX_PRINCIPAL_ID", - "arn": "arn:aws:iam::123456789012:user/*****", - "accountId": "123456789012", - "accessKeyId": "EXAMPLE_KEY_ID", - "userName": "*****" - }, - "eventTime": "2018-04-19T16:32:51Z", - "eventSource": "metering-marketplace.amazonaws.com", - "eventName": "BatchMeterUsage", - "awsRegion": "us-east-1", - "sourceIPAddress": "************", - "userAgent": "Coral/Netty14", - "requestParameters": { - "usageRecords": [ - { - "dimension": "Dimension1", - "timestamp": "Apr 19, 2018 4:32:50 PM", - "customerIdentifier": "customer1", - "customerAWSAccountID": "987654321098", - "quantity": 1 - } - ], - "productCode": "EXAMPLE_proCode" - }, - "responseElements": { - "results": [ - { - "usageRecord": { - "dimension": "Dimension1", - "timestamp": "Apr 19, 2018 4:32:50 PM", - "customerIdentifier": "customer1", - "customerAWSAccountID": "987654321098", - "quantity": 1 - }, - "meteringRecordId": "bEXAMPLE-98f0-4e90-8bd2-bf0EXAMPLE1e", - "status": "Success" - } - ], - "unprocessedRecords": [ ] - }, - "requestID": "dEXAMPLE-251d-11e7-8d11-1f3EXAMPLE8b", - "eventID": "cEXAMPLE-e6c2-465d-b47f-150EXAMPLE97", - "readOnly": false, - "eventType": "AwsApiCall", - "recipientAccountId": "123456789012" - } - ] - } - -### Example: `RegisterUsage` for containers - -The following example shows a CloudTrail log entry that demonstrates the `RegisterUsage` action from the AWS Marketplace Metering Service. When an hourly priced container product from AWS Marketplace is deployed in the buyer's AWS account, the software in the container calls `RegisterUsage` within the buyer's AWS account to initiate the hourly metering for that Amazon Elastic Container Service (Amazon ECS) task or Amazon Elastic Kubernetes Service (Amazon EKS) pod. This CloudTrail log entry is logged in the buyer's AWS account. - - - { - "eventVersion": "1.05", - "userIdentity": { - "type": "AssumedRole", - "principalId": "EX_PRINCIPAL_ID:botocore-session-1111111111", - "arn": "arn:aws:sts::123456789012:assumed-role/Alice/botocore-session-1111111111", - "accountId": "123456789012", - "accessKeyId": "EXAMPLE_KEY_ID", - "sessionContext": { - "sessionIssuer": { - "type": "Role", - "principalId": "EX_PRINCIPAL_ID", - "arn": "arn:aws:iam::123456789012:role/Alice", - "accountId": "123456789012", - "userName": "Alice" - }, - "webIdFederationData": { - "federatedProvider": "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/EXAMPLEFA1C58F08CDB049167EXAMPLE", - "attributes": {} - }, - "attributes": { - "mfaAuthenticated": "false", - "creationDate": "2020-07-23T02:19:34Z" - } - } - }, - "eventTime": "2020-07-23T02:19:46Z", - "eventSource": "metering-marketplace.amazonaws.com", - "eventName": "RegisterUsage", - "awsRegion": "us-east-1", - "sourceIPAddress": "1.2.3.4", - "userAgent": "aws-cli/1.18.103 Python/3.8.2 Linux/4.14.181-142.260.amzn2.x86_64 botocore/1.17.26", - "requestParameters": { - "productCode": "EXAMPLE_proCode", - "publicKeyVersion": 1 - }, - "responseElements": { - "signature": "eyJhbGciOiJQUzI1Ni..." - }, - "requestID": "dEXAMPLE-251d-11e7-8d11-1f3EXAMPLE8b", - "eventID": "cEXAMPLE-e6c2-465d-b47f-150EXAMPLE97", - "eventType": "AwsApiCall", - "recipientAccountId": "123456789012" - } - -### Example: `MeterUsage` for containers on Amazon EKS - -The following example shows a CloudTrail log entry that demonstrates the `MeterUsage` action from the AWS Marketplace Metering Service for containers on Amazon EKS. When a container product with [custom metering](https://docs.aws.amazon.com/marketplace/latest/userguide/container-metering-meterusage.html) from AWS Marketplace is deployed in the buyer's AWS account, the software in the container calls `MeterUsage` within the buyer's AWS account to report each hour. This CloudTrail log entry is logged in the buyer's AWS account. - - - { - "eventVersion": "1.05", - "userIdentity": { - "type": "AssumedRole", - "principalId": "EX_PRINCIPAL_ID:botocore-session-1111111111", - "arn": "arn:aws:sts::123456789012:assumed-role/Alice/botocore-session-1111111111", - "accountId": "123456789012", - "accessKeyId": "EXAMPLE_KEY_ID", - "sessionContext": { - "sessionIssuer": { - "type": "Role", - "principalId": "EX_PRINCIPAL_ID", - "arn": "arn:aws:iam::123456789012:role/Alice", - "accountId": "123456789012", - "userName": "Alice" - }, - "webIdFederationData": { - "federatedProvider": "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/EXAMPLEFA1C58F08CDB049167EXAMPLE", - "attributes": {} - }, - "attributes": { - "mfaAuthenticated": "false", - "creationDate": "2020-07-23T01:03:26Z" - } - } - }, - "eventTime": "2020-07-23T01:38:13Z", - "eventSource": "metering-marketplace.amazonaws.com", - "eventName": "MeterUsage", - "awsRegion": "us-east-1", - "sourceIPAddress": "1.2.3.4", - "userAgent": "aws-cli/1.18.103 Python/3.8.2 Linux/4.14.181-142.260.amzn2.x86_64 botocore/1.17.26", - "requestParameters": { - "timestamp": "Jul 23, 2020 1:35:44 AM", - "usageQuantity": 1, - "usageDimension": "Dimension1", - "productCode": "EXAMPLE_proCode" - }, - "responseElements": { - "meteringRecordId": "bEXAMPLE-98f0-4e90-8bd2-bf0EXAMPLE1e" - }, - "requestID": "dEXAMPLE-251d-11e7-8d11-1f3EXAMPLE8b", - "eventID": "cEXAMPLE-e6c2-465d-b47f-150EXAMPLE97", - "eventType": "AwsApiCall", - "recipientAccountId": "123456789012" - } - -### Example: `MeterUsage` on AMIs - -The following example shows a CloudTrail log entry that demonstrates the `MeterUsage` action from the AWS Marketplace Metering Service for Amazon Machine Images (AMIs). When an AMI product with custom metering from AWS Marketplace is deployed in the buyer's AWS account, the software from the AMI calls `MeterUsage` within the buyer's AWS account to report usage each hour. This CloudTrail log entry is logged in the buyer's AWS account. - - - { - "eventVersion": "1.05", - "userIdentity": { - "type": "AssumedRole", - "principalId": "EX_PRINCIPAL_ID:i-exampled859aa775c", - "arn": "arn:aws:sts::123456789012:assumed-role/Alice/i-exampled859aa775c", - "accountId": "123456789012", - "accessKeyId": "EXAMPLE_KEY_ID", - "sessionContext": { - "sessionIssuer": { - "type": "Role", - "principalId": "EX_PRINCIPAL_ID", - "arn": "arn:aws:iam::123456789012:role/Alice", - "accountId": "123456789012", - "userName": "Alice" - }, - "webIdFederationData": {}, - "attributes": { - "mfaAuthenticated": "false", - "creationDate": "2020-07-10T23:05:20Z" - },