aws.s3.BucketLoggingV2
Explore with Pulumi AI
Provides an S3 bucket (server access) logging resource. For more information, see Logging requests using server access logging in the AWS S3 User Guide.
Note: Amazon S3 supports server access logging, AWS CloudTrail, or a combination of both. Refer to the Logging options for Amazon S3 to decide which method meets your requirements.
This resource cannot be used with S3 directory buckets.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.s3.BucketV2("example", {bucket: "my-tf-example-bucket"});
const exampleBucketAclV2 = new aws.s3.BucketAclV2("example", {
bucket: example.id,
acl: "private",
});
const logBucket = new aws.s3.BucketV2("log_bucket", {bucket: "my-tf-log-bucket"});
const logBucketAcl = new aws.s3.BucketAclV2("log_bucket_acl", {
bucket: logBucket.id,
acl: "log-delivery-write",
});
const exampleBucketLoggingV2 = new aws.s3.BucketLoggingV2("example", {
bucket: example.id,
targetBucket: logBucket.id,
targetPrefix: "log/",
});
import pulumi
import pulumi_aws as aws
example = aws.s3.BucketV2("example", bucket="my-tf-example-bucket")
example_bucket_acl_v2 = aws.s3.BucketAclV2("example",
bucket=example.id,
acl="private")
log_bucket = aws.s3.BucketV2("log_bucket", bucket="my-tf-log-bucket")
log_bucket_acl = aws.s3.BucketAclV2("log_bucket_acl",
bucket=log_bucket.id,
acl="log-delivery-write")
example_bucket_logging_v2 = aws.s3.BucketLoggingV2("example",
bucket=example.id,
target_bucket=log_bucket.id,
target_prefix="log/")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{
Bucket: pulumi.String("my-tf-example-bucket"),
})
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
Bucket: example.ID(),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
logBucket, err := s3.NewBucketV2(ctx, "log_bucket", &s3.BucketV2Args{
Bucket: pulumi.String("my-tf-log-bucket"),
})
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "log_bucket_acl", &s3.BucketAclV2Args{
Bucket: logBucket.ID(),
Acl: pulumi.String("log-delivery-write"),
})
if err != nil {
return err
}
_, err = s3.NewBucketLoggingV2(ctx, "example", &s3.BucketLoggingV2Args{
Bucket: example.ID(),
TargetBucket: logBucket.ID(),
TargetPrefix: pulumi.String("log/"),
})
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.S3.BucketV2("example", new()
{
Bucket = "my-tf-example-bucket",
});
var exampleBucketAclV2 = new Aws.S3.BucketAclV2("example", new()
{
Bucket = example.Id,
Acl = "private",
});
var logBucket = new Aws.S3.BucketV2("log_bucket", new()
{
Bucket = "my-tf-log-bucket",
});
var logBucketAcl = new Aws.S3.BucketAclV2("log_bucket_acl", new()
{
Bucket = logBucket.Id,
Acl = "log-delivery-write",
});
var exampleBucketLoggingV2 = new Aws.S3.BucketLoggingV2("example", new()
{
Bucket = example.Id,
TargetBucket = logBucket.Id,
TargetPrefix = "log/",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
import com.pulumi.aws.s3.BucketLoggingV2;
import com.pulumi.aws.s3.BucketLoggingV2Args;
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 BucketV2("example", BucketV2Args.builder()
.bucket("my-tf-example-bucket")
.build());
var exampleBucketAclV2 = new BucketAclV2("exampleBucketAclV2", BucketAclV2Args.builder()
.bucket(example.id())
.acl("private")
.build());
var logBucket = new BucketV2("logBucket", BucketV2Args.builder()
.bucket("my-tf-log-bucket")
.build());
var logBucketAcl = new BucketAclV2("logBucketAcl", BucketAclV2Args.builder()
.bucket(logBucket.id())
.acl("log-delivery-write")
.build());
var exampleBucketLoggingV2 = new BucketLoggingV2("exampleBucketLoggingV2", BucketLoggingV2Args.builder()
.bucket(example.id())
.targetBucket(logBucket.id())
.targetPrefix("log/")
.build());
}
}
resources:
example:
type: aws:s3:BucketV2
properties:
bucket: my-tf-example-bucket
exampleBucketAclV2:
type: aws:s3:BucketAclV2
name: example
properties:
bucket: ${example.id}
acl: private
logBucket:
type: aws:s3:BucketV2
name: log_bucket
properties:
bucket: my-tf-log-bucket
logBucketAcl:
type: aws:s3:BucketAclV2
name: log_bucket_acl
properties:
bucket: ${logBucket.id}
acl: log-delivery-write
exampleBucketLoggingV2:
type: aws:s3:BucketLoggingV2
name: example
properties:
bucket: ${example.id}
targetBucket: ${logBucket.id}
targetPrefix: log/
Create BucketLoggingV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BucketLoggingV2(name: string, args: BucketLoggingV2Args, opts?: CustomResourceOptions);
@overload
def BucketLoggingV2(resource_name: str,
args: BucketLoggingV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def BucketLoggingV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
target_bucket: Optional[str] = None,
target_prefix: Optional[str] = None,
expected_bucket_owner: Optional[str] = None,
target_grants: Optional[Sequence[BucketLoggingV2TargetGrantArgs]] = None,
target_object_key_format: Optional[BucketLoggingV2TargetObjectKeyFormatArgs] = None)
func NewBucketLoggingV2(ctx *Context, name string, args BucketLoggingV2Args, opts ...ResourceOption) (*BucketLoggingV2, error)
public BucketLoggingV2(string name, BucketLoggingV2Args args, CustomResourceOptions? opts = null)
public BucketLoggingV2(String name, BucketLoggingV2Args args)
public BucketLoggingV2(String name, BucketLoggingV2Args args, CustomResourceOptions options)
type: aws:s3:BucketLoggingV2
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 BucketLoggingV2Args
- 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 BucketLoggingV2Args
- 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 BucketLoggingV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketLoggingV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketLoggingV2Args
- 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 bucketLoggingV2Resource = new Aws.S3.BucketLoggingV2("bucketLoggingV2Resource", new()
{
Bucket = "string",
TargetBucket = "string",
TargetPrefix = "string",
ExpectedBucketOwner = "string",
TargetGrants = new[]
{
new Aws.S3.Inputs.BucketLoggingV2TargetGrantArgs
{
Grantee = new Aws.S3.Inputs.BucketLoggingV2TargetGrantGranteeArgs
{
Type = "string",
DisplayName = "string",
EmailAddress = "string",
Id = "string",
Uri = "string",
},
Permission = "string",
},
},
TargetObjectKeyFormat = new Aws.S3.Inputs.BucketLoggingV2TargetObjectKeyFormatArgs
{
PartitionedPrefix = new Aws.S3.Inputs.BucketLoggingV2TargetObjectKeyFormatPartitionedPrefixArgs
{
PartitionDateSource = "string",
},
SimplePrefix = null,
},
});
example, err := s3.NewBucketLoggingV2(ctx, "bucketLoggingV2Resource", &s3.BucketLoggingV2Args{
Bucket: pulumi.String("string"),
TargetBucket: pulumi.String("string"),
TargetPrefix: pulumi.String("string"),
ExpectedBucketOwner: pulumi.String("string"),
TargetGrants: s3.BucketLoggingV2TargetGrantArray{
&s3.BucketLoggingV2TargetGrantArgs{
Grantee: &s3.BucketLoggingV2TargetGrantGranteeArgs{
Type: pulumi.String("string"),
DisplayName: pulumi.String("string"),
EmailAddress: pulumi.String("string"),
Id: pulumi.String("string"),
Uri: pulumi.String("string"),
},
Permission: pulumi.String("string"),
},
},
TargetObjectKeyFormat: &s3.BucketLoggingV2TargetObjectKeyFormatArgs{
PartitionedPrefix: &s3.BucketLoggingV2TargetObjectKeyFormatPartitionedPrefixArgs{
PartitionDateSource: pulumi.String("string"),
},
SimplePrefix: &s3.BucketLoggingV2TargetObjectKeyFormatSimplePrefixArgs{},
},
})
var bucketLoggingV2Resource = new BucketLoggingV2("bucketLoggingV2Resource", BucketLoggingV2Args.builder()
.bucket("string")
.targetBucket("string")
.targetPrefix("string")
.expectedBucketOwner("string")
.targetGrants(BucketLoggingV2TargetGrantArgs.builder()
.grantee(BucketLoggingV2TargetGrantGranteeArgs.builder()
.type("string")
.displayName("string")
.emailAddress("string")
.id("string")
.uri("string")
.build())
.permission("string")
.build())
.targetObjectKeyFormat(BucketLoggingV2TargetObjectKeyFormatArgs.builder()
.partitionedPrefix(BucketLoggingV2TargetObjectKeyFormatPartitionedPrefixArgs.builder()
.partitionDateSource("string")
.build())
.simplePrefix()
.build())
.build());
bucket_logging_v2_resource = aws.s3.BucketLoggingV2("bucketLoggingV2Resource",
bucket="string",
target_bucket="string",
target_prefix="string",
expected_bucket_owner="string",
target_grants=[{
"grantee": {
"type": "string",
"display_name": "string",
"email_address": "string",
"id": "string",
"uri": "string",
},
"permission": "string",
}],
target_object_key_format={
"partitioned_prefix": {
"partition_date_source": "string",
},
"simple_prefix": {},
})
const bucketLoggingV2Resource = new aws.s3.BucketLoggingV2("bucketLoggingV2Resource", {
bucket: "string",
targetBucket: "string",
targetPrefix: "string",
expectedBucketOwner: "string",
targetGrants: [{
grantee: {
type: "string",
displayName: "string",
emailAddress: "string",
id: "string",
uri: "string",
},
permission: "string",
}],
targetObjectKeyFormat: {
partitionedPrefix: {
partitionDateSource: "string",
},
simplePrefix: {},
},
});
type: aws:s3:BucketLoggingV2
properties:
bucket: string
expectedBucketOwner: string
targetBucket: string
targetGrants:
- grantee:
displayName: string
emailAddress: string
id: string
type: string
uri: string
permission: string
targetObjectKeyFormat:
partitionedPrefix:
partitionDateSource: string
simplePrefix: {}
targetPrefix: string
BucketLoggingV2 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 BucketLoggingV2 resource accepts the following input properties:
- Bucket string
- Name of the bucket.
- Target
Bucket string - Name of the bucket where you want Amazon S3 to store server access logs.
- Target
Prefix string - Prefix for all log object keys.
- Expected
Bucket stringOwner - Account ID of the expected bucket owner.
- Target
Grants List<BucketLogging V2Target Grant> - Set of configuration blocks with information for granting permissions. See below.
- Target
Object BucketKey Format Logging V2Target Object Key Format - Amazon S3 key format for log objects. See below.
- Bucket string
- Name of the bucket.
- Target
Bucket string - Name of the bucket where you want Amazon S3 to store server access logs.
- Target
Prefix string - Prefix for all log object keys.
- Expected
Bucket stringOwner - Account ID of the expected bucket owner.
- Target
Grants []BucketLogging V2Target Grant Args - Set of configuration blocks with information for granting permissions. See below.
- Target
Object BucketKey Format Logging V2Target Object Key Format Args - Amazon S3 key format for log objects. See below.
- bucket String
- Name of the bucket.
- target
Bucket String - Name of the bucket where you want Amazon S3 to store server access logs.
- target
Prefix String - Prefix for all log object keys.
- expected
Bucket StringOwner - Account ID of the expected bucket owner.
- target
Grants List<BucketLogging V2Target Grant> - Set of configuration blocks with information for granting permissions. See below.
- target
Object BucketKey Format Logging V2Target Object Key Format - Amazon S3 key format for log objects. See below.
- bucket string
- Name of the bucket.
- target
Bucket string - Name of the bucket where you want Amazon S3 to store server access logs.
- target
Prefix string - Prefix for all log object keys.
- expected
Bucket stringOwner - Account ID of the expected bucket owner.
- target
Grants BucketLogging V2Target Grant[] - Set of configuration blocks with information for granting permissions. See below.
- target
Object BucketKey Format Logging V2Target Object Key Format - Amazon S3 key format for log objects. See below.
- bucket str
- Name of the bucket.
- target_
bucket str - Name of the bucket where you want Amazon S3 to store server access logs.
- target_
prefix str - Prefix for all log object keys.
- expected_
bucket_ strowner - Account ID of the expected bucket owner.
- target_
grants Sequence[BucketLogging V2Target Grant Args] - Set of configuration blocks with information for granting permissions. See below.
- target_
object_ Bucketkey_ format Logging V2Target Object Key Format Args - Amazon S3 key format for log objects. See below.
- bucket String
- Name of the bucket.
- target
Bucket String - Name of the bucket where you want Amazon S3 to store server access logs.
- target
Prefix String - Prefix for all log object keys.
- expected
Bucket StringOwner - Account ID of the expected bucket owner.
- target
Grants List<Property Map> - Set of configuration blocks with information for granting permissions. See below.
- target
Object Property MapKey Format - Amazon S3 key format for log objects. See below.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketLoggingV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BucketLoggingV2 Resource
Get an existing BucketLoggingV2 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?: BucketLoggingV2State, opts?: CustomResourceOptions): BucketLoggingV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
expected_bucket_owner: Optional[str] = None,
target_bucket: Optional[str] = None,
target_grants: Optional[Sequence[BucketLoggingV2TargetGrantArgs]] = None,
target_object_key_format: Optional[BucketLoggingV2TargetObjectKeyFormatArgs] = None,
target_prefix: Optional[str] = None) -> BucketLoggingV2
func GetBucketLoggingV2(ctx *Context, name string, id IDInput, state *BucketLoggingV2State, opts ...ResourceOption) (*BucketLoggingV2, error)
public static BucketLoggingV2 Get(string name, Input<string> id, BucketLoggingV2State? state, CustomResourceOptions? opts = null)
public static BucketLoggingV2 get(String name, Output<String> id, BucketLoggingV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Bucket string
- Name of the bucket.
- Expected
Bucket stringOwner - Account ID of the expected bucket owner.
- Target
Bucket string - Name of the bucket where you want Amazon S3 to store server access logs.
- Target
Grants List<BucketLogging V2Target Grant> - Set of configuration blocks with information for granting permissions. See below.
- Target
Object BucketKey Format Logging V2Target Object Key Format - Amazon S3 key format for log objects. See below.
- Target
Prefix string - Prefix for all log object keys.
- Bucket string
- Name of the bucket.
- Expected
Bucket stringOwner - Account ID of the expected bucket owner.
- Target
Bucket string - Name of the bucket where you want Amazon S3 to store server access logs.
- Target
Grants []BucketLogging V2Target Grant Args - Set of configuration blocks with information for granting permissions. See below.
- Target
Object BucketKey Format Logging V2Target Object Key Format Args - Amazon S3 key format for log objects. See below.
- Target
Prefix string - Prefix for all log object keys.
- bucket String
- Name of the bucket.
- expected
Bucket StringOwner - Account ID of the expected bucket owner.
- target
Bucket String - Name of the bucket where you want Amazon S3 to store server access logs.
- target
Grants List<BucketLogging V2Target Grant> - Set of configuration blocks with information for granting permissions. See below.
- target
Object BucketKey Format Logging V2Target Object Key Format - Amazon S3 key format for log objects. See below.
- target
Prefix String - Prefix for all log object keys.
- bucket string
- Name of the bucket.
- expected
Bucket stringOwner - Account ID of the expected bucket owner.
- target
Bucket string - Name of the bucket where you want Amazon S3 to store server access logs.
- target
Grants BucketLogging V2Target Grant[] - Set of configuration blocks with information for granting permissions. See below.
- target
Object BucketKey Format Logging V2Target Object Key Format - Amazon S3 key format for log objects. See below.
- target
Prefix string - Prefix for all log object keys.
- bucket str
- Name of the bucket.
- expected_
bucket_ strowner - Account ID of the expected bucket owner.
- target_
bucket str - Name of the bucket where you want Amazon S3 to store server access logs.
- target_
grants Sequence[BucketLogging V2Target Grant Args] - Set of configuration blocks with information for granting permissions. See below.
- target_
object_ Bucketkey_ format Logging V2Target Object Key Format Args - Amazon S3 key format for log objects. See below.
- target_
prefix str - Prefix for all log object keys.
- bucket String
- Name of the bucket.
- expected
Bucket StringOwner - Account ID of the expected bucket owner.
- target
Bucket String - Name of the bucket where you want Amazon S3 to store server access logs.
- target
Grants List<Property Map> - Set of configuration blocks with information for granting permissions. See below.
- target
Object Property MapKey Format - Amazon S3 key format for log objects. See below.
- target
Prefix String - Prefix for all log object keys.
Supporting Types
BucketLoggingV2TargetGrant, BucketLoggingV2TargetGrantArgs
- Grantee
Bucket
Logging V2Target Grant Grantee - Configuration block for the person being granted permissions. See below.
- Permission string
- Logging permissions assigned to the grantee for the bucket. Valid values:
FULL_CONTROL
,READ
,WRITE
.
- Grantee
Bucket
Logging V2Target Grant Grantee - Configuration block for the person being granted permissions. See below.
- Permission string
- Logging permissions assigned to the grantee for the bucket. Valid values:
FULL_CONTROL
,READ
,WRITE
.
- grantee
Bucket
Logging V2Target Grant Grantee - Configuration block for the person being granted permissions. See below.
- permission String
- Logging permissions assigned to the grantee for the bucket. Valid values:
FULL_CONTROL
,READ
,WRITE
.
- grantee
Bucket
Logging V2Target Grant Grantee - Configuration block for the person being granted permissions. See below.
- permission string
- Logging permissions assigned to the grantee for the bucket. Valid values:
FULL_CONTROL
,READ
,WRITE
.
- grantee
Bucket
Logging V2Target Grant Grantee - Configuration block for the person being granted permissions. See below.
- permission str
- Logging permissions assigned to the grantee for the bucket. Valid values:
FULL_CONTROL
,READ
,WRITE
.
- grantee Property Map
- Configuration block for the person being granted permissions. See below.
- permission String
- Logging permissions assigned to the grantee for the bucket. Valid values:
FULL_CONTROL
,READ
,WRITE
.
BucketLoggingV2TargetGrantGrantee, BucketLoggingV2TargetGrantGranteeArgs
- Type string
- Type of grantee. Valid values:
CanonicalUser
,AmazonCustomerByEmail
,Group
. - Display
Name string - Email
Address string - Email address of the grantee. See Regions and Endpoints for supported AWS regions where this argument can be specified.
- Id string
- Canonical user ID of the grantee.
- Uri string
- URI of the grantee group.
- Type string
- Type of grantee. Valid values:
CanonicalUser
,AmazonCustomerByEmail
,Group
. - Display
Name string - Email
Address string - Email address of the grantee. See Regions and Endpoints for supported AWS regions where this argument can be specified.
- Id string
- Canonical user ID of the grantee.
- Uri string
- URI of the grantee group.
- type String
- Type of grantee. Valid values:
CanonicalUser
,AmazonCustomerByEmail
,Group
. - display
Name String - email
Address String - Email address of the grantee. See Regions and Endpoints for supported AWS regions where this argument can be specified.
- id String
- Canonical user ID of the grantee.
- uri String
- URI of the grantee group.
- type string
- Type of grantee. Valid values:
CanonicalUser
,AmazonCustomerByEmail
,Group
. - display
Name string - email
Address string - Email address of the grantee. See Regions and Endpoints for supported AWS regions where this argument can be specified.
- id string
- Canonical user ID of the grantee.
- uri string
- URI of the grantee group.
- type str
- Type of grantee. Valid values:
CanonicalUser
,AmazonCustomerByEmail
,Group
. - display_
name str - email_
address str - Email address of the grantee. See Regions and Endpoints for supported AWS regions where this argument can be specified.
- id str
- Canonical user ID of the grantee.
- uri str
- URI of the grantee group.
- type String
- Type of grantee. Valid values:
CanonicalUser
,AmazonCustomerByEmail
,Group
. - display
Name String - email
Address String - Email address of the grantee. See Regions and Endpoints for supported AWS regions where this argument can be specified.
- id String
- Canonical user ID of the grantee.
- uri String
- URI of the grantee group.
BucketLoggingV2TargetObjectKeyFormat, BucketLoggingV2TargetObjectKeyFormatArgs
- Partitioned
Prefix BucketLogging V2Target Object Key Format Partitioned Prefix - Partitioned S3 key for log objects. See below.
- Simple
Prefix BucketLogging V2Target Object Key Format Simple Prefix - Use the simple format for S3 keys for log objects. To use, set
simple_prefix {}
.
- Partitioned
Prefix BucketLogging V2Target Object Key Format Partitioned Prefix - Partitioned S3 key for log objects. See below.
- Simple
Prefix BucketLogging V2Target Object Key Format Simple Prefix - Use the simple format for S3 keys for log objects. To use, set
simple_prefix {}
.
- partitioned
Prefix BucketLogging V2Target Object Key Format Partitioned Prefix - Partitioned S3 key for log objects. See below.
- simple
Prefix BucketLogging V2Target Object Key Format Simple Prefix - Use the simple format for S3 keys for log objects. To use, set
simple_prefix {}
.
- partitioned
Prefix BucketLogging V2Target Object Key Format Partitioned Prefix - Partitioned S3 key for log objects. See below.
- simple
Prefix BucketLogging V2Target Object Key Format Simple Prefix - Use the simple format for S3 keys for log objects. To use, set
simple_prefix {}
.
- partitioned_
prefix BucketLogging V2Target Object Key Format Partitioned Prefix - Partitioned S3 key for log objects. See below.
- simple_
prefix BucketLogging V2Target Object Key Format Simple Prefix - Use the simple format for S3 keys for log objects. To use, set
simple_prefix {}
.
- partitioned
Prefix Property Map - Partitioned S3 key for log objects. See below.
- simple
Prefix Property Map - Use the simple format for S3 keys for log objects. To use, set
simple_prefix {}
.
BucketLoggingV2TargetObjectKeyFormatPartitionedPrefix, BucketLoggingV2TargetObjectKeyFormatPartitionedPrefixArgs
- Partition
Date stringSource - Specifies the partition date source for the partitioned prefix. Valid values:
EventTime
,DeliveryTime
.
- Partition
Date stringSource - Specifies the partition date source for the partitioned prefix. Valid values:
EventTime
,DeliveryTime
.
- partition
Date StringSource - Specifies the partition date source for the partitioned prefix. Valid values:
EventTime
,DeliveryTime
.
- partition
Date stringSource - Specifies the partition date source for the partitioned prefix. Valid values:
EventTime
,DeliveryTime
.
- partition_
date_ strsource - Specifies the partition date source for the partitioned prefix. Valid values:
EventTime
,DeliveryTime
.
- partition
Date StringSource - Specifies the partition date source for the partitioned prefix. Valid values:
EventTime
,DeliveryTime
.
Import
If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the bucket
and expected_bucket_owner
separated by a comma (,
):
Using pulumi import
to import S3 bucket logging using the bucket
or using the bucket
and expected_bucket_owner
separated by a comma (,
). For example:
If the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, import using the bucket
:
$ pulumi import aws:s3/bucketLoggingV2:BucketLoggingV2 example bucket-name
If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the bucket
and expected_bucket_owner
separated by a comma (,
):
$ pulumi import aws:s3/bucketLoggingV2:BucketLoggingV2 example bucket-name,123456789012
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.