@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
142 lines • 5.84 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLogDataProtectionPolicyDocumentOutput = exports.getLogDataProtectionPolicyDocument = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Generates a CloudWatch Log Group Data Protection Policy document in JSON format for use with the `aws.cloudwatch.LogDataProtectionPolicy` resource.
*
* > For more information about data protection policies, see the [Help protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.cloudwatch.getLogDataProtectionPolicyDocument({
* name: "Example",
* statements: [
* {
* sid: "Audit",
* dataIdentifiers: [
* "arn:aws:dataprotection::aws:data-identifier/EmailAddress",
* "arn:aws:dataprotection::aws:data-identifier/DriversLicense-US",
* ],
* operation: {
* audit: {
* findingsDestination: {
* cloudwatchLogs: {
* logGroup: audit.name,
* },
* firehose: {
* deliveryStream: auditAwsKinesisFirehoseDeliveryStream.name,
* },
* s3: {
* bucket: auditAwsS3Bucket.bucket,
* },
* },
* },
* },
* },
* {
* sid: "Deidentify",
* dataIdentifiers: [
* "arn:aws:dataprotection::aws:data-identifier/EmailAddress",
* "arn:aws:dataprotection::aws:data-identifier/DriversLicense-US",
* ],
* operation: {
* deidentify: {
* maskConfig: {},
* },
* },
* },
* ],
* });
* const exampleLogDataProtectionPolicy = new aws.cloudwatch.LogDataProtectionPolicy("example", {
* logGroupName: exampleAwsCloudwatchLogGroup.name,
* policyDocument: example.then(example => example.json),
* });
* ```
*/
function getLogDataProtectionPolicyDocument(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:cloudwatch/getLogDataProtectionPolicyDocument:getLogDataProtectionPolicyDocument", {
"configuration": args.configuration,
"description": args.description,
"name": args.name,
"statements": args.statements,
"version": args.version,
}, opts);
}
exports.getLogDataProtectionPolicyDocument = getLogDataProtectionPolicyDocument;
/**
* Generates a CloudWatch Log Group Data Protection Policy document in JSON format for use with the `aws.cloudwatch.LogDataProtectionPolicy` resource.
*
* > For more information about data protection policies, see the [Help protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.cloudwatch.getLogDataProtectionPolicyDocument({
* name: "Example",
* statements: [
* {
* sid: "Audit",
* dataIdentifiers: [
* "arn:aws:dataprotection::aws:data-identifier/EmailAddress",
* "arn:aws:dataprotection::aws:data-identifier/DriversLicense-US",
* ],
* operation: {
* audit: {
* findingsDestination: {
* cloudwatchLogs: {
* logGroup: audit.name,
* },
* firehose: {
* deliveryStream: auditAwsKinesisFirehoseDeliveryStream.name,
* },
* s3: {
* bucket: auditAwsS3Bucket.bucket,
* },
* },
* },
* },
* },
* {
* sid: "Deidentify",
* dataIdentifiers: [
* "arn:aws:dataprotection::aws:data-identifier/EmailAddress",
* "arn:aws:dataprotection::aws:data-identifier/DriversLicense-US",
* ],
* operation: {
* deidentify: {
* maskConfig: {},
* },
* },
* },
* ],
* });
* const exampleLogDataProtectionPolicy = new aws.cloudwatch.LogDataProtectionPolicy("example", {
* logGroupName: exampleAwsCloudwatchLogGroup.name,
* policyDocument: example.then(example => example.json),
* });
* ```
*/
function getLogDataProtectionPolicyDocumentOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:cloudwatch/getLogDataProtectionPolicyDocument:getLogDataProtectionPolicyDocument", {
"configuration": args.configuration,
"description": args.description,
"name": args.name,
"statements": args.statements,
"version": args.version,
}, opts);
}
exports.getLogDataProtectionPolicyDocumentOutput = getLogDataProtectionPolicyDocumentOutput;
//# sourceMappingURL=getLogDataProtectionPolicyDocument.js.map
;