aws.cloudwatch.LogDelivery
Explore with Pulumi AI
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",
    ])
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
	})
}
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 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
Create LogDelivery Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogDelivery(name: string, args: LogDeliveryArgs, opts?: CustomResourceOptions);@overload
def LogDelivery(resource_name: str,
                args: LogDeliveryArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def LogDelivery(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                delivery_destination_arn: Optional[str] = None,
                delivery_source_name: Optional[str] = None,
                field_delimiter: Optional[str] = None,
                record_fields: Optional[Sequence[str]] = None,
                s3_delivery_configurations: Optional[Sequence[LogDeliveryS3DeliveryConfigurationArgs]] = None,
                tags: Optional[Mapping[str, str]] = None)func NewLogDelivery(ctx *Context, name string, args LogDeliveryArgs, opts ...ResourceOption) (*LogDelivery, error)public LogDelivery(string name, LogDeliveryArgs args, CustomResourceOptions? opts = null)
public LogDelivery(String name, LogDeliveryArgs args)
public LogDelivery(String name, LogDeliveryArgs args, CustomResourceOptions options)
type: aws:cloudwatch:LogDelivery
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args LogDeliveryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LogDeliveryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LogDeliveryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogDeliveryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogDeliveryArgs
- 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 logDeliveryResource = new Aws.CloudWatch.LogDelivery("logDeliveryResource", new()
{
    DeliveryDestinationArn = "string",
    DeliverySourceName = "string",
    FieldDelimiter = "string",
    RecordFields = new[]
    {
        "string",
    },
    S3DeliveryConfigurations = new[]
    {
        new Aws.CloudWatch.Inputs.LogDeliveryS3DeliveryConfigurationArgs
        {
            EnableHiveCompatiblePath = false,
            SuffixPath = "string",
        },
    },
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := cloudwatch.NewLogDelivery(ctx, "logDeliveryResource", &cloudwatch.LogDeliveryArgs{
	DeliveryDestinationArn: pulumi.String("string"),
	DeliverySourceName:     pulumi.String("string"),
	FieldDelimiter:         pulumi.String("string"),
	RecordFields: pulumi.StringArray{
		pulumi.String("string"),
	},
	S3DeliveryConfigurations: cloudwatch.LogDeliveryS3DeliveryConfigurationArray{
		&cloudwatch.LogDeliveryS3DeliveryConfigurationArgs{
			EnableHiveCompatiblePath: pulumi.Bool(false),
			SuffixPath:               pulumi.String("string"),
		},
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var logDeliveryResource = new LogDelivery("logDeliveryResource", LogDeliveryArgs.builder()
    .deliveryDestinationArn("string")
    .deliverySourceName("string")
    .fieldDelimiter("string")
    .recordFields("string")
    .s3DeliveryConfigurations(LogDeliveryS3DeliveryConfigurationArgs.builder()
        .enableHiveCompatiblePath(false)
        .suffixPath("string")
        .build())
    .tags(Map.of("string", "string"))
    .build());
log_delivery_resource = aws.cloudwatch.LogDelivery("logDeliveryResource",
    delivery_destination_arn="string",
    delivery_source_name="string",
    field_delimiter="string",
    record_fields=["string"],
    s3_delivery_configurations=[{
        "enable_hive_compatible_path": False,
        "suffix_path": "string",
    }],
    tags={
        "string": "string",
    })
const logDeliveryResource = new aws.cloudwatch.LogDelivery("logDeliveryResource", {
    deliveryDestinationArn: "string",
    deliverySourceName: "string",
    fieldDelimiter: "string",
    recordFields: ["string"],
    s3DeliveryConfigurations: [{
        enableHiveCompatiblePath: false,
        suffixPath: "string",
    }],
    tags: {
        string: "string",
    },
});
type: aws:cloudwatch:LogDelivery
properties:
    deliveryDestinationArn: string
    deliverySourceName: string
    fieldDelimiter: string
    recordFields:
        - string
    s3DeliveryConfigurations:
        - enableHiveCompatiblePath: false
          suffixPath: string
    tags:
        string: string
LogDelivery 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 LogDelivery resource accepts the following input properties:
- DeliveryDestination stringArn 
- The ARN of the delivery destination to use for this delivery.
- DeliverySource stringName 
- The name of the delivery source to use for this delivery.
- FieldDelimiter string
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- RecordFields List<string>
- The list of record fields to be delivered to the destination, in order.
- S3DeliveryConfigurations List<LogDelivery S3Delivery Configuration> 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- DeliveryDestination stringArn 
- The ARN of the delivery destination to use for this delivery.
- DeliverySource stringName 
- The name of the delivery source to use for this delivery.
- FieldDelimiter string
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- RecordFields []string
- The list of record fields to be delivered to the destination, in order.
- S3DeliveryConfigurations []LogDelivery S3Delivery Configuration Args 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- deliveryDestination StringArn 
- The ARN of the delivery destination to use for this delivery.
- deliverySource StringName 
- The name of the delivery source to use for this delivery.
- fieldDelimiter String
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- recordFields List<String>
- The list of record fields to be delivered to the destination, in order.
- s3DeliveryConfigurations List<LogDelivery S3Delivery Configuration> 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- deliveryDestination stringArn 
- The ARN of the delivery destination to use for this delivery.
- deliverySource stringName 
- The name of the delivery source to use for this delivery.
- fieldDelimiter string
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- recordFields string[]
- The list of record fields to be delivered to the destination, in order.
- s3DeliveryConfigurations LogDelivery S3Delivery Configuration[] 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- delivery_destination_ strarn 
- The ARN of the delivery destination to use for this delivery.
- delivery_source_ strname 
- The name of the delivery source to use for this delivery.
- field_delimiter str
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- record_fields Sequence[str]
- The list of record fields to be delivered to the destination, in order.
- s3_delivery_ Sequence[Logconfigurations Delivery S3Delivery Configuration Args] 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- deliveryDestination StringArn 
- The ARN of the delivery destination to use for this delivery.
- deliverySource StringName 
- The name of the delivery source to use for this delivery.
- fieldDelimiter String
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- recordFields List<String>
- The list of record fields to be delivered to the destination, in order.
- s3DeliveryConfigurations List<Property Map>
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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 LogDelivery resource produces the following output properties:
Look up Existing LogDelivery Resource
Get an existing LogDelivery 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?: LogDeliveryState, opts?: CustomResourceOptions): LogDelivery@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        delivery_destination_arn: Optional[str] = None,
        delivery_source_name: Optional[str] = None,
        field_delimiter: Optional[str] = None,
        record_fields: Optional[Sequence[str]] = None,
        s3_delivery_configurations: Optional[Sequence[LogDeliveryS3DeliveryConfigurationArgs]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> LogDeliveryfunc GetLogDelivery(ctx *Context, name string, id IDInput, state *LogDeliveryState, opts ...ResourceOption) (*LogDelivery, error)public static LogDelivery Get(string name, Input<string> id, LogDeliveryState? state, CustomResourceOptions? opts = null)public static LogDelivery get(String name, Output<String> id, LogDeliveryState state, CustomResourceOptions options)resources:  _:    type: aws:cloudwatch:LogDelivery    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Arn string
- The Amazon Resource Name (ARN) of the delivery.
- DeliveryDestination stringArn 
- The ARN of the delivery destination to use for this delivery.
- DeliverySource stringName 
- The name of the delivery source to use for this delivery.
- FieldDelimiter string
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- RecordFields List<string>
- The list of record fields to be delivered to the destination, in order.
- S3DeliveryConfigurations List<LogDelivery S3Delivery Configuration> 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Arn string
- The Amazon Resource Name (ARN) of the delivery.
- DeliveryDestination stringArn 
- The ARN of the delivery destination to use for this delivery.
- DeliverySource stringName 
- The name of the delivery source to use for this delivery.
- FieldDelimiter string
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- RecordFields []string
- The list of record fields to be delivered to the destination, in order.
- S3DeliveryConfigurations []LogDelivery S3Delivery Configuration Args 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- The Amazon Resource Name (ARN) of the delivery.
- deliveryDestination StringArn 
- The ARN of the delivery destination to use for this delivery.
- deliverySource StringName 
- The name of the delivery source to use for this delivery.
- fieldDelimiter String
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- recordFields List<String>
- The list of record fields to be delivered to the destination, in order.
- s3DeliveryConfigurations List<LogDelivery S3Delivery Configuration> 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn string
- The Amazon Resource Name (ARN) of the delivery.
- deliveryDestination stringArn 
- The ARN of the delivery destination to use for this delivery.
- deliverySource stringName 
- The name of the delivery source to use for this delivery.
- fieldDelimiter string
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- recordFields string[]
- The list of record fields to be delivered to the destination, in order.
- s3DeliveryConfigurations LogDelivery S3Delivery Configuration[] 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn str
- The Amazon Resource Name (ARN) of the delivery.
- delivery_destination_ strarn 
- The ARN of the delivery destination to use for this delivery.
- delivery_source_ strname 
- The name of the delivery source to use for this delivery.
- field_delimiter str
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- record_fields Sequence[str]
- The list of record fields to be delivered to the destination, in order.
- s3_delivery_ Sequence[Logconfigurations Delivery S3Delivery Configuration Args] 
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- The Amazon Resource Name (ARN) of the delivery.
- deliveryDestination StringArn 
- The ARN of the delivery destination to use for this delivery.
- deliverySource StringName 
- The name of the delivery source to use for this delivery.
- fieldDelimiter String
- The field delimiter to use between record fields when the final output format of a delivery is in plain,w3c, orrawformat.
- recordFields List<String>
- The list of record fields to be delivered to the destination, in order.
- s3DeliveryConfigurations List<Property Map>
- Parameters that are valid only when the delivery's delivery destination is an S3 bucket.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
Supporting Types
LogDeliveryS3DeliveryConfiguration, LogDeliveryS3DeliveryConfigurationArgs        
- EnableHive boolCompatible Path 
- This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
- SuffixPath string
- This string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source.
- EnableHive boolCompatible Path 
- This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
- SuffixPath string
- This string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source.
- enableHive BooleanCompatible Path 
- This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
- suffixPath String
- This string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source.
- enableHive booleanCompatible Path 
- This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
- suffixPath string
- This string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source.
- enable_hive_ boolcompatible_ path 
- This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
- suffix_path str
- This string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source.
- enableHive BooleanCompatible Path 
- This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
- suffixPath String
- This string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source.
Import
Using pulumi import, import CloudWatch Logs Delivery using the id. For example:
$ pulumi import aws:cloudwatch/logDelivery:LogDelivery example jsoGVi4Zq8VlYp9n
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 awsTerraform Provider.