com.pulumi.aws.s3.BucketAccelerateConfigurationV2 Maven / Gradle / Ivy
// *** 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;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.s3.BucketAccelerateConfigurationV2Args;
import com.pulumi.aws.s3.inputs.BucketAccelerateConfigurationV2State;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides an S3 bucket accelerate configuration resource. See the [Requirements for using Transfer Acceleration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html#transfer-acceleration-requirements) for more details.
*
* > This resource cannot be used with S3 directory buckets.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.s3.BucketV2;
* import com.pulumi.aws.s3.BucketV2Args;
* import com.pulumi.aws.s3.BucketAccelerateConfigurationV2;
* import com.pulumi.aws.s3.BucketAccelerateConfigurationV2Args;
* 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 mybucket = new BucketV2("mybucket", BucketV2Args.builder()
* .bucket("mybucket")
* .build());
*
* var example = new BucketAccelerateConfigurationV2("example", BucketAccelerateConfigurationV2Args.builder()
* .bucket(mybucket.id())
* .status("Enabled")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):
*
* __Using `pulumi import` to import.__ For example:
*
* If the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, import using the `bucket`:
*
* ```sh
* $ pulumi import aws:s3/bucketAccelerateConfigurationV2:BucketAccelerateConfigurationV2 example bucket-name
* ```
* If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):
*
* ```sh
* $ pulumi import aws:s3/bucketAccelerateConfigurationV2:BucketAccelerateConfigurationV2 example bucket-name,123456789012
* ```
*
*/
@ResourceType(type="aws:s3/bucketAccelerateConfigurationV2:BucketAccelerateConfigurationV2")
public class BucketAccelerateConfigurationV2 extends com.pulumi.resources.CustomResource {
/**
* Name of the bucket.
*
*/
@Export(name="bucket", refs={String.class}, tree="[0]")
private Output bucket;
/**
* @return Name of the bucket.
*
*/
public Output bucket() {
return this.bucket;
}
/**
* Account ID of the expected bucket owner.
*
*/
@Export(name="expectedBucketOwner", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> expectedBucketOwner;
/**
* @return Account ID of the expected bucket owner.
*
*/
public Output> expectedBucketOwner() {
return Codegen.optional(this.expectedBucketOwner);
}
/**
* Transfer acceleration state of the bucket. Valid values: `Enabled`, `Suspended`.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
/**
* @return Transfer acceleration state of the bucket. Valid values: `Enabled`, `Suspended`.
*
*/
public Output status() {
return this.status;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public BucketAccelerateConfigurationV2(java.lang.String name) {
this(name, BucketAccelerateConfigurationV2Args.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public BucketAccelerateConfigurationV2(java.lang.String name, BucketAccelerateConfigurationV2Args args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public BucketAccelerateConfigurationV2(java.lang.String name, BucketAccelerateConfigurationV2Args args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:s3/bucketAccelerateConfigurationV2:BucketAccelerateConfigurationV2", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private BucketAccelerateConfigurationV2(java.lang.String name, Output id, @Nullable BucketAccelerateConfigurationV2State state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:s3/bucketAccelerateConfigurationV2:BucketAccelerateConfigurationV2", name, state, makeResourceOptions(options, id), false);
}
private static BucketAccelerateConfigurationV2Args makeArgs(BucketAccelerateConfigurationV2Args args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? BucketAccelerateConfigurationV2Args.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static BucketAccelerateConfigurationV2 get(java.lang.String name, Output id, @Nullable BucketAccelerateConfigurationV2State state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new BucketAccelerateConfigurationV2(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy