Package com.pulumi.aws.lightsail
Class BucketAccessKey
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.lightsail.BucketAccessKey
-
public class BucketAccessKey extends com.pulumi.resources.CustomResourceManages a Lightsail bucket access key. Use this resource to create credentials that allow programmatic access to your Lightsail bucket via API requests. ## Example Usage
## Import Using `pulumi import`, import `aws.lightsail.BucketAccessKey` using the `id` attribute. For example: ```sh $ pulumi import aws:lightsail/bucketAccessKey:BucketAccessKey example example-bucket,AKIAIOSFODNN7EXAMPLE ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.lightsail.Bucket; import com.pulumi.aws.lightsail.BucketArgs; import com.pulumi.aws.lightsail.BucketAccessKey; import com.pulumi.aws.lightsail.BucketAccessKeyArgs; import java.util.ArrayList; import java.util.Arrays; 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 example = new Bucket("example", BucketArgs.builder() .name("example-bucket") .bundleId("small_1_0") .build()); var exampleBucketAccessKey = new BucketAccessKey("exampleBucketAccessKey", BucketAccessKeyArgs.builder() .bucketName(example.id()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description BucketAccessKey(java.lang.String name)BucketAccessKey(java.lang.String name, BucketAccessKeyArgs args)BucketAccessKey(java.lang.String name, BucketAccessKeyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>accessKeyId()com.pulumi.core.Output<java.lang.String>bucketName()com.pulumi.core.Output<java.lang.String>createdAt()static BucketAccessKeyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, BucketAccessKeyState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>secretAccessKey()com.pulumi.core.Output<java.lang.String>status()
-
-
-
Constructor Detail
-
BucketAccessKey
public BucketAccessKey(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
BucketAccessKey
public BucketAccessKey(java.lang.String name, BucketAccessKeyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
BucketAccessKey
public BucketAccessKey(java.lang.String name, BucketAccessKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
accessKeyId
public com.pulumi.core.Output<java.lang.String> accessKeyId()
- Returns:
- Access key ID.
-
bucketName
public com.pulumi.core.Output<java.lang.String> bucketName()
- Returns:
- Name of the bucket that the access key will belong to and grant access to.
-
createdAt
public com.pulumi.core.Output<java.lang.String> createdAt()
- Returns:
- Date and time when the access key was created.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
secretAccessKey
public com.pulumi.core.Output<java.lang.String> secretAccessKey()
- Returns:
- Secret access key used to sign requests. This attribute is not available for imported resources. Note that this will be written to the state file.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- Status of the access key.
-
get
public static BucketAccessKey get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable BucketAccessKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-