{"_id":"@aws-sdk/client-cloudwatch-logs-browser","_rev":"19-b12385e7849fa831a48d6f877d1fc8cc","name":"@aws-sdk/client-cloudwatch-logs-browser","dist-tags":{"latest":"0.1.0-preview.2","preview":"0.1.0-preview.6"},"versions":{"0.1.0-preview.2":{"name":"@aws-sdk/client-cloudwatch-logs-browser","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-cloudwatch-logs-browser@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":"b97b79ad81527da03602f6cc863e065b4e728cd2","tarball":"https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs-browser/-/client-cloudwatch-logs-browser-0.1.0-preview.2.tgz","fileCount":1119,"integrity":"sha512-D+I/P7Rpk0v56GuwgvfJ0hDAa0kIAjWARLs8OA8TWh5TO7x/SBRVII5mgpFuFHeVUJQzF1KmViLjFvP0ZN7ouQ==","signatures":[{"sig":"MEYCIQC34/SNX8d0JiraHk0mLQQ8QS0xph3RNOS37maUPBjtwwIhALfPnhUKQ6TqfSLG2aj1l2b+F5r5tp+qRdlW92Es2QCP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":623213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddpNNCRA9TVsSAnZWagAATuAP/2kH7ZEvKNvcfLZPtUkK\nI/bfPbC/EAff4KoyyCrfRtn6q5LuXvvaZcR97AYMoDySSEs5mBBYj2eXsnii\nKKZDO87JIyqI7VMQ1enJGs6+IJ8Hxn28+6+HC+ALqEjLK+QIHWjzLaibSAVt\n1AbpzQE1L54jPD4sUrrSi6Uf37ctTMMnnWQtiitWIXeL18fb8moIlJeSCwZa\nikQNkTIfyIZCHhWn79f8f05T5WARZf31fyiAH/dVPkXeaNM5uueZG+DFqKEE\nK0MZohZeeZuTnHWjGK3XUmFvsn6ZZ+RGlMDcGTlBLx9VrDAIQ1w/0lgnQqX8\nyKY1qNv0PrsqhM50cwMWdj7jiNQTZddw9OgFdmAXF/qXMGywGV/nriRZ3bha\nUEMTtAbpJWqfH8PyK84qK5dN4ze3MlKHLGNj2g4ARa5LGlHN82DtqCyRUtPV\nfN+nMkLoXjlKj4cRbyWolF1iQynhbb6nQVT3GRyTvOcTmrX97iMNfMeHCfbH\nO9+1z/J7w3nbDKwfwGizMybwke2Y6ngPVCLX46ElCg/Ene1SDFx4MAUuVgVb\nnc6JG/IP1UwsJCYnHUd/eM+3gaYgIZ+SCTVILqpuLQafzR6YLaJO16H8QlMo\ngHnaV3l5gA3ZtPGcZnMnUyZ8gONB67Qyd6/UGxnMTrasVmX/Qxz5qVhO+Q4D\ny8fg\r\n=vKuS\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":"karma start karma.conf","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-cloudwatch-logs-browser has been renamed to @aws-sdk/client-cloudwatch-logs. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon CloudWatch Logs","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^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/config-resolver":"^0.1.0-preview.5","@aws-sdk/middleware-stack":"^0.1.0-preview.6","@aws-sdk/retry-middleware":"^0.1.0-preview.5","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.6","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.5","@aws-sdk/signing-middleware":"^0.1.0-preview.6","@aws-sdk/url-parser-browser":"^0.1.0-preview.5","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.6","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.6","@aws-sdk/stream-collector-browser":"^0.1.0-preview.5","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@aws-sdk/middleware-content-length":"^0.1.0-preview.5","@aws-sdk/middleware-header-default":"^0.1.0-preview.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.7.1","karma":"^4.1.0","rimraf":"^2.6.2","typedoc":"^0.14.2","puppeteer":"^1.0.0","typescript":"~3.4.0","@types/jest":"^24.0.12","jasmine-core":"^3.4.0","karma-jasmine":"^2.0.1","karma-coverage":"^1.1.1","karma-typescript":"^4.0.0","karma-chrome-launcher":"^3.0.0","@aws-sdk/karma-credential-loader":"^0.1.0-preview.6","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cloudwatch-logs-browser_0.1.0-preview.2_1568052045213_0.07298669421327864","host":"s3://npm-registry-packages"}},"0.1.0-preview.3":{"name":"@aws-sdk/client-cloudwatch-logs-browser","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-cloudwatch-logs-browser@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":"971658134ac296049b55a431758c5b55e35d45ca","tarball":"https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs-browser/-/client-cloudwatch-logs-browser-0.1.0-preview.3.tgz","fileCount":1119,"integrity":"sha512-cGsHNxIuGwf/UEvZO1TU2+jsAgFBERz11LoQFXAll6VsNRvt1L7JZytWXoraVgZSjaY4QxjvZUQhOclP7mj8Qg==","signatures":[{"sig":"MEYCIQCxLwas/1V3uI+3sMJRjeBzoeFkf8pvSxRUcytVmdlxXwIhAOUPbNZYEOiFzYdNc3tHeHiNMsboWvFopZrIipstNxQr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":623433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg6M+CRA9TVsSAnZWagAAKS8P/3yX9tLDghnKhCA6IwdR\nooTsUWkhN1B3h2q4WSn3X+idNfoJr+dk53sn4+0mlKO0Oefd4quOyExPSwo8\nks4izcn+1tep4KYKteGdMuf9asHxMUq2j7JPxCsT7Njp8xO7wGQLwMRCH2Zq\nVeRSwuYQ+b6+f4aBHMCo3I7tW7Cy6mYQo7+zAChWw9qYrhnW8jqyCfMc+Wid\nWhCM4tq05mKCAYFmtYPwwm+SKpzWNa5Qcg8ozyuoWNue5ukX2EG7HKTh9nSg\nQmTqeTU5vkJtBX9tPUXEA/8mEsFWcJ/POBEppHqLNN3EVEYlPfR5hkljXap4\nz4X5IRkbl/jwuY1Nhv3VckFXJCexVXLsPhcdymRuRoBjrb1Ei1v2FAxPgEHw\nIFZ/66NSJAl92Qx1qhyV1mrq31GhytOflygtmskhbaQosjkdQt6d1c+iXKsX\nadG+cMCEtRg5qMrRbW3iJY+RFiUjUJny1KAbYu3suy/qxjza+2YjXYRmYDsi\np2XVS6sXAl7NlDrHskPKZyym628SldW6GmwqkO9tWG2O37XZOTUcnTrnRgo7\n9+VIReNeAgC2fVdsiKHejtZ0R8ZhTrxpEJv/bckNzPLZVfIrmZoZioaEKrpw\n5n9FEPt3LnKy/bBbv+DpqhZevEAJNFPmlyvLPMxHLyjqS8hHUS0V63zcwdUl\nbC/a\r\n=CgAD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cloudwatch-logs-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cloudwatch-logs-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cloudwatch-logs-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n\n## Description\n\n<p>You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon EC2 instances, AWS CloudTrail, or other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console, CloudWatch Logs commands in the AWS CLI, CloudWatch Logs API, or CloudWatch Logs SDK.</p> <p>You can use CloudWatch Logs to:</p> <ul> <li> <p> <b>Monitor logs from EC2 instances in real-time</b>: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs and send you a notification whenever the rate of errors exceeds a threshold that you specify. CloudWatch Logs uses your log data for monitoring; so, no code changes are required. For example, you can monitor application logs for specific literal terms (such as \"NullReferenceException\") or count the number of occurrences of a literal term at a particular position in log data (such as \"404\" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch metric that you specify.</p> </li> <li> <p> <b>Monitor AWS CloudTrail logged events</b>: You can create alarms in CloudWatch and receive notifications of particular API activity as captured by CloudTrail and use the notification to perform troubleshooting.</p> </li> <li> <p> <b>Archive log data</b>: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events older than this setting are automatically deleted. The CloudWatch Logs agent makes it easy to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.</p> </li> </ul>\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-cloudwatch-logs-browser\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(`CloudWatchLogsClient`) and the commands you need, for example `AssociateKmsKeyCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CloudWatchLogsClient\n} = require(\"@aws-sdk/client-cloudwatch-logs-browser/CloudWatchLogsClient\");\nconst {\n  AssociateKmsKeyCommand\n} = require(\"@aws-sdk/client-cloudwatch-logs-browser/commands/AssociateKmsKeyCommand\");\n```\n\n```javascript\n//TypeScript\nimport { CloudWatchLogsClient } from \"@aws-sdk/client-cloudwatch-logs-browser/CloudWatchLogsClient\";\nimport { AssociateKmsKeyCommand } from \"@aws-sdk/client-cloudwatch-logs-browser/commands/AssociateKmsKeyCommand\";\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 cloudWatchLogs = new CloudWatchLogsClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  logGroupName: /**a string value*/,\n  kmsKeyId: /**a string value*/,\n};\nconst associateKmsKeyCommand = new AssociateKmsKeyCommand(params);\ncloudWatchLogs.send(associateKmsKeyCommand).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 cloudWatchLogs.send(associateKmsKeyCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncloudWatchLogs.send(associateKmsKeyCommand, (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-cloudwatch-logs-browser/CloudWatchLogs\";\nconst cloudWatchLogs = new AWS.CloudWatchLogs({ region: \"region\" });\ncloudWatchLogs.associateKmsKey(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 cloudWatchLogs.send(associateKmsKeyCommand);\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-cloudwatch-logs-browser' 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":"karma start karma.conf","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-cloudwatch-logs-browser has been renamed to @aws-sdk/client-cloudwatch-logs. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon CloudWatch Logs","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^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.7","@aws-sdk/config-resolver":"^0.1.0-preview.5","@aws-sdk/middleware-stack":"^0.1.0-preview.6","@aws-sdk/retry-middleware":"^0.1.0-preview.5","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.6","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.5","@aws-sdk/signing-middleware":"^0.1.0-preview.7","@aws-sdk/url-parser-browser":"^0.1.0-preview.5","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.6","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.6","@aws-sdk/stream-collector-browser":"^0.1.0-preview.5","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@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":{"jest":"^24.7.1","karma":"^4.1.0","rimraf":"^2.6.2","typedoc":"^0.14.2","puppeteer":"^1.0.0","typescript":"~3.4.0","@types/jest":"^24.0.12","jasmine-core":"^3.4.0","karma-jasmine":"^2.0.1","karma-coverage":"^1.1.1","karma-typescript":"^4.0.0","karma-chrome-launcher":"^3.0.0","@aws-sdk/karma-credential-loader":"^0.1.0-preview.7","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cloudwatch-logs-browser_0.1.0-preview.3_1568908093795_0.12221312462128786","host":"s3://npm-registry-packages"}},"0.1.0-preview.4":{"name":"@aws-sdk/client-cloudwatch-logs-browser","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-cloudwatch-logs-browser@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":"d217fc849925d087843c512a074625ba259ea593","tarball":"https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs-browser/-/client-cloudwatch-logs-browser-0.1.0-preview.4.tgz","fileCount":1119,"integrity":"sha512-qw71o5BQD2nuyN7iin0WFHgEmGHThtO0K0i8wJGN0HuXurxAVia7bQ9Wb7ez4k8cqfsGxORl9toXAuJgEqZ4IA==","signatures":[{"sig":"MEUCIHk7zbfDy48paMLxLh5BVF2McTFkhrYFZXXBgffEZUsdAiEAjT2AIW1qcYnol8FY5pp0DhjkBqh2mVewbhSpLP3CMUE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":623430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduNKpCRA9TVsSAnZWagAA6FUP/0/Y7QXBK1OTcQ+m0A+R\nJZCGDo0//GmsKMa0hTd6okgumcVbfyWVR89jndZruYkL3K04K343Zv9Z2LkQ\nFvVb6VHv8D5qLFsau71/1yyO2tGxDabC8b05CrwyJ0L5Cod/IU7hMU///nxS\nQHrM4gfFrS+4JCKigExQOnEpdrZNJ0R0GDqW67+3+pqV9fe32rwth/sz6Jya\nkR+PUGFBFnz6mTlPeL/Faico/XfaoDNG1PjF1RTZ+qPEYBzN2u9cJ8fX//W9\n3RH/se9zQrQ3GwCA16S0RAkZob5jqqHBM3l5R9wS86e0SVOpLfjoRBcHf7Gq\ng7fY500K/ko6TiOqfE9NUxmC6XPIMp92p2tGXcAEzNu4MK/DQsemL9fbBPdE\niB4j1rx8moaS9DH5RbuBl544/BNZ0xsEGhHHItK4NaLLZYjHbuVzCUB6wsur\nJtM4vmINCGG2aL9tHzNrBf1jvikiawWd0tSBLsbDrJcZs4xMuETyWxjcEUHa\n0NPZcuDcY80m61ZSdZti3rAzuT2QcDJfem6ymZaUSZu+h3E3wQY0r7GvnkRo\n1nbtoNP4H9//MTQ/1SmAbJE2nG1j9kIwGKN7eoVh/hT1W4PBdnfQMVoFFTmY\nzGopau3O0F5KS+d8X30nrMuP1BfR+RuUxtb4oODJRemQW3EHJ3o2WBkvETMA\njv34\r\n=FJyE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cloudwatch-logs-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cloudwatch-logs-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cloudwatch-logs-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n\n## Description\n\n<p>You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon EC2 instances, AWS CloudTrail, or other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console, CloudWatch Logs commands in the AWS CLI, CloudWatch Logs API, or CloudWatch Logs SDK.</p> <p>You can use CloudWatch Logs to:</p> <ul> <li> <p> <b>Monitor logs from EC2 instances in real-time</b>: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs and send you a notification whenever the rate of errors exceeds a threshold that you specify. CloudWatch Logs uses your log data for monitoring; so, no code changes are required. For example, you can monitor application logs for specific literal terms (such as \"NullReferenceException\") or count the number of occurrences of a literal term at a particular position in log data (such as \"404\" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch metric that you specify.</p> </li> <li> <p> <b>Monitor AWS CloudTrail logged events</b>: You can create alarms in CloudWatch and receive notifications of particular API activity as captured by CloudTrail and use the notification to perform troubleshooting.</p> </li> <li> <p> <b>Archive log data</b>: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events older than this setting are automatically deleted. The CloudWatch Logs agent makes it easy to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.</p> </li> </ul>\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-cloudwatch-logs-browser\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(`CloudWatchLogsClient`) and the commands you need, for example `AssociateKmsKeyCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CloudWatchLogsClient,\n  AssociateKmsKeyCommand\n} = require(\"@aws-sdk/client-cloudwatch-logs-browser\");\n```\n\n```javascript\n//TypeScript\nimport {\n  CloudWatchLogsClient,\n  AssociateKmsKeyCommand\n} from \"@aws-sdk/client-cloudwatch-logs-browser\";\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 cloudWatchLogs = new CloudWatchLogsClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  logGroupName: /**a string value*/,\n  kmsKeyId: /**a string value*/,\n};\nconst associateKmsKeyCommand = new AssociateKmsKeyCommand(params);\ncloudWatchLogs.send(associateKmsKeyCommand).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 cloudWatchLogs.send(associateKmsKeyCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncloudWatchLogs.send(associateKmsKeyCommand, (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-cloudwatch-logs-browser\";\nconst cloudWatchLogs = new AWS.CloudWatchLogs({ region: \"region\" });\ncloudWatchLogs.associateKmsKey(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 cloudWatchLogs.send(associateKmsKeyCommand);\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-cloudwatch-logs-browser' 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":"karma start karma.conf","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-cloudwatch-logs-browser has been renamed to @aws-sdk/client-cloudwatch-logs. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon CloudWatch Logs","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.6","@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/config-resolver":"^0.1.0-preview.6","@aws-sdk/middleware-stack":"^0.1.0-preview.7","@aws-sdk/retry-middleware":"^0.1.0-preview.6","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.7","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.6","@aws-sdk/signing-middleware":"^0.1.0-preview.8","@aws-sdk/url-parser-browser":"^0.1.0-preview.6","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.6","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.7","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.7","@aws-sdk/stream-collector-browser":"^0.1.0-preview.6","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@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":{"jest":"^24.7.1","karma":"^4.1.0","rimraf":"^2.6.2","typedoc":"^0.14.2","puppeteer":"^1.0.0","typescript":"~3.4.0","@types/jest":"^24.0.12","jasmine-core":"^3.4.0","karma-jasmine":"^2.0.1","karma-coverage":"^1.1.1","karma-typescript":"^4.0.0","karma-chrome-launcher":"^3.0.0","@aws-sdk/karma-credential-loader":"^0.1.0-preview.8","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cloudwatch-logs-browser_0.1.0-preview.4_1572393641278_0.09336836281421168","host":"s3://npm-registry-packages"}},"0.1.0-preview.5":{"name":"@aws-sdk/client-cloudwatch-logs-browser","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-cloudwatch-logs-browser@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":"2a59b62524ff1675f1c68b30a8c3a53bdc0b8b41","tarball":"https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs-browser/-/client-cloudwatch-logs-browser-0.1.0-preview.5.tgz","fileCount":1119,"integrity":"sha512-vMhreW7I9SluU0xnVkCq0CadRNHW/jsYGwkyrSYuMIyfPtnrK+esaYmvlcilQs2BbgHSIj0GYJxYkOpklc6K/A==","signatures":[{"sig":"MEUCIQCDSiTW6Cll1Xk5QVcVXFIasNDSxWkq9j//OGKLwBsMNQIgJAvno6B/wugL+4O3hnGGimU2z4kzcVL4YVGmuWXXMD8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":623674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdueYzCRA9TVsSAnZWagAAXYcP/jtBXEabLsEZyeReN/mf\nfzXuVajqJo8vZJtE/dlKJSrY7exUg39Z3faHuIDv5NWxI75OdU0KJjSBeVJb\nD/qoGq0QSOhQxahxDc/F4IgYWMokDnoR2aNpITl+ickbOrsXb5oa7ngLwFJr\nfN4x1EhUGyTen1GHTq+6SM143LlR+KVYb5cN+fWTxA12Low+4isDhglesUZe\nx0b3wEOunZGVYm6vRP/lGVcy7bieHgihcMBxEg8aErheWYAc9N/pZs/ISc8d\nPGte2SaacMZiJ1PwoIaGsSY7ZcKASy1VdstpmE4Ch20KL3FItTjEYgRUZjJ1\niY9GxMEdDG1sEj/urSw0tbwgFXefAD6aVuFs9tBmpAMksNBSRkXKbDJEHYhs\nhPbCPqUA7HN1nQNuz0cGrzAPCBqfpY0iOPJSqsSm6/l2zSDVzaZqu31mIS/w\nu/mMuaDfTaoFDOV89KqECX7AV36ZDbM3KtsP/cE3iPfvXZoV+zZ9JxdeEryK\nbw78nXZr9GGnh2dNP06De13nWjfzdWZZ0WSLQLHR4Br2Xjci2U/OKWK7DsDN\nu/iFSgmDAgcyib4fTrWt13xFB4ZZNO6SnSW27s3jNp3Da8+XJJLldGB9SaMK\nOIKS1sA7/WsDfXwl7SM/kt6QM367ZbMoSV9vmy0VIysyR8ZnTx04Kr8dAOdY\n2Guc\r\n=w/Zw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cloudwatch-logs-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cloudwatch-logs-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cloudwatch-logs-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n\n## Description\n\n<p>You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon EC2 instances, AWS CloudTrail, or other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console, CloudWatch Logs commands in the AWS CLI, CloudWatch Logs API, or CloudWatch Logs SDK.</p> <p>You can use CloudWatch Logs to:</p> <ul> <li> <p> <b>Monitor logs from EC2 instances in real-time</b>: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs and send you a notification whenever the rate of errors exceeds a threshold that you specify. CloudWatch Logs uses your log data for monitoring; so, no code changes are required. For example, you can monitor application logs for specific literal terms (such as \"NullReferenceException\") or count the number of occurrences of a literal term at a particular position in log data (such as \"404\" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch metric that you specify.</p> </li> <li> <p> <b>Monitor AWS CloudTrail logged events</b>: You can create alarms in CloudWatch and receive notifications of particular API activity as captured by CloudTrail and use the notification to perform troubleshooting.</p> </li> <li> <p> <b>Archive log data</b>: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events older than this setting are automatically deleted. The CloudWatch Logs agent makes it easy to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.</p> </li> </ul>\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-cloudwatch-logs-browser\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(`CloudWatchLogsClient`) and the commands you need, for example `AssociateKmsKeyCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CloudWatchLogsClient,\n  AssociateKmsKeyCommand\n} = require(\"@aws-sdk/client-cloudwatch-logs-browser\");\n```\n\n```javascript\n//TypeScript\nimport {\n  CloudWatchLogsClient,\n  AssociateKmsKeyCommand\n} from \"@aws-sdk/client-cloudwatch-logs-browser\";\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 cloudWatchLogs = new CloudWatchLogsClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  logGroupName: /**a string value*/,\n  kmsKeyId: /**a string value*/,\n};\nconst associateKmsKeyCommand = new AssociateKmsKeyCommand(params);\ncloudWatchLogs.send(associateKmsKeyCommand).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 cloudWatchLogs.send(associateKmsKeyCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncloudWatchLogs.send(associateKmsKeyCommand, (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-cloudwatch-logs-browser\";\nconst cloudWatchLogs = new AWS.CloudWatchLogs({ region: \"region\" });\ncloudWatchLogs.associateKmsKey(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 cloudWatchLogs.send(associateKmsKeyCommand);\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-cloudwatch-logs-browser' 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":"karma start karma.conf","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-cloudwatch-logs-browser has been renamed to @aws-sdk/client-cloudwatch-logs. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon CloudWatch Logs","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@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/config-resolver":"^0.1.0-preview.7","@aws-sdk/middleware-stack":"^0.1.0-preview.8","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.8","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.7","@aws-sdk/signing-middleware":"^0.1.0-preview.9","@aws-sdk/url-parser-browser":"^0.1.0-preview.7","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.8","@aws-sdk/stream-collector-browser":"^0.1.0-preview.7","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@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":{"jest":"^24.7.1","karma":"^4.1.0","rimraf":"^2.6.2","typedoc":"^0.14.2","puppeteer":"^1.0.0","typescript":"~3.4.0","@types/jest":"^24.0.12","jasmine-core":"^3.4.0","karma-jasmine":"^2.0.1","karma-coverage":"^1.1.1","karma-typescript":"^4.0.0","karma-chrome-launcher":"^3.0.0","@aws-sdk/karma-credential-loader":"^0.1.0-preview.9","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cloudwatch-logs-browser_0.1.0-preview.5_1572464179275_0.12875987604288053","host":"s3://npm-registry-packages"}},"0.1.0-preview.6":{"name":"@aws-sdk/client-cloudwatch-logs-browser","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-cloudwatch-logs-browser@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":"187f0654ef130adeb8c7320cc1ce49a87a3e4661","tarball":"https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs-browser/-/client-cloudwatch-logs-browser-0.1.0-preview.6.tgz","fileCount":1119,"integrity":"sha512-kfWhcB05m/utAXRG83ohQ5sEv4DzHkm9grVuU5Mm4cPJN1+3+gUNf5xS8kqnSkGbMl8H41jJleKB2TpxPA3iYA==","signatures":[{"sig":"MEUCIGg/aFeT8ejr/xZEMN6qaIb8Xd6uinjxIRfFeTk7tMKVAiEAvuyvAa3n/SfrTjFb/QmDLsMwIwtbCYudCujRe+o8x64=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":623945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1FUzCRA9TVsSAnZWagAAIrAQAJdfTzU0C9fBtZzyvE9P\nw6KBqzb1dwMdo6s7DMKN2ZD6C/D7vFOZANIAOU+7RYDIQfWtHQ3y+9B7vI1t\n/6ISIp69JtUO6lECsBu56qkb2WsTsoSCpS8J+om56OvCN+DrYyI+FlG6omCU\nRMBnaFKvge+A+qzCIh490+lGHm1/EzAx/A251JScsFR8k39eClIGGywSkSnL\nKYxLGDfHm1imsnw2syRXo2E25E9XAHVsiPplzfZo94PumcrKZMAW2Y68LEIF\nyJ154XCy0DuH2rYQZqMlJ/ijmcJUg+bt5xO5XsYpuFG9hGoscuSfS0tAm6se\neJ5Y4AQePXKAO6ffzyMD0c1pG1EIHX/qFuEjeXsPROLC49M2A5wKjdWtrdz6\nezLwDxNxUStoY+73X+z08bqkNeLFYc3YaVdYWFlwIUqFHBbI06W9NvMg5xn0\noh+p+0DWqBVOcgiWIUFKQx8QJmlOoO67N1IynuQZil0FgRX+yh3mfZWKueq7\nLJ4tyQTuyn4VUISuOcVUDZ3nMT2anrZn0L3hSxLpnu6+o7Q659DXgWtZxvo3\n4PwD2OaAZfXpmhpSw71twEpY89IJnbetc9c8ybhjwoGeHnp/w3iwoKaxcOHg\n8E1HAcVo08atmsY29Qh1tmuD9z2BUWYvdB/KQBPmwI7M8kxmgNPrPAFgjAlz\nqNjn\r\n=vcBs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cloudwatch-logs-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cloudwatch-logs-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cloudwatch-logs-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs-browser)\n\n## Description\n\n<p>You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon EC2 instances, AWS CloudTrail, or other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console, CloudWatch Logs commands in the AWS CLI, CloudWatch Logs API, or CloudWatch Logs SDK.</p> <p>You can use CloudWatch Logs to:</p> <ul> <li> <p> <b>Monitor logs from EC2 instances in real-time</b>: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs and send you a notification whenever the rate of errors exceeds a threshold that you specify. CloudWatch Logs uses your log data for monitoring; so, no code changes are required. For example, you can monitor application logs for specific literal terms (such as \"NullReferenceException\") or count the number of occurrences of a literal term at a particular position in log data (such as \"404\" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch metric that you specify.</p> </li> <li> <p> <b>Monitor AWS CloudTrail logged events</b>: You can create alarms in CloudWatch and receive notifications of particular API activity as captured by CloudTrail and use the notification to perform troubleshooting.</p> </li> <li> <p> <b>Archive log data</b>: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events older than this setting are automatically deleted. The CloudWatch Logs agent makes it easy to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.</p> </li> </ul>\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-cloudwatch-logs-browser\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(`CloudWatchLogsClient`) and the commands you need, for example `AssociateKmsKeyCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CloudWatchLogsClient,\n  AssociateKmsKeyCommand\n} = require(\"@aws-sdk/client-cloudwatch-logs-browser\");\n```\n\n```javascript\n//TypeScript\nimport {\n  CloudWatchLogsClient,\n  AssociateKmsKeyCommand\n} from \"@aws-sdk/client-cloudwatch-logs-browser\";\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 cloudWatchLogs = new CloudWatchLogsClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  logGroupName: /**a string value*/,\n  kmsKeyId: /**a string value*/,\n};\nconst associateKmsKeyCommand = new AssociateKmsKeyCommand(params);\ncloudWatchLogs.send(associateKmsKeyCommand).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 cloudWatchLogs.send(associateKmsKeyCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncloudWatchLogs.send(associateKmsKeyCommand, (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-cloudwatch-logs-browser\";\nconst cloudWatchLogs = new AWS.CloudWatchLogs({ region: \"region\" });\ncloudWatchLogs.associateKmsKey(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 cloudWatchLogs.send(associateKmsKeyCommand);\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-cloudwatch-logs-browser' 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":"karma start karma.conf","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-cloudwatch-logs-browser has been renamed to @aws-sdk/client-cloudwatch-logs. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon CloudWatch Logs","directories":{},"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@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/config-resolver":"^0.1.0-preview.7","@aws-sdk/middleware-stack":"^0.1.0-preview.9","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.8","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.8","@aws-sdk/signing-middleware":"^0.1.0-preview.10","@aws-sdk/url-parser-browser":"^0.1.0-preview.7","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.9","@aws-sdk/stream-collector-browser":"^0.1.0-preview.7","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@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":{"jest":"^24.7.1","karma":"^4.1.0","rimraf":"^2.6.2","typedoc":"^0.14.2","puppeteer":"^1.0.0","typescript":"~3.4.0","@types/jest":"^24.0.12","jasmine-core":"^3.4.0","karma-jasmine":"^2.0.1","karma-coverage":"^1.1.1","karma-typescript":"^4.0.0","karma-chrome-launcher":"^3.0.0","@aws-sdk/karma-credential-loader":"^0.1.0-preview.10","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cloudwatch-logs-browser_0.1.0-preview.6_1574196530943_0.479802372016767","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-09-09T18:00:45.020Z","modified":"2025-03-27T18:36:51.119Z","0.1.0-preview.2":"2019-09-09T18:00:45.397Z","0.1.0-preview.3":"2019-09-19T15:48:14.031Z","0.1.0-preview.4":"2019-10-30T00:00:41.485Z","0.1.0-preview.5":"2019-10-30T19:36:19.515Z","0.1.0-preview.6":"2019-11-19T20:48:51.123Z"},"author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","description":"Browser SDK for Amazon CloudWatch Logs","maintainers":[{"email":"osa-3p@amazon.com","name":"amzn-oss"},{"email":"aws-sdk-js-automation@amazon.com","name":"aws-sdk-bot"}],"readme":"","readmeFilename":""}