Manages Amazon S3 Tables Table Replication configuration.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.s3tables.TableReplication("example", {
tableArn: exampleAwsS3tablesTable.arn,
role: exampleAwsIamRole.arn,
rule: {
destinations: [{
destinationTableBucketArn: target.arn,
}],
},
});
import pulumi
import pulumi_aws as aws
example = aws.s3tables.TableReplication("example",
table_arn=example_aws_s3tables_table["arn"],
role=example_aws_iam_role["arn"],
rule={
"destinations": [{
"destination_table_bucket_arn": target["arn"],
}],
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3tables"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := s3tables.NewTableReplication(ctx, "example", &s3tables.TableReplicationArgs{
TableArn: pulumi.Any(exampleAwsS3tablesTable.Arn),
Role: pulumi.Any(exampleAwsIamRole.Arn),
Rule: &s3tables.TableReplicationRuleArgs{
Destinations: s3tables.TableReplicationRuleDestinationArray{
&s3tables.TableReplicationRuleDestinationArgs{
DestinationTableBucketArn: pulumi.Any(target.Arn),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.S3Tables.TableReplication("example", new()
{
TableArn = exampleAwsS3tablesTable.Arn,
Role = exampleAwsIamRole.Arn,
Rule = new Aws.S3Tables.Inputs.TableReplicationRuleArgs
{
Destinations = new[]
{
new Aws.S3Tables.Inputs.TableReplicationRuleDestinationArgs
{
DestinationTableBucketArn = target.Arn,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3tables.TableReplication;
import com.pulumi.aws.s3tables.TableReplicationArgs;
import com.pulumi.aws.s3tables.inputs.TableReplicationRuleArgs;
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 example = new TableReplication("example", TableReplicationArgs.builder()
.tableArn(exampleAwsS3tablesTable.arn())
.role(exampleAwsIamRole.arn())
.rule(TableReplicationRuleArgs.builder()
.destinations(TableReplicationRuleDestinationArgs.builder()
.destinationTableBucketArn(target.arn())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:s3tables:TableReplication
properties:
tableArn: ${exampleAwsS3tablesTable.arn}
role: ${exampleAwsIamRole.arn}
rule:
destinations:
- destinationTableBucketArn: ${target.arn}
Create TableReplication Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TableReplication(name: string, args: TableReplicationArgs, opts?: CustomResourceOptions);@overload
def TableReplication(resource_name: str,
args: TableReplicationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TableReplication(resource_name: str,
opts: Optional[ResourceOptions] = None,
role: Optional[str] = None,
table_arn: Optional[str] = None,
region: Optional[str] = None,
rule: Optional[TableReplicationRuleArgs] = None)func NewTableReplication(ctx *Context, name string, args TableReplicationArgs, opts ...ResourceOption) (*TableReplication, error)public TableReplication(string name, TableReplicationArgs args, CustomResourceOptions? opts = null)
public TableReplication(String name, TableReplicationArgs args)
public TableReplication(String name, TableReplicationArgs args, CustomResourceOptions options)
type: aws:s3tables:TableReplication
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TableReplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TableReplicationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TableReplicationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TableReplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TableReplicationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var tableReplicationResource = new Aws.S3Tables.TableReplication("tableReplicationResource", new()
{
Role = "string",
TableArn = "string",
Region = "string",
Rule = new Aws.S3Tables.Inputs.TableReplicationRuleArgs
{
Destinations = new[]
{
new Aws.S3Tables.Inputs.TableReplicationRuleDestinationArgs
{
DestinationTableBucketArn = "string",
},
},
},
});
example, err := s3tables.NewTableReplication(ctx, "tableReplicationResource", &s3tables.TableReplicationArgs{
Role: pulumi.String("string"),
TableArn: pulumi.String("string"),
Region: pulumi.String("string"),
Rule: &s3tables.TableReplicationRuleArgs{
Destinations: s3tables.TableReplicationRuleDestinationArray{
&s3tables.TableReplicationRuleDestinationArgs{
DestinationTableBucketArn: pulumi.String("string"),
},
},
},
})
var tableReplicationResource = new TableReplication("tableReplicationResource", TableReplicationArgs.builder()
.role("string")
.tableArn("string")
.region("string")
.rule(TableReplicationRuleArgs.builder()
.destinations(TableReplicationRuleDestinationArgs.builder()
.destinationTableBucketArn("string")
.build())
.build())
.build());
table_replication_resource = aws.s3tables.TableReplication("tableReplicationResource",
role="string",
table_arn="string",
region="string",
rule={
"destinations": [{
"destination_table_bucket_arn": "string",
}],
})
const tableReplicationResource = new aws.s3tables.TableReplication("tableReplicationResource", {
role: "string",
tableArn: "string",
region: "string",
rule: {
destinations: [{
destinationTableBucketArn: "string",
}],
},
});
type: aws:s3tables:TableReplication
properties:
region: string
role: string
rule:
destinations:
- destinationTableBucketArn: string
tableArn: string
TableReplication Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TableReplication resource accepts the following input properties:
- Role string
- ARN referencing the IAM role assumed by S3 when replicating tables.
- Table
Arn string - ARN referencing the Table that owns this replication configuration.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Rule
Table
Replication Rule - Replication rules. See Rule below for more details.
- Role string
- ARN referencing the IAM role assumed by S3 when replicating tables.
- Table
Arn string - ARN referencing the Table that owns this replication configuration.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Rule
Table
Replication Rule Args - Replication rules. See Rule below for more details.
- role String
- ARN referencing the IAM role assumed by S3 when replicating tables.
- table
Arn String - ARN referencing the Table that owns this replication configuration.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- rule
Table
Replication Rule - Replication rules. See Rule below for more details.
- role string
- ARN referencing the IAM role assumed by S3 when replicating tables.
- table
Arn string - ARN referencing the Table that owns this replication configuration.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- rule
Table
Replication Rule - Replication rules. See Rule below for more details.
- role str
- ARN referencing the IAM role assumed by S3 when replicating tables.
- table_
arn str - ARN referencing the Table that owns this replication configuration.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- rule
Table
Replication Rule Args - Replication rules. See Rule below for more details.
- role String
- ARN referencing the IAM role assumed by S3 when replicating tables.
- table
Arn String - ARN referencing the Table that owns this replication configuration.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- rule Property Map
- Replication rules. See Rule below for more details.
Outputs
All input properties are implicitly available as output properties. Additionally, the TableReplication resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Version
Token string
- Id string
- The provider-assigned unique ID for this managed resource.
- Version
Token string
- id String
- The provider-assigned unique ID for this managed resource.
- version
Token String
- id string
- The provider-assigned unique ID for this managed resource.
- version
Token string
- id str
- The provider-assigned unique ID for this managed resource.
- version_
token str
- id String
- The provider-assigned unique ID for this managed resource.
- version
Token String
Look up Existing TableReplication Resource
Get an existing TableReplication resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TableReplicationState, opts?: CustomResourceOptions): TableReplication@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
role: Optional[str] = None,
rule: Optional[TableReplicationRuleArgs] = None,
table_arn: Optional[str] = None,
version_token: Optional[str] = None) -> TableReplicationfunc GetTableReplication(ctx *Context, name string, id IDInput, state *TableReplicationState, opts ...ResourceOption) (*TableReplication, error)public static TableReplication Get(string name, Input<string> id, TableReplicationState? state, CustomResourceOptions? opts = null)public static TableReplication get(String name, Output<String> id, TableReplicationState state, CustomResourceOptions options)resources: _: type: aws:s3tables:TableReplication get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Role string
- ARN referencing the IAM role assumed by S3 when replicating tables.
- Rule
Table
Replication Rule - Replication rules. See Rule below for more details.
- Table
Arn string - ARN referencing the Table that owns this replication configuration.
- Version
Token string
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Role string
- ARN referencing the IAM role assumed by S3 when replicating tables.
- Rule
Table
Replication Rule Args - Replication rules. See Rule below for more details.
- Table
Arn string - ARN referencing the Table that owns this replication configuration.
- Version
Token string
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role String
- ARN referencing the IAM role assumed by S3 when replicating tables.
- rule
Table
Replication Rule - Replication rules. See Rule below for more details.
- table
Arn String - ARN referencing the Table that owns this replication configuration.
- version
Token String
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role string
- ARN referencing the IAM role assumed by S3 when replicating tables.
- rule
Table
Replication Rule - Replication rules. See Rule below for more details.
- table
Arn string - ARN referencing the Table that owns this replication configuration.
- version
Token string
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role str
- ARN referencing the IAM role assumed by S3 when replicating tables.
- rule
Table
Replication Rule Args - Replication rules. See Rule below for more details.
- table_
arn str - ARN referencing the Table that owns this replication configuration.
- version_
token str
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role String
- ARN referencing the IAM role assumed by S3 when replicating tables.
- rule Property Map
- Replication rules. See Rule below for more details.
- table
Arn String - ARN referencing the Table that owns this replication configuration.
- version
Token String
Supporting Types
TableReplicationRule, TableReplicationRuleArgs
- Destinations
List<Table
Replication Rule Destination> - Replication destination. See Destination below for more details.
- Destinations
[]Table
Replication Rule Destination - Replication destination. See Destination below for more details.
- destinations
List<Table
Replication Rule Destination> - Replication destination. See Destination below for more details.
- destinations
Table
Replication Rule Destination[] - Replication destination. See Destination below for more details.
- destinations
Sequence[Table
Replication Rule Destination] - Replication destination. See Destination below for more details.
- destinations List<Property Map>
- Replication destination. See Destination below for more details.
TableReplicationRuleDestination, TableReplicationRuleDestinationArgs
- Destination
Table stringBucket Arn - ARN of destination table bucket to replicate source tables to.
- Destination
Table stringBucket Arn - ARN of destination table bucket to replicate source tables to.
- destination
Table StringBucket Arn - ARN of destination table bucket to replicate source tables to.
- destination
Table stringBucket Arn - ARN of destination table bucket to replicate source tables to.
- destination_
table_ strbucket_ arn - ARN of destination table bucket to replicate source tables to.
- destination
Table StringBucket Arn - ARN of destination table bucket to replicate source tables to.
Import
Using pulumi import, import S3 Tables Table Replication using the table_arn. For example:
$ pulumi import aws:s3tables/tableReplication:TableReplication example 'arn:aws:s3tables:us-west-2:123456789012:table/example-table'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
