1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getS3Object
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getS3Object

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.getS3Object({
        bucket: "example",
        key: "object",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_s3_object(bucket="example",
        key="object")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupS3Object(ctx, &ionoscloud.LookupS3ObjectArgs{
    			Bucket: "example",
    			Key:    "object",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.GetS3Object.Invoke(new()
        {
            Bucket = "example",
            Key = "object",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetS3ObjectArgs;
    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 example = IonoscloudFunctions.getS3Object(GetS3ObjectArgs.builder()
                .bucket("example")
                .key("object")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getS3Object
          arguments:
            bucket: example
            key: object
    

    Using getS3Object

    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 getS3Object(args: GetS3ObjectArgs, opts?: InvokeOptions): Promise<GetS3ObjectResult>
    function getS3ObjectOutput(args: GetS3ObjectOutputArgs, opts?: InvokeOptions): Output<GetS3ObjectResult>
    def get_s3_object(bucket: Optional[str] = None,
                      key: Optional[str] = None,
                      range: Optional[str] = None,
                      version_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetS3ObjectResult
    def get_s3_object_output(bucket: Optional[pulumi.Input[str]] = None,
                      key: Optional[pulumi.Input[str]] = None,
                      range: Optional[pulumi.Input[str]] = None,
                      version_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetS3ObjectResult]
    func LookupS3Object(ctx *Context, args *LookupS3ObjectArgs, opts ...InvokeOption) (*LookupS3ObjectResult, error)
    func LookupS3ObjectOutput(ctx *Context, args *LookupS3ObjectOutputArgs, opts ...InvokeOption) LookupS3ObjectResultOutput

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

    public static class GetS3Object 
    {
        public static Task<GetS3ObjectResult> InvokeAsync(GetS3ObjectArgs args, InvokeOptions? opts = null)
        public static Output<GetS3ObjectResult> Invoke(GetS3ObjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetS3ObjectResult> getS3Object(GetS3ObjectArgs args, InvokeOptions options)
    public static Output<GetS3ObjectResult> getS3Object(GetS3ObjectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getS3Object:getS3Object
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bucket string
    [string] The name of the bucket where the object is stored.
    Key string
    [string] The name of the object.
    Range string
    [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
    VersionId string
    [string] The version of the object.
    Bucket string
    [string] The name of the bucket where the object is stored.
    Key string
    [string] The name of the object.
    Range string
    [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
    VersionId string
    [string] The version of the object.
    bucket String
    [string] The name of the bucket where the object is stored.
    key String
    [string] The name of the object.
    range String
    [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
    versionId String
    [string] The version of the object.
    bucket string
    [string] The name of the bucket where the object is stored.
    key string
    [string] The name of the object.
    range string
    [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
    versionId string
    [string] The version of the object.
    bucket str
    [string] The name of the bucket where the object is stored.
    key str
    [string] The name of the object.
    range str
    [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
    version_id str
    [string] The version of the object.
    bucket String
    [string] The name of the bucket where the object is stored.
    key String
    [string] The name of the object.
    range String
    [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
    versionId String
    [string] The version of the object.

    getS3Object Result

    The following output properties are available:

    Body string
    The content of the object.
    Bucket string
    CacheControl string
    The caching behavior along the request/reply chain.
    ContentDisposition string
    Presentational information for the object.
    ContentEncoding string
    The content encodings applied to the object.
    ContentLanguage string
    The natural language of the intended audience for the object.
    ContentLength double
    The size of the object in bytes.
    ContentType string
    The MIME type describing the format of the contents.
    Etag string
    An entity tag (ETag) assigned by a web server to a specific version of a resource.
    Expires string
    The date and time at which the object is no longer cacheable.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Metadata Dictionary<string, string>
    A map of metadata stored with the object.
    ObjectLockLegalHold string
    The legal hold status of the object, which can be either ON or OFF.
    ObjectLockMode string
    The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
    ObjectLockRetainUntilDate string
    The date until which the object will remain locked.
    RequestPayer string
    Confirms that the requester knows that they will be charged for the request.
    ServerSideEncryption string
    The server-side encryption algorithm used when storing this object.
    ServerSideEncryptionContext string
    The encryption context to use for object encryption. This attribute is sensitive.
    ServerSideEncryptionCustomerAlgorithm string
    The algorithm to use for encrypting the object (e.g., AES256).
    ServerSideEncryptionCustomerKey string
    The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
    ServerSideEncryptionCustomerKeyMd5 string
    The 128-bit MD5 digest of the encryption key.
    StorageClass string
    The storage class of the object.
    Tags Dictionary<string, string>
    The tag-set for the object, represented as a map of string key-value pairs.
    VersionId string
    The version of the object. This attribute is optional.
    WebsiteRedirect 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.
    Range string
    Body string
    The content of the object.
    Bucket string
    CacheControl string
    The caching behavior along the request/reply chain.
    ContentDisposition string
    Presentational information for the object.
    ContentEncoding string
    The content encodings applied to the object.
    ContentLanguage string
    The natural language of the intended audience for the object.
    ContentLength float64
    The size of the object in bytes.
    ContentType string
    The MIME type describing the format of the contents.
    Etag string
    An entity tag (ETag) assigned by a web server to a specific version of a resource.
    Expires string
    The date and time at which the object is no longer cacheable.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Metadata map[string]string
    A map of metadata stored with the object.
    ObjectLockLegalHold string
    The legal hold status of the object, which can be either ON or OFF.
    ObjectLockMode string
    The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
    ObjectLockRetainUntilDate string
    The date until which the object will remain locked.
    RequestPayer string
    Confirms that the requester knows that they will be charged for the request.
    ServerSideEncryption string
    The server-side encryption algorithm used when storing this object.
    ServerSideEncryptionContext string
    The encryption context to use for object encryption. This attribute is sensitive.
    ServerSideEncryptionCustomerAlgorithm string
    The algorithm to use for encrypting the object (e.g., AES256).
    ServerSideEncryptionCustomerKey string
    The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
    ServerSideEncryptionCustomerKeyMd5 string
    The 128-bit MD5 digest of the encryption key.
    StorageClass string
    The storage class of the object.
    Tags map[string]string
    The tag-set for the object, represented as a map of string key-value pairs.
    VersionId string
    The version of the object. This attribute is optional.
    WebsiteRedirect 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.
    Range string
    body String
    The content of the object.
    bucket String
    cacheControl String
    The caching behavior along the request/reply chain.
    contentDisposition String
    Presentational information for the object.
    contentEncoding String
    The content encodings applied to the object.
    contentLanguage String
    The natural language of the intended audience for the object.
    contentLength Double
    The size of the object in bytes.
    contentType String
    The MIME type describing the format of the contents.
    etag String
    An entity tag (ETag) assigned by a web server to a specific version of a resource.
    expires String
    The date and time at which the object is no longer cacheable.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    metadata Map<String,String>
    A map of metadata stored with the object.
    objectLockLegalHold String
    The legal hold status of the object, which can be either ON or OFF.
    objectLockMode String
    The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
    objectLockRetainUntilDate String
    The date until which the object will remain locked.
    requestPayer String
    Confirms that the requester knows that they will be charged for the request.
    serverSideEncryption String
    The server-side encryption algorithm used when storing this object.
    serverSideEncryptionContext String
    The encryption context to use for object encryption. This attribute is sensitive.
    serverSideEncryptionCustomerAlgorithm String
    The algorithm to use for encrypting the object (e.g., AES256).
    serverSideEncryptionCustomerKey String
    The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
    serverSideEncryptionCustomerKeyMd5 String
    The 128-bit MD5 digest of the encryption key.
    storageClass String
    The storage class of the object.
    tags Map<String,String>
    The tag-set for the object, represented as a map of string key-value pairs.
    versionId String
    The version of the object. This attribute is optional.
    websiteRedirect 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.
    range String
    body string
    The content of the object.
    bucket string
    cacheControl string
    The caching behavior along the request/reply chain.
    contentDisposition string
    Presentational information for the object.
    contentEncoding string
    The content encodings applied to the object.
    contentLanguage string
    The natural language of the intended audience for the object.
    contentLength number
    The size of the object in bytes.
    contentType string
    The MIME type describing the format of the contents.
    etag string
    An entity tag (ETag) assigned by a web server to a specific version of a resource.
    expires string
    The date and time at which the object is no longer cacheable.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    metadata {[key: string]: string}
    A map of metadata stored with the object.
    objectLockLegalHold string
    The legal hold status of the object, which can be either ON or OFF.
    objectLockMode string
    The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
    objectLockRetainUntilDate string
    The date until which the object will remain locked.
    requestPayer string
    Confirms that the requester knows that they will be charged for the request.
    serverSideEncryption string
    The server-side encryption algorithm used when storing this object.
    serverSideEncryptionContext string
    The encryption context to use for object encryption. This attribute is sensitive.
    serverSideEncryptionCustomerAlgorithm string
    The algorithm to use for encrypting the object (e.g., AES256).
    serverSideEncryptionCustomerKey string
    The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
    serverSideEncryptionCustomerKeyMd5 string
    The 128-bit MD5 digest of the encryption key.
    storageClass string
    The storage class of the object.
    tags {[key: string]: string}
    The tag-set for the object, represented as a map of string key-value pairs.
    versionId string
    The version of the object. This attribute is optional.
    websiteRedirect 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.
    range string
    body str
    The content of the object.
    bucket str
    cache_control str
    The caching behavior along the request/reply chain.
    content_disposition str
    Presentational information for the object.
    content_encoding str
    The content encodings applied to the object.
    content_language str
    The natural language of the intended audience for the object.
    content_length float
    The size of the object in bytes.
    content_type str
    The MIME type describing the format of the contents.
    etag str
    An entity tag (ETag) assigned by a web server to a specific version of a resource.
    expires str
    The date and time at which the object is no longer cacheable.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    metadata Mapping[str, str]
    A map of metadata stored with the object.
    object_lock_legal_hold str
    The legal hold status of the object, which can be either ON or OFF.
    object_lock_mode str
    The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
    object_lock_retain_until_date str
    The date until which the object will remain locked.
    request_payer str
    Confirms that the requester knows that they will be charged for the request.
    server_side_encryption str
    The server-side encryption algorithm used when storing this object.
    server_side_encryption_context str
    The encryption context to use for object encryption. This attribute is sensitive.
    server_side_encryption_customer_algorithm str
    The algorithm to use for encrypting the object (e.g., AES256).
    server_side_encryption_customer_key str
    The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
    server_side_encryption_customer_key_md5 str
    The 128-bit MD5 digest of the encryption key.
    storage_class str
    The storage class of the object.
    tags Mapping[str, str]
    The tag-set for the object, represented as a map of string key-value pairs.
    version_id str
    The version of the object. This attribute is optional.
    website_redirect 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.
    range str
    body String
    The content of the object.
    bucket String
    cacheControl String
    The caching behavior along the request/reply chain.
    contentDisposition String
    Presentational information for the object.
    contentEncoding String
    The content encodings applied to the object.
    contentLanguage String
    The natural language of the intended audience for the object.
    contentLength Number
    The size of the object in bytes.
    contentType String
    The MIME type describing the format of the contents.
    etag String
    An entity tag (ETag) assigned by a web server to a specific version of a resource.
    expires String
    The date and time at which the object is no longer cacheable.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    metadata Map<String>
    A map of metadata stored with the object.
    objectLockLegalHold String
    The legal hold status of the object, which can be either ON or OFF.
    objectLockMode String
    The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
    objectLockRetainUntilDate String
    The date until which the object will remain locked.
    requestPayer String
    Confirms that the requester knows that they will be charged for the request.
    serverSideEncryption String
    The server-side encryption algorithm used when storing this object.
    serverSideEncryptionContext String
    The encryption context to use for object encryption. This attribute is sensitive.
    serverSideEncryptionCustomerAlgorithm String
    The algorithm to use for encrypting the object (e.g., AES256).
    serverSideEncryptionCustomerKey String
    The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
    serverSideEncryptionCustomerKeyMd5 String
    The 128-bit MD5 digest of the encryption key.
    storageClass String
    The storage class of the object.
    tags Map<String>
    The tag-set for the object, represented as a map of string key-value pairs.
    versionId String
    The version of the object. This attribute is optional.
    websiteRedirect 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.
    range String

    Package Details

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