
com.pulumi.aws.s3tables.TablePolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
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.s3tables;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.s3tables.TablePolicyArgs;
import com.pulumi.aws.s3tables.inputs.TablePolicyState;
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 javax.annotation.Nullable;
/**
* Resource for managing an Amazon S3 Tables Table Policy.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.s3tables.TablePolicy;
* import com.pulumi.aws.s3tables.TablePolicyArgs;
* import com.pulumi.aws.s3tables.TableBucket;
* import com.pulumi.aws.s3tables.TableBucketArgs;
* import com.pulumi.aws.s3tables.Namespace;
* import com.pulumi.aws.s3tables.NamespaceArgs;
* import com.pulumi.aws.s3tables.Table;
* import com.pulumi.aws.s3tables.TableArgs;
* 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) {
* final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
* .statements()
* .build());
*
* var exampleTablePolicy = new TablePolicy("exampleTablePolicy", TablePolicyArgs.builder()
* .resourcePolicy(example.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
* .name(test.name())
* .namespace(test.namespace())
* .tableBucketArn(test.tableBucketArn())
* .build());
*
* var exampleTableBucket = new TableBucket("exampleTableBucket", TableBucketArgs.builder()
* .name("example-bucket")
* .build());
*
* var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
* .namespace("example-namespace")
* .tableBucketArn(exampleTableBucket.arn())
* .build());
*
* var exampleTable = new Table("exampleTable", TableArgs.builder()
* .name("example-table")
* .namespace(exampleNamespace)
* .tableBucketArn(exampleNamespace.tableBucketArn())
* .format("ICEBERG")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import S3 Tables Table Policy using the `table_bucket_arn`, the value of `namespace`, and the value of `name`, separated by a semicolon (`;`). For example:
*
* ```sh
* $ pulumi import aws:s3tables/tablePolicy:TablePolicy example 'arn:aws:s3tables:us-west-2:123456789012:bucket/example-bucket;example-namespace;example-table'
* ```
*
*/
@ResourceType(type="aws:s3tables/tablePolicy:TablePolicy")
public class TablePolicy extends com.pulumi.resources.CustomResource {
/**
* Name of the table.
* Must be between 1 and 255 characters in length.
* Can consist of lowercase letters, numbers, and underscores, and must begin and end with a lowercase letter or number.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Name of the table.
* Must be between 1 and 255 characters in length.
* Can consist of lowercase letters, numbers, and underscores, and must begin and end with a lowercase letter or number.
*
*/
public Output name() {
return this.name;
}
/**
* Name of the namespace for this table.
* Must be between 1 and 255 characters in length.
* Can consist of lowercase letters, numbers, and underscores, and must begin and end with a lowercase letter or number.
*
*/
@Export(name="namespace", refs={String.class}, tree="[0]")
private Output namespace;
/**
* @return Name of the namespace for this table.
* Must be between 1 and 255 characters in length.
* Can consist of lowercase letters, numbers, and underscores, and must begin and end with a lowercase letter or number.
*
*/
public Output namespace() {
return this.namespace;
}
/**
* Amazon Web Services resource-based policy document in JSON format.
*
*/
@Export(name="resourcePolicy", refs={String.class}, tree="[0]")
private Output resourcePolicy;
/**
* @return Amazon Web Services resource-based policy document in JSON format.
*
*/
public Output resourcePolicy() {
return this.resourcePolicy;
}
/**
* ARN referencing the Table Bucket that contains this Namespace.
*
*/
@Export(name="tableBucketArn", refs={String.class}, tree="[0]")
private Output tableBucketArn;
/**
* @return ARN referencing the Table Bucket that contains this Namespace.
*
*/
public Output tableBucketArn() {
return this.tableBucketArn;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public TablePolicy(java.lang.String name) {
this(name, TablePolicyArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public TablePolicy(java.lang.String name, TablePolicyArgs 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 TablePolicy(java.lang.String name, TablePolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:s3tables/tablePolicy:TablePolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private TablePolicy(java.lang.String name, Output id, @Nullable TablePolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:s3tables/tablePolicy:TablePolicy", name, state, makeResourceOptions(options, id), false);
}
private static TablePolicyArgs makeArgs(TablePolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? TablePolicyArgs.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 TablePolicy get(java.lang.String name, Output id, @Nullable TablePolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new TablePolicy(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy