Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.s3.inputs.BucketObjectv2State Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.s3.inputs;
import com.pulumi.asset.AssetOrArchive;
import com.pulumi.aws.s3.inputs.BucketObjectv2OverrideProviderArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class BucketObjectv2State extends com.pulumi.resources.ResourceArgs {
public static final BucketObjectv2State Empty = new BucketObjectv2State();
/**
* [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, `bucket-owner-read`, and `bucket-owner-full-control`.
*
*/
@Import(name="acl")
private @Nullable Output acl;
/**
* @return [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, `bucket-owner-read`, and `bucket-owner-full-control`.
*
*/
public Optional> acl() {
return Optional.ofNullable(this.acl);
}
/**
* ARN of the object.
*
*/
@Import(name="arn")
private @Nullable Output arn;
/**
* @return ARN of the object.
*
*/
public Optional> arn() {
return Optional.ofNullable(this.arn);
}
/**
* Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified.
*
*/
@Import(name="bucket")
private @Nullable Output bucket;
/**
* @return Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified.
*
*/
public Optional> bucket() {
return Optional.ofNullable(this.bucket);
}
/**
* Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS.
*
*/
@Import(name="bucketKeyEnabled")
private @Nullable Output bucketKeyEnabled;
/**
* @return Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS.
*
*/
public Optional> bucketKeyEnabled() {
return Optional.ofNullable(this.bucketKeyEnabled);
}
/**
* Caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
*
*/
@Import(name="cacheControl")
private @Nullable Output cacheControl;
/**
* @return Caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
*
*/
public Optional> cacheControl() {
return Optional.ofNullable(this.cacheControl);
}
/**
* Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the `kms:Decrypt` action. Valid values: `CRC32`, `CRC32C`, `SHA1`, `SHA256`.
*
*/
@Import(name="checksumAlgorithm")
private @Nullable Output checksumAlgorithm;
/**
* @return Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the `kms:Decrypt` action. Valid values: `CRC32`, `CRC32C`, `SHA1`, `SHA256`.
*
*/
public Optional> checksumAlgorithm() {
return Optional.ofNullable(this.checksumAlgorithm);
}
/**
* The base64-encoded, 32-bit CRC32 checksum of the object.
*
*/
@Import(name="checksumCrc32")
private @Nullable Output checksumCrc32;
/**
* @return The base64-encoded, 32-bit CRC32 checksum of the object.
*
*/
public Optional> checksumCrc32() {
return Optional.ofNullable(this.checksumCrc32);
}
/**
* The base64-encoded, 32-bit CRC32C checksum of the object.
*
*/
@Import(name="checksumCrc32c")
private @Nullable Output checksumCrc32c;
/**
* @return The base64-encoded, 32-bit CRC32C checksum of the object.
*
*/
public Optional> checksumCrc32c() {
return Optional.ofNullable(this.checksumCrc32c);
}
/**
* The base64-encoded, 160-bit SHA-1 digest of the object.
*
*/
@Import(name="checksumSha1")
private @Nullable Output checksumSha1;
/**
* @return The base64-encoded, 160-bit SHA-1 digest of the object.
*
*/
public Optional> checksumSha1() {
return Optional.ofNullable(this.checksumSha1);
}
/**
* The base64-encoded, 256-bit SHA-256 digest of the object.
*
*/
@Import(name="checksumSha256")
private @Nullable Output checksumSha256;
/**
* @return The base64-encoded, 256-bit SHA-256 digest of the object.
*
*/
public Optional> checksumSha256() {
return Optional.ofNullable(this.checksumSha256);
}
/**
* Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
*
*/
@Import(name="content")
private @Nullable Output content;
/**
* @return Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
*
*/
public Optional> content() {
return Optional.ofNullable(this.content);
}
/**
* Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file.
*
*/
@Import(name="contentBase64")
private @Nullable Output contentBase64;
/**
* @return Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file.
*
*/
public Optional> contentBase64() {
return Optional.ofNullable(this.contentBase64);
}
/**
* Presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
*
*/
@Import(name="contentDisposition")
private @Nullable Output contentDisposition;
/**
* @return Presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
*
*/
public Optional> contentDisposition() {
return Optional.ofNullable(this.contentDisposition);
}
/**
* Content encodings that 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. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
*
*/
@Import(name="contentEncoding")
private @Nullable Output contentEncoding;
/**
* @return Content encodings that 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. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
*
*/
public Optional> contentEncoding() {
return Optional.ofNullable(this.contentEncoding);
}
/**
* Language the content is in e.g., en-US or en-GB.
*
*/
@Import(name="contentLanguage")
private @Nullable Output contentLanguage;
/**
* @return Language the content is in e.g., en-US or en-GB.
*
*/
public Optional> contentLanguage() {
return Optional.ofNullable(this.contentLanguage);
}
/**
* Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
*
*/
@Import(name="contentType")
private @Nullable Output contentType;
/**
* @return Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
*
*/
public Optional> contentType() {
return Optional.ofNullable(this.contentType);
}
/**
* Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kms_key_id` or `server_side_encryption = "aws:kms"`, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (see `source_hash` instead).
*
*/
@Import(name="etag")
private @Nullable Output etag;
/**
* @return Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kms_key_id` or `server_side_encryption = "aws:kms"`, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (see `source_hash` instead).
*
*/
public Optional> etag() {
return Optional.ofNullable(this.etag);
}
/**
* Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled.
*
*/
@Import(name="forceDestroy")
private @Nullable Output forceDestroy;
/**
* @return Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled.
*
*/
public Optional> forceDestroy() {
return Optional.ofNullable(this.forceDestroy);
}
/**
* Name of the object once it is in the bucket.
*
* The following arguments are optional:
*
*/
@Import(name="key")
private @Nullable Output key;
/**
* @return Name of the object once it is in the bucket.
*
* The following arguments are optional:
*
*/
public Optional> key() {
return Optional.ofNullable(this.key);
}
/**
* ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `aws.kms.Key` resource, use the `arn` attribute. If referencing the `aws.kms.Alias` data source or resource, use the `target_key_arn` attribute. The provider will only perform drift detection if a configuration value is provided.
*
*/
@Import(name="kmsKeyId")
private @Nullable Output kmsKeyId;
/**
* @return ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `aws.kms.Key` resource, use the `arn` attribute. If referencing the `aws.kms.Alias` data source or resource, use the `target_key_arn` attribute. The provider will only perform drift detection if a configuration value is provided.
*
*/
public Optional> kmsKeyId() {
return Optional.ofNullable(this.kmsKeyId);
}
/**
* Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API).
*
*/
@Import(name="metadata")
private @Nullable Output> metadata;
/**
* @return Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API).
*
*/
public Optional>> metadata() {
return Optional.ofNullable(this.metadata);
}
/**
* [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`.
*
*/
@Import(name="objectLockLegalHoldStatus")
private @Nullable Output objectLockLegalHoldStatus;
/**
* @return [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`.
*
*/
public Optional> objectLockLegalHoldStatus() {
return Optional.ofNullable(this.objectLockLegalHoldStatus);
}
/**
* Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`.
*
*/
@Import(name="objectLockMode")
private @Nullable Output objectLockMode;
/**
* @return Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`.
*
*/
public Optional> objectLockMode() {
return Optional.ofNullable(this.objectLockMode);
}
/**
* Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods).
*
*/
@Import(name="objectLockRetainUntilDate")
private @Nullable Output objectLockRetainUntilDate;
/**
* @return Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods).
*
*/
public Optional> objectLockRetainUntilDate() {
return Optional.ofNullable(this.objectLockRetainUntilDate);
}
/**
* Override provider-level configuration options. See Override Provider below for more details.
*
*/
@Import(name="overrideProvider")
private @Nullable Output overrideProvider;
/**
* @return Override provider-level configuration options. See Override Provider below for more details.
*
*/
public Optional> overrideProvider() {
return Optional.ofNullable(this.overrideProvider);
}
/**
* Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`".
*
*/
@Import(name="serverSideEncryption")
private @Nullable Output serverSideEncryption;
/**
* @return Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`".
*
*/
public Optional> serverSideEncryption() {
return Optional.ofNullable(this.serverSideEncryption);
}
/**
* Path to a file that will be read and uploaded as raw bytes for the object content.
*
*/
@Import(name="source")
private @Nullable Output source;
/**
* @return Path to a file that will be read and uploaded as raw bytes for the object content.
*
*/
public Optional> source() {
return Optional.ofNullable(this.source);
}
/**
* Triggers updates like `etag` but useful to address `etag` encryption limitations. (The value is only stored in state and not saved by AWS.)
*
*/
@Import(name="sourceHash")
private @Nullable Output sourceHash;
/**
* @return Triggers updates like `etag` but useful to address `etag` encryption limitations. (The value is only stored in state and not saved by AWS.)
*
*/
public Optional> sourceHash() {
return Optional.ofNullable(this.sourceHash);
}
/**
* [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`".
*
*/
@Import(name="storageClass")
private @Nullable Output storageClass;
/**
* @return [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`".
*
*/
public Optional> storageClass() {
return Optional.ofNullable(this.storageClass);
}
/**
* Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Import(name="tagsAll")
private @Nullable Output> tagsAll;
/**
* @return Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
public Optional>> tagsAll() {
return Optional.ofNullable(this.tagsAll);
}
/**
* Unique version ID value for the object, if bucket versioning is enabled.
*
*/
@Import(name="versionId")
private @Nullable Output versionId;
/**
* @return Unique version ID value for the object, if bucket versioning is enabled.
*
*/
public Optional> versionId() {
return Optional.ofNullable(this.versionId);
}
/**
* Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
*
* If no content is provided through `source`, `content` or `content_base64`, then the object will be empty.
*
* > **Note:** The provider ignores all leading `/`s in the object's `key` and treats multiple `/`s in the rest of the object's `key` as a single `/`, so values of `/index.html` and `index.html` correspond to the same S3 object as do `first//second///third//` and `first/second/third/`.
*
*/
@Import(name="websiteRedirect")
private @Nullable Output websiteRedirect;
/**
* @return Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
*
* If no content is provided through `source`, `content` or `content_base64`, then the object will be empty.
*
* > **Note:** The provider ignores all leading `/`s in the object's `key` and treats multiple `/`s in the rest of the object's `key` as a single `/`, so values of `/index.html` and `index.html` correspond to the same S3 object as do `first//second///third//` and `first/second/third/`.
*
*/
public Optional> websiteRedirect() {
return Optional.ofNullable(this.websiteRedirect);
}
private BucketObjectv2State() {}
private BucketObjectv2State(BucketObjectv2State $) {
this.acl = $.acl;
this.arn = $.arn;
this.bucket = $.bucket;
this.bucketKeyEnabled = $.bucketKeyEnabled;
this.cacheControl = $.cacheControl;
this.checksumAlgorithm = $.checksumAlgorithm;
this.checksumCrc32 = $.checksumCrc32;
this.checksumCrc32c = $.checksumCrc32c;
this.checksumSha1 = $.checksumSha1;
this.checksumSha256 = $.checksumSha256;
this.content = $.content;
this.contentBase64 = $.contentBase64;
this.contentDisposition = $.contentDisposition;
this.contentEncoding = $.contentEncoding;
this.contentLanguage = $.contentLanguage;
this.contentType = $.contentType;
this.etag = $.etag;
this.forceDestroy = $.forceDestroy;
this.key = $.key;
this.kmsKeyId = $.kmsKeyId;
this.metadata = $.metadata;
this.objectLockLegalHoldStatus = $.objectLockLegalHoldStatus;
this.objectLockMode = $.objectLockMode;
this.objectLockRetainUntilDate = $.objectLockRetainUntilDate;
this.overrideProvider = $.overrideProvider;
this.serverSideEncryption = $.serverSideEncryption;
this.source = $.source;
this.sourceHash = $.sourceHash;
this.storageClass = $.storageClass;
this.tags = $.tags;
this.tagsAll = $.tagsAll;
this.versionId = $.versionId;
this.websiteRedirect = $.websiteRedirect;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(BucketObjectv2State defaults) {
return new Builder(defaults);
}
public static final class Builder {
private BucketObjectv2State $;
public Builder() {
$ = new BucketObjectv2State();
}
public Builder(BucketObjectv2State defaults) {
$ = new BucketObjectv2State(Objects.requireNonNull(defaults));
}
/**
* @param acl [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, `bucket-owner-read`, and `bucket-owner-full-control`.
*
* @return builder
*
*/
public Builder acl(@Nullable Output acl) {
$.acl = acl;
return this;
}
/**
* @param acl [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, `bucket-owner-read`, and `bucket-owner-full-control`.
*
* @return builder
*
*/
public Builder acl(String acl) {
return acl(Output.of(acl));
}
/**
* @param arn ARN of the object.
*
* @return builder
*
*/
public Builder arn(@Nullable Output arn) {
$.arn = arn;
return this;
}
/**
* @param arn ARN of the object.
*
* @return builder
*
*/
public Builder arn(String arn) {
return arn(Output.of(arn));
}
/**
* @param bucket Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified.
*
* @return builder
*
*/
public Builder bucket(@Nullable Output bucket) {
$.bucket = bucket;
return this;
}
/**
* @param bucket Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified.
*
* @return builder
*
*/
public Builder bucket(String bucket) {
return bucket(Output.of(bucket));
}
/**
* @param bucketKeyEnabled Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS.
*
* @return builder
*
*/
public Builder bucketKeyEnabled(@Nullable Output bucketKeyEnabled) {
$.bucketKeyEnabled = bucketKeyEnabled;
return this;
}
/**
* @param bucketKeyEnabled Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS.
*
* @return builder
*
*/
public Builder bucketKeyEnabled(Boolean bucketKeyEnabled) {
return bucketKeyEnabled(Output.of(bucketKeyEnabled));
}
/**
* @param cacheControl Caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
*
* @return builder
*
*/
public Builder cacheControl(@Nullable Output cacheControl) {
$.cacheControl = cacheControl;
return this;
}
/**
* @param cacheControl Caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
*
* @return builder
*
*/
public Builder cacheControl(String cacheControl) {
return cacheControl(Output.of(cacheControl));
}
/**
* @param checksumAlgorithm Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the `kms:Decrypt` action. Valid values: `CRC32`, `CRC32C`, `SHA1`, `SHA256`.
*
* @return builder
*
*/
public Builder checksumAlgorithm(@Nullable Output checksumAlgorithm) {
$.checksumAlgorithm = checksumAlgorithm;
return this;
}
/**
* @param checksumAlgorithm Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the `kms:Decrypt` action. Valid values: `CRC32`, `CRC32C`, `SHA1`, `SHA256`.
*
* @return builder
*
*/
public Builder checksumAlgorithm(String checksumAlgorithm) {
return checksumAlgorithm(Output.of(checksumAlgorithm));
}
/**
* @param checksumCrc32 The base64-encoded, 32-bit CRC32 checksum of the object.
*
* @return builder
*
*/
public Builder checksumCrc32(@Nullable Output checksumCrc32) {
$.checksumCrc32 = checksumCrc32;
return this;
}
/**
* @param checksumCrc32 The base64-encoded, 32-bit CRC32 checksum of the object.
*
* @return builder
*
*/
public Builder checksumCrc32(String checksumCrc32) {
return checksumCrc32(Output.of(checksumCrc32));
}
/**
* @param checksumCrc32c The base64-encoded, 32-bit CRC32C checksum of the object.
*
* @return builder
*
*/
public Builder checksumCrc32c(@Nullable Output checksumCrc32c) {
$.checksumCrc32c = checksumCrc32c;
return this;
}
/**
* @param checksumCrc32c The base64-encoded, 32-bit CRC32C checksum of the object.
*
* @return builder
*
*/
public Builder checksumCrc32c(String checksumCrc32c) {
return checksumCrc32c(Output.of(checksumCrc32c));
}
/**
* @param checksumSha1 The base64-encoded, 160-bit SHA-1 digest of the object.
*
* @return builder
*
*/
public Builder checksumSha1(@Nullable Output checksumSha1) {
$.checksumSha1 = checksumSha1;
return this;
}
/**
* @param checksumSha1 The base64-encoded, 160-bit SHA-1 digest of the object.
*
* @return builder
*
*/
public Builder checksumSha1(String checksumSha1) {
return checksumSha1(Output.of(checksumSha1));
}
/**
* @param checksumSha256 The base64-encoded, 256-bit SHA-256 digest of the object.
*
* @return builder
*
*/
public Builder checksumSha256(@Nullable Output checksumSha256) {
$.checksumSha256 = checksumSha256;
return this;
}
/**
* @param checksumSha256 The base64-encoded, 256-bit SHA-256 digest of the object.
*
* @return builder
*
*/
public Builder checksumSha256(String checksumSha256) {
return checksumSha256(Output.of(checksumSha256));
}
/**
* @param content Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
*
* @return builder
*
*/
public Builder content(@Nullable Output content) {
$.content = content;
return this;
}
/**
* @param content Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
*
* @return builder
*
*/
public Builder content(String content) {
return content(Output.of(content));
}
/**
* @param contentBase64 Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file.
*
* @return builder
*
*/
public Builder contentBase64(@Nullable Output contentBase64) {
$.contentBase64 = contentBase64;
return this;
}
/**
* @param contentBase64 Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file.
*
* @return builder
*
*/
public Builder contentBase64(String contentBase64) {
return contentBase64(Output.of(contentBase64));
}
/**
* @param contentDisposition Presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
*
* @return builder
*
*/
public Builder contentDisposition(@Nullable Output contentDisposition) {
$.contentDisposition = contentDisposition;
return this;
}
/**
* @param contentDisposition Presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
*
* @return builder
*
*/
public Builder contentDisposition(String contentDisposition) {
return contentDisposition(Output.of(contentDisposition));
}
/**
* @param contentEncoding Content encodings that 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. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
*
* @return builder
*
*/
public Builder contentEncoding(@Nullable Output contentEncoding) {
$.contentEncoding = contentEncoding;
return this;
}
/**
* @param contentEncoding Content encodings that 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. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
*
* @return builder
*
*/
public Builder contentEncoding(String contentEncoding) {
return contentEncoding(Output.of(contentEncoding));
}
/**
* @param contentLanguage Language the content is in e.g., en-US or en-GB.
*
* @return builder
*
*/
public Builder contentLanguage(@Nullable Output contentLanguage) {
$.contentLanguage = contentLanguage;
return this;
}
/**
* @param contentLanguage Language the content is in e.g., en-US or en-GB.
*
* @return builder
*
*/
public Builder contentLanguage(String contentLanguage) {
return contentLanguage(Output.of(contentLanguage));
}
/**
* @param contentType Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
*
* @return builder
*
*/
public Builder contentType(@Nullable Output contentType) {
$.contentType = contentType;
return this;
}
/**
* @param contentType Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
*
* @return builder
*
*/
public Builder contentType(String contentType) {
return contentType(Output.of(contentType));
}
/**
* @param etag Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kms_key_id` or `server_side_encryption = "aws:kms"`, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (see `source_hash` instead).
*
* @return builder
*
*/
public Builder etag(@Nullable Output etag) {
$.etag = etag;
return this;
}
/**
* @param etag Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kms_key_id` or `server_side_encryption = "aws:kms"`, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (see `source_hash` instead).
*
* @return builder
*
*/
public Builder etag(String etag) {
return etag(Output.of(etag));
}
/**
* @param forceDestroy Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled.
*
* @return builder
*
*/
public Builder forceDestroy(@Nullable Output forceDestroy) {
$.forceDestroy = forceDestroy;
return this;
}
/**
* @param forceDestroy Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled.
*
* @return builder
*
*/
public Builder forceDestroy(Boolean forceDestroy) {
return forceDestroy(Output.of(forceDestroy));
}
/**
* @param key Name of the object once it is in the bucket.
*
* The following arguments are optional:
*
* @return builder
*
*/
public Builder key(@Nullable Output key) {
$.key = key;
return this;
}
/**
* @param key Name of the object once it is in the bucket.
*
* The following arguments are optional:
*
* @return builder
*
*/
public Builder key(String key) {
return key(Output.of(key));
}
/**
* @param kmsKeyId ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `aws.kms.Key` resource, use the `arn` attribute. If referencing the `aws.kms.Alias` data source or resource, use the `target_key_arn` attribute. The provider will only perform drift detection if a configuration value is provided.
*
* @return builder
*
*/
public Builder kmsKeyId(@Nullable Output kmsKeyId) {
$.kmsKeyId = kmsKeyId;
return this;
}
/**
* @param kmsKeyId ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `aws.kms.Key` resource, use the `arn` attribute. If referencing the `aws.kms.Alias` data source or resource, use the `target_key_arn` attribute. The provider will only perform drift detection if a configuration value is provided.
*
* @return builder
*
*/
public Builder kmsKeyId(String kmsKeyId) {
return kmsKeyId(Output.of(kmsKeyId));
}
/**
* @param metadata Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API).
*
* @return builder
*
*/
public Builder metadata(@Nullable Output> metadata) {
$.metadata = metadata;
return this;
}
/**
* @param metadata Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API).
*
* @return builder
*
*/
public Builder metadata(Map metadata) {
return metadata(Output.of(metadata));
}
/**
* @param objectLockLegalHoldStatus [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`.
*
* @return builder
*
*/
public Builder objectLockLegalHoldStatus(@Nullable Output objectLockLegalHoldStatus) {
$.objectLockLegalHoldStatus = objectLockLegalHoldStatus;
return this;
}
/**
* @param objectLockLegalHoldStatus [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`.
*
* @return builder
*
*/
public Builder objectLockLegalHoldStatus(String objectLockLegalHoldStatus) {
return objectLockLegalHoldStatus(Output.of(objectLockLegalHoldStatus));
}
/**
* @param objectLockMode Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`.
*
* @return builder
*
*/
public Builder objectLockMode(@Nullable Output objectLockMode) {
$.objectLockMode = objectLockMode;
return this;
}
/**
* @param objectLockMode Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`.
*
* @return builder
*
*/
public Builder objectLockMode(String objectLockMode) {
return objectLockMode(Output.of(objectLockMode));
}
/**
* @param objectLockRetainUntilDate Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods).
*
* @return builder
*
*/
public Builder objectLockRetainUntilDate(@Nullable Output objectLockRetainUntilDate) {
$.objectLockRetainUntilDate = objectLockRetainUntilDate;
return this;
}
/**
* @param objectLockRetainUntilDate Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods).
*
* @return builder
*
*/
public Builder objectLockRetainUntilDate(String objectLockRetainUntilDate) {
return objectLockRetainUntilDate(Output.of(objectLockRetainUntilDate));
}
/**
* @param overrideProvider Override provider-level configuration options. See Override Provider below for more details.
*
* @return builder
*
*/
public Builder overrideProvider(@Nullable Output overrideProvider) {
$.overrideProvider = overrideProvider;
return this;
}
/**
* @param overrideProvider Override provider-level configuration options. See Override Provider below for more details.
*
* @return builder
*
*/
public Builder overrideProvider(BucketObjectv2OverrideProviderArgs overrideProvider) {
return overrideProvider(Output.of(overrideProvider));
}
/**
* @param serverSideEncryption Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`".
*
* @return builder
*
*/
public Builder serverSideEncryption(@Nullable Output serverSideEncryption) {
$.serverSideEncryption = serverSideEncryption;
return this;
}
/**
* @param serverSideEncryption Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`".
*
* @return builder
*
*/
public Builder serverSideEncryption(String serverSideEncryption) {
return serverSideEncryption(Output.of(serverSideEncryption));
}
/**
* @param source Path to a file that will be read and uploaded as raw bytes for the object content.
*
* @return builder
*
*/
public Builder source(@Nullable Output source) {
$.source = source;
return this;
}
/**
* @param source Path to a file that will be read and uploaded as raw bytes for the object content.
*
* @return builder
*
*/
public Builder source(AssetOrArchive source) {
return source(Output.of(source));
}
/**
* @param sourceHash Triggers updates like `etag` but useful to address `etag` encryption limitations. (The value is only stored in state and not saved by AWS.)
*
* @return builder
*
*/
public Builder sourceHash(@Nullable Output sourceHash) {
$.sourceHash = sourceHash;
return this;
}
/**
* @param sourceHash Triggers updates like `etag` but useful to address `etag` encryption limitations. (The value is only stored in state and not saved by AWS.)
*
* @return builder
*
*/
public Builder sourceHash(String sourceHash) {
return sourceHash(Output.of(sourceHash));
}
/**
* @param storageClass [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`".
*
* @return builder
*
*/
public Builder storageClass(@Nullable Output storageClass) {
$.storageClass = storageClass;
return this;
}
/**
* @param storageClass [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`".
*
* @return builder
*
*/
public Builder storageClass(String storageClass) {
return storageClass(Output.of(storageClass));
}
/**
* @param tags Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param tagsAll Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @return builder
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
public Builder tagsAll(@Nullable Output> tagsAll) {
$.tagsAll = tagsAll;
return this;
}
/**
* @param tagsAll Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @return builder
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
public Builder tagsAll(Map tagsAll) {
return tagsAll(Output.of(tagsAll));
}
/**
* @param versionId Unique version ID value for the object, if bucket versioning is enabled.
*
* @return builder
*
*/
public Builder versionId(@Nullable Output versionId) {
$.versionId = versionId;
return this;
}
/**
* @param versionId Unique version ID value for the object, if bucket versioning is enabled.
*
* @return builder
*
*/
public Builder versionId(String versionId) {
return versionId(Output.of(versionId));
}
/**
* @param websiteRedirect Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
*
* If no content is provided through `source`, `content` or `content_base64`, then the object will be empty.
*
* > **Note:** The provider ignores all leading `/`s in the object's `key` and treats multiple `/`s in the rest of the object's `key` as a single `/`, so values of `/index.html` and `index.html` correspond to the same S3 object as do `first//second///third//` and `first/second/third/`.
*
* @return builder
*
*/
public Builder websiteRedirect(@Nullable Output websiteRedirect) {
$.websiteRedirect = websiteRedirect;
return this;
}
/**
* @param websiteRedirect Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
*
* If no content is provided through `source`, `content` or `content_base64`, then the object will be empty.
*
* > **Note:** The provider ignores all leading `/`s in the object's `key` and treats multiple `/`s in the rest of the object's `key` as a single `/`, so values of `/index.html` and `index.html` correspond to the same S3 object as do `first//second///third//` and `first/second/third/`.
*
* @return builder
*
*/
public Builder websiteRedirect(String websiteRedirect) {
return websiteRedirect(Output.of(websiteRedirect));
}
public BucketObjectv2State build() {
return $;
}
}
}