1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ObjectStorage
  5. getReplicationPolicies
Oracle Cloud Infrastructure v2.19.0 published on Thursday, Dec 12, 2024 by Pulumi

oci.ObjectStorage.getReplicationPolicies

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.19.0 published on Thursday, Dec 12, 2024 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,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_replication_policies = oci.ObjectStorage.get_replication_policies(bucket=replication_policy_bucket,
        namespace=replication_policy_namespace)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      testReplicationPolicies:
        fn::invoke:
          function: oci:ObjectStorage:getReplicationPolicies
          arguments:
            bucket: ${replicationPolicyBucket}
            namespace: ${replicationPolicyNamespace}
    

    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>
    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]
    func GetReplicationPolicies(ctx *Context, args *GetReplicationPoliciesArgs, opts ...InvokeOption) (*GetReplicationPoliciesResult, error)
    func GetReplicationPoliciesOutput(ctx *Context, args *GetReplicationPoliciesOutputArgs, opts ...InvokeOption) GetReplicationPoliciesResultOutput

    > 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)
    }
    public static CompletableFuture<GetReplicationPoliciesResult> getReplicationPolicies(GetReplicationPoliciesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:ObjectStorage/getReplicationPolicies:getReplicationPolicies
      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.
    Filters List<GetReplicationPoliciesFilter>
    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.
    Filters []GetReplicationPoliciesFilter
    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.
    filters List<GetReplicationPoliciesFilter>
    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.
    filters GetReplicationPoliciesFilter[]
    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.
    filters Sequence[objectstorage.GetReplicationPoliciesFilter]
    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.
    filters 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 string
    The name of the policy.
    Values List<string>
    Regex bool
    Name string
    The name of the policy.
    Values []string
    Regex bool
    name String
    The name of the policy.
    values List<String>
    regex Boolean
    name string
    The name of the policy.
    values string[]
    regex boolean
    name str
    The name of the policy.
    values Sequence[str]
    regex bool
    name String
    The name of the policy.
    values List<String>
    regex Boolean

    GetReplicationPoliciesReplicationPolicy

    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".
    Id string
    The id of the replication policy.
    Name string
    The name of the policy.
    Namespace string
    The Object Storage namespace used for the request.
    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".
    Id string
    The id of the replication policy.
    Name string
    The name of the policy.
    Namespace string
    The Object Storage namespace used for the request.
    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".
    id String
    The id of the replication policy.
    name String
    The name of the policy.
    namespace String
    The Object Storage namespace used for the request.
    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".
    id string
    The id of the replication policy.
    name string
    The name of the policy.
    namespace string
    The Object Storage namespace used for the request.
    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".
    id str
    The id of the replication policy.
    name str
    The name of the policy.
    namespace str
    The Object Storage namespace used for the request.
    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".
    id String
    The id of the replication policy.
    name String
    The name of the policy.
    namespace String
    The Object Storage namespace used for the request.
    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 v2.19.0 published on Thursday, Dec 12, 2024 by Pulumi