LogDelivery

class LogDelivery : KotlinCustomResource

Resource for managing an AWS CloudWatch Logs Delivery. A delivery is a connection between an aws.cloudwatch.LogDeliverySource and an aws.cloudwatch.LogDeliveryDestination.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudwatch.LogDelivery("example", {
deliverySourceName: exampleAwsCloudwatchLogDeliverySource.name,
deliveryDestinationArn: exampleAwsCloudwatchLogDeliveryDestination.arn,
fieldDelimiter: ",",
recordFields: [
"event_timestamp",
"event",
],
});
import pulumi
import pulumi_aws as aws
example = aws.cloudwatch.LogDelivery("example",
delivery_source_name=example_aws_cloudwatch_log_delivery_source["name"],
delivery_destination_arn=example_aws_cloudwatch_log_delivery_destination["arn"],
field_delimiter=",",
record_fields=[
"event_timestamp",
"event",
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudWatch.LogDelivery("example", new()
{
DeliverySourceName = exampleAwsCloudwatchLogDeliverySource.Name,
DeliveryDestinationArn = exampleAwsCloudwatchLogDeliveryDestination.Arn,
FieldDelimiter = ",",
RecordFields = new[]
{
"event_timestamp",
"event",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudwatch.NewLogDelivery(ctx, "example", &cloudwatch.LogDeliveryArgs{
DeliverySourceName: pulumi.Any(exampleAwsCloudwatchLogDeliverySource.Name),
DeliveryDestinationArn: pulumi.Any(exampleAwsCloudwatchLogDeliveryDestination.Arn),
FieldDelimiter: pulumi.String(","),
RecordFields: pulumi.StringArray{
pulumi.String("event_timestamp"),
pulumi.String("event"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogDelivery;
import com.pulumi.aws.cloudwatch.LogDeliveryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new LogDelivery("example", LogDeliveryArgs.builder()
.deliverySourceName(exampleAwsCloudwatchLogDeliverySource.name())
.deliveryDestinationArn(exampleAwsCloudwatchLogDeliveryDestination.arn())
.fieldDelimiter(",")
.recordFields(
"event_timestamp",
"event")
.build());
}
}
resources:
example:
type: aws:cloudwatch:LogDelivery
properties:
deliverySourceName: ${exampleAwsCloudwatchLogDeliverySource.name}
deliveryDestinationArn: ${exampleAwsCloudwatchLogDeliveryDestination.arn}
fieldDelimiter: ','
recordFields:
- event_timestamp
- event

Import

Using pulumi import, import CloudWatch Logs Delivery using the id. For example:

$ pulumi import aws:cloudwatch/logDelivery:LogDelivery example jsoGVi4Zq8VlYp9n

Properties

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) of the delivery.

Link copied to clipboard

The ARN of the delivery destination to use for this delivery.

Link copied to clipboard

The name of the delivery source to use for this delivery.

Link copied to clipboard
val fieldDelimiter: Output<String>

The field delimiter to use between record fields when the final output format of a delivery is in plain, w3c, or raw format.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val recordFields: Output<List<String>>

The list of record fields to be delivered to the destination, in order.

Link copied to clipboard

Parameters that are valid only when the delivery's delivery destination is an S3 bucket.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>