import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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 * * ```typescript * 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", * ], * }); * ``` * * ### CloudFront Standard Logging (v2) * * CloudFront delivers access logs through CloudWatch Logs, so a distribution's standard logging (v2) configuration is expressed as a delivery source, a delivery destination, and a delivery. The `recordFields` list selects the access log fields, including `viewer-request-log-data` and `viewer-response-log-data`, which carry the custom data that a viewer request or viewer response CloudFront Function logs with `cf.logCustomData()`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatch.LogDeliverySource("example", { * name: "cloudfront-access-logs", * logType: "ACCESS_LOGS", * resourceArn: exampleAwsCloudfrontDistribution.arn, * }); * const exampleLogDeliveryDestination = new aws.cloudwatch.LogDeliveryDestination("example", { * deliveryDestinationConfiguration: { * destinationResourceArn: exampleAwsCloudwatchLogGroup.arn, * }, * name: "cloudfront-access-logs", * outputFormat: "json", * }); * const exampleLogDelivery = new aws.cloudwatch.LogDelivery("example", { * deliverySourceName: example.name, * deliveryDestinationArn: exampleLogDeliveryDestination.arn, * recordFields: [ * "date", * "time", * "c-ip", * "sc-status", * "viewer-request-log-data", * "viewer-response-log-data", * ], * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `id` (String) ID of the delivery. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Deliveries using `id`. For example: * * ```sh * $ pulumi import aws:cloudwatch/logDelivery:LogDelivery example jsoGVi4Zq8VlYp9n * ``` */ export declare class LogDelivery extends pulumi.CustomResource { /** * Get an existing LogDelivery resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: LogDeliveryState, opts?: pulumi.CustomResourceOptions): LogDelivery; /** * Returns true if the given object is an instance of LogDelivery. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LogDelivery; /** * ARN of the delivery. */ readonly arn: pulumi.Output; /** * The ARN of the delivery destination to use for this delivery. */ readonly deliveryDestinationArn: pulumi.Output; /** * The name of the delivery source to use for this delivery. */ readonly deliverySourceName: pulumi.Output; /** * The field delimiter to use between record fields when the final output format of a delivery is in `plain`, `w3c`, or `raw` format. */ readonly fieldDelimiter: pulumi.Output; /** * The list of record fields to be delivered to the destination, in order. The valid field names vary by the `logType` of the delivery source. For a CloudFront `ACCESS_LOGS` source, see [Configure standard logging (v2)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/standard-logging.html#standard-logging-real-time-log-selection) for the supported values. */ readonly recordFields: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Parameters that are valid only when the delivery's delivery destination is an S3 bucket. */ readonly s3DeliveryConfigurations: pulumi.Output; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Create a LogDelivery resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LogDeliveryArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LogDelivery resources. */ export interface LogDeliveryState { /** * ARN of the delivery. */ arn?: pulumi.Input; /** * The ARN of the delivery destination to use for this delivery. */ deliveryDestinationArn?: pulumi.Input; /** * The name of the delivery source to use for this delivery. */ deliverySourceName?: pulumi.Input; /** * The field delimiter to use between record fields when the final output format of a delivery is in `plain`, `w3c`, or `raw` format. */ fieldDelimiter?: pulumi.Input; /** * The list of record fields to be delivered to the destination, in order. The valid field names vary by the `logType` of the delivery source. For a CloudFront `ACCESS_LOGS` source, see [Configure standard logging (v2)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/standard-logging.html#standard-logging-real-time-log-selection) for the supported values. */ recordFields?: pulumi.Input[] | undefined>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Parameters that are valid only when the delivery's delivery destination is an S3 bucket. */ s3DeliveryConfigurations?: pulumi.Input[] | undefined>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } /** * The set of arguments for constructing a LogDelivery resource. */ export interface LogDeliveryArgs { /** * The ARN of the delivery destination to use for this delivery. */ deliveryDestinationArn: pulumi.Input; /** * The name of the delivery source to use for this delivery. */ deliverySourceName: pulumi.Input; /** * The field delimiter to use between record fields when the final output format of a delivery is in `plain`, `w3c`, or `raw` format. */ fieldDelimiter?: pulumi.Input; /** * The list of record fields to be delivered to the destination, in order. The valid field names vary by the `logType` of the delivery source. For a CloudFront `ACCESS_LOGS` source, see [Configure standard logging (v2)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/standard-logging.html#standard-logging-real-time-log-selection) for the supported values. */ recordFields?: pulumi.Input[] | undefined>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Parameters that are valid only when the delivery's delivery destination is an S3 bucket. */ s3DeliveryConfigurations?: pulumi.Input[] | undefined>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=logDelivery.d.ts.map