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

oci.ObjectStorage.getReplicationPolicies

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Replication Policies in Oracle Cloud Infrastructure Object Storage service.

List the replication policies associated with a bucket.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testReplicationPolicies = oci.ObjectStorage.getReplicationPolicies({
    bucket: replicationPolicyBucket,
    namespace: replicationPolicyNamespace,
});
Copy
import pulumi
import pulumi_oci as oci

test_replication_policies = oci.ObjectStorage.get_replication_policies(bucket=replication_policy_bucket,
    namespace=replication_policy_namespace)
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.GetReplicationPolicies(ctx, &objectstorage.GetReplicationPoliciesArgs{
			Bucket:    replicationPolicyBucket,
			Namespace: replicationPolicyNamespace,
		}, 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 testReplicationPolicies = Oci.ObjectStorage.GetReplicationPolicies.Invoke(new()
    {
        Bucket = replicationPolicyBucket,
        Namespace = replicationPolicyNamespace,
    });

});
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.GetReplicationPoliciesArgs;
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 testReplicationPolicies = ObjectStorageFunctions.getReplicationPolicies(GetReplicationPoliciesArgs.builder()
            .bucket(replicationPolicyBucket)
            .namespace(replicationPolicyNamespace)
            .build());

    }
}
Copy
variables:
  testReplicationPolicies:
    fn::invoke:
      function: oci:ObjectStorage:getReplicationPolicies
      arguments:
        bucket: ${replicationPolicyBucket}
        namespace: ${replicationPolicyNamespace}
Copy

Using getReplicationPolicies

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 getReplicationPolicies(args: GetReplicationPoliciesArgs, opts?: InvokeOptions): Promise<GetReplicationPoliciesResult>
function getReplicationPoliciesOutput(args: GetReplicationPoliciesOutputArgs, opts?: InvokeOptions): Output<GetReplicationPoliciesResult>
Copy
def get_replication_policies(bucket: Optional[str] = None,
                             filters: Optional[Sequence[_objectstorage.GetReplicationPoliciesFilter]] = None,
                             namespace: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetReplicationPoliciesResult
def get_replication_policies_output(bucket: Optional[pulumi.Input[str]] = None,
                             filters: Optional[pulumi.Input[Sequence[pulumi.Input[_objectstorage.GetReplicationPoliciesFilterArgs]]]] = None,
                             namespace: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetReplicationPoliciesResult]
Copy
func GetReplicationPolicies(ctx *Context, args *GetReplicationPoliciesArgs, opts ...InvokeOption) (*GetReplicationPoliciesResult, error)
func GetReplicationPoliciesOutput(ctx *Context, args *GetReplicationPoliciesOutputArgs, opts ...InvokeOption) GetReplicationPoliciesResultOutput
Copy

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

public static class GetReplicationPolicies 
{
    public static Task<GetReplicationPoliciesResult> InvokeAsync(GetReplicationPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetReplicationPoliciesResult> Invoke(GetReplicationPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetReplicationPoliciesResult> getReplicationPolicies(GetReplicationPoliciesArgs args, InvokeOptions options)
public static Output<GetReplicationPoliciesResult> getReplicationPolicies(GetReplicationPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:ObjectStorage/getReplicationPolicies:getReplicationPolicies
  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.
Filters Changes to this property will trigger replacement. List<GetReplicationPoliciesFilter>
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.
Filters Changes to this property will trigger replacement. []GetReplicationPoliciesFilter
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.
filters Changes to this property will trigger replacement. List<GetReplicationPoliciesFilter>
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.
filters Changes to this property will trigger replacement. GetReplicationPoliciesFilter[]
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.
filters Changes to this property will trigger replacement. Sequence[objectstorage.GetReplicationPoliciesFilter]
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.
filters Changes to this property will trigger replacement. List<Property Map>

getReplicationPolicies Result

The following output properties are available:

Bucket string
Id string
The provider-assigned unique ID for this managed resource.
Namespace string
ReplicationPolicies List<GetReplicationPoliciesReplicationPolicy>
The list of replication_policies.
Filters List<GetReplicationPoliciesFilter>
Bucket string
Id string
The provider-assigned unique ID for this managed resource.
Namespace string
ReplicationPolicies []GetReplicationPoliciesReplicationPolicy
The list of replication_policies.
Filters []GetReplicationPoliciesFilter
bucket String
id String
The provider-assigned unique ID for this managed resource.
namespace String
replicationPolicies List<GetReplicationPoliciesReplicationPolicy>
The list of replication_policies.
filters List<GetReplicationPoliciesFilter>
bucket string
id string
The provider-assigned unique ID for this managed resource.
namespace string
replicationPolicies GetReplicationPoliciesReplicationPolicy[]
The list of replication_policies.
filters GetReplicationPoliciesFilter[]
bucket String
id String
The provider-assigned unique ID for this managed resource.
namespace String
replicationPolicies List<Property Map>
The list of replication_policies.
filters List<Property Map>

Supporting Types

GetReplicationPoliciesFilter

Name This property is required. string
The name of the policy.
Values This property is required. List<string>
Regex bool
Name This property is required. string
The name of the policy.
Values This property is required. []string
Regex bool
name This property is required. String
The name of the policy.
values This property is required. List<String>
regex Boolean
name This property is required. string
The name of the policy.
values This property is required. string[]
regex boolean
name This property is required. str
The name of the policy.
values This property is required. Sequence[str]
regex bool
name This property is required. String
The name of the policy.
values This property is required. List<String>
regex Boolean

GetReplicationPoliciesReplicationPolicy

Bucket This property is required. string
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
DeleteObjectInDestinationBucket This property is required. string

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

DestinationBucketName This property is required. 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 This property is required. string
The destination region to replicate to, for example "us-ashburn-1".
Id This property is required. string
The id of the replication policy.
Name This property is required. string
The name of the policy.
Namespace This property is required. string
The Object Storage namespace used for the request.
Status This property is required. 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 This property is required. string
A human-readable description of the status.
TimeCreated This property is required. string
The date when the replication policy was created as per RFC 3339.
TimeLastSync This property is required. string
Changes made to the source bucket before this time has been replicated.
Bucket This property is required. string
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
DeleteObjectInDestinationBucket This property is required. string

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

DestinationBucketName This property is required. 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 This property is required. string
The destination region to replicate to, for example "us-ashburn-1".
Id This property is required. string
The id of the replication policy.
Name This property is required. string
The name of the policy.
Namespace This property is required. string
The Object Storage namespace used for the request.
Status This property is required. 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 This property is required. string
A human-readable description of the status.
TimeCreated This property is required. string
The date when the replication policy was created as per RFC 3339.
TimeLastSync This property is required. string
Changes made to the source bucket before this time has been replicated.
bucket This property is required. String
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
deleteObjectInDestinationBucket This property is required. String

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

destinationBucketName This property is required. 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 This property is required. String
The destination region to replicate to, for example "us-ashburn-1".
id This property is required. String
The id of the replication policy.
name This property is required. String
The name of the policy.
namespace This property is required. String
The Object Storage namespace used for the request.
status This property is required. 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 This property is required. String
A human-readable description of the status.
timeCreated This property is required. String
The date when the replication policy was created as per RFC 3339.
timeLastSync This property is required. String
Changes made to the source bucket before this time has been replicated.
bucket This property is required. string
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
deleteObjectInDestinationBucket This property is required. string

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

destinationBucketName This property is required. 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 This property is required. string
The destination region to replicate to, for example "us-ashburn-1".
id This property is required. string
The id of the replication policy.
name This property is required. string
The name of the policy.
namespace This property is required. string
The Object Storage namespace used for the request.
status This property is required. 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 This property is required. string
A human-readable description of the status.
timeCreated This property is required. string
The date when the replication policy was created as per RFC 3339.
timeLastSync This property is required. string
Changes made to the source bucket before this time has been replicated.
bucket This property is required. str
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
delete_object_in_destination_bucket This property is required. str

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

destination_bucket_name This property is required. 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 This property is required. str
The destination region to replicate to, for example "us-ashburn-1".
id This property is required. str
The id of the replication policy.
name This property is required. str
The name of the policy.
namespace This property is required. str
The Object Storage namespace used for the request.
status This property is required. 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 This property is required. str
A human-readable description of the status.
time_created This property is required. str
The date when the replication policy was created as per RFC 3339.
time_last_sync This property is required. str
Changes made to the source bucket before this time has been replicated.
bucket This property is required. String
The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
deleteObjectInDestinationBucket This property is required. String

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

destinationBucketName This property is required. 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 This property is required. String
The destination region to replicate to, for example "us-ashburn-1".
id This property is required. String
The id of the replication policy.
name This property is required. String
The name of the policy.
namespace This property is required. String
The Object Storage namespace used for the request.
status This property is required. 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 This property is required. String
A human-readable description of the status.
timeCreated This property is required. String
The date when the replication policy was created as per RFC 3339.
timeLastSync This property is required. 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