1. Packages
  2. Timescale Provider
  3. API Docs
  4. LogExporter
timescale 2.3.0 published on Thursday, Jun 12, 2025 by timescale

timescale.LogExporter

Explore with Pulumi AI

timescale logo
timescale 2.3.0 published on Thursday, Jun 12, 2025 by timescale

    Schema for a log exporter.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.timescale.LogExporter;
    import com.pulumi.timescale.LogExporterArgs;
    import com.pulumi.timescale.inputs.LogExporterCloudwatchArgs;
    import com.pulumi.timescale.Service;
    import com.pulumi.timescale.ServiceArgs;
    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) {
            final var config = ctx.config();
            final var tsProjectId = config.get("tsProjectId");
            final var tsAccessKey = config.get("tsAccessKey");
            final var tsSecretKey = config.get("tsSecretKey");
            var myCloudwatchExporterWithRole = new LogExporter("myCloudwatchExporterWithRole", LogExporterArgs.builder()
                .region("us-east-1")
                .cloudwatch(LogExporterCloudwatchArgs.builder()
                    .region("us-east-1")
                    .role_arn("arn:aws:iam::123456789012:role/MyLogsExporterRole")
                    .log_group_name("/myapplication/logs")
                    .log_stream_name("exporter-stream-role")
                    .build())
                .build());
    
            var myCloudwatchExporterWithKeys = new LogExporter("myCloudwatchExporterWithKeys", LogExporterArgs.builder()
                .region("us-east-1")
                .cloudwatch(LogExporterCloudwatchArgs.builder()
                    .region("us-east-1")
                    .access_key("your_access_key_")
                    .secret_key("your_secret_keyxxxxxxxxxxxxxxxxxxxxxxxxx")
                    .log_group_name("/anotherapplication/logs")
                    .log_stream_name("exporter-stream-keys")
                    .build())
                .build());
    
            // Create a service and attach one of the exporters (only 1 log exporter can be attached at the same time)
            var logExporterTest = new Service("logExporterTest", ServiceArgs.builder()
                .milliCpu(1000)
                .memoryGb(4)
                .regionCode("us-east-1")
                .logExporterId(myCloudwatchExporterWithKeys.id())
                .build());
    
        }
    }
    
    configuration:
      tsProjectId:
        type: string
      tsAccessKey:
        type: string
      tsSecretKey:
        type: string
    resources:
      myCloudwatchExporterWithRole:
        type: timescale:LogExporter
        properties:
          region: us-east-1
          cloudwatch:
            region: us-east-1
            role_arn: arn:aws:iam::123456789012:role/MyLogsExporterRole
            log_group_name: /myapplication/logs
            log_stream_name: exporter-stream-role
      myCloudwatchExporterWithKeys:
        type: timescale:LogExporter
        properties:
          region: us-east-1
          cloudwatch:
            region: us-east-1
            access_key: your_access_key_
            secret_key: your_secret_keyxxxxxxxxxxxxxxxxxxxxxxxxx
            log_group_name: /anotherapplication/logs
            log_stream_name: exporter-stream-keys
      # Create a service and attach one of the exporters (only 1 log exporter can be attached at the same time)
      logExporterTest:
        type: timescale:Service
        properties:
          milliCpu: 1000
          memoryGb: 4
          regionCode: us-east-1
          logExporterId: ${myCloudwatchExporterWithKeys.id}
    

    Create LogExporter Resource

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

    Constructor syntax

    new LogExporter(name: string, args: LogExporterArgs, opts?: CustomResourceOptions);
    @overload
    def LogExporter(resource_name: str,
                    args: LogExporterArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogExporter(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    region: Optional[str] = None,
                    cloudwatch: Optional[LogExporterCloudwatchArgs] = None,
                    name: Optional[str] = None)
    func NewLogExporter(ctx *Context, name string, args LogExporterArgs, opts ...ResourceOption) (*LogExporter, error)
    public LogExporter(string name, LogExporterArgs args, CustomResourceOptions? opts = null)
    public LogExporter(String name, LogExporterArgs args)
    public LogExporter(String name, LogExporterArgs args, CustomResourceOptions options)
    
    type: timescale:LogExporter
    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 LogExporterArgs
    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 LogExporterArgs
    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 LogExporterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogExporterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogExporterArgs
    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 logExporterResource = new Timescale.LogExporter("logExporterResource", new()
    {
        Region = "string",
        Cloudwatch = new Timescale.Inputs.LogExporterCloudwatchArgs
        {
            LogGroupName = "string",
            LogStreamName = "string",
            Region = "string",
            AccessKey = "string",
            RoleArn = "string",
            SecretKey = "string",
        },
        Name = "string",
    });
    
    example, err := timescale.NewLogExporter(ctx, "logExporterResource", &timescale.LogExporterArgs{
    	Region: pulumi.String("string"),
    	Cloudwatch: &timescale.LogExporterCloudwatchArgs{
    		LogGroupName:  pulumi.String("string"),
    		LogStreamName: pulumi.String("string"),
    		Region:        pulumi.String("string"),
    		AccessKey:     pulumi.String("string"),
    		RoleArn:       pulumi.String("string"),
    		SecretKey:     pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var logExporterResource = new LogExporter("logExporterResource", LogExporterArgs.builder()
        .region("string")
        .cloudwatch(LogExporterCloudwatchArgs.builder()
            .logGroupName("string")
            .logStreamName("string")
            .region("string")
            .accessKey("string")
            .roleArn("string")
            .secretKey("string")
            .build())
        .name("string")
        .build());
    
    log_exporter_resource = timescale.LogExporter("logExporterResource",
        region="string",
        cloudwatch={
            "log_group_name": "string",
            "log_stream_name": "string",
            "region": "string",
            "access_key": "string",
            "role_arn": "string",
            "secret_key": "string",
        },
        name="string")
    
    const logExporterResource = new timescale.LogExporter("logExporterResource", {
        region: "string",
        cloudwatch: {
            logGroupName: "string",
            logStreamName: "string",
            region: "string",
            accessKey: "string",
            roleArn: "string",
            secretKey: "string",
        },
        name: "string",
    });
    
    type: timescale:LogExporter
    properties:
        cloudwatch:
            accessKey: string
            logGroupName: string
            logStreamName: string
            region: string
            roleArn: string
            secretKey: string
        name: string
        region: string
    

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

    Region string
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    Cloudwatch LogExporterCloudwatch
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    Name string
    Log exporter name.
    Region string
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    Cloudwatch LogExporterCloudwatchArgs
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    Name string
    Log exporter name.
    region String
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    cloudwatch LogExporterCloudwatch
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    name String
    Log exporter name.
    region string
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    cloudwatch LogExporterCloudwatch
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    name string
    Log exporter name.
    region str
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    cloudwatch LogExporterCloudwatchArgs
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    name str
    Log exporter name.
    region String
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    cloudwatch Property Map
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    name String
    Log exporter name.

    Outputs

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

    Created string
    Timestamp of when the log exporter was created (RFC3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    Type of the log exporter. Possible values: cloudwatch.
    Created string
    Timestamp of when the log exporter was created (RFC3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    Type of the log exporter. Possible values: cloudwatch.
    created String
    Timestamp of when the log exporter was created (RFC3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    Type of the log exporter. Possible values: cloudwatch.
    created string
    Timestamp of when the log exporter was created (RFC3339 format).
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    Type of the log exporter. Possible values: cloudwatch.
    created str
    Timestamp of when the log exporter was created (RFC3339 format).
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    Type of the log exporter. Possible values: cloudwatch.
    created String
    Timestamp of when the log exporter was created (RFC3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    Type of the log exporter. Possible values: cloudwatch.

    Look up Existing LogExporter Resource

    Get an existing LogExporter 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?: LogExporterState, opts?: CustomResourceOptions): LogExporter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloudwatch: Optional[LogExporterCloudwatchArgs] = None,
            created: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            type: Optional[str] = None) -> LogExporter
    func GetLogExporter(ctx *Context, name string, id IDInput, state *LogExporterState, opts ...ResourceOption) (*LogExporter, error)
    public static LogExporter Get(string name, Input<string> id, LogExporterState? state, CustomResourceOptions? opts = null)
    public static LogExporter get(String name, Output<String> id, LogExporterState state, CustomResourceOptions options)
    resources:  _:    type: timescale:LogExporter    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.
    The following state arguments are supported:
    Cloudwatch LogExporterCloudwatch
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    Created string
    Timestamp of when the log exporter was created (RFC3339 format).
    Name string
    Log exporter name.
    Region string
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    Type string
    Type of the log exporter. Possible values: cloudwatch.
    Cloudwatch LogExporterCloudwatchArgs
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    Created string
    Timestamp of when the log exporter was created (RFC3339 format).
    Name string
    Log exporter name.
    Region string
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    Type string
    Type of the log exporter. Possible values: cloudwatch.
    cloudwatch LogExporterCloudwatch
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    created String
    Timestamp of when the log exporter was created (RFC3339 format).
    name String
    Log exporter name.
    region String
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    type String
    Type of the log exporter. Possible values: cloudwatch.
    cloudwatch LogExporterCloudwatch
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    created string
    Timestamp of when the log exporter was created (RFC3339 format).
    name string
    Log exporter name.
    region string
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    type string
    Type of the log exporter. Possible values: cloudwatch.
    cloudwatch LogExporterCloudwatchArgs
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    created str
    Timestamp of when the log exporter was created (RFC3339 format).
    name str
    Log exporter name.
    region str
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    type str
    Type of the log exporter. Possible values: cloudwatch.
    cloudwatch Property Map
    Configuration for AWS CloudWatch exporter. Configure authentication using either role_arn or access_key with secret_key.
    created String
    Timestamp of when the log exporter was created (RFC3339 format).
    name String
    Log exporter name.
    region String
    Region where the exporter will be deployed. Only services running in the same region can be attached.
    type String
    Type of the log exporter. Possible values: cloudwatch.

    Supporting Types

    LogExporterCloudwatch, LogExporterCloudwatchArgs

    LogGroupName string
    Name of the CloudWatch Log Group.
    LogStreamName string
    Name of the CloudWatch Log Stream.
    Region string
    AWS region for CloudWatch.
    AccessKey string
    AWS access key ID. If provided, secret_key must also be set, and role_arn must not be set.
    RoleArn string
    ARN of the IAM role to assume for CloudWatch access. If provided, access_key and secret_key must not be set.
    SecretKey string
    AWS secret access key. If provided, access_key must also be set, and role_arn must not be set.
    LogGroupName string
    Name of the CloudWatch Log Group.
    LogStreamName string
    Name of the CloudWatch Log Stream.
    Region string
    AWS region for CloudWatch.
    AccessKey string
    AWS access key ID. If provided, secret_key must also be set, and role_arn must not be set.
    RoleArn string
    ARN of the IAM role to assume for CloudWatch access. If provided, access_key and secret_key must not be set.
    SecretKey string
    AWS secret access key. If provided, access_key must also be set, and role_arn must not be set.
    logGroupName String
    Name of the CloudWatch Log Group.
    logStreamName String
    Name of the CloudWatch Log Stream.
    region String
    AWS region for CloudWatch.
    accessKey String
    AWS access key ID. If provided, secret_key must also be set, and role_arn must not be set.
    roleArn String
    ARN of the IAM role to assume for CloudWatch access. If provided, access_key and secret_key must not be set.
    secretKey String
    AWS secret access key. If provided, access_key must also be set, and role_arn must not be set.
    logGroupName string
    Name of the CloudWatch Log Group.
    logStreamName string
    Name of the CloudWatch Log Stream.
    region string
    AWS region for CloudWatch.
    accessKey string
    AWS access key ID. If provided, secret_key must also be set, and role_arn must not be set.
    roleArn string
    ARN of the IAM role to assume for CloudWatch access. If provided, access_key and secret_key must not be set.
    secretKey string
    AWS secret access key. If provided, access_key must also be set, and role_arn must not be set.
    log_group_name str
    Name of the CloudWatch Log Group.
    log_stream_name str
    Name of the CloudWatch Log Stream.
    region str
    AWS region for CloudWatch.
    access_key str
    AWS access key ID. If provided, secret_key must also be set, and role_arn must not be set.
    role_arn str
    ARN of the IAM role to assume for CloudWatch access. If provided, access_key and secret_key must not be set.
    secret_key str
    AWS secret access key. If provided, access_key must also be set, and role_arn must not be set.
    logGroupName String
    Name of the CloudWatch Log Group.
    logStreamName String
    Name of the CloudWatch Log Stream.
    region String
    AWS region for CloudWatch.
    accessKey String
    AWS access key ID. If provided, secret_key must also be set, and role_arn must not be set.
    roleArn String
    ARN of the IAM role to assume for CloudWatch access. If provided, access_key and secret_key must not be set.
    secretKey String
    AWS secret access key. If provided, access_key must also be set, and role_arn must not be set.

    Package Details

    Repository
    timescale timescale/terraform-provider-timescale
    License
    Notes
    This Pulumi package is based on the timescale Terraform Provider.
    timescale logo
    timescale 2.3.0 published on Thursday, Jun 12, 2025 by timescale