TablePolicy

class TablePolicy : KotlinCustomResource

Resource for managing an Amazon S3 Tables Table Policy.

Example Usage

Basic Usage

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());
}
}
resources:
exampleTablePolicy:
type: aws:s3tables:TablePolicy
name: example
properties:
resourcePolicy: ${example.json}
name: ${test.name}
namespace: ${test.namespace}
tableBucketArn: ${test.tableBucketArn}
exampleTable:
type: aws:s3tables:Table
name: example
properties:
name: example_table
namespace: ${exampleNamespace}
tableBucketArn: ${exampleNamespace.tableBucketArn}
format: ICEBERG
exampleNamespace:
type: aws:s3tables:Namespace
name: example
properties:
namespace:
- example-namespace
tableBucketArn: ${exampleTableBucket.arn}
exampleTableBucket:
type: aws:s3tables:TableBucket
name: example
properties:
name: example-bucket
variables:
example:
fn::invoke:
function: aws:iam:getPolicyDocument
arguments:
statements:
- {}

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:

$ pulumi import aws:s3tables/tablePolicy:TablePolicy example 'arn:aws:s3tables:us-west-2:123456789012:bucket/example-bucket;example-namespace;example-table'

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

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.

Link copied to clipboard
val namespace: Output<String>

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.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourcePolicy: Output<String>

Amazon Web Services resource-based policy document in JSON format.

Link copied to clipboard
val tableBucketArn: Output<String>

ARN referencing the Table Bucket that contains this Namespace.

Link copied to clipboard
val urn: Output<String>