Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.ObjectStorage.getObject
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides details about a specific Object resource in Oracle Cloud Infrastructure Object Storage service.
Gets the metadata and body of an object.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testObject = oci.ObjectStorage.getObject({
bucket: objectBucket,
namespace: objectNamespace,
object: objectObject,
httpResponseCacheControl: objectHttpResponseCacheControl,
httpResponseContentDisposition: objectHttpResponseContentDisposition,
httpResponseContentEncoding: objectHttpResponseContentEncoding,
httpResponseContentLanguage: objectHttpResponseContentLanguage,
httpResponseContentType: objectHttpResponseContentType,
httpResponseExpires: objectHttpResponseExpires,
versionId: testVersion.id,
});
import pulumi
import pulumi_oci as oci
test_object = oci.ObjectStorage.get_object(bucket=object_bucket,
namespace=object_namespace,
object=object_object,
http_response_cache_control=object_http_response_cache_control,
http_response_content_disposition=object_http_response_content_disposition,
http_response_content_encoding=object_http_response_content_encoding,
http_response_content_language=object_http_response_content_language,
http_response_content_type=object_http_response_content_type,
http_response_expires=object_http_response_expires,
version_id=test_version["id"])
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.GetObject(ctx, &objectstorage.GetObjectArgs{
Bucket: objectBucket,
Namespace: objectNamespace,
Object: objectObject,
HttpResponseCacheControl: pulumi.StringRef(objectHttpResponseCacheControl),
HttpResponseContentDisposition: pulumi.StringRef(objectHttpResponseContentDisposition),
HttpResponseContentEncoding: pulumi.StringRef(objectHttpResponseContentEncoding),
HttpResponseContentLanguage: pulumi.StringRef(objectHttpResponseContentLanguage),
HttpResponseContentType: pulumi.StringRef(objectHttpResponseContentType),
HttpResponseExpires: pulumi.StringRef(objectHttpResponseExpires),
VersionId: pulumi.StringRef(testVersion.Id),
}, 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 testObject = Oci.ObjectStorage.GetObject.Invoke(new()
{
Bucket = objectBucket,
Namespace = objectNamespace,
Object = objectObject,
HttpResponseCacheControl = objectHttpResponseCacheControl,
HttpResponseContentDisposition = objectHttpResponseContentDisposition,
HttpResponseContentEncoding = objectHttpResponseContentEncoding,
HttpResponseContentLanguage = objectHttpResponseContentLanguage,
HttpResponseContentType = objectHttpResponseContentType,
HttpResponseExpires = objectHttpResponseExpires,
VersionId = testVersion.Id,
});
});
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.GetObjectArgs;
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 testObject = ObjectStorageFunctions.getObject(GetObjectArgs.builder()
.bucket(objectBucket)
.namespace(objectNamespace)
.object(objectObject)
.httpResponseCacheControl(objectHttpResponseCacheControl)
.httpResponseContentDisposition(objectHttpResponseContentDisposition)
.httpResponseContentEncoding(objectHttpResponseContentEncoding)
.httpResponseContentLanguage(objectHttpResponseContentLanguage)
.httpResponseContentType(objectHttpResponseContentType)
.httpResponseExpires(objectHttpResponseExpires)
.versionId(testVersion.id())
.build());
}
}
variables:
testObject:
fn::invoke:
Function: oci:ObjectStorage:getObject
Arguments:
bucket: ${objectBucket}
namespace: ${objectNamespace}
object: ${objectObject}
httpResponseCacheControl: ${objectHttpResponseCacheControl}
httpResponseContentDisposition: ${objectHttpResponseContentDisposition}
httpResponseContentEncoding: ${objectHttpResponseContentEncoding}
httpResponseContentLanguage: ${objectHttpResponseContentLanguage}
httpResponseContentType: ${objectHttpResponseContentType}
httpResponseExpires: ${objectHttpResponseExpires}
versionId: ${testVersion.id}
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(base64_encode_content: Optional[bool] = None,
bucket: Optional[str] = None,
content_length_limit: Optional[int] = None,
http_response_cache_control: Optional[str] = None,
http_response_content_disposition: Optional[str] = None,
http_response_content_encoding: Optional[str] = None,
http_response_content_language: Optional[str] = None,
http_response_content_type: Optional[str] = None,
http_response_expires: Optional[str] = None,
namespace: Optional[str] = None,
object: Optional[str] = None,
version_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetObjectResult
def get_object_output(base64_encode_content: Optional[pulumi.Input[bool]] = None,
bucket: Optional[pulumi.Input[str]] = None,
content_length_limit: Optional[pulumi.Input[int]] = None,
http_response_cache_control: Optional[pulumi.Input[str]] = None,
http_response_content_disposition: Optional[pulumi.Input[str]] = None,
http_response_content_encoding: Optional[pulumi.Input[str]] = None,
http_response_content_language: Optional[pulumi.Input[str]] = None,
http_response_content_type: Optional[pulumi.Input[str]] = None,
http_response_expires: Optional[pulumi.Input[str]] = None,
namespace: Optional[pulumi.Input[str]] = None,
object: Optional[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: oci:ObjectStorage/getObject:getObject
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 Object Storage namespace used for the request.
- Object string
- The name of the object. Avoid entering confidential information. Example:
test/object1.log
- Base64Encode
Content bool - Content
Length intLimit - The limit of the content length of the object body to download from the object store. The default is 1Mb.
- Http
Response stringCache Control - Specify this query parameter to override the Cache-Control response header in the GetObject response.
- Http
Response stringContent Disposition - Specify this query parameter to override the value of the Content-Disposition response header in the GetObject response.
- Http
Response stringContent Encoding - Specify this query parameter to override the Content-Encoding response header in the GetObject response.
- Http
Response stringContent Language - Specify this query parameter to override the Content-Language response header in the GetObject response.
- Http
Response stringContent Type - Specify this query parameter to override the Content-Type response header in the GetObject response.
- Http
Response stringExpires - Specify this query parameter to override the Expires response header in the GetObject response.
- Version
Id string - VersionId used to identify a particular version of the object
- Bucket string
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- Namespace string
- The Object Storage namespace used for the request.
- Object string
- The name of the object. Avoid entering confidential information. Example:
test/object1.log
- Base64Encode
Content bool - Content
Length intLimit - The limit of the content length of the object body to download from the object store. The default is 1Mb.
- Http
Response stringCache Control - Specify this query parameter to override the Cache-Control response header in the GetObject response.
- Http
Response stringContent Disposition - Specify this query parameter to override the value of the Content-Disposition response header in the GetObject response.
- Http
Response stringContent Encoding - Specify this query parameter to override the Content-Encoding response header in the GetObject response.
- Http
Response stringContent Language - Specify this query parameter to override the Content-Language response header in the GetObject response.
- Http
Response stringContent Type - Specify this query parameter to override the Content-Type response header in the GetObject response.
- Http
Response stringExpires - Specify this query parameter to override the Expires response header in the GetObject response.
- Version
Id string - VersionId used to identify a particular version of the object
- bucket String
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- namespace String
- The Object Storage namespace used for the request.
- object String
- The name of the object. Avoid entering confidential information. Example:
test/object1.log
- base64Encode
Content Boolean - content
Length IntegerLimit - The limit of the content length of the object body to download from the object store. The default is 1Mb.
- http
Response StringCache Control - Specify this query parameter to override the Cache-Control response header in the GetObject response.
- http
Response StringContent Disposition - Specify this query parameter to override the value of the Content-Disposition response header in the GetObject response.
- http
Response StringContent Encoding - Specify this query parameter to override the Content-Encoding response header in the GetObject response.
- http
Response StringContent Language - Specify this query parameter to override the Content-Language response header in the GetObject response.
- http
Response StringContent Type - Specify this query parameter to override the Content-Type response header in the GetObject response.
- http
Response StringExpires - Specify this query parameter to override the Expires response header in the GetObject response.
- version
Id String - VersionId used to identify a particular version of the object
- bucket string
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- namespace string
- The Object Storage namespace used for the request.
- object string
- The name of the object. Avoid entering confidential information. Example:
test/object1.log
- base64Encode
Content boolean - content
Length numberLimit - The limit of the content length of the object body to download from the object store. The default is 1Mb.
- http
Response stringCache Control - Specify this query parameter to override the Cache-Control response header in the GetObject response.
- http
Response stringContent Disposition - Specify this query parameter to override the value of the Content-Disposition response header in the GetObject response.
- http
Response stringContent Encoding - Specify this query parameter to override the Content-Encoding response header in the GetObject response.
- http
Response stringContent Language - Specify this query parameter to override the Content-Language response header in the GetObject response.
- http
Response stringContent Type - Specify this query parameter to override the Content-Type response header in the GetObject response.
- http
Response stringExpires - Specify this query parameter to override the Expires response header in the GetObject response.
- version
Id string - VersionId used to identify a particular version of the object
- bucket str
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- namespace str
- The Object Storage namespace used for the request.
- object str
- The name of the object. Avoid entering confidential information. Example:
test/object1.log
- base64_
encode_ boolcontent - content_
length_ intlimit - The limit of the content length of the object body to download from the object store. The default is 1Mb.
- http_
response_ strcache_ control - Specify this query parameter to override the Cache-Control response header in the GetObject response.
- http_
response_ strcontent_ disposition - Specify this query parameter to override the value of the Content-Disposition response header in the GetObject response.
- http_
response_ strcontent_ encoding - Specify this query parameter to override the Content-Encoding response header in the GetObject response.
- http_
response_ strcontent_ language - Specify this query parameter to override the Content-Language response header in the GetObject response.
- http_
response_ strcontent_ type - Specify this query parameter to override the Content-Type response header in the GetObject response.
- http_
response_ strexpires - Specify this query parameter to override the Expires response header in the GetObject response.
- version_
id str - VersionId used to identify a particular version of the object
- bucket String
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- namespace String
- The Object Storage namespace used for the request.
- object String
- The name of the object. Avoid entering confidential information. Example:
test/object1.log
- base64Encode
Content Boolean - content
Length NumberLimit - The limit of the content length of the object body to download from the object store. The default is 1Mb.
- http
Response StringCache Control - Specify this query parameter to override the Cache-Control response header in the GetObject response.
- http
Response StringContent Disposition - Specify this query parameter to override the value of the Content-Disposition response header in the GetObject response.
- http
Response StringContent Encoding - Specify this query parameter to override the Content-Encoding response header in the GetObject response.
- http
Response StringContent Language - Specify this query parameter to override the Content-Language response header in the GetObject response.
- http
Response StringContent Type - Specify this query parameter to override the Content-Type response header in the GetObject response.
- http
Response StringExpires - Specify this query parameter to override the Expires response header in the GetObject response.
- version
Id String - VersionId used to identify a particular version of the object
getObject Result
The following output properties are available:
- Bucket string
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- Cache
Control string - Content string
- The object to upload to the object store.
- Content
Disposition string - Content
Encoding string - The content encoding of the object.
- Content
Language string - The content language of the object.
- Content
Length string - The content length of the body.
- Content
Md5 string - The base-64 encoded MD5 hash of the body.
- Content
Type string - The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, object>
- Optional user-defined metadata key and value. Note: Metadata keys are case-insensitive and all returned keys will be lower case.
- 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
- Storage
Tier string - The storage tier that the object is stored in.
- Version
Id string - Base64Encode
Content bool - Content
Length intLimit - Http
Response stringCache Control - Http
Response stringContent Disposition - Http
Response stringContent Encoding - Http
Response stringContent Language - Http
Response stringContent Type - Http
Response stringExpires
- Bucket string
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- Cache
Control string - Content string
- The object to upload to the object store.
- Content
Disposition string - Content
Encoding string - The content encoding of the object.
- Content
Language string - The content language of the object.
- Content
Length string - The content length of the body.
- Content
Md5 string - The base-64 encoded MD5 hash of the body.
- Content
Type string - The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]interface{}
- Optional user-defined metadata key and value. Note: Metadata keys are case-insensitive and all returned keys will be lower case.
- 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
- Storage
Tier string - The storage tier that the object is stored in.
- Version
Id string - Base64Encode
Content bool - Content
Length intLimit - Http
Response stringCache Control - Http
Response stringContent Disposition - Http
Response stringContent Encoding - Http
Response stringContent Language - Http
Response stringContent Type - Http
Response stringExpires
- bucket String
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- cache
Control String - content String
- The object to upload to the object store.
- content
Disposition String - content
Encoding String - The content encoding of the object.
- content
Language String - The content language of the object.
- content
Length String - The content length of the body.
- content
Md5 String - The base-64 encoded MD5 hash of the body.
- content
Type String - The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,Object>
- Optional user-defined metadata key and value. Note: Metadata keys are case-insensitive and all returned keys will be lower case.
- 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
- storage
Tier String - The storage tier that the object is stored in.
- version
Id String - base64Encode
Content Boolean - content
Length IntegerLimit - http
Response StringCache Control - http
Response StringContent Disposition - http
Response StringContent Encoding - http
Response StringContent Language - http
Response StringContent Type - http
Response StringExpires
- bucket string
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- cache
Control string - content string
- The object to upload to the object store.
- content
Disposition string - content
Encoding string - The content encoding of the object.
- content
Language string - The content language of the object.
- content
Length string - The content length of the body.
- content
Md5 string - The base-64 encoded MD5 hash of the body.
- content
Type string - The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: any}
- Optional user-defined metadata key and value. Note: Metadata keys are case-insensitive and all returned keys will be lower case.
- 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
- storage
Tier string - The storage tier that the object is stored in.
- version
Id string - base64Encode
Content boolean - content
Length numberLimit - http
Response stringCache Control - http
Response stringContent Disposition - http
Response stringContent Encoding - http
Response stringContent Language - http
Response stringContent Type - http
Response stringExpires
- bucket str
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- cache_
control str - content str
- The object to upload to the object store.
- content_
disposition str - content_
encoding str - The content encoding of the object.
- content_
language str - The content language of the object.
- content_
length str - The content length of the body.
- content_
md5 str - The base-64 encoded MD5 hash of the body.
- content_
type str - The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, Any]
- Optional user-defined metadata key and value. Note: Metadata keys are case-insensitive and all returned keys will be lower case.
- 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
- storage_
tier str - The storage tier that the object is stored in.
- version_
id str - base64_
encode_ boolcontent - content_
length_ intlimit - http_
response_ strcache_ control - http_
response_ strcontent_ disposition - http_
response_ strcontent_ encoding - http_
response_ strcontent_ language - http_
response_ strcontent_ type - http_
response_ strexpires
- bucket String
- The name of the bucket. Avoid entering confidential information. Example:
my-new-bucket1
- cache
Control String - content String
- The object to upload to the object store.
- content
Disposition String - content
Encoding String - The content encoding of the object.
- content
Language String - The content language of the object.
- content
Length String - The content length of the body.
- content
Md5 String - The base-64 encoded MD5 hash of the body.
- content
Type String - The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<Any>
- Optional user-defined metadata key and value. Note: Metadata keys are case-insensitive and all returned keys will be lower case.
- 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
- storage
Tier String - The storage tier that the object is stored in.
- version
Id String - base64Encode
Content Boolean - content
Length NumberLimit - http
Response StringCache Control - http
Response StringContent Disposition - http
Response StringContent Encoding - http
Response StringContent Language - http
Response StringContent Type - http
Response StringExpires
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi