1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ObjectStorage
  5. getReplicationPolicy
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.ObjectStorage.getReplicationPolicy

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 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: replicationPolicyBucket,
    namespace: replicationPolicyNamespace,
    replicationId: testReplication.id,
});
Copy
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"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testReplicationPolicy:
    fn::invoke:
      function: oci:ObjectStorage:getReplicationPolicy
      arguments:
        bucket: ${replicationPolicyBucket}
        namespace: ${replicationPolicyNamespace}
        replicationId: ${testReplication.id}
Copy

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>
Copy
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]
Copy
func GetReplicationPolicy(ctx *Context, args *GetReplicationPolicyArgs, opts ...InvokeOption) (*GetReplicationPolicyResult, error)
func GetReplicationPolicyOutput(ctx *Context, args *GetReplicationPolicyOutputArgs, opts ...InvokeOption) GetReplicationPolicyResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetReplicationPolicyResult> getReplicationPolicy(GetReplicationPolicyArgs args, InvokeOptions options)
public static Output<GetReplicationPolicyResult> getReplicationPolicy(GetReplicationPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:ObjectStorage/getReplicationPolicy:getReplicationPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Bucket This property is required. string
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
Namespace This property is required. string
The Object Storage namespace used for the request.
ReplicationId This property is required. string
The ID of the replication policy.
Bucket This property is required. string
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
Namespace This property is required. string
The Object Storage namespace used for the request.
ReplicationId This property is required. string
The ID of the replication policy.
bucket This property is required. String
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
namespace This property is required. String
The Object Storage namespace used for the request.
replicationId This property is required. String
The ID of the replication policy.
bucket This property is required. string
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
namespace This property is required. string
The Object Storage namespace used for the request.
replicationId This property is required. string
The ID of the replication policy.
bucket This property is required. str
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
namespace This property is required. str
The Object Storage namespace used for the request.
replication_id This property is required. str
The ID of the replication policy.
bucket This property is required. String
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
namespace This property is required. String
The Object Storage namespace used for the request.
replicationId This property is required. 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.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi