Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.ObjectStorage.getObjectHead
Explore with Pulumi AI
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:
getObjectHead Result
The following output properties are available:
- Archival
State string - Bucket string
- Content
Length int - The content-length of the object
- Content
Type 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
- Storage
Tier 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 string - Bucket string
- Content
Length int - The content-length of the object
- Content
Type 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
- Storage
Tier 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 String - bucket String
- content
Length Integer - The content-length of the object
- content
Type 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
- storage
Tier 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 string - bucket string
- content
Length number - The content-length of the object
- content
Type 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
- storage
Tier 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.
- archival
State String - bucket String
- content
Length Number - The content-length of the object
- content
Type 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
- storage
Tier 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.