Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getObjectHead

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

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testObjectHead = Output.Create(Oci.ObjectStorage.GetObjectHead.InvokeAsync(new Oci.ObjectStorage.GetObjectHeadArgs
        {
            Bucket = @var.Object_bucket,
            Namespace = @var.Object_namespace,
            Object = @var.Object_object,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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:    _var.Object_bucket,
			Namespace: _var.Object_namespace,
			Object:    _var.Object_object,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_object_head = oci.ObjectStorage.get_object_head(bucket=var["object_bucket"],
    namespace=var["object_namespace"],
    object=var["object_object"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testObjectHead = oci.ObjectStorage.getObjectHead({
    bucket: _var.object_bucket,
    namespace: _var.object_namespace,
    object: _var.object_object,
});

Coming soon!

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, object>

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]interface{}

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,Object>

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]: any}

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, Any]

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<Any>

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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.