alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.oss.BucketReplication

Provides an independent replication configuration resource for OSS bucket.

For information about OSS replication and how to use it, see What is cross-region replication and What is same-region replication.

NOTE: Available in v1.161.0+.

Example Usage

Set bucket replication configuration

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var cross_region_replication = new AliCloud.Oss.BucketReplication("cross-region-replication", new()
    {
        Action = "ALL",
        Bucket = "bucket-in-hangzhou",
        Destination = new AliCloud.Oss.Inputs.BucketReplicationDestinationArgs
        {
            Bucket = "bucket-in-beijing",
            Location = "oss-cn-beijing",
        },
    });

    var same_region_replication = new AliCloud.Oss.BucketReplication("same-region-replication", new()
    {
        Action = "ALL",
        Bucket = "bucket-in-hangzhou",
        Destination = new AliCloud.Oss.Inputs.BucketReplicationDestinationArgs
        {
            Bucket = "bucket-in-hangzhou-1",
            Location = "oss-cn-hangzhou",
        },
    });

    var replication_with_prefix = new AliCloud.Oss.BucketReplication("replication-with-prefix", new()
    {
        Action = "ALL",
        Bucket = "bucket-1",
        Destination = new AliCloud.Oss.Inputs.BucketReplicationDestinationArgs
        {
            Bucket = "bucket-2",
            Location = "oss-cn-hangzhou",
        },
        HistoricalObjectReplication = "disabled",
        PrefixSet = new AliCloud.Oss.Inputs.BucketReplicationPrefixSetArgs
        {
            Prefixes = new[]
            {
                "prefix1/",
                "prefix2/",
            },
        },
    });

    var replication_with_specific_action = new AliCloud.Oss.BucketReplication("replication-with-specific-action", new()
    {
        Action = "PUT",
        Bucket = "bucket-1",
        Destination = new AliCloud.Oss.Inputs.BucketReplicationDestinationArgs
        {
            Bucket = "bucket-2",
            Location = "oss-cn-hangzhou",
        },
        HistoricalObjectReplication = "disabled",
    });

    var replication_with_kms_encryption = new AliCloud.Oss.BucketReplication("replication-with-kms-encryption", new()
    {
        Action = "ALL",
        Bucket = "bucket-1",
        Destination = new AliCloud.Oss.Inputs.BucketReplicationDestinationArgs
        {
            Bucket = "bucket-2",
            Location = "oss-cn-hangzhou",
        },
        EncryptionConfiguration = new AliCloud.Oss.Inputs.BucketReplicationEncryptionConfigurationArgs
        {
            ReplicaKmsKeyId = "<your kms key id>",
        },
        HistoricalObjectReplication = "disabled",
        SourceSelectionCriteria = new AliCloud.Oss.Inputs.BucketReplicationSourceSelectionCriteriaArgs
        {
            SseKmsEncryptedObjects = new AliCloud.Oss.Inputs.BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjectsArgs
            {
                Status = "Enabled",
            },
        },
        SyncRole = "<your ram role>",
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := oss.NewBucketReplication(ctx, "cross-region-replication", &oss.BucketReplicationArgs{
			Action: pulumi.String("ALL"),
			Bucket: pulumi.String("bucket-in-hangzhou"),
			Destination: &oss.BucketReplicationDestinationArgs{
				Bucket:   pulumi.String("bucket-in-beijing"),
				Location: pulumi.String("oss-cn-beijing"),
			},
		})
		if err != nil {
			return err
		}
		_, err = oss.NewBucketReplication(ctx, "same-region-replication", &oss.BucketReplicationArgs{
			Action: pulumi.String("ALL"),
			Bucket: pulumi.String("bucket-in-hangzhou"),
			Destination: &oss.BucketReplicationDestinationArgs{
				Bucket:   pulumi.String("bucket-in-hangzhou-1"),
				Location: pulumi.String("oss-cn-hangzhou"),
			},
		})
		if err != nil {
			return err
		}
		_, err = oss.NewBucketReplication(ctx, "replication-with-prefix", &oss.BucketReplicationArgs{
			Action: pulumi.String("ALL"),
			Bucket: pulumi.String("bucket-1"),
			Destination: &oss.BucketReplicationDestinationArgs{
				Bucket:   pulumi.String("bucket-2"),
				Location: pulumi.String("oss-cn-hangzhou"),
			},
			HistoricalObjectReplication: pulumi.String("disabled"),
			PrefixSet: &oss.BucketReplicationPrefixSetArgs{
				Prefixes: pulumi.StringArray{
					pulumi.String("prefix1/"),
					pulumi.String("prefix2/"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = oss.NewBucketReplication(ctx, "replication-with-specific-action", &oss.BucketReplicationArgs{
			Action: pulumi.String("PUT"),
			Bucket: pulumi.String("bucket-1"),
			Destination: &oss.BucketReplicationDestinationArgs{
				Bucket:   pulumi.String("bucket-2"),
				Location: pulumi.String("oss-cn-hangzhou"),
			},
			HistoricalObjectReplication: pulumi.String("disabled"),
		})
		if err != nil {
			return err
		}
		_, err = oss.NewBucketReplication(ctx, "replication-with-kms-encryption", &oss.BucketReplicationArgs{
			Action: pulumi.String("ALL"),
			Bucket: pulumi.String("bucket-1"),
			Destination: &oss.BucketReplicationDestinationArgs{
				Bucket:   pulumi.String("bucket-2"),
				Location: pulumi.String("oss-cn-hangzhou"),
			},
			EncryptionConfiguration: &oss.BucketReplicationEncryptionConfigurationArgs{
				ReplicaKmsKeyId: pulumi.String("<your kms key id>"),
			},
			HistoricalObjectReplication: pulumi.String("disabled"),
			SourceSelectionCriteria: &oss.BucketReplicationSourceSelectionCriteriaArgs{
				SseKmsEncryptedObjects: &oss.BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjectsArgs{
					Status: pulumi.String("Enabled"),
				},
			},
			SyncRole: pulumi.String("<your ram role>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.oss.BucketReplication;
import com.pulumi.alicloud.oss.BucketReplicationArgs;
import com.pulumi.alicloud.oss.inputs.BucketReplicationDestinationArgs;
import com.pulumi.alicloud.oss.inputs.BucketReplicationPrefixSetArgs;
import com.pulumi.alicloud.oss.inputs.BucketReplicationEncryptionConfigurationArgs;
import com.pulumi.alicloud.oss.inputs.BucketReplicationSourceSelectionCriteriaArgs;
import com.pulumi.alicloud.oss.inputs.BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjectsArgs;
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 cross_region_replication = new BucketReplication("cross-region-replication", BucketReplicationArgs.builder()        
            .action("ALL")
            .bucket("bucket-in-hangzhou")
            .destination(BucketReplicationDestinationArgs.builder()
                .bucket("bucket-in-beijing")
                .location("oss-cn-beijing")
                .build())
            .build());

        var same_region_replication = new BucketReplication("same-region-replication", BucketReplicationArgs.builder()        
            .action("ALL")
            .bucket("bucket-in-hangzhou")
            .destination(BucketReplicationDestinationArgs.builder()
                .bucket("bucket-in-hangzhou-1")
                .location("oss-cn-hangzhou")
                .build())
            .build());

        var replication_with_prefix = new BucketReplication("replication-with-prefix", BucketReplicationArgs.builder()        
            .action("ALL")
            .bucket("bucket-1")
            .destination(BucketReplicationDestinationArgs.builder()
                .bucket("bucket-2")
                .location("oss-cn-hangzhou")
                .build())
            .historicalObjectReplication("disabled")
            .prefixSet(BucketReplicationPrefixSetArgs.builder()
                .prefixes(                
                    "prefix1/",
                    "prefix2/")
                .build())
            .build());

        var replication_with_specific_action = new BucketReplication("replication-with-specific-action", BucketReplicationArgs.builder()        
            .action("PUT")
            .bucket("bucket-1")
            .destination(BucketReplicationDestinationArgs.builder()
                .bucket("bucket-2")
                .location("oss-cn-hangzhou")
                .build())
            .historicalObjectReplication("disabled")
            .build());

        var replication_with_kms_encryption = new BucketReplication("replication-with-kms-encryption", BucketReplicationArgs.builder()        
            .action("ALL")
            .bucket("bucket-1")
            .destination(BucketReplicationDestinationArgs.builder()
                .bucket("bucket-2")
                .location("oss-cn-hangzhou")
                .build())
            .encryptionConfiguration(BucketReplicationEncryptionConfigurationArgs.builder()
                .replicaKmsKeyId("<your kms key id>")
                .build())
            .historicalObjectReplication("disabled")
            .sourceSelectionCriteria(BucketReplicationSourceSelectionCriteriaArgs.builder()
                .sseKmsEncryptedObjects(BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjectsArgs.builder()
                    .status("Enabled")
                    .build())
                .build())
            .syncRole("<your ram role>")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

cross_region_replication = alicloud.oss.BucketReplication("cross-region-replication",
    action="ALL",
    bucket="bucket-in-hangzhou",
    destination=alicloud.oss.BucketReplicationDestinationArgs(
        bucket="bucket-in-beijing",
        location="oss-cn-beijing",
    ))
same_region_replication = alicloud.oss.BucketReplication("same-region-replication",
    action="ALL",
    bucket="bucket-in-hangzhou",
    destination=alicloud.oss.BucketReplicationDestinationArgs(
        bucket="bucket-in-hangzhou-1",
        location="oss-cn-hangzhou",
    ))
replication_with_prefix = alicloud.oss.BucketReplication("replication-with-prefix",
    action="ALL",
    bucket="bucket-1",
    destination=alicloud.oss.BucketReplicationDestinationArgs(
        bucket="bucket-2",
        location="oss-cn-hangzhou",
    ),
    historical_object_replication="disabled",
    prefix_set=alicloud.oss.BucketReplicationPrefixSetArgs(
        prefixes=[
            "prefix1/",
            "prefix2/",
        ],
    ))
replication_with_specific_action = alicloud.oss.BucketReplication("replication-with-specific-action",
    action="PUT",
    bucket="bucket-1",
    destination=alicloud.oss.BucketReplicationDestinationArgs(
        bucket="bucket-2",
        location="oss-cn-hangzhou",
    ),
    historical_object_replication="disabled")
replication_with_kms_encryption = alicloud.oss.BucketReplication("replication-with-kms-encryption",
    action="ALL",
    bucket="bucket-1",
    destination=alicloud.oss.BucketReplicationDestinationArgs(
        bucket="bucket-2",
        location="oss-cn-hangzhou",
    ),
    encryption_configuration=alicloud.oss.BucketReplicationEncryptionConfigurationArgs(
        replica_kms_key_id="<your kms key id>",
    ),
    historical_object_replication="disabled",
    source_selection_criteria=alicloud.oss.BucketReplicationSourceSelectionCriteriaArgs(
        sse_kms_encrypted_objects=alicloud.oss.BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjectsArgs(
            status="Enabled",
        ),
    ),
    sync_role="<your ram role>")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const cross_region_replication = new alicloud.oss.BucketReplication("cross-region-replication", {
    action: "ALL",
    bucket: "bucket-in-hangzhou",
    destination: {
        bucket: "bucket-in-beijing",
        location: "oss-cn-beijing",
    },
});
const same_region_replication = new alicloud.oss.BucketReplication("same-region-replication", {
    action: "ALL",
    bucket: "bucket-in-hangzhou",
    destination: {
        bucket: "bucket-in-hangzhou-1",
        location: "oss-cn-hangzhou",
    },
});
const replication_with_prefix = new alicloud.oss.BucketReplication("replication-with-prefix", {
    action: "ALL",
    bucket: "bucket-1",
    destination: {
        bucket: "bucket-2",
        location: "oss-cn-hangzhou",
    },
    historicalObjectReplication: "disabled",
    prefixSet: {
        prefixes: [
            "prefix1/",
            "prefix2/",
        ],
    },
});
const replication_with_specific_action = new alicloud.oss.BucketReplication("replication-with-specific-action", {
    action: "PUT",
    bucket: "bucket-1",
    destination: {
        bucket: "bucket-2",
        location: "oss-cn-hangzhou",
    },
    historicalObjectReplication: "disabled",
});
const replication_with_kms_encryption = new alicloud.oss.BucketReplication("replication-with-kms-encryption", {
    action: "ALL",
    bucket: "bucket-1",
    destination: {
        bucket: "bucket-2",
        location: "oss-cn-hangzhou",
    },
    encryptionConfiguration: {
        replicaKmsKeyId: "<your kms key id>",
    },
    historicalObjectReplication: "disabled",
    sourceSelectionCriteria: {
        sseKmsEncryptedObjects: {
            status: "Enabled",
        },
    },
    syncRole: "<your ram role>",
});
resources:
  cross-region-replication:
    type: alicloud:oss:BucketReplication
    properties:
      action: ALL
      bucket: bucket-in-hangzhou
      destination:
        bucket: bucket-in-beijing
        location: oss-cn-beijing
  same-region-replication:
    type: alicloud:oss:BucketReplication
    properties:
      action: ALL
      bucket: bucket-in-hangzhou
      destination:
        bucket: bucket-in-hangzhou-1
        location: oss-cn-hangzhou
  replication-with-prefix:
    type: alicloud:oss:BucketReplication
    properties:
      action: ALL
      bucket: bucket-1
      destination:
        bucket: bucket-2
        location: oss-cn-hangzhou
      historicalObjectReplication: disabled
      prefixSet:
        prefixes:
          - prefix1/
          - prefix2/
  replication-with-specific-action:
    type: alicloud:oss:BucketReplication
    properties:
      action: PUT
      bucket: bucket-1
      destination:
        bucket: bucket-2
        location: oss-cn-hangzhou
      historicalObjectReplication: disabled
  replication-with-kms-encryption:
    type: alicloud:oss:BucketReplication
    properties:
      action: ALL
      bucket: bucket-1
      destination:
        bucket: bucket-2
        location: oss-cn-hangzhou
      encryptionConfiguration:
        replicaKmsKeyId: <your kms key id>
      historicalObjectReplication: disabled
      sourceSelectionCriteria:
        sseKmsEncryptedObjects:
          status: Enabled
      syncRole: <your ram role>

Create BucketReplication Resource

new BucketReplication(name: string, args: BucketReplicationArgs, opts?: CustomResourceOptions);
@overload
def BucketReplication(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      action: Optional[str] = None,
                      bucket: Optional[str] = None,
                      destination: Optional[BucketReplicationDestinationArgs] = None,
                      encryption_configuration: Optional[BucketReplicationEncryptionConfigurationArgs] = None,
                      historical_object_replication: Optional[str] = None,
                      prefix_set: Optional[BucketReplicationPrefixSetArgs] = None,
                      progress: Optional[BucketReplicationProgressArgs] = None,
                      source_selection_criteria: Optional[BucketReplicationSourceSelectionCriteriaArgs] = None,
                      sync_role: Optional[str] = None)
@overload
def BucketReplication(resource_name: str,
                      args: BucketReplicationArgs,
                      opts: Optional[ResourceOptions] = None)
func NewBucketReplication(ctx *Context, name string, args BucketReplicationArgs, opts ...ResourceOption) (*BucketReplication, error)
public BucketReplication(string name, BucketReplicationArgs args, CustomResourceOptions? opts = null)
public BucketReplication(String name, BucketReplicationArgs args)
public BucketReplication(String name, BucketReplicationArgs args, CustomResourceOptions options)
type: alicloud:oss:BucketReplication
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BucketReplicationArgs
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 BucketReplicationArgs
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 BucketReplicationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BucketReplicationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BucketReplicationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BucketReplication Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The BucketReplication resource accepts the following input properties:

Bucket string

The name of the bucket.

Destination Pulumi.AliCloud.Oss.Inputs.BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

Action string

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

EncryptionConfiguration Pulumi.AliCloud.Oss.Inputs.BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

HistoricalObjectReplication string

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

PrefixSet Pulumi.AliCloud.Oss.Inputs.BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

Progress Pulumi.AliCloud.Oss.Inputs.BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

SourceSelectionCriteria Pulumi.AliCloud.Oss.Inputs.BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

SyncRole string

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

Bucket string

The name of the bucket.

Destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

Action string

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

EncryptionConfiguration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

HistoricalObjectReplication string

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

PrefixSet BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

Progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

SourceSelectionCriteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

SyncRole string

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

bucket String

The name of the bucket.

destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

action String

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

encryptionConfiguration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historicalObjectReplication String

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefixSet BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

sourceSelectionCriteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

syncRole String

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

bucket string

The name of the bucket.

destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

action string

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

encryptionConfiguration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historicalObjectReplication string

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefixSet BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

sourceSelectionCriteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

syncRole string

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

bucket str

The name of the bucket.

destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

action str

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

encryption_configuration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historical_object_replication str

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefix_set BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

source_selection_criteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

sync_role str

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

bucket String

The name of the bucket.

destination Property Map

Specifies the destination for the rule(See the following block destination).

action String

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

encryptionConfiguration Property Map

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historicalObjectReplication String

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefixSet Property Map

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress Property Map

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

sourceSelectionCriteria Property Map

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

syncRole String

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

Outputs

All input properties are implicitly available as output properties. Additionally, the BucketReplication resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

RuleId string

The ID of the data replication rule.

Status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

Id string

The provider-assigned unique ID for this managed resource.

RuleId string

The ID of the data replication rule.

Status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

id String

The provider-assigned unique ID for this managed resource.

ruleId String

The ID of the data replication rule.

status String

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

id string

The provider-assigned unique ID for this managed resource.

ruleId string

The ID of the data replication rule.

status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

id str

The provider-assigned unique ID for this managed resource.

rule_id str

The ID of the data replication rule.

status str

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

id String

The provider-assigned unique ID for this managed resource.

ruleId String

The ID of the data replication rule.

status String

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

Look up Existing BucketReplication Resource

Get an existing BucketReplication 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?: BucketReplicationState, opts?: CustomResourceOptions): BucketReplication
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        bucket: Optional[str] = None,
        destination: Optional[BucketReplicationDestinationArgs] = None,
        encryption_configuration: Optional[BucketReplicationEncryptionConfigurationArgs] = None,
        historical_object_replication: Optional[str] = None,
        prefix_set: Optional[BucketReplicationPrefixSetArgs] = None,
        progress: Optional[BucketReplicationProgressArgs] = None,
        rule_id: Optional[str] = None,
        source_selection_criteria: Optional[BucketReplicationSourceSelectionCriteriaArgs] = None,
        status: Optional[str] = None,
        sync_role: Optional[str] = None) -> BucketReplication
func GetBucketReplication(ctx *Context, name string, id IDInput, state *BucketReplicationState, opts ...ResourceOption) (*BucketReplication, error)
public static BucketReplication Get(string name, Input<string> id, BucketReplicationState? state, CustomResourceOptions? opts = null)
public static BucketReplication get(String name, Output<String> id, BucketReplicationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
Action string

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

Bucket string

The name of the bucket.

Destination Pulumi.AliCloud.Oss.Inputs.BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

EncryptionConfiguration Pulumi.AliCloud.Oss.Inputs.BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

HistoricalObjectReplication string

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

PrefixSet Pulumi.AliCloud.Oss.Inputs.BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

Progress Pulumi.AliCloud.Oss.Inputs.BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

RuleId string

The ID of the data replication rule.

SourceSelectionCriteria Pulumi.AliCloud.Oss.Inputs.BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

Status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

SyncRole string

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

Action string

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

Bucket string

The name of the bucket.

Destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

EncryptionConfiguration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

HistoricalObjectReplication string

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

PrefixSet BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

Progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

RuleId string

The ID of the data replication rule.

SourceSelectionCriteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

Status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

SyncRole string

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

action String

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

bucket String

The name of the bucket.

destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

encryptionConfiguration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historicalObjectReplication String

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefixSet BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

ruleId String

The ID of the data replication rule.

sourceSelectionCriteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

status String

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

syncRole String

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

action string

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

bucket string

The name of the bucket.

destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

encryptionConfiguration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historicalObjectReplication string

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefixSet BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

ruleId string

The ID of the data replication rule.

sourceSelectionCriteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

syncRole string

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

action str

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

bucket str

The name of the bucket.

destination BucketReplicationDestinationArgs

Specifies the destination for the rule(See the following block destination).

encryption_configuration BucketReplicationEncryptionConfigurationArgs

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historical_object_replication str

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefix_set BucketReplicationPrefixSetArgs

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress BucketReplicationProgressArgs

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

rule_id str

The ID of the data replication rule.

source_selection_criteria BucketReplicationSourceSelectionCriteriaArgs

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

status str

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

sync_role str

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

action String

The operations that can be synchronized to the destination bucket. You can set action to one or more of the following operation types. Valid values: ALL(contains PUT, DELETE, and ABORT), PUT, DELETE and ABORT. Defaults to ALL.

bucket String

The name of the bucket.

destination Property Map

Specifies the destination for the rule(See the following block destination).

encryptionConfiguration Property Map

Specifies the encryption configuration for the objects replicated to the destination bucket(See the following block encryption_configuration).

historicalObjectReplication String

Specifies whether to replicate historical data from the source bucket to the destination bucket before data replication is enabled. Can be enabled or disabled. Defaults to enabled.

prefixSet Property Map

The prefixes used to specify the object to replicate. Only objects that match the prefix are replicated to the destination bucket(See the following block prefix_set).

progress Property Map

Retrieves the progress of the data replication task. This status is returned only when the data replication task is in the doing state.

ruleId String

The ID of the data replication rule.

sourceSelectionCriteria Property Map

Specifies other conditions used to filter the source objects to replicate(See the following block source_selection_criteria).

status String

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

syncRole String

Specifies the role that you authorize OSS to use to replicate data. If SSE-KMS is specified to encrypt the objects replicated to the destination bucket, it must be specified.

Supporting Types

BucketReplicationDestination

Bucket string

The destination bucket to which the data is replicated.

Location string
TransferType string

The link used to transfer data in data replication.. Can be internal or oss_acc. Defaults to internal.

Bucket string

The destination bucket to which the data is replicated.

Location string
TransferType string

The link used to transfer data in data replication.. Can be internal or oss_acc. Defaults to internal.

bucket String

The destination bucket to which the data is replicated.

location String
transferType String

The link used to transfer data in data replication.. Can be internal or oss_acc. Defaults to internal.

bucket string

The destination bucket to which the data is replicated.

location string
transferType string

The link used to transfer data in data replication.. Can be internal or oss_acc. Defaults to internal.

bucket str

The destination bucket to which the data is replicated.

location str
transfer_type str

The link used to transfer data in data replication.. Can be internal or oss_acc. Defaults to internal.

bucket String

The destination bucket to which the data is replicated.

location String
transferType String

The link used to transfer data in data replication.. Can be internal or oss_acc. Defaults to internal.

BucketReplicationEncryptionConfiguration

ReplicaKmsKeyId string

The CMK ID used in SSE-KMS.

ReplicaKmsKeyId string

The CMK ID used in SSE-KMS.

replicaKmsKeyId String

The CMK ID used in SSE-KMS.

replicaKmsKeyId string

The CMK ID used in SSE-KMS.

replica_kms_key_id str

The CMK ID used in SSE-KMS.

replicaKmsKeyId String

The CMK ID used in SSE-KMS.

BucketReplicationPrefixSet

Prefixes List<string>

The list of object key name prefix identifying one or more objects to which the rule applies.

Prefixes []string

The list of object key name prefix identifying one or more objects to which the rule applies.

prefixes List<String>

The list of object key name prefix identifying one or more objects to which the rule applies.

prefixes string[]

The list of object key name prefix identifying one or more objects to which the rule applies.

prefixes Sequence[str]

The list of object key name prefix identifying one or more objects to which the rule applies.

prefixes List<String>

The list of object key name prefix identifying one or more objects to which the rule applies.

BucketReplicationProgress

HistoricalObject string

The percentage of the replicated historical data. This element is valid only when historical_object_replication is set to enabled.

NewObject string

The time used to distinguish new data from historical data. Data that is written to the source bucket before the time is replicated to the destination bucket as new data. The value of this element is in GMT.

HistoricalObject string

The percentage of the replicated historical data. This element is valid only when historical_object_replication is set to enabled.

NewObject string

The time used to distinguish new data from historical data. Data that is written to the source bucket before the time is replicated to the destination bucket as new data. The value of this element is in GMT.

historicalObject String

The percentage of the replicated historical data. This element is valid only when historical_object_replication is set to enabled.

newObject String

The time used to distinguish new data from historical data. Data that is written to the source bucket before the time is replicated to the destination bucket as new data. The value of this element is in GMT.

historicalObject string

The percentage of the replicated historical data. This element is valid only when historical_object_replication is set to enabled.

newObject string

The time used to distinguish new data from historical data. Data that is written to the source bucket before the time is replicated to the destination bucket as new data. The value of this element is in GMT.

historical_object str

The percentage of the replicated historical data. This element is valid only when historical_object_replication is set to enabled.

new_object str

The time used to distinguish new data from historical data. Data that is written to the source bucket before the time is replicated to the destination bucket as new data. The value of this element is in GMT.

historicalObject String

The percentage of the replicated historical data. This element is valid only when historical_object_replication is set to enabled.

newObject String

The time used to distinguish new data from historical data. Data that is written to the source bucket before the time is replicated to the destination bucket as new data. The value of this element is in GMT.

BucketReplicationSourceSelectionCriteria

SseKmsEncryptedObjects Pulumi.AliCloud.Oss.Inputs.BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjects

Filter source objects encrypted by using SSE-KMS(See the following block sse_kms_encrypted_objects).

SseKmsEncryptedObjects BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjects

Filter source objects encrypted by using SSE-KMS(See the following block sse_kms_encrypted_objects).

sseKmsEncryptedObjects BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjects

Filter source objects encrypted by using SSE-KMS(See the following block sse_kms_encrypted_objects).

sseKmsEncryptedObjects BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjects

Filter source objects encrypted by using SSE-KMS(See the following block sse_kms_encrypted_objects).

sse_kms_encrypted_objects BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjects

Filter source objects encrypted by using SSE-KMS(See the following block sse_kms_encrypted_objects).

sseKmsEncryptedObjects Property Map

Filter source objects encrypted by using SSE-KMS(See the following block sse_kms_encrypted_objects).

BucketReplicationSourceSelectionCriteriaSseKmsEncryptedObjects

Status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

Status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

status String

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

status string

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

status str

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

status String

Specifies whether to replicate objects encrypted by using SSE-KMS. Can be Enabled or Disabled.

Import

Timeouts The timeouts block allows you to specify timeouts for certain actions* delete - (Defaults to 30 mins) Used when delete a data replication rule (until the data replication task is cleared).

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.