Package com.pulumi.aws.s3tables
Class TableBucketPolicy
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.s3tables.TableBucketPolicy
-
public class TableBucketPolicy extends com.pulumi.resources.CustomResourceResource for managing an Amazon S3 Tables Table Bucket Policy. ## Example Usage ### Basic Usage
## Import ### Identity Schema #### Required * `tableBucketArn` (String) ARN of the S3 Tables Table Bucket. Using `pulumi import`, import S3 Tables Table Bucket Policy using the `tableBucketArn`. For example: ```sh $ pulumi import aws:s3tables/tableBucketPolicy:TableBucketPolicy example 'arn:aws:s3tables:us-west-2:123456789012:bucket/example-bucket;example-namespace' ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.iam.IamFunctions; import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs; import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementArgs; import com.pulumi.aws.s3tables.TableBucket; import com.pulumi.aws.s3tables.TableBucketArgs; import com.pulumi.aws.s3tables.TableBucketPolicy; import com.pulumi.aws.s3tables.TableBucketPolicyArgs; 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) { final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .build()) .build()); var exampleTableBucket = new TableBucket("exampleTableBucket", TableBucketArgs.builder() .name("example-bucket") .build()); var exampleTableBucketPolicy = new TableBucketPolicy("exampleTableBucketPolicy", TableBucketPolicyArgs.builder() .resourcePolicy(example.json()) .tableBucketArn(exampleTableBucket.arn()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description TableBucketPolicy(java.lang.String name)TableBucketPolicy(java.lang.String name, TableBucketPolicyArgs args)TableBucketPolicy(java.lang.String name, TableBucketPolicyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TableBucketPolicyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, TableBucketPolicyState 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>resourcePolicy()com.pulumi.core.Output<java.lang.String>tableBucketArn()
-
-
-
Constructor Detail
-
TableBucketPolicy
public TableBucketPolicy(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
TableBucketPolicy
public TableBucketPolicy(java.lang.String name, TableBucketPolicyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
TableBucketPolicy
public TableBucketPolicy(java.lang.String name, TableBucketPolicyArgs 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
-
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.
-
resourcePolicy
public com.pulumi.core.Output<java.lang.String> resourcePolicy()
- Returns:
- Amazon Web Services resource-based policy document in JSON format.
-
tableBucketArn
public com.pulumi.core.Output<java.lang.String> tableBucketArn()
- Returns:
- ARN referencing the Table Bucket that owns this policy.
-
get
public static TableBucketPolicy get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable TableBucketPolicyState 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.
-
-