1. Packages
  2. AWS
  3. API Docs
  4. cloudwatch
  5. LogDeliveryDestination
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.cloudwatch.LogDeliveryDestination

Explore with Pulumi AI

Resource for managing an AWS CloudWatch Logs Delivery Destination.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.cloudwatch.LogDeliveryDestination("example", {
    name: "example",
    deliveryDestinationConfiguration: {
        destinationResourceArn: exampleAwsCloudwatchLogGroup.arn,
    },
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.cloudwatch.LogDeliveryDestination("example",
    name="example",
    delivery_destination_configuration={
        "destination_resource_arn": example_aws_cloudwatch_log_group["arn"],
    })
Copy
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.NewLogDeliveryDestination(ctx, "example", &cloudwatch.LogDeliveryDestinationArgs{
			Name: pulumi.String("example"),
			DeliveryDestinationConfiguration: &cloudwatch.LogDeliveryDestinationDeliveryDestinationConfigurationArgs{
				DestinationResourceArn: pulumi.Any(exampleAwsCloudwatchLogGroup.Arn),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.CloudWatch.LogDeliveryDestination("example", new()
    {
        Name = "example",
        DeliveryDestinationConfiguration = new Aws.CloudWatch.Inputs.LogDeliveryDestinationDeliveryDestinationConfigurationArgs
        {
            DestinationResourceArn = exampleAwsCloudwatchLogGroup.Arn,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogDeliveryDestination;
import com.pulumi.aws.cloudwatch.LogDeliveryDestinationArgs;
import com.pulumi.aws.cloudwatch.inputs.LogDeliveryDestinationDeliveryDestinationConfigurationArgs;
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 LogDeliveryDestination("example", LogDeliveryDestinationArgs.builder()
            .name("example")
            .deliveryDestinationConfiguration(LogDeliveryDestinationDeliveryDestinationConfigurationArgs.builder()
                .destinationResourceArn(exampleAwsCloudwatchLogGroup.arn())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:cloudwatch:LogDeliveryDestination
    properties:
      name: example
      deliveryDestinationConfiguration:
        destinationResourceArn: ${exampleAwsCloudwatchLogGroup.arn}
Copy

Create LogDeliveryDestination Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LogDeliveryDestination(name: string, args?: LogDeliveryDestinationArgs, opts?: CustomResourceOptions);
@overload
def LogDeliveryDestination(resource_name: str,
                           args: Optional[LogDeliveryDestinationArgs] = None,
                           opts: Optional[ResourceOptions] = None)

@overload
def LogDeliveryDestination(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           delivery_destination_configuration: Optional[LogDeliveryDestinationDeliveryDestinationConfigurationArgs] = None,
                           name: Optional[str] = None,
                           output_format: Optional[str] = None,
                           tags: Optional[Mapping[str, str]] = None)
func NewLogDeliveryDestination(ctx *Context, name string, args *LogDeliveryDestinationArgs, opts ...ResourceOption) (*LogDeliveryDestination, error)
public LogDeliveryDestination(string name, LogDeliveryDestinationArgs? args = null, CustomResourceOptions? opts = null)
public LogDeliveryDestination(String name, LogDeliveryDestinationArgs args)
public LogDeliveryDestination(String name, LogDeliveryDestinationArgs args, CustomResourceOptions options)
type: aws:cloudwatch:LogDeliveryDestination
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args LogDeliveryDestinationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args LogDeliveryDestinationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args LogDeliveryDestinationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args LogDeliveryDestinationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LogDeliveryDestinationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var logDeliveryDestinationResource = new Aws.CloudWatch.LogDeliveryDestination("logDeliveryDestinationResource", new()
{
    DeliveryDestinationConfiguration = new Aws.CloudWatch.Inputs.LogDeliveryDestinationDeliveryDestinationConfigurationArgs
    {
        DestinationResourceArn = "string",
    },
    Name = "string",
    OutputFormat = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := cloudwatch.NewLogDeliveryDestination(ctx, "logDeliveryDestinationResource", &cloudwatch.LogDeliveryDestinationArgs{
	DeliveryDestinationConfiguration: &cloudwatch.LogDeliveryDestinationDeliveryDestinationConfigurationArgs{
		DestinationResourceArn: pulumi.String("string"),
	},
	Name:         pulumi.String("string"),
	OutputFormat: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var logDeliveryDestinationResource = new LogDeliveryDestination("logDeliveryDestinationResource", LogDeliveryDestinationArgs.builder()
    .deliveryDestinationConfiguration(LogDeliveryDestinationDeliveryDestinationConfigurationArgs.builder()
        .destinationResourceArn("string")
        .build())
    .name("string")
    .outputFormat("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
log_delivery_destination_resource = aws.cloudwatch.LogDeliveryDestination("logDeliveryDestinationResource",
    delivery_destination_configuration={
        "destination_resource_arn": "string",
    },
    name="string",
    output_format="string",
    tags={
        "string": "string",
    })
Copy
const logDeliveryDestinationResource = new aws.cloudwatch.LogDeliveryDestination("logDeliveryDestinationResource", {
    deliveryDestinationConfiguration: {
        destinationResourceArn: "string",
    },
    name: "string",
    outputFormat: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:cloudwatch:LogDeliveryDestination
properties:
    deliveryDestinationConfiguration:
        destinationResourceArn: string
    name: string
    outputFormat: string
    tags:
        string: string
Copy

LogDeliveryDestination Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LogDeliveryDestination resource accepts the following input properties:

DeliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfiguration
The AWS resource that will receive the logs.
Name string
The name for this delivery destination.
OutputFormat string
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
Tags Dictionary<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.
DeliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfigurationArgs
The AWS resource that will receive the logs.
Name string
The name for this delivery destination.
OutputFormat string
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
Tags 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.
deliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfiguration
The AWS resource that will receive the logs.
name String
The name for this delivery destination.
outputFormat String
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags 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.
deliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfiguration
The AWS resource that will receive the logs.
name string
The name for this delivery destination.
outputFormat string
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags {[key: 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.
delivery_destination_configuration LogDeliveryDestinationDeliveryDestinationConfigurationArgs
The AWS resource that will receive the logs.
name str
The name for this delivery destination.
output_format str
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags Mapping[str, str]
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.
deliveryDestinationConfiguration Property Map
The AWS resource that will receive the logs.
name String
The name for this delivery destination.
outputFormat String
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags Map<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.

Outputs

All input properties are implicitly available as output properties. Additionally, the LogDeliveryDestination resource produces the following output properties:

Arn string
The Amazon Resource Name (ARN) of the delivery destination.
DeliveryDestinationType string
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The Amazon Resource Name (ARN) of the delivery destination.
DeliveryDestinationType string
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the delivery destination.
deliveryDestinationType String
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The Amazon Resource Name (ARN) of the delivery destination.
deliveryDestinationType string
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
id string
The provider-assigned unique ID for this managed resource.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The Amazon Resource Name (ARN) of the delivery destination.
delivery_destination_type str
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
id str
The provider-assigned unique ID for this managed resource.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the delivery destination.
deliveryDestinationType String
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing LogDeliveryDestination Resource

Get an existing LogDeliveryDestination resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LogDeliveryDestinationState, opts?: CustomResourceOptions): LogDeliveryDestination
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        delivery_destination_configuration: Optional[LogDeliveryDestinationDeliveryDestinationConfigurationArgs] = None,
        delivery_destination_type: Optional[str] = None,
        name: Optional[str] = None,
        output_format: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> LogDeliveryDestination
func GetLogDeliveryDestination(ctx *Context, name string, id IDInput, state *LogDeliveryDestinationState, opts ...ResourceOption) (*LogDeliveryDestination, error)
public static LogDeliveryDestination Get(string name, Input<string> id, LogDeliveryDestinationState? state, CustomResourceOptions? opts = null)
public static LogDeliveryDestination get(String name, Output<String> id, LogDeliveryDestinationState state, CustomResourceOptions options)
resources:  _:    type: aws:cloudwatch:LogDeliveryDestination    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
The Amazon Resource Name (ARN) of the delivery destination.
DeliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfiguration
The AWS resource that will receive the logs.
DeliveryDestinationType string
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
Name string
The name for this delivery destination.
OutputFormat string
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
Tags Dictionary<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.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The Amazon Resource Name (ARN) of the delivery destination.
DeliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfigurationArgs
The AWS resource that will receive the logs.
DeliveryDestinationType string
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
Name string
The name for this delivery destination.
OutputFormat string
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
Tags 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.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the delivery destination.
deliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfiguration
The AWS resource that will receive the logs.
deliveryDestinationType String
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
name String
The name for this delivery destination.
outputFormat String
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags 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.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The Amazon Resource Name (ARN) of the delivery destination.
deliveryDestinationConfiguration LogDeliveryDestinationDeliveryDestinationConfiguration
The AWS resource that will receive the logs.
deliveryDestinationType string
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
name string
The name for this delivery destination.
outputFormat string
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags {[key: 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.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The Amazon Resource Name (ARN) of the delivery destination.
delivery_destination_configuration LogDeliveryDestinationDeliveryDestinationConfigurationArgs
The AWS resource that will receive the logs.
delivery_destination_type str
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
name str
The name for this delivery destination.
output_format str
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags Mapping[str, str]
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.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the delivery destination.
deliveryDestinationConfiguration Property Map
The AWS resource that will receive the logs.
deliveryDestinationType String
Whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.
name String
The name for this delivery destination.
outputFormat String
The format of the logs that are sent to this delivery destination. Valid values: json, plain, w3c, raw, parquet.
tags Map<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.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Supporting Types

LogDeliveryDestinationDeliveryDestinationConfiguration
, LogDeliveryDestinationDeliveryDestinationConfigurationArgs

DestinationResourceArn This property is required. string
The ARN of the AWS destination that this delivery destination represents.
DestinationResourceArn This property is required. string
The ARN of the AWS destination that this delivery destination represents.
destinationResourceArn This property is required. String
The ARN of the AWS destination that this delivery destination represents.
destinationResourceArn This property is required. string
The ARN of the AWS destination that this delivery destination represents.
destination_resource_arn This property is required. str
The ARN of the AWS destination that this delivery destination represents.
destinationResourceArn This property is required. String
The ARN of the AWS destination that this delivery destination represents.

Import

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

$ pulumi import aws:cloudwatch/logDeliveryDestination:LogDeliveryDestination example example
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.