Permalink
Fetching contributors…
Cannot retrieve contributors at this time
124 lines (119 sloc) 4.68 KB
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* The S3 object data source allows access to the metadata and
* _optionally_ (see below) content of an object stored inside S3 bucket.
*
* ~> **Note:** The content of an object (`body` field) is available only for objects which have a human-readable `Content-Type` (`text/*` and `application/json`). This is to prevent printing unsafe characters and potentially downloading large amount of data which would be thrown away in favour of metadata.
*/
export function getBucketObject(args: GetBucketObjectArgs, opts?: pulumi.InvokeOptions): Promise<GetBucketObjectResult> {
return pulumi.runtime.invoke("aws:s3/getBucketObject:getBucketObject", {
"bucket": args.bucket,
"key": args.key,
"range": args.range,
"tags": args.tags,
"versionId": args.versionId,
}, opts);
}
/**
* A collection of arguments for invoking getBucketObject.
*/
export interface GetBucketObjectArgs {
/**
* The name of the bucket to read the object from
*/
readonly bucket: string;
/**
* The full path to the object inside the bucket
*/
readonly key: string;
readonly range?: string;
readonly tags?: {[key: string]: any};
/**
* Specific version ID of the object returned (defaults to latest version)
*/
readonly versionId?: string;
}
/**
* A collection of values returned by getBucketObject.
*/
export interface GetBucketObjectResult {
/**
* Object data (see **limitations above** to understand cases in which this field is actually available)
*/
readonly body: string;
/**
* Specifies caching behavior along the request/reply chain.
*/
readonly cacheControl: string;
/**
* Specifies presentational information for the object.
*/
readonly contentDisposition: string;
/**
* Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
*/
readonly contentEncoding: string;
/**
* The language the content is in.
*/
readonly contentLanguage: string;
/**
* Size of the body in bytes.
*/
readonly contentLength: number;
/**
* A standard MIME type describing the format of the object data.
*/
readonly contentType: string;
/**
* [ETag](https://en.wikipedia.org/wiki/HTTP_ETag) generated for the object (an MD5 sum of the object content in case it's not encrypted)
*/
readonly etag: string;
/**
* If the object expiration is configured (see [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
*/
readonly expiration: string;
/**
* The date and time at which the object is no longer cacheable.
*/
readonly expires: string;
/**
* Last modified date of the object in RFC1123 format (e.g. `Mon, 02 Jan 2006 15:04:05 MST`)
*/
readonly lastModified: string;
/**
* A map of metadata stored with the object in S3
*/
readonly metadata: {[key: string]: any};
/**
* If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
*/
readonly serverSideEncryption: string;
/**
* If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
*/
readonly sseKmsKeyId: string;
/**
* [Storage class](http://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) information of the object. Available for all objects except for `Standard` storage class objects.
*/
readonly storageClass: string;
/**
* A mapping of tags assigned to the object.
*/
readonly tags: {[key: string]: any};
/**
* The latest version ID of the object returned.
*/
readonly versionId: 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. Amazon S3 stores the value of this header in the object metadata.
*/
readonly websiteRedirectLocation: string;
/**
* id is the provider-assigned unique ID for this managed resource.
*/
readonly id: string;
}