Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.ObjectStorage.getReplicationPolicy
Explore with Pulumi AI
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: replicationPolicyBucket,
    namespace: replicationPolicyNamespace,
    replicationId: testReplication.id,
});
import pulumi
import pulumi_oci as oci
test_replication_policy = oci.ObjectStorage.get_replication_policy(bucket=replication_policy_bucket,
    namespace=replication_policy_namespace,
    replication_id=test_replication["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/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:        replicationPolicyBucket,
			Namespace:     replicationPolicyNamespace,
			ReplicationId: testReplication.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 = replicationPolicyBucket,
        Namespace = replicationPolicyNamespace,
        ReplicationId = testReplication.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(replicationPolicyBucket)
            .namespace(replicationPolicyNamespace)
            .replicationId(testReplication.id())
            .build());
    }
}
variables:
  testReplicationPolicy:
    fn::invoke:
      function: oci:ObjectStorage:getReplicationPolicy
      arguments:
        bucket: ${replicationPolicyBucket}
        namespace: ${replicationPolicyNamespace}
        replicationId: ${testReplication.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 LookupReplicationPolicy(ctx *Context, args *LookupReplicationPolicyArgs, opts ...InvokeOption) (*LookupReplicationPolicyResult, error)
func LookupReplicationPolicyOutput(ctx *Context, args *LookupReplicationPolicyOutputArgs, opts ...InvokeOption) LookupReplicationPolicyResultOutput> Note: This function is named LookupReplicationPolicy 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)
public static Output<GetReplicationPolicyResult> getReplicationPolicy(GetReplicationPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: oci:ObjectStorage/getReplicationPolicy:getReplicationPolicy
  arguments:
    # arguments dictionaryThe 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
- DeleteObject stringIn Destination Bucket 
- DestinationBucket stringName 
- 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.
- DestinationRegion stringName 
- 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.
- TimeLast stringSync 
- Changes made to the source bucket before this time has been replicated.
- Bucket string
- DeleteObject stringIn Destination Bucket 
- DestinationBucket stringName 
- 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.
- DestinationRegion stringName 
- 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.
- TimeLast stringSync 
- Changes made to the source bucket before this time has been replicated.
- bucket String
- deleteObject StringIn Destination Bucket 
- destinationBucket StringName 
- 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.
- destinationRegion StringName 
- 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.
- timeLast StringSync 
- Changes made to the source bucket before this time has been replicated.
- bucket string
- deleteObject stringIn Destination Bucket 
- destinationBucket stringName 
- 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.
- destinationRegion stringName 
- 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.
- timeLast stringSync 
- Changes made to the source bucket before this time has been replicated.
- bucket str
- delete_object_ strin_ destination_ bucket 
- destination_bucket_ strname 
- 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_ strname 
- 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_ strsync 
- Changes made to the source bucket before this time has been replicated.
- bucket String
- deleteObject StringIn Destination Bucket 
- destinationBucket StringName 
- 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.
- destinationRegion StringName 
- 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.
- timeLast StringSync 
- 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 ociTerraform Provider.