1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ObjectStorage
  5. getObjectHead
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.ObjectStorage.getObjectHead

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about metadata of a specific Object resource in Oracle Cloud Infrastructure Object Storage service.

    Gets the metadata of an object.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testObjectHead = oci.ObjectStorage.getObjectHead({
        bucket: objectBucket,
        namespace: objectNamespace,
        object: objectObject,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_object_head = oci.ObjectStorage.get_object_head(bucket=object_bucket,
        namespace=object_namespace,
        object=object_object)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/ObjectStorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ObjectStorage.GetObjectHead(ctx, &objectstorage.GetObjectHeadArgs{
    			Bucket:    objectBucket,
    			Namespace: objectNamespace,
    			Object:    objectObject,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testObjectHead = Oci.ObjectStorage.GetObjectHead.Invoke(new()
        {
            Bucket = objectBucket,
            Namespace = objectNamespace,
            Object = objectObject,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ObjectStorage.ObjectStorageFunctions;
    import com.pulumi.oci.ObjectStorage.inputs.GetObjectHeadArgs;
    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 testObjectHead = ObjectStorageFunctions.getObjectHead(GetObjectHeadArgs.builder()
                .bucket(objectBucket)
                .namespace(objectNamespace)
                .object(objectObject)
                .build());
    
        }
    }
    
    variables:
      testObjectHead:
        fn::invoke:
          Function: oci:ObjectStorage:getObjectHead
          Arguments:
            bucket: ${objectBucket}
            namespace: ${objectNamespace}
            object: ${objectObject}
    

    Using getObjectHead

    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 getObjectHead(args: GetObjectHeadArgs, opts?: InvokeOptions): Promise<GetObjectHeadResult>
    function getObjectHeadOutput(args: GetObjectHeadOutputArgs, opts?: InvokeOptions): Output<GetObjectHeadResult>
    def get_object_head(bucket: Optional[str] = None,
                        namespace: Optional[str] = None,
                        object: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetObjectHeadResult
    def get_object_head_output(bucket: Optional[pulumi.Input[str]] = None,
                        namespace: Optional[pulumi.Input[str]] = None,
                        object: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetObjectHeadResult]
    func GetObjectHead(ctx *Context, args *GetObjectHeadArgs, opts ...InvokeOption) (*GetObjectHeadResult, error)
    func GetObjectHeadOutput(ctx *Context, args *GetObjectHeadOutputArgs, opts ...InvokeOption) GetObjectHeadResultOutput

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

    public static class GetObjectHead 
    {
        public static Task<GetObjectHeadResult> InvokeAsync(GetObjectHeadArgs args, InvokeOptions? opts = null)
        public static Output<GetObjectHeadResult> Invoke(GetObjectHeadInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetObjectHeadResult> getObjectHead(GetObjectHeadArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:ObjectStorage/getObjectHead:getObjectHead
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The top-level namespace used for the request.
    Object string
    The name of the object. Avoid entering confidential information. Example: test/object1.log
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The top-level namespace used for the request.
    Object string
    The name of the object. Avoid entering confidential information. Example: test/object1.log
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The top-level namespace used for the request.
    object String
    The name of the object. Avoid entering confidential information. Example: test/object1.log
    bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace string
    The top-level namespace used for the request.
    object string
    The name of the object. Avoid entering confidential information. Example: test/object1.log
    bucket str
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace str
    The top-level namespace used for the request.
    object str
    The name of the object. Avoid entering confidential information. Example: test/object1.log
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The top-level namespace used for the request.
    object String
    The name of the object. Avoid entering confidential information. Example: test/object1.log

    getObjectHead Result

    The following output properties are available:

    ArchivalState string
    Bucket string
    ContentLength int
    The content-length of the object
    ContentType string
    The content-type of the object
    Etag string
    The etag of the object
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata Dictionary<string, string>
    The metadata of the object
    Namespace string
    Object string
    StorageTier string
    The storage tier that the object is stored in.

    • archival-state - Archival state of an object. This field is set only for objects in Archive tier.
    ArchivalState string
    Bucket string
    ContentLength int
    The content-length of the object
    ContentType string
    The content-type of the object
    Etag string
    The etag of the object
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata map[string]string
    The metadata of the object
    Namespace string
    Object string
    StorageTier string
    The storage tier that the object is stored in.

    • archival-state - Archival state of an object. This field is set only for objects in Archive tier.
    archivalState String
    bucket String
    contentLength Integer
    The content-length of the object
    contentType String
    The content-type of the object
    etag String
    The etag of the object
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String,String>
    The metadata of the object
    namespace String
    object String
    storageTier String
    The storage tier that the object is stored in.

    • archival-state - Archival state of an object. This field is set only for objects in Archive tier.
    archivalState string
    bucket string
    contentLength number
    The content-length of the object
    contentType string
    The content-type of the object
    etag string
    The etag of the object
    id string
    The provider-assigned unique ID for this managed resource.
    metadata {[key: string]: string}
    The metadata of the object
    namespace string
    object string
    storageTier string
    The storage tier that the object is stored in.

    • archival-state - Archival state of an object. This field is set only for objects in Archive tier.
    archival_state str
    bucket str
    content_length int
    The content-length of the object
    content_type str
    The content-type of the object
    etag str
    The etag of the object
    id str
    The provider-assigned unique ID for this managed resource.
    metadata Mapping[str, str]
    The metadata of the object
    namespace str
    object str
    storage_tier str
    The storage tier that the object is stored in.

    • archival-state - Archival state of an object. This field is set only for objects in Archive tier.
    archivalState String
    bucket String
    contentLength Number
    The content-length of the object
    contentType String
    The content-type of the object
    etag String
    The etag of the object
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String>
    The metadata of the object
    namespace String
    object String
    storageTier String
    The storage tier that the object is stored in.

    • archival-state - Archival state of an object. This field is set only for objects in Archive tier.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi