{"_id":"@aws-sdk/client-marketplace-metering-node","_rev":"18-08356ab397d86c7ee34a62a89133ed7d","name":"@aws-sdk/client-marketplace-metering-node","dist-tags":{"latest":"0.1.0-preview.2","preview":"0.1.0-preview.6"},"versions":{"0.1.0-preview.2":{"name":"@aws-sdk/client-marketplace-metering-node","version":"0.1.0-preview.2","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-marketplace-metering-node@0.1.0-preview.2","maintainers":[{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"},{"name":"amzn-oss","email":"osa-3p@amazon.com"}],"dist":{"shasum":"376182778b052fe7771d5b31faa19b2f31a5e74c","tarball":"https://registry.npmjs.org/@aws-sdk/client-marketplace-metering-node/-/client-marketplace-metering-node-0.1.0-preview.2.tgz","fileCount":218,"integrity":"sha512-WlVCP8D2zZDe8iM67gyquFCkxGsS20kV1yUzY43gc9t3dnKlxjF51WNbWGYbDSDxvjtv2xTsCJoEgkHLuWWj3w==","signatures":[{"sig":"MEYCIQDAWJ6qgdj5+aklnprN6rUoUVZU1opxGDfCjd7zmXjf4QIhANn6XNUF2tfBHfKZMPI1gyMID/5Sgna29Zfep4WtuHvS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddpHOCRA9TVsSAnZWagAAWzcP/1ciLlEuy0Jhw4cOq7sq\n2x0TwqsDDRP0owln835pW4a6P3kp/xI/V21fUXdEj+QKwnxXSyQqoU8acicU\noJ5TKdJUgtEQqMi0KusCoZNi9qBKEG2ta5RYhZ1rL9FTHc4ouqbwr4OxwCwY\n1Q331RM0qNNvEhXb+D5ym7W5R57qvT38o7xjnkSGY9IWRud1qPR9whoX9Gjp\nHdLDLYH4d+EiAvawMe2Efjs57H+p+oSqf+NJuxLp76N8XHKPAbu/96m3/qE9\nFATMPelx+UdGtt28gHHz6+SDLhAzJI4REFjqB76rymI7xhUfRYixDiSk7gb7\n2dWhUw94dSQzset9LI/zWwP625TxawcmQOTi4eqo951e6qwi0mI6zP/sWn/d\nrs0HlNRJVpKeftZX3imSg7uj1RDVKfS6NgCpaMYECxv8WRjtPBbWRd7NNEY3\nuXcUk5mJy5kcY/HJQjc9SjQiXpsBewLkRUt85P2KsHJSmX2FPo5V9ZBoN1pI\ngPOKpeI8bYJ0UskRMJ2EhPQY+VQUgIRHTItcys4QS7q7qESvlh6dNGQe/kAf\n4H7E6nfhdKb0IDPrv5eqCTGhuFW1CWdlFRwpPCKAuPVIDcxog/aqUsyBxzHt\nRiyRcEW3Da6YqOG4lsh3FcDICkJCjlYlzPFTH3xfazvGBUc1zGxiYSKPLGWt\nCmwf\r\n=uDxn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-marketplace-metering-node has been renamed to @aws-sdk/client-marketplace-metering. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for AWSMarketplace Metering","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.5","@aws-sdk/hash-node":"^0.1.0-preview.5","@aws-sdk/json-parser":"^0.1.0-preview.5","@aws-sdk/core-handler":"^0.1.0-preview.5","@aws-sdk/json-builder":"^0.1.0-preview.5","@aws-sdk/signature-v4":"^0.1.0-preview.6","@aws-sdk/util-utf8-node":"^0.1.0-preview.3","@aws-sdk/config-resolver":"^0.1.0-preview.5","@aws-sdk/region-provider":"^0.1.0-preview.5","@aws-sdk/url-parser-node":"^0.1.0-preview.5","@aws-sdk/middleware-stack":"^0.1.0-preview.6","@aws-sdk/retry-middleware":"^0.1.0-preview.5","@aws-sdk/util-base64-node":"^0.1.0-preview.3","@aws-sdk/node-http-handler":"^0.1.0-preview.6","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.6","@aws-sdk/signing-middleware":"^0.1.0-preview.6","@aws-sdk/util-user-agent-node":"^0.1.0-preview.6","@aws-sdk/middleware-serializer":"^0.1.0-preview.5","@aws-sdk/stream-collector-node":"^0.1.0-preview.5","@aws-sdk/util-body-length-node":"^0.1.0-preview.4","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.6","@aws-sdk/credential-provider-node":"^0.1.0-preview.6","@aws-sdk/middleware-content-length":"^0.1.0-preview.5","@aws-sdk/middleware-header-default":"^0.1.0-preview.5"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-marketplace-metering-node_0.1.0-preview.2_1568051662024_0.7315497890054194","host":"s3://npm-registry-packages"}},"0.1.0-preview.3":{"name":"@aws-sdk/client-marketplace-metering-node","version":"0.1.0-preview.3","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-marketplace-metering-node@0.1.0-preview.3","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"1268d663fdf0ac732b880e0b1217aa3553b2c173","tarball":"https://registry.npmjs.org/@aws-sdk/client-marketplace-metering-node/-/client-marketplace-metering-node-0.1.0-preview.3.tgz","fileCount":218,"integrity":"sha512-PlRWeWJOo3zQcp5nMz4RRzAws3i6qv4zDqtgvWohS0s5Qi4vpSlgEFdl8uLYzLnlUNqbrY0ToGl5GnCgwC8FlA==","signatures":[{"sig":"MEUCIDznyyTOtUs3eaqXc+uF2laBalfh449n8F6OwKgkvzKHAiEA2aQCwyldGu4dt729lyP4YhnW10q3xSR+ZqiHP613mqU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg6f9CRA9TVsSAnZWagAAWooP/iq24LhcSbibvzA9ylPw\nAK3aWqwFgzPLegA2FxmBYb5TcnQfsnfCLsU7qcqVKl3zWTkSDAuMlGNiV3//\nf8qzZEViihu3JQEHdZaAp4BN2SCz+TU8PYFDH5JL0Dlen1OUCG6qb8xBEpQw\nYdTG3Ppb0AGpKx9vtHA4uODRrscTZLAml5HWZqCFSF5mlBplV9IvEm9oX/Zk\nWymbFJGCurlI8prwlJ8jBiCeWp/bukg0uXmDiylvO2uT8GL5hnX19ieq5I/k\nky/gIYYNwbKrKCwAUpyQnCb5zUDXP2WPN09FbqzLThNOMrn/VmCX+RakkuMK\nQdhGi2CLweCdmqNGKbysTnXsrp5nElshXgZlurUraxLBVBeACXwkuJayAalT\nhAB/cFrOpGTxLeh07BBRefdpyDwnqeXk+hBuRwPc1GaEi2AXiNeDPNWJxJlA\nd0xotQeT+hkO3hUgbjfnYqLFfygE3tUJLN8vsLBTzzHdKmX5zK1lHyRuaeWL\nY9cpeQBS0Sh6R4f3YzLkhk32PUx+Xgiz0CMWcwzz6Ea54y4OSSLAfsoGEw03\n7wmpw3GICKlHJssUbwaFO3DrH04VrsQf7NyxapR92HZLI0hBLUtZnoO1OetY\nJ/v95jaqa5OYoiL5jvWMrR9LiuKQim3UQJDwh27yvbnYVCDR8JtTWjEuxHmG\n5GaD\r\n=Umk9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-marketplace-metering-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-marketplace-metering-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-marketplace-metering-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n\n## Description\n\n<fullname>AWS Marketplace Metering Service</fullname> <p>This reference provides descriptions of the low-level AWS Marketplace Metering Service API.</p> <p>AWS Marketplace sellers can use this API to submit usage data for custom usage dimensions.</p> <p> <b>Submitting Metering Records</b> </p> <ul> <li> <p> <i>MeterUsage</i>- Submits the metering record for a Marketplace product. MeterUsage is called from an EC2 instance.</p> </li> <li> <p> <i>BatchMeterUsage</i>- Submits the metering record for a set of customers. BatchMeterUsage is called from a software-as-a-service (SaaS) application.</p> </li> </ul> <p> <b>Accepting New Customers</b> </p> <ul> <li> <p> <i>ResolveCustomer</i>- Called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a Registration Token through the browser. The Registration Token is resolved through this API to obtain a CustomerIdentifier and Product Code.</p> </li> </ul> <p> <b>Entitlement and Metering for Paid Container Products</b> </p> <ul> <li> <p> Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the RegisterUsage operation for software entitlement and metering. Calling RegisterUsage from containers running outside of Amazon Elastic Container Service (Amazon ECR) isn't supported. Free and BYOL products for ECS aren't required to call RegisterUsage, but you can do so if you want to receive usage data in your seller reports. For more information on using the RegisterUsage operation, see <a href=\"https://docs.aws.amazon.com/marketplace/latest/userguide/container-based-products.html\">Container-Based Products</a>. </p> </li> </ul> <p>BatchMeterUsage API calls are captured by AWS CloudTrail. You can use Cloudtrail to verify that the SaaS metering records that you sent are accurate by searching for records with the eventName of BatchMeterUsage. You can also use CloudTrail to audit records over time. For more information, see the <i> <a href=\"http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html\">AWS CloudTrail User Guide</a> </i>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-marketplace-metering-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`MarketplaceMeteringClient`) and the commands you need, for example `BatchMeterUsageCommand`:\n\n```javascript\n//JavaScript\nconst {\n  MarketplaceMeteringClient\n} = require(\"@aws-sdk/client-marketplace-metering-node/MarketplaceMeteringClient\");\nconst {\n  BatchMeterUsageCommand\n} = require(\"@aws-sdk/client-marketplace-metering-node/commands/BatchMeterUsageCommand\");\n```\n\n```javascript\n//TypeScript\nimport { MarketplaceMeteringClient } from \"@aws-sdk/client-marketplace-metering-node/MarketplaceMeteringClient\";\nimport { BatchMeterUsageCommand } from \"@aws-sdk/client-marketplace-metering-node/commands/BatchMeterUsageCommand\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\n- Initiate command with input parameters.\n- Call `send` operation on client with command object as input.\n- If you are using a custom http handler, you may call `destroy()` to close open connections.\n\n```javascript\nconst marketplaceMetering = new MarketplaceMeteringClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  UsageRecords: [ /**a list of structure*/ ],\n  ProductCode: /**a string value*/,\n};\nconst batchMeterUsageCommand = new BatchMeterUsageCommand(params);\nmarketplaceMetering.send(batchMeterUsageCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nmarketplaceMetering.send(batchMeterUsageCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/@aws-sdk/client-marketplace-metering-node/MarketplaceMetering\";\nconst marketplaceMetering = new AWS.MarketplaceMetering({ region: \"region\" });\nmarketplaceMetering.batchMeterUsage(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. You can access them by specifying exception names:\n    if(error.name === 'SomeServiceException') {\n        const value = error.specialKeyInException;\n    }\n*/\n}\n```\n\n## Getting Help\n\nPlease use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3)\n- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-marketplace-metering-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),\nsee LICENSE for more information.\n\n[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-marketplace-metering-node has been renamed to @aws-sdk/client-marketplace-metering. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for AWSMarketplace Metering","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.5","@aws-sdk/hash-node":"^0.1.0-preview.6","@aws-sdk/json-parser":"^0.1.0-preview.5","@aws-sdk/core-handler":"^0.1.0-preview.5","@aws-sdk/json-builder":"^0.1.0-preview.5","@aws-sdk/signature-v4":"^0.1.0-preview.7","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.5","@aws-sdk/region-provider":"^0.1.0-preview.5","@aws-sdk/url-parser-node":"^0.1.0-preview.6","@aws-sdk/middleware-stack":"^0.1.0-preview.6","@aws-sdk/retry-middleware":"^0.1.0-preview.5","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.6","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.6","@aws-sdk/signing-middleware":"^0.1.0-preview.7","@aws-sdk/util-user-agent-node":"^0.1.0-preview.7","@aws-sdk/middleware-serializer":"^0.1.0-preview.5","@aws-sdk/stream-collector-node":"^0.1.0-preview.6","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.6","@aws-sdk/credential-provider-node":"^0.1.0-preview.7","@aws-sdk/middleware-content-length":"^0.1.0-preview.5","@aws-sdk/middleware-header-default":"^0.1.0-preview.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-marketplace-metering-node_0.1.0-preview.3_1568909309231_0.9179508857713756","host":"s3://npm-registry-packages"}},"0.1.0-preview.4":{"name":"@aws-sdk/client-marketplace-metering-node","version":"0.1.0-preview.4","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-marketplace-metering-node@0.1.0-preview.4","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"32098a8a17bac847b3600d70358be4601e64081c","tarball":"https://registry.npmjs.org/@aws-sdk/client-marketplace-metering-node/-/client-marketplace-metering-node-0.1.0-preview.4.tgz","fileCount":218,"integrity":"sha512-G/Gq3FqIJ56PJ6ea0qyqnSAA2scFrCQStaW4o7nsk8q13ZmuwU5PmQhTskwe7pqGJogl67kGBlTvYOZBYBWmCw==","signatures":[{"sig":"MEUCIQC4lvx4fHqAt8onfoNoB2hWsz/4SpPMSmQfGf7ioEViowIgWw0JKSExzqDCkFzq3rjFYoLdNuhQ6XPvPuu+tWNRDaw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduNFtCRA9TVsSAnZWagAAtlwP/RdU+/axZtbw+C9xMSP9\n7r1dZONfzkcj/Ye3zexlfmEZLqzqfUvKLG70A05px1t/YdmC/bRgS5Qpjb2g\nMJsUUVxwjFyMq8FVJyzkuYFSmdkEhDx9//xf/qjxkQT7OYd37tt8FMaTxVzO\naqpxVb/AqqpZT3gF/WFMpzpjjo7JaSP+tLmkSPbOAEGIg3N7AdWszbY4yyhR\nMmdoBTy8A6nj0r+OAFG69Pr0ufVB7poGhKeE2eaKdEsZUW5eX/1wVWoISyB6\nreA73T6PpbfHcJZl+wVSEhXGrjODWSDKXsoYG4b9QDriXFDmoe9xP0aNEWMu\naJwNSoaTnQRzPfIkD97zf8JXSl15S1ahHY7L6mtP7BtfB/VKnHCGItTipLgr\n5ZVdG4EN2B8hEALKf5h/KvJWHHhWSKEhq4hpOosJfsbN6h5FAtE/kgH61YMF\ngIG2dcBaw6jZADSEDjXk9W4gigtzD2sDZlckqpTLMX+yjDqK6riemAzw1t2U\nSaELe3Z2KoOnFVUHUq1ZAuVmIPypsUttbRXXOKremysgmbFIVhMDiCBkIeIf\ng54Xmqoj2InVVV04G12KCEKEea9OKnLBpjJ1WxzsjfNTkt9/oWBHMSKsDXrl\nxcMd8xfgmHK1roGpaE4ghKY/ncfVDw7gXNu+IZzaFLt6DLY6hgOcJ/IVdruM\nF0IC\r\n=Mlg/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-marketplace-metering-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-marketplace-metering-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-marketplace-metering-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n\n## Description\n\n<fullname>AWS Marketplace Metering Service</fullname> <p>This reference provides descriptions of the low-level AWS Marketplace Metering Service API.</p> <p>AWS Marketplace sellers can use this API to submit usage data for custom usage dimensions.</p> <p> <b>Submitting Metering Records</b> </p> <ul> <li> <p> <i>MeterUsage</i>- Submits the metering record for a Marketplace product. MeterUsage is called from an EC2 instance.</p> </li> <li> <p> <i>BatchMeterUsage</i>- Submits the metering record for a set of customers. BatchMeterUsage is called from a software-as-a-service (SaaS) application.</p> </li> </ul> <p> <b>Accepting New Customers</b> </p> <ul> <li> <p> <i>ResolveCustomer</i>- Called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a Registration Token through the browser. The Registration Token is resolved through this API to obtain a CustomerIdentifier and Product Code.</p> </li> </ul> <p> <b>Entitlement and Metering for Paid Container Products</b> </p> <ul> <li> <p> Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the RegisterUsage operation for software entitlement and metering. Calling RegisterUsage from containers running outside of Amazon Elastic Container Service (Amazon ECR) isn't supported. Free and BYOL products for ECS aren't required to call RegisterUsage, but you can do so if you want to receive usage data in your seller reports. For more information on using the RegisterUsage operation, see <a href=\"https://docs.aws.amazon.com/marketplace/latest/userguide/container-based-products.html\">Container-Based Products</a>. </p> </li> </ul> <p>BatchMeterUsage API calls are captured by AWS CloudTrail. You can use Cloudtrail to verify that the SaaS metering records that you sent are accurate by searching for records with the eventName of BatchMeterUsage. You can also use CloudTrail to audit records over time. For more information, see the <i> <a href=\"http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html\">AWS CloudTrail User Guide</a> </i>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-marketplace-metering-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`MarketplaceMeteringClient`) and the commands you need, for example `BatchMeterUsageCommand`:\n\n```javascript\n//JavaScript\nconst {\n  MarketplaceMeteringClient,\n  BatchMeterUsageCommand\n} = require(\"@aws-sdk/client-marketplace-metering-node\");\n```\n\n```javascript\n//TypeScript\nimport {\n  MarketplaceMeteringClient,\n  BatchMeterUsageCommand\n} from \"@aws-sdk/client-marketplace-metering-node\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\n- Initiate command with input parameters.\n- Call `send` operation on client with command object as input.\n- If you are using a custom http handler, you may call `destroy()` to close open connections.\n\n```javascript\nconst marketplaceMetering = new MarketplaceMeteringClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  UsageRecords: [ /**a list of structure*/ ],\n  ProductCode: /**a string value*/,\n};\nconst batchMeterUsageCommand = new BatchMeterUsageCommand(params);\nmarketplaceMetering.send(batchMeterUsageCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nmarketplaceMetering.send(batchMeterUsageCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/client-marketplace-metering-node\";\nconst marketplaceMetering = new AWS.MarketplaceMetering({ region: \"region\" });\nmarketplaceMetering.batchMeterUsage(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. You can access them by specifying exception names:\n    if(error.name === 'SomeServiceException') {\n        const value = error.specialKeyInException;\n    }\n*/\n}\n```\n\n## Getting Help\n\nPlease use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3)\n- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-marketplace-metering-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),\nsee LICENSE for more information.\n\n[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-marketplace-metering-node has been renamed to @aws-sdk/client-marketplace-metering. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for AWSMarketplace Metering","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.6","@aws-sdk/hash-node":"^0.1.0-preview.7","@aws-sdk/json-parser":"^0.1.0-preview.6","@aws-sdk/core-handler":"^0.1.0-preview.6","@aws-sdk/json-builder":"^0.1.0-preview.6","@aws-sdk/signature-v4":"^0.1.0-preview.8","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.6","@aws-sdk/region-provider":"^0.1.0-preview.6","@aws-sdk/url-parser-node":"^0.1.0-preview.7","@aws-sdk/middleware-stack":"^0.1.0-preview.7","@aws-sdk/retry-middleware":"^0.1.0-preview.6","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.7","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.7","@aws-sdk/signing-middleware":"^0.1.0-preview.8","@aws-sdk/util-user-agent-node":"^0.1.0-preview.8","@aws-sdk/middleware-serializer":"^0.1.0-preview.6","@aws-sdk/stream-collector-node":"^0.1.0-preview.7","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.7","@aws-sdk/credential-provider-node":"^0.1.0-preview.8","@aws-sdk/middleware-content-length":"^0.1.0-preview.6","@aws-sdk/middleware-header-default":"^0.1.0-preview.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-marketplace-metering-node_0.1.0-preview.4_1572393324612_0.4158934094318145","host":"s3://npm-registry-packages"}},"0.1.0-preview.5":{"name":"@aws-sdk/client-marketplace-metering-node","version":"0.1.0-preview.5","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-marketplace-metering-node@0.1.0-preview.5","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"b68b09e87ee89342dd8201214b1a603e05b6eeea","tarball":"https://registry.npmjs.org/@aws-sdk/client-marketplace-metering-node/-/client-marketplace-metering-node-0.1.0-preview.5.tgz","fileCount":218,"integrity":"sha512-GwfyPAiDw3NaEGVGJYMwbe2tyLYUS17J9WkdbQW/sFiQtoVhhp6lj/VQXqaJUjh63cn31fKvCIxVQ+4g0bANjg==","signatures":[{"sig":"MEYCIQDwhsfALODqRwBleK20D/vJ5N/VpXSTPRmErzmVsq6xuAIhAPJr6pl6WIX6rGEcSmhI+ZGXTSkAWOhoksVvxm2B/pnu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdueTUCRA9TVsSAnZWagAAiEgP/02AOb/8ZhDqpUYZMjEJ\nkeWRHdnMDp8SjrTbkmYOSKk0ULlXB3DjYMfK9VimSvdI7zbOojy86gN/1GWH\n/KFe+hAUM4Q1Yz3TJ1C/c7WBS8hX9q8mrraYP4qTAIr5p5M7vnyXqg+930MD\ntuTM2MyQVayTTBwLyw6O9ND6I2WuAC6rliD2kMYhkqDQXqQ1yETlR9ITylGJ\nl1E6zHap57JxeGb5WaaUneEB5W0Qy6A6ghR3oMbGxwzTgT97cPDFWehtJP/b\nKCKGxlt6CU8CaK6xZXqJL8tQwwLqQoRjOLYj1yj2d/2hzNd9CX42SnvaDOiQ\niFRE+qwo+rrg7AII9+geQrWu2EZ0mr7G9WpPeBTzlkMMOXmwHANx03ZnHKQ/\nzCiToymsWbwYbMKaIv0wDodKOt726UeJBxnBvYzeSZFzfwC9ZEF2Mk5Y1mTV\nMmMf5sy3uCHb4Dhq8kTH95uMlPIcfHHGr4VKQudWJdUKMOpXm6Y4cP9q1bFB\ngXef3Xam/F8KwnKZQagR0s5zDvMtwU0LbwdKhXp5N4taN9jcoeagkiG6hu8m\ngOVuvdZwCcGFujfEw8Ue2bjkUqV547oL9yE+t21e8+tU4TZucfmZ1t4PXQua\ny2OukOvY5WF+nNmKPo+XR2ac6nnSSpg0BJhPttj0yhpxn63OUYhFLoj9OSzK\nk1tf\r\n=eDhT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-marketplace-metering-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-marketplace-metering-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-marketplace-metering-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n\n## Description\n\n<fullname>AWS Marketplace Metering Service</fullname> <p>This reference provides descriptions of the low-level AWS Marketplace Metering Service API.</p> <p>AWS Marketplace sellers can use this API to submit usage data for custom usage dimensions.</p> <p> <b>Submitting Metering Records</b> </p> <ul> <li> <p> <i>MeterUsage</i>- Submits the metering record for a Marketplace product. MeterUsage is called from an EC2 instance.</p> </li> <li> <p> <i>BatchMeterUsage</i>- Submits the metering record for a set of customers. BatchMeterUsage is called from a software-as-a-service (SaaS) application.</p> </li> </ul> <p> <b>Accepting New Customers</b> </p> <ul> <li> <p> <i>ResolveCustomer</i>- Called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a Registration Token through the browser. The Registration Token is resolved through this API to obtain a CustomerIdentifier and Product Code.</p> </li> </ul> <p> <b>Entitlement and Metering for Paid Container Products</b> </p> <ul> <li> <p> Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the RegisterUsage operation for software entitlement and metering. Calling RegisterUsage from containers running outside of Amazon Elastic Container Service (Amazon ECR) isn't supported. Free and BYOL products for ECS aren't required to call RegisterUsage, but you can do so if you want to receive usage data in your seller reports. For more information on using the RegisterUsage operation, see <a href=\"https://docs.aws.amazon.com/marketplace/latest/userguide/container-based-products.html\">Container-Based Products</a>. </p> </li> </ul> <p>BatchMeterUsage API calls are captured by AWS CloudTrail. You can use Cloudtrail to verify that the SaaS metering records that you sent are accurate by searching for records with the eventName of BatchMeterUsage. You can also use CloudTrail to audit records over time. For more information, see the <i> <a href=\"http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html\">AWS CloudTrail User Guide</a> </i>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-marketplace-metering-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`MarketplaceMeteringClient`) and the commands you need, for example `BatchMeterUsageCommand`:\n\n```javascript\n//JavaScript\nconst {\n  MarketplaceMeteringClient,\n  BatchMeterUsageCommand\n} = require(\"@aws-sdk/client-marketplace-metering-node\");\n```\n\n```javascript\n//TypeScript\nimport {\n  MarketplaceMeteringClient,\n  BatchMeterUsageCommand\n} from \"@aws-sdk/client-marketplace-metering-node\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\n- Initiate command with input parameters.\n- Call `send` operation on client with command object as input.\n- If you are using a custom http handler, you may call `destroy()` to close open connections.\n\n```javascript\nconst marketplaceMetering = new MarketplaceMeteringClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  UsageRecords: [ /**a list of structure*/ ],\n  ProductCode: /**a string value*/,\n};\nconst batchMeterUsageCommand = new BatchMeterUsageCommand(params);\nmarketplaceMetering.send(batchMeterUsageCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nmarketplaceMetering.send(batchMeterUsageCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/client-marketplace-metering-node\";\nconst marketplaceMetering = new AWS.MarketplaceMetering({ region: \"region\" });\nmarketplaceMetering.batchMeterUsage(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. You can access them by specifying exception names:\n    if(error.name === 'SomeServiceException') {\n        const value = error.specialKeyInException;\n    }\n*/\n}\n```\n\n## Getting Help\n\nPlease use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3)\n- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-marketplace-metering-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),\nsee LICENSE for more information.\n\n[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-marketplace-metering-node has been renamed to @aws-sdk/client-marketplace-metering. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for AWSMarketplace Metering","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@aws-sdk/hash-node":"^0.1.0-preview.8","@aws-sdk/json-parser":"^0.1.0-preview.7","@aws-sdk/core-handler":"^0.1.0-preview.7","@aws-sdk/json-builder":"^0.1.0-preview.7","@aws-sdk/signature-v4":"^0.1.0-preview.9","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.7","@aws-sdk/region-provider":"^0.1.0-preview.7","@aws-sdk/url-parser-node":"^0.1.0-preview.8","@aws-sdk/middleware-stack":"^0.1.0-preview.8","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.8","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.8","@aws-sdk/signing-middleware":"^0.1.0-preview.9","@aws-sdk/util-user-agent-node":"^0.1.0-preview.9","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/stream-collector-node":"^0.1.0-preview.8","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/credential-provider-node":"^0.1.0-preview.9","@aws-sdk/middleware-content-length":"^0.1.0-preview.7","@aws-sdk/middleware-header-default":"^0.1.0-preview.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-marketplace-metering-node_0.1.0-preview.5_1572463828330_0.058228517095600285","host":"s3://npm-registry-packages"}},"0.1.0-preview.6":{"name":"@aws-sdk/client-marketplace-metering-node","version":"0.1.0-preview.6","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-marketplace-metering-node@0.1.0-preview.6","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"bcb66823a9870bd24aec73e7d77d7e406d24c203","tarball":"https://registry.npmjs.org/@aws-sdk/client-marketplace-metering-node/-/client-marketplace-metering-node-0.1.0-preview.6.tgz","fileCount":218,"integrity":"sha512-Fo19f3AUiBTVVP+cY3S86EUS4+Y37e8oJaiDU1jHBsjffzLnQ6/NziTWbuamwc1+RiISZ/TioS5FZs5ZNks8LQ==","signatures":[{"sig":"MEQCIEymgHAlKowrjdcRFyZUx5srU/palTaFHK2Xq0Xhfm1sAiBUuaYEv8tDCzhk1sJxXiqZd82HnoEPXHF1uO1z2lJECQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1FSOCRA9TVsSAnZWagAApVgP/jnsp1LWh0BXC4aet+Ym\nLKY1QFzbtkytsr40Jm/82wPj5gNNjq5zaUPJsUKp4DATQCLypbsitt0oIMHa\nFXkyJmIseDTY2m/o8hy6dm4Z76hpnvcHsSiZdpbbADPY2KFeBqP0ubSRp8vY\nui1oCMYUMC36u9yk9hnnj8d38+kw9v77TRZUUgBSWGn5Qv+df0n2Re6TrorZ\nJcmHrV/o1//7KHnjEPCTomt6UIOH/7Bm6pWy+jT8Kipy/k+1gTuG8eF4Jo5k\nQ5IbRdq6S2ZL1OJSMQa64cPxs51tXbalV5y1tzjtqrsDGIc5Ga1J9UJUO+JO\nxmY+0rKdHr+bB1irRmTpURvcrk+5FOCyH3UT5aiBBpAftGkF46Dage7vwFfJ\nzfzDIC2SjxV6k/7dZc1rcwjRZ9CCh9SapsWRqVtVj+b81DbSKRwb9kaj5etZ\nLTgAxM1MWfAprpM55/Bs5FrSMZ5PNa7svWMlyP7PQF/jFky7JHcPzFwQvgnY\nWDGseafIKOSxZ8fknRI0ae8kVW6JAX93Pdix8z4vjOaxeu69So8zyYvJgw9g\nVZ+BMDla7iIE+v2r3PEWheFTeDDy8wCpBwZw9X7uael1b2TsKMFtA/pAKdl4\nAqTh2tPp/bHjNNf4Wr3XvT3qfqSrj6H+sefYwr06dpUG/qtlUxEl0yXnUXI9\nRpVc\r\n=Icch\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-marketplace-metering-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-marketplace-metering-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-marketplace-metering-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-marketplace-metering-node)\n\n## Description\n\n<fullname>AWS Marketplace Metering Service</fullname> <p>This reference provides descriptions of the low-level AWS Marketplace Metering Service API.</p> <p>AWS Marketplace sellers can use this API to submit usage data for custom usage dimensions.</p> <p> <b>Submitting Metering Records</b> </p> <ul> <li> <p> <i>MeterUsage</i>- Submits the metering record for a Marketplace product. MeterUsage is called from an EC2 instance.</p> </li> <li> <p> <i>BatchMeterUsage</i>- Submits the metering record for a set of customers. BatchMeterUsage is called from a software-as-a-service (SaaS) application.</p> </li> </ul> <p> <b>Accepting New Customers</b> </p> <ul> <li> <p> <i>ResolveCustomer</i>- Called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a Registration Token through the browser. The Registration Token is resolved through this API to obtain a CustomerIdentifier and Product Code.</p> </li> </ul> <p> <b>Entitlement and Metering for Paid Container Products</b> </p> <ul> <li> <p> Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the RegisterUsage operation for software entitlement and metering. Calling RegisterUsage from containers running outside of Amazon Elastic Container Service (Amazon ECR) isn't supported. Free and BYOL products for ECS aren't required to call RegisterUsage, but you can do so if you want to receive usage data in your seller reports. For more information on using the RegisterUsage operation, see <a href=\"https://docs.aws.amazon.com/marketplace/latest/userguide/container-based-products.html\">Container-Based Products</a>. </p> </li> </ul> <p>BatchMeterUsage API calls are captured by AWS CloudTrail. You can use Cloudtrail to verify that the SaaS metering records that you sent are accurate by searching for records with the eventName of BatchMeterUsage. You can also use CloudTrail to audit records over time. For more information, see the <i> <a href=\"http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html\">AWS CloudTrail User Guide</a> </i>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-marketplace-metering-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`MarketplaceMeteringClient`) and the commands you need, for example `BatchMeterUsageCommand`:\n\n```javascript\n//JavaScript\nconst {\n  MarketplaceMeteringClient,\n  BatchMeterUsageCommand\n} = require(\"@aws-sdk/client-marketplace-metering-node\");\n```\n\n```javascript\n//TypeScript\nimport {\n  MarketplaceMeteringClient,\n  BatchMeterUsageCommand\n} from \"@aws-sdk/client-marketplace-metering-node\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\n- Initiate command with input parameters.\n- Call `send` operation on client with command object as input.\n- If you are using a custom http handler, you may call `destroy()` to close open connections.\n\n```javascript\nconst marketplaceMetering = new MarketplaceMeteringClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  UsageRecords: [ /**a list of structure*/ ],\n  ProductCode: /**a string value*/,\n};\nconst batchMeterUsageCommand = new BatchMeterUsageCommand(params);\nmarketplaceMetering.send(batchMeterUsageCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nmarketplaceMetering.send(batchMeterUsageCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/client-marketplace-metering-node\";\nconst marketplaceMetering = new AWS.MarketplaceMetering({ region: \"region\" });\nmarketplaceMetering.batchMeterUsage(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await marketplaceMetering.send(batchMeterUsageCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. You can access them by specifying exception names:\n    if(error.name === 'SomeServiceException') {\n        const value = error.specialKeyInException;\n    }\n*/\n}\n```\n\n## Getting Help\n\nPlease use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3)\n- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-marketplace-metering-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),\nsee LICENSE for more information.\n\n[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-marketplace-metering-node has been renamed to @aws-sdk/client-marketplace-metering. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for AWSMarketplace Metering","directories":{},"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@aws-sdk/hash-node":"^0.1.0-preview.8","@aws-sdk/json-parser":"^0.1.0-preview.7","@aws-sdk/core-handler":"^0.1.0-preview.7","@aws-sdk/json-builder":"^0.1.0-preview.7","@aws-sdk/signature-v4":"^0.1.0-preview.10","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.7","@aws-sdk/region-provider":"^0.1.0-preview.7","@aws-sdk/url-parser-node":"^0.1.0-preview.8","@aws-sdk/middleware-stack":"^0.1.0-preview.9","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.8","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.8","@aws-sdk/signing-middleware":"^0.1.0-preview.10","@aws-sdk/util-user-agent-node":"^0.1.0-preview.10","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/stream-collector-node":"^0.1.0-preview.9","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/credential-provider-node":"^0.1.0-preview.10","@aws-sdk/middleware-content-length":"^0.1.0-preview.7","@aws-sdk/middleware-header-default":"^0.1.0-preview.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-marketplace-metering-node_0.1.0-preview.6_1574196365652_0.7653781887829294","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-09-09T17:54:21.846Z","modified":"2025-03-27T18:40:28.740Z","0.1.0-preview.2":"2019-09-09T17:54:22.198Z","0.1.0-preview.3":"2019-09-19T16:08:29.358Z","0.1.0-preview.4":"2019-10-29T23:55:25.017Z","0.1.0-preview.5":"2019-10-30T19:30:28.519Z","0.1.0-preview.6":"2019-11-19T20:46:05.861Z"},"author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","description":"Node SDK for AWSMarketplace Metering","maintainers":[{"email":"osa-3p@amazon.com","name":"amzn-oss"},{"email":"aws-sdk-js-automation@amazon.com","name":"aws-sdk-bot"}],"readme":"","readmeFilename":""}