1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ObjectStorage
  5. ReplicationPolicy
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

oci.ObjectStorage.ReplicationPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

    This resource provides the Replication Policy resource in Oracle Cloud Infrastructure Object Storage service.

    Creates a replication policy for the specified bucket.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testReplicationPolicy = new Oci.ObjectStorage.ReplicationPolicy("testReplicationPolicy", new()
        {
            Bucket = @var.Replication_policy_bucket,
            DestinationBucketName = oci_objectstorage_bucket.Test_bucket.Name,
            DestinationRegionName = oci_identity_region.Test_region.Name,
            Namespace = @var.Replication_policy_namespace,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/ObjectStorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ObjectStorage.NewReplicationPolicy(ctx, "testReplicationPolicy", &ObjectStorage.ReplicationPolicyArgs{
    			Bucket:                pulumi.Any(_var.Replication_policy_bucket),
    			DestinationBucketName: pulumi.Any(oci_objectstorage_bucket.Test_bucket.Name),
    			DestinationRegionName: pulumi.Any(oci_identity_region.Test_region.Name),
    			Namespace:             pulumi.Any(_var.Replication_policy_namespace),
    		})
    		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.oci.ObjectStorage.ReplicationPolicy;
    import com.pulumi.oci.ObjectStorage.ReplicationPolicyArgs;
    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 testReplicationPolicy = new ReplicationPolicy("testReplicationPolicy", ReplicationPolicyArgs.builder()        
                .bucket(var_.replication_policy_bucket())
                .destinationBucketName(oci_objectstorage_bucket.test_bucket().name())
                .destinationRegionName(oci_identity_region.test_region().name())
                .namespace(var_.replication_policy_namespace())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_replication_policy = oci.object_storage.ReplicationPolicy("testReplicationPolicy",
        bucket=var["replication_policy_bucket"],
        destination_bucket_name=oci_objectstorage_bucket["test_bucket"]["name"],
        destination_region_name=oci_identity_region["test_region"]["name"],
        namespace=var["replication_policy_namespace"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testReplicationPolicy = new oci.objectstorage.ReplicationPolicy("testReplicationPolicy", {
        bucket: _var.replication_policy_bucket,
        destinationBucketName: oci_objectstorage_bucket.test_bucket.name,
        destinationRegionName: oci_identity_region.test_region.name,
        namespace: _var.replication_policy_namespace,
    });
    
    resources:
      testReplicationPolicy:
        type: oci:ObjectStorage:ReplicationPolicy
        properties:
          #Required
          bucket: ${var.replication_policy_bucket}
          destinationBucketName: ${oci_objectstorage_bucket.test_bucket.name}
          destinationRegionName: ${oci_identity_region.test_region.name}
          namespace: ${var.replication_policy_namespace}
    

    Create ReplicationPolicy Resource

    new ReplicationPolicy(name: string, args: ReplicationPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ReplicationPolicy(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          bucket: Optional[str] = None,
                          delete_object_in_destination_bucket: Optional[str] = None,
                          destination_bucket_name: Optional[str] = None,
                          destination_region_name: Optional[str] = None,
                          name: Optional[str] = None,
                          namespace: Optional[str] = None)
    @overload
    def ReplicationPolicy(resource_name: str,
                          args: ReplicationPolicyArgs,
                          opts: Optional[ResourceOptions] = None)
    func NewReplicationPolicy(ctx *Context, name string, args ReplicationPolicyArgs, opts ...ResourceOption) (*ReplicationPolicy, error)
    public ReplicationPolicy(string name, ReplicationPolicyArgs args, CustomResourceOptions? opts = null)
    public ReplicationPolicy(String name, ReplicationPolicyArgs args)
    public ReplicationPolicy(String name, ReplicationPolicyArgs args, CustomResourceOptions options)
    
    type: oci:ObjectStorage:ReplicationPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ReplicationPolicyArgs
    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 ReplicationPolicyArgs
    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 ReplicationPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReplicationPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReplicationPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ReplicationPolicy 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 ReplicationPolicy resource accepts the following input properties:

    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    DestinationBucketName string
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    DestinationRegionName string
    The destination region to replicate to, for example "us-ashburn-1".
    Namespace string

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DeleteObjectInDestinationBucket string

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    Name string
    The name of the policy. Avoid entering confidential information.
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    DestinationBucketName string
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    DestinationRegionName string
    The destination region to replicate to, for example "us-ashburn-1".
    Namespace string

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DeleteObjectInDestinationBucket string

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    Name string
    The name of the policy. Avoid entering confidential information.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    destinationBucketName String
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destinationRegionName String
    The destination region to replicate to, for example "us-ashburn-1".
    namespace String

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    deleteObjectInDestinationBucket String

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    name String
    The name of the policy. Avoid entering confidential information.
    bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    destinationBucketName string
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destinationRegionName string
    The destination region to replicate to, for example "us-ashburn-1".
    namespace string

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    deleteObjectInDestinationBucket string

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    name string
    The name of the policy. Avoid entering confidential information.
    bucket str
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    destination_bucket_name str
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destination_region_name str
    The destination region to replicate to, for example "us-ashburn-1".
    namespace str

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    delete_object_in_destination_bucket str

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    name str
    The name of the policy. Avoid entering confidential information.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    destinationBucketName String
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destinationRegionName String
    The destination region to replicate to, for example "us-ashburn-1".
    namespace String

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    deleteObjectInDestinationBucket String

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    name String
    The name of the policy. Avoid entering confidential information.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    StatusMessage string
    A human-readable description of the status.
    TimeCreated string
    The date when the replication policy was created as per RFC 3339.
    TimeLastSync string
    Changes made to the source bucket before this time has been replicated.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    StatusMessage string
    A human-readable description of the status.
    TimeCreated string
    The date when the replication policy was created as per RFC 3339.
    TimeLastSync string
    Changes made to the source bucket before this time has been replicated.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    statusMessage String
    A human-readable description of the status.
    timeCreated String
    The date when the replication policy was created as per RFC 3339.
    timeLastSync String
    Changes made to the source bucket before this time has been replicated.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    statusMessage string
    A human-readable description of the status.
    timeCreated string
    The date when the replication policy was created as per RFC 3339.
    timeLastSync string
    Changes made to the source bucket before this time has been replicated.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    status_message str
    A human-readable description of the status.
    time_created str
    The date when the replication policy was created as per RFC 3339.
    time_last_sync str
    Changes made to the source bucket before this time has been replicated.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    statusMessage String
    A human-readable description of the status.
    timeCreated String
    The date when the replication policy was created as per RFC 3339.
    timeLastSync String
    Changes made to the source bucket before this time has been replicated.

    Look up Existing ReplicationPolicy Resource

    Get an existing ReplicationPolicy 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?: ReplicationPolicyState, opts?: CustomResourceOptions): ReplicationPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket: Optional[str] = None,
            delete_object_in_destination_bucket: Optional[str] = None,
            destination_bucket_name: Optional[str] = None,
            destination_region_name: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            status: Optional[str] = None,
            status_message: Optional[str] = None,
            time_created: Optional[str] = None,
            time_last_sync: Optional[str] = None) -> ReplicationPolicy
    func GetReplicationPolicy(ctx *Context, name string, id IDInput, state *ReplicationPolicyState, opts ...ResourceOption) (*ReplicationPolicy, error)
    public static ReplicationPolicy Get(string name, Input<string> id, ReplicationPolicyState? state, CustomResourceOptions? opts = null)
    public static ReplicationPolicy get(String name, Output<String> id, ReplicationPolicyState 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:
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    DeleteObjectInDestinationBucket string

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    DestinationBucketName string
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    DestinationRegionName string
    The destination region to replicate to, for example "us-ashburn-1".
    Name string
    The name of the policy. Avoid entering confidential information.
    Namespace string

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Status string
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    StatusMessage string
    A human-readable description of the status.
    TimeCreated string
    The date when the replication policy was created as per RFC 3339.
    TimeLastSync string
    Changes made to the source bucket before this time has been replicated.
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    DeleteObjectInDestinationBucket string

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    DestinationBucketName string
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    DestinationRegionName string
    The destination region to replicate to, for example "us-ashburn-1".
    Name string
    The name of the policy. Avoid entering confidential information.
    Namespace string

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Status string
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    StatusMessage string
    A human-readable description of the status.
    TimeCreated string
    The date when the replication policy was created as per RFC 3339.
    TimeLastSync string
    Changes made to the source bucket before this time has been replicated.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    deleteObjectInDestinationBucket String

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    destinationBucketName String
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destinationRegionName String
    The destination region to replicate to, for example "us-ashburn-1".
    name String
    The name of the policy. Avoid entering confidential information.
    namespace String

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    status String
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    statusMessage String
    A human-readable description of the status.
    timeCreated String
    The date when the replication policy was created as per RFC 3339.
    timeLastSync String
    Changes made to the source bucket before this time has been replicated.
    bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    deleteObjectInDestinationBucket string

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    destinationBucketName string
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destinationRegionName string
    The destination region to replicate to, for example "us-ashburn-1".
    name string
    The name of the policy. Avoid entering confidential information.
    namespace string

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    status string
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    statusMessage string
    A human-readable description of the status.
    timeCreated string
    The date when the replication policy was created as per RFC 3339.
    timeLastSync string
    Changes made to the source bucket before this time has been replicated.
    bucket str
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    delete_object_in_destination_bucket str

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    destination_bucket_name str
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destination_region_name str
    The destination region to replicate to, for example "us-ashburn-1".
    name str
    The name of the policy. Avoid entering confidential information.
    namespace str

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    status str
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    status_message str
    A human-readable description of the status.
    time_created str
    The date when the replication policy was created as per RFC 3339.
    time_last_sync str
    Changes made to the source bucket before this time has been replicated.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    deleteObjectInDestinationBucket String

    Deprecated:The 'delete_object_in_destination_bucket' field has been deprecated. It is no longer supported.

    destinationBucketName String
    The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy.
    destinationRegionName String
    The destination region to replicate to, for example "us-ashburn-1".
    name String
    The name of the policy. Avoid entering confidential information.
    namespace String

    The Object Storage namespace used for the request.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    status String
    The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE.
    statusMessage String
    A human-readable description of the status.
    timeCreated String
    The date when the replication policy was created as per RFC 3339.
    timeLastSync String
    Changes made to the source bucket before this time has been replicated.

    Import

    ReplicationPolicies can be imported using the id, e.g.

     $ pulumi import oci:ObjectStorage/replicationPolicy:ReplicationPolicy test_replication_policy "n/{namespaceName}/b/{bucketName}/replicationPolicies/{replicationId}"
    

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi