1. Packages
  2. Logzio Provider
  3. API Docs
  4. S3Fetcher
logzio 1.17.1 published on Monday, Apr 14, 2025 by logzio

logzio.S3Fetcher

Explore with Pulumi AI

logzio logo
logzio 1.17.1 published on Monday, Apr 14, 2025 by logzio

    # S3 Fetcher Provider

    Provides a Logz.io S3 Fetcher resource. This can be used to create and manage S3 Fetcher instances, that retrieve logs stored in AWS S3 Buckets.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as logzio from "@pulumi/logzio";
    
    const myS3FetcherKeys = new logzio.S3Fetcher("myS3FetcherKeys", {
        active: true,
        addS3ObjectKeyAsLogField: false,
        awsAccessKey: "my_access_key",
        awsRegion: "EU_WEST_3",
        awsSecretKey: "my_secret_key",
        bucketName: "my_bucket",
        logsType: "S3Access",
    });
    const myS3FetcherArn = new logzio.S3Fetcher("myS3FetcherArn", {
        active: true,
        addS3ObjectKeyAsLogField: false,
        awsArn: "my_arn",
        awsRegion: "AP_SOUTHEAST_2",
        bucketName: "my_bucket",
        logsType: "cloudfront",
    });
    
    import pulumi
    import pulumi_logzio as logzio
    
    my_s3_fetcher_keys = logzio.S3Fetcher("myS3FetcherKeys",
        active=True,
        add_s3_object_key_as_log_field=False,
        aws_access_key="my_access_key",
        aws_region="EU_WEST_3",
        aws_secret_key="my_secret_key",
        bucket_name="my_bucket",
        logs_type="S3Access")
    my_s3_fetcher_arn = logzio.S3Fetcher("myS3FetcherArn",
        active=True,
        add_s3_object_key_as_log_field=False,
        aws_arn="my_arn",
        aws_region="AP_SOUTHEAST_2",
        bucket_name="my_bucket",
        logs_type="cloudfront")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := logzio.NewS3Fetcher(ctx, "myS3FetcherKeys", &logzio.S3FetcherArgs{
    			Active:                   pulumi.Bool(true),
    			AddS3ObjectKeyAsLogField: pulumi.Bool(false),
    			AwsAccessKey:             pulumi.String("my_access_key"),
    			AwsRegion:                pulumi.String("EU_WEST_3"),
    			AwsSecretKey:             pulumi.String("my_secret_key"),
    			BucketName:               pulumi.String("my_bucket"),
    			LogsType:                 pulumi.String("S3Access"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = logzio.NewS3Fetcher(ctx, "myS3FetcherArn", &logzio.S3FetcherArgs{
    			Active:                   pulumi.Bool(true),
    			AddS3ObjectKeyAsLogField: pulumi.Bool(false),
    			AwsArn:                   pulumi.String("my_arn"),
    			AwsRegion:                pulumi.String("AP_SOUTHEAST_2"),
    			BucketName:               pulumi.String("my_bucket"),
    			LogsType:                 pulumi.String("cloudfront"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        var myS3FetcherKeys = new Logzio.S3Fetcher("myS3FetcherKeys", new()
        {
            Active = true,
            AddS3ObjectKeyAsLogField = false,
            AwsAccessKey = "my_access_key",
            AwsRegion = "EU_WEST_3",
            AwsSecretKey = "my_secret_key",
            BucketName = "my_bucket",
            LogsType = "S3Access",
        });
    
        var myS3FetcherArn = new Logzio.S3Fetcher("myS3FetcherArn", new()
        {
            Active = true,
            AddS3ObjectKeyAsLogField = false,
            AwsArn = "my_arn",
            AwsRegion = "AP_SOUTHEAST_2",
            BucketName = "my_bucket",
            LogsType = "cloudfront",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logzio.S3Fetcher;
    import com.pulumi.logzio.S3FetcherArgs;
    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 myS3FetcherKeys = new S3Fetcher("myS3FetcherKeys", S3FetcherArgs.builder()
                .active(true)
                .addS3ObjectKeyAsLogField(false)
                .awsAccessKey("my_access_key")
                .awsRegion("EU_WEST_3")
                .awsSecretKey("my_secret_key")
                .bucketName("my_bucket")
                .logsType("S3Access")
                .build());
    
            var myS3FetcherArn = new S3Fetcher("myS3FetcherArn", S3FetcherArgs.builder()
                .active(true)
                .addS3ObjectKeyAsLogField(false)
                .awsArn("my_arn")
                .awsRegion("AP_SOUTHEAST_2")
                .bucketName("my_bucket")
                .logsType("cloudfront")
                .build());
    
        }
    }
    
    resources:
      myS3FetcherKeys:
        type: logzio:S3Fetcher
        properties:
          active: true
          addS3ObjectKeyAsLogField: false
          awsAccessKey: my_access_key
          awsRegion: EU_WEST_3
          awsSecretKey: my_secret_key
          bucketName: my_bucket
          logsType: S3Access
      myS3FetcherArn:
        type: logzio:S3Fetcher
        properties:
          active: true
          addS3ObjectKeyAsLogField: false
          awsArn: my_arn
          awsRegion: AP_SOUTHEAST_2
          bucketName: my_bucket
          logsType: cloudfront
    

    Create S3Fetcher Resource

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

    Constructor syntax

    new S3Fetcher(name: string, args: S3FetcherArgs, opts?: CustomResourceOptions);
    @overload
    def S3Fetcher(resource_name: str,
                  args: S3FetcherArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def S3Fetcher(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  active: Optional[bool] = None,
                  aws_region: Optional[str] = None,
                  bucket_name: Optional[str] = None,
                  logs_type: Optional[str] = None,
                  add_s3_object_key_as_log_field: Optional[bool] = None,
                  aws_access_key: Optional[str] = None,
                  aws_arn: Optional[str] = None,
                  aws_secret_key: Optional[str] = None,
                  prefix: Optional[str] = None,
                  s3_fetcher_id: Optional[str] = None)
    func NewS3Fetcher(ctx *Context, name string, args S3FetcherArgs, opts ...ResourceOption) (*S3Fetcher, error)
    public S3Fetcher(string name, S3FetcherArgs args, CustomResourceOptions? opts = null)
    public S3Fetcher(String name, S3FetcherArgs args)
    public S3Fetcher(String name, S3FetcherArgs args, CustomResourceOptions options)
    
    type: logzio:S3Fetcher
    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 S3FetcherArgs
    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 S3FetcherArgs
    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 S3FetcherArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args S3FetcherArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args S3FetcherArgs
    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 s3fetcherResource = new Logzio.S3Fetcher("s3fetcherResource", new()
    {
        Active = false,
        AwsRegion = "string",
        BucketName = "string",
        LogsType = "string",
        AddS3ObjectKeyAsLogField = false,
        AwsAccessKey = "string",
        AwsArn = "string",
        AwsSecretKey = "string",
        Prefix = "string",
        S3FetcherId = "string",
    });
    
    example, err := logzio.NewS3Fetcher(ctx, "s3fetcherResource", &logzio.S3FetcherArgs{
    	Active:                   pulumi.Bool(false),
    	AwsRegion:                pulumi.String("string"),
    	BucketName:               pulumi.String("string"),
    	LogsType:                 pulumi.String("string"),
    	AddS3ObjectKeyAsLogField: pulumi.Bool(false),
    	AwsAccessKey:             pulumi.String("string"),
    	AwsArn:                   pulumi.String("string"),
    	AwsSecretKey:             pulumi.String("string"),
    	Prefix:                   pulumi.String("string"),
    	S3FetcherId:              pulumi.String("string"),
    })
    
    var s3fetcherResource = new S3Fetcher("s3fetcherResource", S3FetcherArgs.builder()
        .active(false)
        .awsRegion("string")
        .bucketName("string")
        .logsType("string")
        .addS3ObjectKeyAsLogField(false)
        .awsAccessKey("string")
        .awsArn("string")
        .awsSecretKey("string")
        .prefix("string")
        .s3FetcherId("string")
        .build());
    
    s3fetcher_resource = logzio.S3Fetcher("s3fetcherResource",
        active=False,
        aws_region="string",
        bucket_name="string",
        logs_type="string",
        add_s3_object_key_as_log_field=False,
        aws_access_key="string",
        aws_arn="string",
        aws_secret_key="string",
        prefix="string",
        s3_fetcher_id="string")
    
    const s3fetcherResource = new logzio.S3Fetcher("s3fetcherResource", {
        active: false,
        awsRegion: "string",
        bucketName: "string",
        logsType: "string",
        addS3ObjectKeyAsLogField: false,
        awsAccessKey: "string",
        awsArn: "string",
        awsSecretKey: "string",
        prefix: "string",
        s3FetcherId: "string",
    });
    
    type: logzio:S3Fetcher
    properties:
        active: false
        addS3ObjectKeyAsLogField: false
        awsAccessKey: string
        awsArn: string
        awsRegion: string
        awsSecretKey: string
        bucketName: string
        logsType: string
        prefix: string
        s3FetcherId: string
    

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

    active Boolean
    awsRegion String
    bucketName String
    logsType String
    addS3ObjectKeyAsLogField Boolean
    awsAccessKey String
    awsArn String
    awsSecretKey String
    prefix String
    s3FetcherId String
    active boolean
    awsRegion string
    bucketName string
    logsType string
    addS3ObjectKeyAsLogField boolean
    awsAccessKey string
    awsArn string
    awsSecretKey string
    prefix string
    s3FetcherId string
    active Boolean
    awsRegion String
    bucketName String
    logsType String
    addS3ObjectKeyAsLogField Boolean
    awsAccessKey String
    awsArn String
    awsSecretKey String
    prefix String
    s3FetcherId String

    Outputs

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

    FetcherId double
    (Int) Id of the created fetcher.
    Id string
    The provider-assigned unique ID for this managed resource.
    FetcherId float64
    (Int) Id of the created fetcher.
    Id string
    The provider-assigned unique ID for this managed resource.
    fetcherId Double
    (Int) Id of the created fetcher.
    id String
    The provider-assigned unique ID for this managed resource.
    fetcherId number
    (Int) Id of the created fetcher.
    id string
    The provider-assigned unique ID for this managed resource.
    fetcher_id float
    (Int) Id of the created fetcher.
    id str
    The provider-assigned unique ID for this managed resource.
    fetcherId Number
    (Int) Id of the created fetcher.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing S3Fetcher Resource

    Get an existing S3Fetcher 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?: S3FetcherState, opts?: CustomResourceOptions): S3Fetcher
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            add_s3_object_key_as_log_field: Optional[bool] = None,
            aws_access_key: Optional[str] = None,
            aws_arn: Optional[str] = None,
            aws_region: Optional[str] = None,
            aws_secret_key: Optional[str] = None,
            bucket_name: Optional[str] = None,
            fetcher_id: Optional[float] = None,
            logs_type: Optional[str] = None,
            prefix: Optional[str] = None,
            s3_fetcher_id: Optional[str] = None) -> S3Fetcher
    func GetS3Fetcher(ctx *Context, name string, id IDInput, state *S3FetcherState, opts ...ResourceOption) (*S3Fetcher, error)
    public static S3Fetcher Get(string name, Input<string> id, S3FetcherState? state, CustomResourceOptions? opts = null)
    public static S3Fetcher get(String name, Output<String> id, S3FetcherState state, CustomResourceOptions options)
    resources:  _:    type: logzio:S3Fetcher    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:
    Active bool
    AddS3ObjectKeyAsLogField bool
    AwsAccessKey string
    AwsArn string
    AwsRegion string
    AwsSecretKey string
    BucketName string
    FetcherId double
    (Int) Id of the created fetcher.
    LogsType string
    Prefix string
    S3FetcherId string
    Active bool
    AddS3ObjectKeyAsLogField bool
    AwsAccessKey string
    AwsArn string
    AwsRegion string
    AwsSecretKey string
    BucketName string
    FetcherId float64
    (Int) Id of the created fetcher.
    LogsType string
    Prefix string
    S3FetcherId string
    active Boolean
    addS3ObjectKeyAsLogField Boolean
    awsAccessKey String
    awsArn String
    awsRegion String
    awsSecretKey String
    bucketName String
    fetcherId Double
    (Int) Id of the created fetcher.
    logsType String
    prefix String
    s3FetcherId String
    active boolean
    addS3ObjectKeyAsLogField boolean
    awsAccessKey string
    awsArn string
    awsRegion string
    awsSecretKey string
    bucketName string
    fetcherId number
    (Int) Id of the created fetcher.
    logsType string
    prefix string
    s3FetcherId string
    active Boolean
    addS3ObjectKeyAsLogField Boolean
    awsAccessKey String
    awsArn String
    awsRegion String
    awsSecretKey String
    bucketName String
    fetcherId Number
    (Int) Id of the created fetcher.
    logsType String
    prefix String
    s3FetcherId String

    Package Details

    Repository
    logzio logzio/terraform-provider-logzio
    License
    Notes
    This Pulumi package is based on the logzio Terraform Provider.
    logzio logo
    logzio 1.17.1 published on Monday, Apr 14, 2025 by logzio