import * as core from "@terrascript/core"; export interface DsObjectArgs { /** * (Required) The name of the bucket to read the object from. Alternatively, an [S3 access point](https * ://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified */ bucket: string | core.StringOut; /** * (Required) The full path to the object inside the bucket */ key: string | core.StringOut; range?: string | core.StringOut; tags?: core.Map | core.MapOut; /** * (Optional) Specific version ID of the object returned (defaults to latest version) */ versionId?: string | core.StringOut; } export class DsObject extends core.Data { /** * Object data (see **limitations above** to understand cases in which this field is actually available * ) */ @core.attr(String, { computed: true }) public body!: string | core.StringOut; /** * (Required) The name of the bucket to read the object from. Alternatively, an [S3 access point](https * ://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified */ @core.attr(String) public bucket!: string | core.StringOut; /** * (Optional) Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest * /dev/bucket-key.html) for SSE-KMS. */ @core.attr(Boolean, { computed: true }) public bucketKeyEnabled!: boolean | core.BooleanOut; /** * Specifies caching behavior along the request/reply chain. */ @core.attr(String, { computed: true }) public cacheControl!: string | core.StringOut; /** * Specifies presentational information for the object. */ @core.attr(String, { computed: true }) public contentDisposition!: string | core.StringOut; /** * Specifies what content encodings have been applied to the object and thus what decoding mechanisms m * ust be applied to obtain the media-type referenced by the Content-Type header field. */ @core.attr(String, { computed: true }) public contentEncoding!: string | core.StringOut; /** * The language the content is in. */ @core.attr(String, { computed: true }) public contentLanguage!: string | core.StringOut; /** * Size of the body in bytes. */ @core.attr(Number, { computed: true }) public contentLength!: number | core.NumberOut; /** * A standard MIME type describing the format of the object data. */ @core.attr(String, { computed: true }) public contentType!: string | core.StringOut; /** * [ETag](https://en.wikipedia.org/wiki/HTTP_ETag) generated for the object (an MD5 sum of the object c * ontent in case it's not encrypted) */ @core.attr(String, { computed: true }) public etag!: string | core.StringOut; /** * 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 e * xpiry-date and rule-id key value pairs providing object expiration information. The value of the rul * e-id is URL encoded. */ @core.attr(String, { computed: true }) public expiration!: string | core.StringOut; /** * The date and time at which the object is no longer cacheable. */ @core.attr(String, { computed: true }) public expires!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) The full path to the object inside the bucket */ @core.attr(String) public key!: string | core.StringOut; /** * Last modified date of the object in RFC1123 format (e.g., `Mon, 02 Jan 2006 15:04:05 MST`) */ @core.attr(String, { computed: true }) public lastModified!: string | core.StringOut; /** * A map of metadata stored with the object in S3 */ @core.attr(String, { computed: true, kind: "map" }) public metadata!: core.Map | core.MapOut; /** * Indicates whether this object has an active [legal hold](https://docs.aws.amazon.com/AmazonS3/latest * /dev/object-lock-overview.html#object-lock-legal-holds). This field is only returned if you have per * mission to view an object's legal hold status. */ @core.attr(String, { computed: true }) public objectLockLegalHoldStatus!: string | core.StringOut; /** * The object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overvie * w.html#object-lock-retention-modes) currently in place for this object. */ @core.attr(String, { computed: true }) public objectLockMode!: string | core.StringOut; /** * The date and time when this object's object lock will expire. */ @core.attr(String, { computed: true }) public objectLockRetainUntilDate!: string | core.StringOut; @core.attr(String) public range?: string | core.StringOut; /** * 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. */ @core.attr(String, { computed: true }) public serverSideEncryption!: string | core.StringOut; /** * If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used * for the object. */ @core.attr(String, { computed: true }) public sseKmsKeyId!: string | core.StringOut; /** * [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. */ @core.attr(String, { computed: true }) public storageClass!: string | core.StringOut; @core.attr(String, { computed: true, kind: "map" }) public tags?: core.Map | core.MapOut; /** * (Optional) Specific version ID of the object returned (defaults to latest version) */ @core.attr(String, { computed: true }) public versionId?: string | core.StringOut; /** * If the bucket is configured as a website, redirects requests for this object to another object in th * e same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadat * a. */ @core.attr(String, { computed: true }) public websiteRedirectLocation!: string | core.StringOut; constructor(name: string, args?: DsObjectArgs) { super(name, "aws_s3_object", args); } public override getNamespace(): string { return "aws_s3"; } }