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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.s3.kotlin
import com.pulumi.aws.s3.ObjectCopyArgs.builder
import com.pulumi.aws.s3.kotlin.inputs.ObjectCopyGrantArgs
import com.pulumi.aws.s3.kotlin.inputs.ObjectCopyGrantArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a resource for copying an S3 object.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.s3.ObjectCopy("test", {
* bucket: "destination_bucket",
* key: "destination_key",
* source: "source_bucket/source_key",
* grants: [{
* uri: "http://acs.amazonaws.com/groups/global/AllUsers",
* type: "Group",
* permissions: ["READ"],
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.s3.ObjectCopy("test",
* bucket="destination_bucket",
* key="destination_key",
* source="source_bucket/source_key",
* grants=[{
* "uri": "http://acs.amazonaws.com/groups/global/AllUsers",
* "type": "Group",
* "permissions": ["READ"],
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.S3.ObjectCopy("test", new()
* {
* Bucket = "destination_bucket",
* Key = "destination_key",
* Source = "source_bucket/source_key",
* Grants = new[]
* {
* new Aws.S3.Inputs.ObjectCopyGrantArgs
* {
* Uri = "http://acs.amazonaws.com/groups/global/AllUsers",
* Type = "Group",
* Permissions = new[]
* {
* "READ",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := s3.NewObjectCopy(ctx, "test", &s3.ObjectCopyArgs{
* Bucket: pulumi.String("destination_bucket"),
* Key: pulumi.String("destination_key"),
* Source: pulumi.String("source_bucket/source_key"),
* Grants: s3.ObjectCopyGrantArray{
* &s3.ObjectCopyGrantArgs{
* Uri: pulumi.String("http://acs.amazonaws.com/groups/global/AllUsers"),
* Type: pulumi.String("Group"),
* Permissions: pulumi.StringArray{
* pulumi.String("READ"),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.s3.ObjectCopy;
* import com.pulumi.aws.s3.ObjectCopyArgs;
* import com.pulumi.aws.s3.inputs.ObjectCopyGrantArgs;
* 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) {
* var test = new ObjectCopy("test", ObjectCopyArgs.builder()
* .bucket("destination_bucket")
* .key("destination_key")
* .source("source_bucket/source_key")
* .grants(ObjectCopyGrantArgs.builder()
* .uri("http://acs.amazonaws.com/groups/global/AllUsers")
* .type("Group")
* .permissions("READ")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:s3:ObjectCopy
* properties:
* bucket: destination_bucket
* key: destination_key
* source: source_bucket/source_key
* grants:
* - uri: http://acs.amazonaws.com/groups/global/AllUsers
* type: Group
* permissions:
* - READ
* ```
*
* @property 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`, `authenticated-read`, `aws-exec-read`, `bucket-owner-read`, and `bucket-owner-full-control`. Conflicts with `grant`.
* @property bucket Name of the bucket to put the file in.
* @property bucketKeyEnabled
* @property cacheControl Specifies 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.
* @property 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`.
* @property contentDisposition Specifies presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
* @property contentEncoding 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. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
* @property contentLanguage Language the content is in e.g., en-US or en-GB.
* @property 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.
* @property copyIfMatch Copies the object if its entity tag (ETag) matches the specified tag.
* @property copyIfModifiedSince Copies the object if it has been modified since the specified time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
* @property copyIfNoneMatch Copies the object if its entity tag (ETag) is different than the specified ETag.
* @property copyIfUnmodifiedSince Copies the object if it hasn't been modified since the specified time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
* @property customerAlgorithm Specifies the algorithm to use to when encrypting the object (for example, AES256).
* @property customerKey Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.
* @property customerKeyMd5 Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
* @property expectedBucketOwner Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
* @property expectedSourceBucketOwner Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
* @property expires Date and time at which the object is no longer cacheable, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
* @property forceDestroy 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.
* @property grants Configuration block for header grants. Documented below. Conflicts with `acl`.
* @property key Name of the object once it is in the bucket.
* @property kmsEncryptionContext Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
* @property kmsKeyId Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified **ARN** of the KMS Key. If using `aws.kms.Key`, use the exported `arn` attribute: `kms_key_id = aws_kms_key.foo.arn`
* @property 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).
* @property metadataDirective Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are `COPY` and `REPLACE`.
* @property objectLockLegalHoldStatus The [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`.
* @property 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`.
* @property 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).
* @property requestPayer Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is `requester`.
* @property serverSideEncryption Specifies server-side encryption of the object in S3. Valid values are `AES256` and `aws:kms`.
* @property source Specifies the source object for the copy operation. You specify the value in one of two formats. For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (`/`). For example, `testbucket/test1.json`. For objects accessed through access points, specify the ARN of the object as accessed through the access point, in the format `arn:aws:s3:::accesspoint//object/`. For example, `arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json`.
* The following arguments are optional:
* @property sourceCustomerAlgorithm Specifies the algorithm to use when decrypting the source object (for example, AES256).
* @property sourceCustomerKey Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
* @property sourceCustomerKeyMd5 Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
* @property storageClass Specifies the desired [storage class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html#AmazonS3-CopyObject-request-header-StorageClass) for the object. Defaults to `STANDARD`.
* @property taggingDirective Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are `COPY` and `REPLACE`.
* @property 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.
* @property websiteRedirect Specifies a target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
*/
public data class ObjectCopyArgs(
public val acl: Output? = null,
public val bucket: Output? = null,
public val bucketKeyEnabled: Output? = null,
public val cacheControl: Output? = null,
public val checksumAlgorithm: Output? = null,
public val contentDisposition: Output? = null,
public val contentEncoding: Output? = null,
public val contentLanguage: Output? = null,
public val contentType: Output? = null,
public val copyIfMatch: Output? = null,
public val copyIfModifiedSince: Output? = null,
public val copyIfNoneMatch: Output? = null,
public val copyIfUnmodifiedSince: Output? = null,
public val customerAlgorithm: Output? = null,
public val customerKey: Output? = null,
public val customerKeyMd5: Output? = null,
public val expectedBucketOwner: Output? = null,
public val expectedSourceBucketOwner: Output? = null,
public val expires: Output? = null,
public val forceDestroy: Output? = null,
public val grants: Output>? = null,
public val key: Output? = null,
public val kmsEncryptionContext: Output? = null,
public val kmsKeyId: Output? = null,
public val metadata: Output