1. Packages
  2. AWS
  3. API Docs
  4. s3
  5. getObject
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.s3.getObject

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    The S3 object data source allows access to the metadata and optionally (see below) content of an object stored inside S3 bucket.

    Note: The content of an object (body field) is available only for objects which have a human-readable Content-Type:

    • text/*
    • application/json
    • application/ld+json
    • application/x-httpd-php
    • application/xhtml+xml
    • application/x-csh
    • application/x-sh
    • application/xml
    • application/atom+xml
    • application/x-sql

    This is to prevent printing unsafe characters and potentially downloading large amount of data which would be thrown away in favor of metadata.

    Example Usage

    The following example retrieves a text object (which must have a Content-Type value starting with text/) and uses it as the user_data for an EC2 instance:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const bootstrapScript = aws.s3.getObject({
        bucket: "ourcorp-deploy-config",
        key: "ec2-bootstrap-script.sh",
    });
    const example = new aws.ec2.Instance("example", {
        instanceType: aws.ec2.InstanceType.T2_Micro,
        ami: "ami-2757f631",
        userData: bootstrapScript.then(bootstrapScript => bootstrapScript.body),
    });
    
    import pulumi
    import pulumi_aws as aws
    
    bootstrap_script = aws.s3.get_object(bucket="ourcorp-deploy-config",
        key="ec2-bootstrap-script.sh")
    example = aws.ec2.Instance("example",
        instance_type=aws.ec2.InstanceType.T2_MICRO,
        ami="ami-2757f631",
        user_data=bootstrap_script.body)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"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 {
    		bootstrapScript, err := s3.GetObject(ctx, &s3.GetObjectArgs{
    			Bucket: "ourcorp-deploy-config",
    			Key:    "ec2-bootstrap-script.sh",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewInstance(ctx, "example", &ec2.InstanceArgs{
    			InstanceType: pulumi.String(ec2.InstanceType_T2_Micro),
    			Ami:          pulumi.String("ami-2757f631"),
    			UserData:     pulumi.String(bootstrapScript.Body),
    		})
    		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 bootstrapScript = Aws.S3.GetObject.Invoke(new()
        {
            Bucket = "ourcorp-deploy-config",
            Key = "ec2-bootstrap-script.sh",
        });
    
        var example = new Aws.Ec2.Instance("example", new()
        {
            InstanceType = Aws.Ec2.InstanceType.T2_Micro,
            Ami = "ami-2757f631",
            UserData = bootstrapScript.Apply(getObjectResult => getObjectResult.Body),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.s3.S3Functions;
    import com.pulumi.aws.s3.inputs.GetObjectArgs;
    import com.pulumi.aws.ec2.Instance;
    import com.pulumi.aws.ec2.InstanceArgs;
    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 bootstrapScript = S3Functions.getObject(GetObjectArgs.builder()
                .bucket("ourcorp-deploy-config")
                .key("ec2-bootstrap-script.sh")
                .build());
    
            var example = new Instance("example", InstanceArgs.builder()
                .instanceType("t2.micro")
                .ami("ami-2757f631")
                .userData(bootstrapScript.applyValue(getObjectResult -> getObjectResult.body()))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:Instance
        properties:
          instanceType: t2.micro
          ami: ami-2757f631
          userData: ${bootstrapScript.body}
    variables:
      bootstrapScript:
        fn::invoke:
          Function: aws:s3:getObject
          Arguments:
            bucket: ourcorp-deploy-config
            key: ec2-bootstrap-script.sh
    

    The following, more-complex example retrieves only the metadata for a zip file stored in S3, which is then used to pass the most recent version_id to AWS Lambda for use as a function implementation. More information about Lambda functions is available in the documentation for aws.lambda.Function.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const lambda = aws.s3.getObject({
        bucket: "ourcorp-lambda-functions",
        key: "hello-world.zip",
    });
    const testLambda = new aws.lambda.Function("test_lambda", {
        s3Bucket: lambda.then(lambda => lambda.bucket),
        s3Key: lambda.then(lambda => lambda.key),
        s3ObjectVersion: lambda.then(lambda => lambda.versionId),
        name: "lambda_function_name",
        role: iamForLambda.arn,
        handler: "exports.test",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    lambda_ = aws.s3.get_object(bucket="ourcorp-lambda-functions",
        key="hello-world.zip")
    test_lambda = aws.lambda_.Function("test_lambda",
        s3_bucket=lambda_.bucket,
        s3_key=lambda_.key,
        s3_object_version=lambda_.version_id,
        name="lambda_function_name",
        role=iam_for_lambda["arn"],
        handler="exports.test")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
    	"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 {
    		lambda, err := s3.GetObject(ctx, &s3.GetObjectArgs{
    			Bucket: "ourcorp-lambda-functions",
    			Key:    "hello-world.zip",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = lambda.NewFunction(ctx, "test_lambda", &lambda.FunctionArgs{
    			S3Bucket:        pulumi.String(lambda.Bucket),
    			S3Key:           pulumi.String(lambda.Key),
    			S3ObjectVersion: pulumi.String(lambda.VersionId),
    			Name:            pulumi.String("lambda_function_name"),
    			Role:            pulumi.Any(iamForLambda.Arn),
    			Handler:         pulumi.String("exports.test"),
    		})
    		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 lambda = Aws.S3.GetObject.Invoke(new()
        {
            Bucket = "ourcorp-lambda-functions",
            Key = "hello-world.zip",
        });
    
        var testLambda = new Aws.Lambda.Function("test_lambda", new()
        {
            S3Bucket = lambda.Apply(getObjectResult => getObjectResult.Bucket),
            S3Key = lambda.Apply(getObjectResult => getObjectResult.Key),
            S3ObjectVersion = lambda.Apply(getObjectResult => getObjectResult.VersionId),
            Name = "lambda_function_name",
            Role = iamForLambda.Arn,
            Handler = "exports.test",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.s3.S3Functions;
    import com.pulumi.aws.s3.inputs.GetObjectArgs;
    import com.pulumi.aws.lambda.Function;
    import com.pulumi.aws.lambda.FunctionArgs;
    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 lambda = S3Functions.getObject(GetObjectArgs.builder()
                .bucket("ourcorp-lambda-functions")
                .key("hello-world.zip")
                .build());
    
            var testLambda = new Function("testLambda", FunctionArgs.builder()
                .s3Bucket(lambda.applyValue(getObjectResult -> getObjectResult.bucket()))
                .s3Key(lambda.applyValue(getObjectResult -> getObjectResult.key()))
                .s3ObjectVersion(lambda.applyValue(getObjectResult -> getObjectResult.versionId()))
                .name("lambda_function_name")
                .role(iamForLambda.arn())
                .handler("exports.test")
                .build());
    
        }
    }
    
    resources:
      testLambda:
        type: aws:lambda:Function
        name: test_lambda
        properties:
          s3Bucket: ${lambda.bucket}
          s3Key: ${lambda.key}
          s3ObjectVersion: ${lambda.versionId}
          name: lambda_function_name
          role: ${iamForLambda.arn}
          handler: exports.test
    variables:
      lambda:
        fn::invoke:
          Function: aws:s3:getObject
          Arguments:
            bucket: ourcorp-lambda-functions
            key: hello-world.zip
    

    Using getObject

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getObject(args: GetObjectArgs, opts?: InvokeOptions): Promise<GetObjectResult>
    function getObjectOutput(args: GetObjectOutputArgs, opts?: InvokeOptions): Output<GetObjectResult>
    def get_object(bucket: Optional[str] = None,
                   checksum_mode: Optional[str] = None,
                   key: Optional[str] = None,
                   range: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   version_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetObjectResult
    def get_object_output(bucket: Optional[pulumi.Input[str]] = None,
                   checksum_mode: Optional[pulumi.Input[str]] = None,
                   key: Optional[pulumi.Input[str]] = None,
                   range: Optional[pulumi.Input[str]] = None,
                   tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                   version_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetObjectResult]
    func GetObject(ctx *Context, args *GetObjectArgs, opts ...InvokeOption) (*GetObjectResult, error)
    func GetObjectOutput(ctx *Context, args *GetObjectOutputArgs, opts ...InvokeOption) GetObjectResultOutput

    > Note: This function is named GetObject in the Go SDK.

    public static class GetObject 
    {
        public static Task<GetObjectResult> InvokeAsync(GetObjectArgs args, InvokeOptions? opts = null)
        public static Output<GetObjectResult> Invoke(GetObjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetObjectResult> getObject(GetObjectArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:s3/getObject:getObject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bucket string
    Name of the bucket to read the object from. Alternatively, an S3 access point ARN can be specified
    Key string
    Full path to the object inside the bucket
    ChecksumMode string
    To retrieve the object's checksum, this argument must be ENABLED. If you enable checksum_mode and the object is encrypted with KMS, you must have permission to use the kms:Decrypt action. Valid values: ENABLED
    Range string
    Tags Dictionary<string, string>
    Map of tags assigned to the object.
    VersionId string
    Specific version ID of the object returned (defaults to latest version)
    Bucket string
    Name of the bucket to read the object from. Alternatively, an S3 access point ARN can be specified
    Key string
    Full path to the object inside the bucket
    ChecksumMode string
    To retrieve the object's checksum, this argument must be ENABLED. If you enable checksum_mode and the object is encrypted with KMS, you must have permission to use the kms:Decrypt action. Valid values: ENABLED
    Range string
    Tags map[string]string
    Map of tags assigned to the object.
    VersionId string
    Specific version ID of the object returned (defaults to latest version)
    bucket String
    Name of the bucket to read the object from. Alternatively, an S3 access point ARN can be specified
    key String
    Full path to the object inside the bucket
    checksumMode String
    To retrieve the object's checksum, this argument must be ENABLED. If you enable checksum_mode and the object is encrypted with KMS, you must have permission to use the kms:Decrypt action. Valid values: ENABLED
    range String
    tags Map<String,String>
    Map of tags assigned to the object.
    versionId String
    Specific version ID of the object returned (defaults to latest version)
    bucket string
    Name of the bucket to read the object from. Alternatively, an S3 access point ARN can be specified
    key string
    Full path to the object inside the bucket
    checksumMode string
    To retrieve the object's checksum, this argument must be ENABLED. If you enable checksum_mode and the object is encrypted with KMS, you must have permission to use the kms:Decrypt action. Valid values: ENABLED
    range string
    tags {[key: string]: string}
    Map of tags assigned to the object.
    versionId string
    Specific version ID of the object returned (defaults to latest version)
    bucket str
    Name of the bucket to read the object from. Alternatively, an S3 access point ARN can be specified
    key str
    Full path to the object inside the bucket
    checksum_mode str
    To retrieve the object's checksum, this argument must be ENABLED. If you enable checksum_mode and the object is encrypted with KMS, you must have permission to use the kms:Decrypt action. Valid values: ENABLED
    range str
    tags Mapping[str, str]
    Map of tags assigned to the object.
    version_id str
    Specific version ID of the object returned (defaults to latest version)
    bucket String
    Name of the bucket to read the object from. Alternatively, an S3 access point ARN can be specified
    key String
    Full path to the object inside the bucket
    checksumMode String
    To retrieve the object's checksum, this argument must be ENABLED. If you enable checksum_mode and the object is encrypted with KMS, you must have permission to use the kms:Decrypt action. Valid values: ENABLED
    range String
    tags Map<String>
    Map of tags assigned to the object.
    versionId String
    Specific version ID of the object returned (defaults to latest version)

    getObject Result

    The following output properties are available:

    Arn string
    ARN of the object.
    Body string
    Object data (see limitations above to understand cases in which this field is actually available)
    Bucket string
    BucketKeyEnabled bool
    (Optional) Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
    CacheControl string
    Caching behavior along the request/reply chain.
    ChecksumCrc32 string
    The base64-encoded, 32-bit CRC32 checksum of the object.
    ChecksumCrc32c string
    The base64-encoded, 32-bit CRC32C checksum of the object.
    ChecksumSha1 string
    The base64-encoded, 160-bit SHA-1 digest of the object.
    ChecksumSha256 string
    The base64-encoded, 256-bit SHA-256 digest of the object.
    ContentDisposition string
    Presentational information for the object.
    ContentEncoding string
    What content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
    ContentLanguage string
    Language the content is in.
    ContentLength int
    Size of the body in bytes.
    ContentType string
    Standard MIME type describing the format of the object data.
    Etag string
    ETag generated for the object (an MD5 sum of the object content in case it's not encrypted)
    Expiration string
    If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
    Expires string
    Date and time at which the object is no longer cacheable.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    LastModified string
    Last modified date of the object in RFC1123 format (e.g., Mon, 02 Jan 2006 15:04:05 MST)
    Metadata Dictionary<string, string>
    Map of metadata stored with the object in S3. Keys are always returned in lowercase.
    ObjectLockLegalHoldStatus string
    Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
    ObjectLockMode string
    Object lock retention mode currently in place for this object.
    ObjectLockRetainUntilDate string
    The date and time when this object's object lock will expire.
    ServerSideEncryption string
    If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
    SseKmsKeyId string
    If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
    StorageClass string
    Storage class information of the object. Available for all objects except for Standard storage class objects.
    Tags Dictionary<string, string>
    Map of tags assigned to the object.
    VersionId string
    Latest version ID of the object returned.
    WebsiteRedirectLocation string
    If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
    ChecksumMode string
    Range string
    Arn string
    ARN of the object.
    Body string
    Object data (see limitations above to understand cases in which this field is actually available)
    Bucket string
    BucketKeyEnabled bool
    (Optional) Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
    CacheControl string
    Caching behavior along the request/reply chain.
    ChecksumCrc32 string
    The base64-encoded, 32-bit CRC32 checksum of the object.
    ChecksumCrc32c string
    The base64-encoded, 32-bit CRC32C checksum of the object.
    ChecksumSha1 string
    The base64-encoded, 160-bit SHA-1 digest of the object.
    ChecksumSha256 string
    The base64-encoded, 256-bit SHA-256 digest of the object.
    ContentDisposition string
    Presentational information for the object.
    ContentEncoding string
    What content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
    ContentLanguage string
    Language the content is in.
    ContentLength int
    Size of the body in bytes.
    ContentType string
    Standard MIME type describing the format of the object data.
    Etag string
    ETag generated for the object (an MD5 sum of the object content in case it's not encrypted)
    Expiration string
    If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
    Expires string
    Date and time at which the object is no longer cacheable.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    LastModified string
    Last modified date of the object in RFC1123 format (e.g., Mon, 02 Jan 2006 15:04:05 MST)
    Metadata map[string]string
    Map of metadata stored with the object in S3. Keys are always returned in lowercase.
    ObjectLockLegalHoldStatus string
    Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
    ObjectLockMode string
    Object lock retention mode currently in place for this object.
    ObjectLockRetainUntilDate string
    The date and time when this object's object lock will expire.
    ServerSideEncryption string
    If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
    SseKmsKeyId string
    If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
    StorageClass string
    Storage class information of the object. Available for all objects except for Standard storage class objects.
    Tags map[string]string
    Map of tags assigned to the object.
    VersionId string
    Latest version ID of the object returned.
    WebsiteRedirectLocation string
    If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
    ChecksumMode string
    Range string
    arn String
    ARN of the object.
    body String
    Object data (see limitations above to understand cases in which this field is actually available)
    bucket String
    bucketKeyEnabled Boolean
    (Optional) Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
    cacheControl String
    Caching behavior along the request/reply chain.
    checksumCrc32 String
    The base64-encoded, 32-bit CRC32 checksum of the object.
    checksumCrc32c String
    The base64-encoded, 32-bit CRC32C checksum of the object.
    checksumSha1 String
    The base64-encoded, 160-bit SHA-1 digest of the object.
    checksumSha256 String
    The base64-encoded, 256-bit SHA-256 digest of the object.
    contentDisposition String
    Presentational information for the object.
    contentEncoding String
    What content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
    contentLanguage String
    Language the content is in.
    contentLength Integer
    Size of the body in bytes.
    contentType String
    Standard MIME type describing the format of the object data.
    etag String
    ETag generated for the object (an MD5 sum of the object content in case it's not encrypted)
    expiration String
    If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
    expires String
    Date and time at which the object is no longer cacheable.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    lastModified String
    Last modified date of the object in RFC1123 format (e.g., Mon, 02 Jan 2006 15:04:05 MST)
    metadata Map<String,String>
    Map of metadata stored with the object in S3. Keys are always returned in lowercase.
    objectLockLegalHoldStatus String
    Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
    objectLockMode String
    Object lock retention mode currently in place for this object.
    objectLockRetainUntilDate String
    The date and time when this object's object lock will expire.
    serverSideEncryption String
    If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
    sseKmsKeyId String
    If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
    storageClass String
    Storage class information of the object. Available for all objects except for Standard storage class objects.
    tags Map<String,String>
    Map of tags assigned to the object.
    versionId String
    Latest version ID of the object returned.
    websiteRedirectLocation String
    If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
    checksumMode String
    range String
    arn string
    ARN of the object.
    body string
    Object data (see limitations above to understand cases in which this field is actually available)
    bucket string
    bucketKeyEnabled boolean
    (Optional) Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
    cacheControl string
    Caching behavior along the request/reply chain.
    checksumCrc32 string
    The base64-encoded, 32-bit CRC32 checksum of the object.
    checksumCrc32c string
    The base64-encoded, 32-bit CRC32C checksum of the object.
    checksumSha1 string
    The base64-encoded, 160-bit SHA-1 digest of the object.
    checksumSha256 string
    The base64-encoded, 256-bit SHA-256 digest of the object.
    contentDisposition string
    Presentational information for the object.
    contentEncoding string
    What content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
    contentLanguage string
    Language the content is in.
    contentLength number
    Size of the body in bytes.
    contentType string
    Standard MIME type describing the format of the object data.
    etag string
    ETag generated for the object (an MD5 sum of the object content in case it's not encrypted)
    expiration string
    If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
    expires string
    Date and time at which the object is no longer cacheable.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    lastModified string
    Last modified date of the object in RFC1123 format (e.g., Mon, 02 Jan 2006 15:04:05 MST)
    metadata {[key: string]: string}
    Map of metadata stored with the object in S3. Keys are always returned in lowercase.
    objectLockLegalHoldStatus string
    Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
    objectLockMode string
    Object lock retention mode currently in place for this object.
    objectLockRetainUntilDate string
    The date and time when this object's object lock will expire.
    serverSideEncryption string
    If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
    sseKmsKeyId string
    If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
    storageClass string
    Storage class information of the object. Available for all objects except for Standard storage class objects.
    tags {[key: string]: string}
    Map of tags assigned to the object.
    versionId string
    Latest version ID of the object returned.
    websiteRedirectLocation string
    If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
    checksumMode string
    range string
    arn str
    ARN of the object.
    body str
    Object data (see limitations above to understand cases in which this field is actually available)
    bucket str
    bucket_key_enabled bool
    (Optional) Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
    cache_control str
    Caching behavior along the request/reply chain.
    checksum_crc32 str
    The base64-encoded, 32-bit CRC32 checksum of the object.
    checksum_crc32c str
    The base64-encoded, 32-bit CRC32C checksum of the object.
    checksum_sha1 str
    The base64-encoded, 160-bit SHA-1 digest of the object.
    checksum_sha256 str
    The base64-encoded, 256-bit SHA-256 digest of the object.
    content_disposition str
    Presentational information for the object.
    content_encoding str
    What content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
    content_language str
    Language the content is in.
    content_length int
    Size of the body in bytes.
    content_type str
    Standard MIME type describing the format of the object data.
    etag str
    ETag generated for the object (an MD5 sum of the object content in case it's not encrypted)
    expiration str
    If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
    expires str
    Date and time at which the object is no longer cacheable.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    last_modified str
    Last modified date of the object in RFC1123 format (e.g., Mon, 02 Jan 2006 15:04:05 MST)
    metadata Mapping[str, str]
    Map of metadata stored with the object in S3. Keys are always returned in lowercase.
    object_lock_legal_hold_status str
    Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
    object_lock_mode str
    Object lock retention mode currently in place for this object.
    object_lock_retain_until_date str
    The date and time when this object's object lock will expire.
    server_side_encryption str
    If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
    sse_kms_key_id str
    If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
    storage_class str
    Storage class information of the object. Available for all objects except for Standard storage class objects.
    tags Mapping[str, str]
    Map of tags assigned to the object.
    version_id str
    Latest version ID of the object returned.
    website_redirect_location str
    If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
    checksum_mode str
    range str
    arn String
    ARN of the object.
    body String
    Object data (see limitations above to understand cases in which this field is actually available)
    bucket String
    bucketKeyEnabled Boolean
    (Optional) Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
    cacheControl String
    Caching behavior along the request/reply chain.
    checksumCrc32 String
    The base64-encoded, 32-bit CRC32 checksum of the object.
    checksumCrc32c String
    The base64-encoded, 32-bit CRC32C checksum of the object.
    checksumSha1 String
    The base64-encoded, 160-bit SHA-1 digest of the object.
    checksumSha256 String
    The base64-encoded, 256-bit SHA-256 digest of the object.
    contentDisposition String
    Presentational information for the object.
    contentEncoding String
    What content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
    contentLanguage String
    Language the content is in.
    contentLength Number
    Size of the body in bytes.
    contentType String
    Standard MIME type describing the format of the object data.
    etag String
    ETag generated for the object (an MD5 sum of the object content in case it's not encrypted)
    expiration String
    If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
    expires String
    Date and time at which the object is no longer cacheable.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    lastModified String
    Last modified date of the object in RFC1123 format (e.g., Mon, 02 Jan 2006 15:04:05 MST)
    metadata Map<String>
    Map of metadata stored with the object in S3. Keys are always returned in lowercase.
    objectLockLegalHoldStatus String
    Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
    objectLockMode String
    Object lock retention mode currently in place for this object.
    objectLockRetainUntilDate String
    The date and time when this object's object lock will expire.
    serverSideEncryption String
    If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
    sseKmsKeyId String
    If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
    storageClass String
    Storage class information of the object. Available for all objects except for Standard storage class objects.
    tags Map<String>
    Map of tags assigned to the object.
    versionId String
    Latest version ID of the object returned.
    websiteRedirectLocation String
    If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
    checksumMode String
    range String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi