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

aws.cloudwatch.LogDeliverySource

Explore with Pulumi AI

Resource for managing an AWS CloudWatch Logs Delivery Source.

Example Usage

Basic Usage

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

const example = new aws.cloudwatch.LogDeliverySource("example", {
    name: "example",
    logType: "APPLICATION_LOGS",
    resourceArn: exampleAwsBedrockagentKnowledgeBase.arn,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.cloudwatch.LogDeliverySource("example",
    name="example",
    log_type="APPLICATION_LOGS",
    resource_arn=example_aws_bedrockagent_knowledge_base["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.NewLogDeliverySource(ctx, "example", &cloudwatch.LogDeliverySourceArgs{
			Name:        pulumi.String("example"),
			LogType:     pulumi.String("APPLICATION_LOGS"),
			ResourceArn: pulumi.Any(exampleAwsBedrockagentKnowledgeBase.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.LogDeliverySource("example", new()
    {
        Name = "example",
        LogType = "APPLICATION_LOGS",
        ResourceArn = exampleAwsBedrockagentKnowledgeBase.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogDeliverySource;
import com.pulumi.aws.cloudwatch.LogDeliverySourceArgs;
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 LogDeliverySource("example", LogDeliverySourceArgs.builder()
            .name("example")
            .logType("APPLICATION_LOGS")
            .resourceArn(exampleAwsBedrockagentKnowledgeBase.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:cloudwatch:LogDeliverySource
    properties:
      name: example
      logType: APPLICATION_LOGS
      resourceArn: ${exampleAwsBedrockagentKnowledgeBase.arn}
Copy

Create LogDeliverySource Resource

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

Constructor syntax

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

@overload
def LogDeliverySource(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      log_type: Optional[str] = None,
                      resource_arn: Optional[str] = None,
                      name: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None)
func NewLogDeliverySource(ctx *Context, name string, args LogDeliverySourceArgs, opts ...ResourceOption) (*LogDeliverySource, error)
public LogDeliverySource(string name, LogDeliverySourceArgs args, CustomResourceOptions? opts = null)
public LogDeliverySource(String name, LogDeliverySourceArgs args)
public LogDeliverySource(String name, LogDeliverySourceArgs args, CustomResourceOptions options)
type: aws:cloudwatch:LogDeliverySource
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 This property is required. LogDeliverySourceArgs
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 This property is required. LogDeliverySourceArgs
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 This property is required. LogDeliverySourceArgs
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 This property is required. LogDeliverySourceArgs
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. LogDeliverySourceArgs
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 logDeliverySourceResource = new Aws.CloudWatch.LogDeliverySource("logDeliverySourceResource", new()
{
    LogType = "string",
    ResourceArn = "string",
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := cloudwatch.NewLogDeliverySource(ctx, "logDeliverySourceResource", &cloudwatch.LogDeliverySourceArgs{
	LogType:     pulumi.String("string"),
	ResourceArn: pulumi.String("string"),
	Name:        pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var logDeliverySourceResource = new LogDeliverySource("logDeliverySourceResource", LogDeliverySourceArgs.builder()
    .logType("string")
    .resourceArn("string")
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
log_delivery_source_resource = aws.cloudwatch.LogDeliverySource("logDeliverySourceResource",
    log_type="string",
    resource_arn="string",
    name="string",
    tags={
        "string": "string",
    })
Copy
const logDeliverySourceResource = new aws.cloudwatch.LogDeliverySource("logDeliverySourceResource", {
    logType: "string",
    resourceArn: "string",
    name: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:cloudwatch:LogDeliverySource
properties:
    logType: string
    name: string
    resourceArn: string
    tags:
        string: string
Copy

LogDeliverySource 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 LogDeliverySource resource accepts the following input properties:

LogType This property is required. string
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
ResourceArn This property is required. string
The ARN of the AWS resource that is generating and sending logs.
Name string
The name for this delivery source.
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.
LogType This property is required. string
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
ResourceArn This property is required. string
The ARN of the AWS resource that is generating and sending logs.
Name string
The name for this delivery source.
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.
logType This property is required. String
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
resourceArn This property is required. String
The ARN of the AWS resource that is generating and sending logs.
name String
The name for this delivery source.
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.
logType This property is required. string
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
resourceArn This property is required. string
The ARN of the AWS resource that is generating and sending logs.
name string
The name for this delivery source.
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.
log_type This property is required. str
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
resource_arn This property is required. str
The ARN of the AWS resource that is generating and sending logs.
name str
The name for this delivery source.
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.
logType This property is required. String
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
resourceArn This property is required. String
The ARN of the AWS resource that is generating and sending logs.
name String
The name for this delivery source.
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 LogDeliverySource resource produces the following output properties:

Arn string
The Amazon Resource Name (ARN) of the delivery source.
Id string
The provider-assigned unique ID for this managed resource.
Service string
The AWS service that is sending logs.
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 source.
Id string
The provider-assigned unique ID for this managed resource.
Service string
The AWS service that is sending logs.
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 source.
id String
The provider-assigned unique ID for this managed resource.
service String
The AWS service that is sending logs.
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 source.
id string
The provider-assigned unique ID for this managed resource.
service string
The AWS service that is sending logs.
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 source.
id str
The provider-assigned unique ID for this managed resource.
service str
The AWS service that is sending logs.
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 source.
id String
The provider-assigned unique ID for this managed resource.
service String
The AWS service that is sending logs.
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 LogDeliverySource Resource

Get an existing LogDeliverySource 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?: LogDeliverySourceState, opts?: CustomResourceOptions): LogDeliverySource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        log_type: Optional[str] = None,
        name: Optional[str] = None,
        resource_arn: Optional[str] = None,
        service: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> LogDeliverySource
func GetLogDeliverySource(ctx *Context, name string, id IDInput, state *LogDeliverySourceState, opts ...ResourceOption) (*LogDeliverySource, error)
public static LogDeliverySource Get(string name, Input<string> id, LogDeliverySourceState? state, CustomResourceOptions? opts = null)
public static LogDeliverySource get(String name, Output<String> id, LogDeliverySourceState state, CustomResourceOptions options)
resources:  _:    type: aws:cloudwatch:LogDeliverySource    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 source.
LogType string
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
Name string
The name for this delivery source.
ResourceArn string
The ARN of the AWS resource that is generating and sending logs.
Service string
The AWS service that is sending logs.
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 source.
LogType string
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
Name string
The name for this delivery source.
ResourceArn string
The ARN of the AWS resource that is generating and sending logs.
Service string
The AWS service that is sending logs.
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 source.
logType String
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
name String
The name for this delivery source.
resourceArn String
The ARN of the AWS resource that is generating and sending logs.
service String
The AWS service that is sending logs.
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 source.
logType string
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
name string
The name for this delivery source.
resourceArn string
The ARN of the AWS resource that is generating and sending logs.
service string
The AWS service that is sending logs.
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 source.
log_type str
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
name str
The name for this delivery source.
resource_arn str
The ARN of the AWS resource that is generating and sending logs.
service str
The AWS service that is sending logs.
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 source.
logType String
The type of log that the source is sending. For Amazon Bedrock, the valid value is APPLICATION_LOGS. For Amazon CodeWhisperer, the valid value is EVENT_LOGS. For IAM Identity Center, the valid value is ERROR_LOGS. For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS, AUTHENTICATION_LOGS, WORKMAIL_AVAILABILITY_PROVIDER_LOGS, and WORKMAIL_MAILBOX_ACCESS_LOGS.
name String
The name for this delivery source.
resourceArn String
The ARN of the AWS resource that is generating and sending logs.
service String
The AWS service that is sending logs.
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.

Import

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

$ pulumi import aws:cloudwatch/logDeliverySource:LogDeliverySource 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.