1. Packages
  2. Azure Native
  3. API Docs
  4. storage
  5. ObjectReplicationPolicy
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

azure-native.storage.ObjectReplicationPolicy

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

    The replication policy between two storage accounts. Multiple rules can be defined in one policy. Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2021-02-01.

    Other available API versions: 2023-01-01, 2023-04-01, 2023-05-01.

    Example Usage

    StorageAccountCreateObjectReplicationPolicyOnDestination

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var objectReplicationPolicy = new AzureNative.Storage.ObjectReplicationPolicy("objectReplicationPolicy", new()
        {
            AccountName = "dst112",
            DestinationAccount = "dst112",
            ObjectReplicationPolicyId = "default",
            ResourceGroupName = "res7687",
            Rules = new[]
            {
                new AzureNative.Storage.Inputs.ObjectReplicationPolicyRuleArgs
                {
                    DestinationContainer = "dcont139",
                    Filters = new AzureNative.Storage.Inputs.ObjectReplicationPolicyFilterArgs
                    {
                        PrefixMatch = new[]
                        {
                            "blobA",
                            "blobB",
                        },
                    },
                    SourceContainer = "scont139",
                },
            },
            SourceAccount = "src1122",
        });
    
    });
    
    package main
    
    import (
    	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewObjectReplicationPolicy(ctx, "objectReplicationPolicy", &storage.ObjectReplicationPolicyArgs{
    			AccountName:               pulumi.String("dst112"),
    			DestinationAccount:        pulumi.String("dst112"),
    			ObjectReplicationPolicyId: pulumi.String("default"),
    			ResourceGroupName:         pulumi.String("res7687"),
    			Rules: storage.ObjectReplicationPolicyRuleArray{
    				&storage.ObjectReplicationPolicyRuleArgs{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: &storage.ObjectReplicationPolicyFilterArgs{
    						PrefixMatch: pulumi.StringArray{
    							pulumi.String("blobA"),
    							pulumi.String("blobB"),
    						},
    					},
    					SourceContainer: pulumi.String("scont139"),
    				},
    			},
    			SourceAccount: pulumi.String("src1122"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicy;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicyArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyRuleArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyFilterArgs;
    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) {
            var objectReplicationPolicy = new ObjectReplicationPolicy("objectReplicationPolicy", ObjectReplicationPolicyArgs.builder()
                .accountName("dst112")
                .destinationAccount("dst112")
                .objectReplicationPolicyId("default")
                .resourceGroupName("res7687")
                .rules(ObjectReplicationPolicyRuleArgs.builder()
                    .destinationContainer("dcont139")
                    .filters(ObjectReplicationPolicyFilterArgs.builder()
                        .prefixMatch(                    
                            "blobA",
                            "blobB")
                        .build())
                    .sourceContainer("scont139")
                    .build())
                .sourceAccount("src1122")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    object_replication_policy = azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy",
        account_name="dst112",
        destination_account="dst112",
        object_replication_policy_id="default",
        resource_group_name="res7687",
        rules=[{
            "destination_container": "dcont139",
            "filters": {
                "prefix_match": [
                    "blobA",
                    "blobB",
                ],
            },
            "source_container": "scont139",
        }],
        source_account="src1122")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const objectReplicationPolicy = new azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy", {
        accountName: "dst112",
        destinationAccount: "dst112",
        objectReplicationPolicyId: "default",
        resourceGroupName: "res7687",
        rules: [{
            destinationContainer: "dcont139",
            filters: {
                prefixMatch: [
                    "blobA",
                    "blobB",
                ],
            },
            sourceContainer: "scont139",
        }],
        sourceAccount: "src1122",
    });
    
    resources:
      objectReplicationPolicy:
        type: azure-native:storage:ObjectReplicationPolicy
        properties:
          accountName: dst112
          destinationAccount: dst112
          objectReplicationPolicyId: default
          resourceGroupName: res7687
          rules:
            - destinationContainer: dcont139
              filters:
                prefixMatch:
                  - blobA
                  - blobB
              sourceContainer: scont139
          sourceAccount: src1122
    

    StorageAccountCreateObjectReplicationPolicyOnSource

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var objectReplicationPolicy = new AzureNative.Storage.ObjectReplicationPolicy("objectReplicationPolicy", new()
        {
            AccountName = "src1122",
            DestinationAccount = "dst112",
            ObjectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f",
            ResourceGroupName = "res7687",
            Rules = new[]
            {
                new AzureNative.Storage.Inputs.ObjectReplicationPolicyRuleArgs
                {
                    DestinationContainer = "dcont139",
                    Filters = new AzureNative.Storage.Inputs.ObjectReplicationPolicyFilterArgs
                    {
                        MinCreationTime = "2020-02-19T16:05:00Z",
                        PrefixMatch = new[]
                        {
                            "blobA",
                            "blobB",
                        },
                    },
                    RuleId = "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                    SourceContainer = "scont139",
                },
            },
            SourceAccount = "src1122",
        });
    
    });
    
    package main
    
    import (
    	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewObjectReplicationPolicy(ctx, "objectReplicationPolicy", &storage.ObjectReplicationPolicyArgs{
    			AccountName:               pulumi.String("src1122"),
    			DestinationAccount:        pulumi.String("dst112"),
    			ObjectReplicationPolicyId: pulumi.String("2a20bb73-5717-4635-985a-5d4cf777438f"),
    			ResourceGroupName:         pulumi.String("res7687"),
    			Rules: storage.ObjectReplicationPolicyRuleArray{
    				&storage.ObjectReplicationPolicyRuleArgs{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: &storage.ObjectReplicationPolicyFilterArgs{
    						MinCreationTime: pulumi.String("2020-02-19T16:05:00Z"),
    						PrefixMatch: pulumi.StringArray{
    							pulumi.String("blobA"),
    							pulumi.String("blobB"),
    						},
    					},
    					RuleId:          pulumi.String("d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
    					SourceContainer: pulumi.String("scont139"),
    				},
    			},
    			SourceAccount: pulumi.String("src1122"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicy;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicyArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyRuleArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyFilterArgs;
    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) {
            var objectReplicationPolicy = new ObjectReplicationPolicy("objectReplicationPolicy", ObjectReplicationPolicyArgs.builder()
                .accountName("src1122")
                .destinationAccount("dst112")
                .objectReplicationPolicyId("2a20bb73-5717-4635-985a-5d4cf777438f")
                .resourceGroupName("res7687")
                .rules(ObjectReplicationPolicyRuleArgs.builder()
                    .destinationContainer("dcont139")
                    .filters(ObjectReplicationPolicyFilterArgs.builder()
                        .minCreationTime("2020-02-19T16:05:00Z")
                        .prefixMatch(                    
                            "blobA",
                            "blobB")
                        .build())
                    .ruleId("d5d18a48-8801-4554-aeaa-74faf65f5ef9")
                    .sourceContainer("scont139")
                    .build())
                .sourceAccount("src1122")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    object_replication_policy = azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy",
        account_name="src1122",
        destination_account="dst112",
        object_replication_policy_id="2a20bb73-5717-4635-985a-5d4cf777438f",
        resource_group_name="res7687",
        rules=[{
            "destination_container": "dcont139",
            "filters": {
                "min_creation_time": "2020-02-19T16:05:00Z",
                "prefix_match": [
                    "blobA",
                    "blobB",
                ],
            },
            "rule_id": "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
            "source_container": "scont139",
        }],
        source_account="src1122")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const objectReplicationPolicy = new azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy", {
        accountName: "src1122",
        destinationAccount: "dst112",
        objectReplicationPolicyId: "2a20bb73-5717-4635-985a-5d4cf777438f",
        resourceGroupName: "res7687",
        rules: [{
            destinationContainer: "dcont139",
            filters: {
                minCreationTime: "2020-02-19T16:05:00Z",
                prefixMatch: [
                    "blobA",
                    "blobB",
                ],
            },
            ruleId: "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
            sourceContainer: "scont139",
        }],
        sourceAccount: "src1122",
    });
    
    resources:
      objectReplicationPolicy:
        type: azure-native:storage:ObjectReplicationPolicy
        properties:
          accountName: src1122
          destinationAccount: dst112
          objectReplicationPolicyId: 2a20bb73-5717-4635-985a-5d4cf777438f
          resourceGroupName: res7687
          rules:
            - destinationContainer: dcont139
              filters:
                minCreationTime: 2020-02-19T16:05:00Z
                prefixMatch:
                  - blobA
                  - blobB
              ruleId: d5d18a48-8801-4554-aeaa-74faf65f5ef9
              sourceContainer: scont139
          sourceAccount: src1122
    

    StorageAccountUpdateObjectReplicationPolicyOnDestination

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var objectReplicationPolicy = new AzureNative.Storage.ObjectReplicationPolicy("objectReplicationPolicy", new()
        {
            AccountName = "dst112",
            DestinationAccount = "dst112",
            ObjectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f",
            ResourceGroupName = "res7687",
            Rules = new[]
            {
                new AzureNative.Storage.Inputs.ObjectReplicationPolicyRuleArgs
                {
                    DestinationContainer = "dcont139",
                    Filters = new AzureNative.Storage.Inputs.ObjectReplicationPolicyFilterArgs
                    {
                        PrefixMatch = new[]
                        {
                            "blobA",
                            "blobB",
                        },
                    },
                    RuleId = "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                    SourceContainer = "scont139",
                },
                new AzureNative.Storage.Inputs.ObjectReplicationPolicyRuleArgs
                {
                    DestinationContainer = "dcont179",
                    SourceContainer = "scont179",
                },
            },
            SourceAccount = "src1122",
        });
    
    });
    
    package main
    
    import (
    	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewObjectReplicationPolicy(ctx, "objectReplicationPolicy", &storage.ObjectReplicationPolicyArgs{
    			AccountName:               pulumi.String("dst112"),
    			DestinationAccount:        pulumi.String("dst112"),
    			ObjectReplicationPolicyId: pulumi.String("2a20bb73-5717-4635-985a-5d4cf777438f"),
    			ResourceGroupName:         pulumi.String("res7687"),
    			Rules: storage.ObjectReplicationPolicyRuleArray{
    				&storage.ObjectReplicationPolicyRuleArgs{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: &storage.ObjectReplicationPolicyFilterArgs{
    						PrefixMatch: pulumi.StringArray{
    							pulumi.String("blobA"),
    							pulumi.String("blobB"),
    						},
    					},
    					RuleId:          pulumi.String("d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
    					SourceContainer: pulumi.String("scont139"),
    				},
    				&storage.ObjectReplicationPolicyRuleArgs{
    					DestinationContainer: pulumi.String("dcont179"),
    					SourceContainer:      pulumi.String("scont179"),
    				},
    			},
    			SourceAccount: pulumi.String("src1122"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicy;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicyArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyRuleArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyFilterArgs;
    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) {
            var objectReplicationPolicy = new ObjectReplicationPolicy("objectReplicationPolicy", ObjectReplicationPolicyArgs.builder()
                .accountName("dst112")
                .destinationAccount("dst112")
                .objectReplicationPolicyId("2a20bb73-5717-4635-985a-5d4cf777438f")
                .resourceGroupName("res7687")
                .rules(            
                    ObjectReplicationPolicyRuleArgs.builder()
                        .destinationContainer("dcont139")
                        .filters(ObjectReplicationPolicyFilterArgs.builder()
                            .prefixMatch(                        
                                "blobA",
                                "blobB")
                            .build())
                        .ruleId("d5d18a48-8801-4554-aeaa-74faf65f5ef9")
                        .sourceContainer("scont139")
                        .build(),
                    ObjectReplicationPolicyRuleArgs.builder()
                        .destinationContainer("dcont179")
                        .sourceContainer("scont179")
                        .build())
                .sourceAccount("src1122")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    object_replication_policy = azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy",
        account_name="dst112",
        destination_account="dst112",
        object_replication_policy_id="2a20bb73-5717-4635-985a-5d4cf777438f",
        resource_group_name="res7687",
        rules=[
            {
                "destination_container": "dcont139",
                "filters": {
                    "prefix_match": [
                        "blobA",
                        "blobB",
                    ],
                },
                "rule_id": "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                "source_container": "scont139",
            },
            {
                "destination_container": "dcont179",
                "source_container": "scont179",
            },
        ],
        source_account="src1122")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const objectReplicationPolicy = new azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy", {
        accountName: "dst112",
        destinationAccount: "dst112",
        objectReplicationPolicyId: "2a20bb73-5717-4635-985a-5d4cf777438f",
        resourceGroupName: "res7687",
        rules: [
            {
                destinationContainer: "dcont139",
                filters: {
                    prefixMatch: [
                        "blobA",
                        "blobB",
                    ],
                },
                ruleId: "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                sourceContainer: "scont139",
            },
            {
                destinationContainer: "dcont179",
                sourceContainer: "scont179",
            },
        ],
        sourceAccount: "src1122",
    });
    
    resources:
      objectReplicationPolicy:
        type: azure-native:storage:ObjectReplicationPolicy
        properties:
          accountName: dst112
          destinationAccount: dst112
          objectReplicationPolicyId: 2a20bb73-5717-4635-985a-5d4cf777438f
          resourceGroupName: res7687
          rules:
            - destinationContainer: dcont139
              filters:
                prefixMatch:
                  - blobA
                  - blobB
              ruleId: d5d18a48-8801-4554-aeaa-74faf65f5ef9
              sourceContainer: scont139
            - destinationContainer: dcont179
              sourceContainer: scont179
          sourceAccount: src1122
    

    StorageAccountUpdateObjectReplicationPolicyOnSource

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var objectReplicationPolicy = new AzureNative.Storage.ObjectReplicationPolicy("objectReplicationPolicy", new()
        {
            AccountName = "src1122",
            DestinationAccount = "dst112",
            ObjectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f",
            ResourceGroupName = "res7687",
            Rules = new[]
            {
                new AzureNative.Storage.Inputs.ObjectReplicationPolicyRuleArgs
                {
                    DestinationContainer = "dcont139",
                    Filters = new AzureNative.Storage.Inputs.ObjectReplicationPolicyFilterArgs
                    {
                        PrefixMatch = new[]
                        {
                            "blobA",
                            "blobB",
                        },
                    },
                    RuleId = "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                    SourceContainer = "scont139",
                },
                new AzureNative.Storage.Inputs.ObjectReplicationPolicyRuleArgs
                {
                    DestinationContainer = "dcont179",
                    RuleId = "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2",
                    SourceContainer = "scont179",
                },
            },
            SourceAccount = "src1122",
        });
    
    });
    
    package main
    
    import (
    	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewObjectReplicationPolicy(ctx, "objectReplicationPolicy", &storage.ObjectReplicationPolicyArgs{
    			AccountName:               pulumi.String("src1122"),
    			DestinationAccount:        pulumi.String("dst112"),
    			ObjectReplicationPolicyId: pulumi.String("2a20bb73-5717-4635-985a-5d4cf777438f"),
    			ResourceGroupName:         pulumi.String("res7687"),
    			Rules: storage.ObjectReplicationPolicyRuleArray{
    				&storage.ObjectReplicationPolicyRuleArgs{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: &storage.ObjectReplicationPolicyFilterArgs{
    						PrefixMatch: pulumi.StringArray{
    							pulumi.String("blobA"),
    							pulumi.String("blobB"),
    						},
    					},
    					RuleId:          pulumi.String("d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
    					SourceContainer: pulumi.String("scont139"),
    				},
    				&storage.ObjectReplicationPolicyRuleArgs{
    					DestinationContainer: pulumi.String("dcont179"),
    					RuleId:               pulumi.String("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"),
    					SourceContainer:      pulumi.String("scont179"),
    				},
    			},
    			SourceAccount: pulumi.String("src1122"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicy;
    import com.pulumi.azurenative.storage.ObjectReplicationPolicyArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyRuleArgs;
    import com.pulumi.azurenative.storage.inputs.ObjectReplicationPolicyFilterArgs;
    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) {
            var objectReplicationPolicy = new ObjectReplicationPolicy("objectReplicationPolicy", ObjectReplicationPolicyArgs.builder()
                .accountName("src1122")
                .destinationAccount("dst112")
                .objectReplicationPolicyId("2a20bb73-5717-4635-985a-5d4cf777438f")
                .resourceGroupName("res7687")
                .rules(            
                    ObjectReplicationPolicyRuleArgs.builder()
                        .destinationContainer("dcont139")
                        .filters(ObjectReplicationPolicyFilterArgs.builder()
                            .prefixMatch(                        
                                "blobA",
                                "blobB")
                            .build())
                        .ruleId("d5d18a48-8801-4554-aeaa-74faf65f5ef9")
                        .sourceContainer("scont139")
                        .build(),
                    ObjectReplicationPolicyRuleArgs.builder()
                        .destinationContainer("dcont179")
                        .ruleId("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2")
                        .sourceContainer("scont179")
                        .build())
                .sourceAccount("src1122")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    object_replication_policy = azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy",
        account_name="src1122",
        destination_account="dst112",
        object_replication_policy_id="2a20bb73-5717-4635-985a-5d4cf777438f",
        resource_group_name="res7687",
        rules=[
            {
                "destination_container": "dcont139",
                "filters": {
                    "prefix_match": [
                        "blobA",
                        "blobB",
                    ],
                },
                "rule_id": "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                "source_container": "scont139",
            },
            {
                "destination_container": "dcont179",
                "rule_id": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2",
                "source_container": "scont179",
            },
        ],
        source_account="src1122")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const objectReplicationPolicy = new azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicy", {
        accountName: "src1122",
        destinationAccount: "dst112",
        objectReplicationPolicyId: "2a20bb73-5717-4635-985a-5d4cf777438f",
        resourceGroupName: "res7687",
        rules: [
            {
                destinationContainer: "dcont139",
                filters: {
                    prefixMatch: [
                        "blobA",
                        "blobB",
                    ],
                },
                ruleId: "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                sourceContainer: "scont139",
            },
            {
                destinationContainer: "dcont179",
                ruleId: "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2",
                sourceContainer: "scont179",
            },
        ],
        sourceAccount: "src1122",
    });
    
    resources:
      objectReplicationPolicy:
        type: azure-native:storage:ObjectReplicationPolicy
        properties:
          accountName: src1122
          destinationAccount: dst112
          objectReplicationPolicyId: 2a20bb73-5717-4635-985a-5d4cf777438f
          resourceGroupName: res7687
          rules:
            - destinationContainer: dcont139
              filters:
                prefixMatch:
                  - blobA
                  - blobB
              ruleId: d5d18a48-8801-4554-aeaa-74faf65f5ef9
              sourceContainer: scont139
            - destinationContainer: dcont179
              ruleId: cfbb4bc2-8b60-429f-b05a-d1e0942b33b2
              sourceContainer: scont179
          sourceAccount: src1122
    

    Create ObjectReplicationPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ObjectReplicationPolicy(name: string, args: ObjectReplicationPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ObjectReplicationPolicy(resource_name: str,
                                args: ObjectReplicationPolicyArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def ObjectReplicationPolicy(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                account_name: Optional[str] = None,
                                destination_account: Optional[str] = None,
                                resource_group_name: Optional[str] = None,
                                source_account: Optional[str] = None,
                                object_replication_policy_id: Optional[str] = None,
                                rules: Optional[Sequence[ObjectReplicationPolicyRuleArgs]] = None)
    func NewObjectReplicationPolicy(ctx *Context, name string, args ObjectReplicationPolicyArgs, opts ...ResourceOption) (*ObjectReplicationPolicy, error)
    public ObjectReplicationPolicy(string name, ObjectReplicationPolicyArgs args, CustomResourceOptions? opts = null)
    public ObjectReplicationPolicy(String name, ObjectReplicationPolicyArgs args)
    public ObjectReplicationPolicy(String name, ObjectReplicationPolicyArgs args, CustomResourceOptions options)
    
    type: azure-native:storage:ObjectReplicationPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ObjectReplicationPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ObjectReplicationPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ObjectReplicationPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ObjectReplicationPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ObjectReplicationPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var objectReplicationPolicyResource = new AzureNative.Storage.ObjectReplicationPolicy("objectReplicationPolicyResource", new()
    {
        AccountName = "string",
        DestinationAccount = "string",
        ResourceGroupName = "string",
        SourceAccount = "string",
        ObjectReplicationPolicyId = "string",
        Rules = new[]
        {
            new AzureNative.Storage.Inputs.ObjectReplicationPolicyRuleArgs
            {
                DestinationContainer = "string",
                SourceContainer = "string",
                Filters = new AzureNative.Storage.Inputs.ObjectReplicationPolicyFilterArgs
                {
                    MinCreationTime = "string",
                    PrefixMatch = new[]
                    {
                        "string",
                    },
                },
                RuleId = "string",
            },
        },
    });
    
    example, err := storage.NewObjectReplicationPolicy(ctx, "objectReplicationPolicyResource", &storage.ObjectReplicationPolicyArgs{
    	AccountName:               pulumi.String("string"),
    	DestinationAccount:        pulumi.String("string"),
    	ResourceGroupName:         pulumi.String("string"),
    	SourceAccount:             pulumi.String("string"),
    	ObjectReplicationPolicyId: pulumi.String("string"),
    	Rules: storage.ObjectReplicationPolicyRuleArray{
    		&storage.ObjectReplicationPolicyRuleArgs{
    			DestinationContainer: pulumi.String("string"),
    			SourceContainer:      pulumi.String("string"),
    			Filters: &storage.ObjectReplicationPolicyFilterArgs{
    				MinCreationTime: pulumi.String("string"),
    				PrefixMatch: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			RuleId: pulumi.String("string"),
    		},
    	},
    })
    
    var objectReplicationPolicyResource = new ObjectReplicationPolicy("objectReplicationPolicyResource", ObjectReplicationPolicyArgs.builder()
        .accountName("string")
        .destinationAccount("string")
        .resourceGroupName("string")
        .sourceAccount("string")
        .objectReplicationPolicyId("string")
        .rules(ObjectReplicationPolicyRuleArgs.builder()
            .destinationContainer("string")
            .sourceContainer("string")
            .filters(ObjectReplicationPolicyFilterArgs.builder()
                .minCreationTime("string")
                .prefixMatch("string")
                .build())
            .ruleId("string")
            .build())
        .build());
    
    object_replication_policy_resource = azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicyResource",
        account_name="string",
        destination_account="string",
        resource_group_name="string",
        source_account="string",
        object_replication_policy_id="string",
        rules=[{
            "destination_container": "string",
            "source_container": "string",
            "filters": {
                "min_creation_time": "string",
                "prefix_match": ["string"],
            },
            "rule_id": "string",
        }])
    
    const objectReplicationPolicyResource = new azure_native.storage.ObjectReplicationPolicy("objectReplicationPolicyResource", {
        accountName: "string",
        destinationAccount: "string",
        resourceGroupName: "string",
        sourceAccount: "string",
        objectReplicationPolicyId: "string",
        rules: [{
            destinationContainer: "string",
            sourceContainer: "string",
            filters: {
                minCreationTime: "string",
                prefixMatch: ["string"],
            },
            ruleId: "string",
        }],
    });
    
    type: azure-native:storage:ObjectReplicationPolicy
    properties:
        accountName: string
        destinationAccount: string
        objectReplicationPolicyId: string
        resourceGroupName: string
        rules:
            - destinationContainer: string
              filters:
                minCreationTime: string
                prefixMatch:
                    - string
              ruleId: string
              sourceContainer: string
        sourceAccount: string
    

    ObjectReplicationPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ObjectReplicationPolicy resource accepts the following input properties:

    AccountName string
    The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
    DestinationAccount string
    Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.
    ResourceGroupName string
    The name of the resource group within the user's subscription. The name is case insensitive.
    SourceAccount string
    Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.
    ObjectReplicationPolicyId string
    For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
    Rules List<Pulumi.AzureNative.Storage.Inputs.ObjectReplicationPolicyRule>
    The storage account object replication rules.
    AccountName string
    The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
    DestinationAccount string
    Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.
    ResourceGroupName string
    The name of the resource group within the user's subscription. The name is case insensitive.
    SourceAccount string
    Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.
    ObjectReplicationPolicyId string
    For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
    Rules []ObjectReplicationPolicyRuleArgs
    The storage account object replication rules.
    accountName String
    The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
    destinationAccount String
    Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.
    resourceGroupName String
    The name of the resource group within the user's subscription. The name is case insensitive.
    sourceAccount String
    Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.
    objectReplicationPolicyId String
    For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
    rules List<ObjectReplicationPolicyRule>
    The storage account object replication rules.
    accountName string
    The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
    destinationAccount string
    Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.
    resourceGroupName string
    The name of the resource group within the user's subscription. The name is case insensitive.
    sourceAccount string
    Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.
    objectReplicationPolicyId string
    For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
    rules ObjectReplicationPolicyRule[]
    The storage account object replication rules.
    account_name str
    The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
    destination_account str
    Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.
    resource_group_name str
    The name of the resource group within the user's subscription. The name is case insensitive.
    source_account str
    Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.
    object_replication_policy_id str
    For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
    rules Sequence[ObjectReplicationPolicyRuleArgs]
    The storage account object replication rules.
    accountName String
    The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
    destinationAccount String
    Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.
    resourceGroupName String
    The name of the resource group within the user's subscription. The name is case insensitive.
    sourceAccount String
    Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.
    objectReplicationPolicyId String
    For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
    rules List<Property Map>
    The storage account object replication rules.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ObjectReplicationPolicy resource produces the following output properties:

    EnabledTime string
    Indicates when the policy is enabled on the source account.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    PolicyId string
    A unique id for object replication policy.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    EnabledTime string
    Indicates when the policy is enabled on the source account.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    PolicyId string
    A unique id for object replication policy.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    enabledTime String
    Indicates when the policy is enabled on the source account.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    policyId String
    A unique id for object replication policy.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    enabledTime string
    Indicates when the policy is enabled on the source account.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    policyId string
    A unique id for object replication policy.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    enabled_time str
    Indicates when the policy is enabled on the source account.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    policy_id str
    A unique id for object replication policy.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    enabledTime String
    Indicates when the policy is enabled on the source account.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    policyId String
    A unique id for object replication policy.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    ObjectReplicationPolicyFilter, ObjectReplicationPolicyFilterArgs

    MinCreationTime string
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    PrefixMatch List<string>
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    MinCreationTime string
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    PrefixMatch []string
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    minCreationTime String
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefixMatch List<String>
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    minCreationTime string
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefixMatch string[]
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    min_creation_time str
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefix_match Sequence[str]
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    minCreationTime String
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefixMatch List<String>
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.

    ObjectReplicationPolicyFilterResponse, ObjectReplicationPolicyFilterResponseArgs

    MinCreationTime string
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    PrefixMatch List<string>
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    MinCreationTime string
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    PrefixMatch []string
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    minCreationTime String
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefixMatch List<String>
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    minCreationTime string
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefixMatch string[]
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    min_creation_time str
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefix_match Sequence[str]
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
    minCreationTime String
    Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
    prefixMatch List<String>
    Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.

    ObjectReplicationPolicyRule, ObjectReplicationPolicyRuleArgs

    DestinationContainer string
    Required. Destination container name.
    SourceContainer string
    Required. Source container name.
    Filters Pulumi.AzureNative.Storage.Inputs.ObjectReplicationPolicyFilter
    Optional. An object that defines the filter set.
    RuleId string
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    DestinationContainer string
    Required. Destination container name.
    SourceContainer string
    Required. Source container name.
    Filters ObjectReplicationPolicyFilter
    Optional. An object that defines the filter set.
    RuleId string
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destinationContainer String
    Required. Destination container name.
    sourceContainer String
    Required. Source container name.
    filters ObjectReplicationPolicyFilter
    Optional. An object that defines the filter set.
    ruleId String
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destinationContainer string
    Required. Destination container name.
    sourceContainer string
    Required. Source container name.
    filters ObjectReplicationPolicyFilter
    Optional. An object that defines the filter set.
    ruleId string
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destination_container str
    Required. Destination container name.
    source_container str
    Required. Source container name.
    filters ObjectReplicationPolicyFilter
    Optional. An object that defines the filter set.
    rule_id str
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destinationContainer String
    Required. Destination container name.
    sourceContainer String
    Required. Source container name.
    filters Property Map
    Optional. An object that defines the filter set.
    ruleId String
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.

    ObjectReplicationPolicyRuleResponse, ObjectReplicationPolicyRuleResponseArgs

    DestinationContainer string
    Required. Destination container name.
    SourceContainer string
    Required. Source container name.
    Filters Pulumi.AzureNative.Storage.Inputs.ObjectReplicationPolicyFilterResponse
    Optional. An object that defines the filter set.
    RuleId string
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    DestinationContainer string
    Required. Destination container name.
    SourceContainer string
    Required. Source container name.
    Filters ObjectReplicationPolicyFilterResponse
    Optional. An object that defines the filter set.
    RuleId string
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destinationContainer String
    Required. Destination container name.
    sourceContainer String
    Required. Source container name.
    filters ObjectReplicationPolicyFilterResponse
    Optional. An object that defines the filter set.
    ruleId String
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destinationContainer string
    Required. Destination container name.
    sourceContainer string
    Required. Source container name.
    filters ObjectReplicationPolicyFilterResponse
    Optional. An object that defines the filter set.
    ruleId string
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destination_container str
    Required. Destination container name.
    source_container str
    Required. Source container name.
    filters ObjectReplicationPolicyFilterResponse
    Optional. An object that defines the filter set.
    rule_id str
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
    destinationContainer String
    Required. Destination container name.
    sourceContainer String
    Required. Source container name.
    filters Property Map
    Optional. An object that defines the filter set.
    ruleId String
    Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:storage:ObjectReplicationPolicy 2a20bb73-5717-4635-985a-5d4cf777438f /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi