1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ObjectStorage
  5. getReplicationPolicy
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.ObjectStorage.getReplicationPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides details about a specific Replication Policy resource in Oracle Cloud Infrastructure Object Storage service.

    Get the replication policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testReplicationPolicy = oci.ObjectStorage.getReplicationPolicy({
        bucket: _var.replication_policy_bucket,
        namespace: _var.replication_policy_namespace,
        replicationId: oci_objectstorage_replication.test_replication.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_replication_policy = oci.ObjectStorage.get_replication_policy(bucket=var["replication_policy_bucket"],
        namespace=var["replication_policy_namespace"],
        replication_id=oci_objectstorage_replication["test_replication"]["id"])
    
    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.GetReplicationPolicy(ctx, &objectstorage.GetReplicationPolicyArgs{
    			Bucket:        _var.Replication_policy_bucket,
    			Namespace:     _var.Replication_policy_namespace,
    			ReplicationId: oci_objectstorage_replication.Test_replication.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testReplicationPolicy = Oci.ObjectStorage.GetReplicationPolicy.Invoke(new()
        {
            Bucket = @var.Replication_policy_bucket,
            Namespace = @var.Replication_policy_namespace,
            ReplicationId = oci_objectstorage_replication.Test_replication.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ObjectStorage.ObjectStorageFunctions;
    import com.pulumi.oci.ObjectStorage.inputs.GetReplicationPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testReplicationPolicy = ObjectStorageFunctions.getReplicationPolicy(GetReplicationPolicyArgs.builder()
                .bucket(var_.replication_policy_bucket())
                .namespace(var_.replication_policy_namespace())
                .replicationId(oci_objectstorage_replication.test_replication().id())
                .build());
    
        }
    }
    
    variables:
      testReplicationPolicy:
        fn::invoke:
          Function: oci:ObjectStorage:getReplicationPolicy
          Arguments:
            bucket: ${var.replication_policy_bucket}
            namespace: ${var.replication_policy_namespace}
            replicationId: ${oci_objectstorage_replication.test_replication.id}
    

    Using getReplicationPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getReplicationPolicy(args: GetReplicationPolicyArgs, opts?: InvokeOptions): Promise<GetReplicationPolicyResult>
    function getReplicationPolicyOutput(args: GetReplicationPolicyOutputArgs, opts?: InvokeOptions): Output<GetReplicationPolicyResult>
    def get_replication_policy(bucket: Optional[str] = None,
                               namespace: Optional[str] = None,
                               replication_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetReplicationPolicyResult
    def get_replication_policy_output(bucket: Optional[pulumi.Input[str]] = None,
                               namespace: Optional[pulumi.Input[str]] = None,
                               replication_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetReplicationPolicyResult]
    func GetReplicationPolicy(ctx *Context, args *GetReplicationPolicyArgs, opts ...InvokeOption) (*GetReplicationPolicyResult, error)
    func GetReplicationPolicyOutput(ctx *Context, args *GetReplicationPolicyOutputArgs, opts ...InvokeOption) GetReplicationPolicyResultOutput

    > Note: This function is named GetReplicationPolicy in the Go SDK.

    public static class GetReplicationPolicy 
    {
        public static Task<GetReplicationPolicyResult> InvokeAsync(GetReplicationPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetReplicationPolicyResult> Invoke(GetReplicationPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReplicationPolicyResult> getReplicationPolicy(GetReplicationPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:ObjectStorage/getReplicationPolicy:getReplicationPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The Object Storage namespace used for the request.
    ReplicationId string
    The ID of the replication policy.
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The Object Storage namespace used for the request.
    ReplicationId string
    The ID of the replication policy.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The Object Storage namespace used for the request.
    replicationId String
    The ID of the replication policy.
    bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace string
    The Object Storage namespace used for the request.
    replicationId string
    The ID of the replication policy.
    bucket str
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace str
    The Object Storage namespace used for the request.
    replication_id str
    The ID of the replication policy.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The Object Storage namespace used for the request.
    replicationId String
    The ID of the replication policy.

    getReplicationPolicy Result

    The following output properties are available:

    Bucket string
    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".
    Id string
    The id of the replication policy.
    Name string
    The name of the policy.
    Namespace string
    ReplicationId string
    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
    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".
    Id string
    The id of the replication policy.
    Name string
    The name of the policy.
    Namespace string
    ReplicationId string
    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
    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".
    id String
    The id of the replication policy.
    name String
    The name of the policy.
    namespace String
    replicationId String
    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
    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".
    id string
    The id of the replication policy.
    name string
    The name of the policy.
    namespace string
    replicationId string
    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
    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".
    id str
    The id of the replication policy.
    name str
    The name of the policy.
    namespace str
    replication_id str
    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
    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".
    id String
    The id of the replication policy.
    name String
    The name of the policy.
    namespace String
    replicationId String
    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.

    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.32.0 published on Thursday, Apr 18, 2024 by Pulumi