1. Packages
  2. Azure Native v1
  3. API Docs
  4. storage
  5. ObjectReplicationPolicy
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.storage.ObjectReplicationPolicy

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    The replication policy between two storage accounts. Multiple rules can be defined in one policy. API Version: 2021-02-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"
    	"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.ObjectReplicationPolicyRuleArgs{
    				{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: {
    						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 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(Map.ofEntries(
                    Map.entry("destinationContainer", "dcont139"),
                    Map.entry("filters", Map.of("prefixMatch",                 
                        "blobA",
                        "blobB")),
                    Map.entry("sourceContainer", "scont139")
                ))
                .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=[{
            "destinationContainer": "dcont139",
            "filters": azure_native.storage.ObjectReplicationPolicyFilterArgs(
                prefix_match=[
                    "blobA",
                    "blobB",
                ],
            ),
            "sourceContainer": "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"
    	"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.ObjectReplicationPolicyRuleArgs{
    				{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: {
    						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 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(Map.ofEntries(
                    Map.entry("destinationContainer", "dcont139"),
                    Map.entry("filters", Map.ofEntries(
                        Map.entry("minCreationTime", "2020-02-19T16:05:00Z"),
                        Map.entry("prefixMatch",                     
                            "blobA",
                            "blobB")
                    )),
                    Map.entry("ruleId", "d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
                    Map.entry("sourceContainer", "scont139")
                ))
                .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=[{
            "destinationContainer": "dcont139",
            "filters": azure_native.storage.ObjectReplicationPolicyFilterArgs(
                min_creation_time="2020-02-19T16:05:00Z",
                prefix_match=[
                    "blobA",
                    "blobB",
                ],
            ),
            "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
            "sourceContainer": "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"
    	"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.ObjectReplicationPolicyRuleArgs{
    				{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: {
    						PrefixMatch: pulumi.StringArray{
    							pulumi.String("blobA"),
    							pulumi.String("blobB"),
    						},
    					},
    					RuleId:          pulumi.String("d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
    					SourceContainer: pulumi.String("scont139"),
    				},
    				{
    					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 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(            
                    Map.ofEntries(
                        Map.entry("destinationContainer", "dcont139"),
                        Map.entry("filters", Map.of("prefixMatch",                     
                            "blobA",
                            "blobB")),
                        Map.entry("ruleId", "d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
                        Map.entry("sourceContainer", "scont139")
                    ),
                    Map.ofEntries(
                        Map.entry("destinationContainer", "dcont179"),
                        Map.entry("sourceContainer", "scont179")
                    ))
                .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=[
            {
                "destinationContainer": "dcont139",
                "filters": azure_native.storage.ObjectReplicationPolicyFilterArgs(
                    prefix_match=[
                        "blobA",
                        "blobB",
                    ],
                ),
                "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                "sourceContainer": "scont139",
            },
            azure_native.storage.ObjectReplicationPolicyRuleArgs(
                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"
    	"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.ObjectReplicationPolicyRuleArgs{
    				{
    					DestinationContainer: pulumi.String("dcont139"),
    					Filters: {
    						PrefixMatch: pulumi.StringArray{
    							pulumi.String("blobA"),
    							pulumi.String("blobB"),
    						},
    					},
    					RuleId:          pulumi.String("d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
    					SourceContainer: pulumi.String("scont139"),
    				},
    				{
    					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 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(            
                    Map.ofEntries(
                        Map.entry("destinationContainer", "dcont139"),
                        Map.entry("filters", Map.of("prefixMatch",                     
                            "blobA",
                            "blobB")),
                        Map.entry("ruleId", "d5d18a48-8801-4554-aeaa-74faf65f5ef9"),
                        Map.entry("sourceContainer", "scont139")
                    ),
                    Map.ofEntries(
                        Map.entry("destinationContainer", "dcont179"),
                        Map.entry("ruleId", "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"),
                        Map.entry("sourceContainer", "scont179")
                    ))
                .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=[
            {
                "destinationContainer": "dcont139",
                "filters": azure_native.storage.ObjectReplicationPolicyFilterArgs(
                    prefix_match=[
                        "blobA",
                        "blobB",
                    ],
                ),
                "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9",
                "sourceContainer": "scont139",
            },
            azure_native.storage.ObjectReplicationPolicyRuleArgs(
                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[]
        {
            
            {
                { "destinationContainer", "string" },
                { "sourceContainer", "string" },
                { "filters", 
                {
                    { "minCreationTime", "string" },
                    { "prefixMatch", new[]
                    {
                        "string",
                    } },
                } },
                { "ruleId", "string" },
            },
        },
    });
    
    example, err := storage.NewObjectReplicationPolicy(ctx, "objectReplicationPolicyResource", &storage.ObjectReplicationPolicyArgs{
    	AccountName:               "string",
    	DestinationAccount:        "string",
    	ResourceGroupName:         "string",
    	SourceAccount:             "string",
    	ObjectReplicationPolicyId: "string",
    	Rules: []map[string]interface{}{
    		map[string]interface{}{
    			"destinationContainer": "string",
    			"sourceContainer":      "string",
    			"filters": map[string]interface{}{
    				"minCreationTime": "string",
    				"prefixMatch": []string{
    					"string",
    				},
    			},
    			"ruleId": "string",
    		},
    	},
    })
    
    var objectReplicationPolicyResource = new ObjectReplicationPolicy("objectReplicationPolicyResource", ObjectReplicationPolicyArgs.builder()
        .accountName("string")
        .destinationAccount("string")
        .resourceGroupName("string")
        .sourceAccount("string")
        .objectReplicationPolicyId("string")
        .rules(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .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=[{
            destinationContainer: string,
            sourceContainer: string,
            filters: {
                minCreationTime: string,
                prefixMatch: [string],
            },
            ruleId: 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

    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.
    ResourceGroupName string
    The name of the resource group within the user's subscription. The name is case insensitive.
    SourceAccount string
    Required. Source account name.
    ObjectReplicationPolicyId string
    The ID of object replication policy or 'default' if the policy ID is unknown.
    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.
    ResourceGroupName string
    The name of the resource group within the user's subscription. The name is case insensitive.
    SourceAccount string
    Required. Source account name.
    ObjectReplicationPolicyId string
    The ID of object replication policy or 'default' if the policy ID is unknown.
    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.
    resourceGroupName String
    The name of the resource group within the user's subscription. The name is case insensitive.
    sourceAccount String
    Required. Source account name.
    objectReplicationPolicyId String
    The ID of object replication policy or 'default' if the policy ID is unknown.
    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.
    resourceGroupName string
    The name of the resource group within the user's subscription. The name is case insensitive.
    sourceAccount string
    Required. Source account name.
    objectReplicationPolicyId string
    The ID of object replication policy or 'default' if the policy ID is unknown.
    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.
    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.
    object_replication_policy_id str
    The ID of object replication policy or 'default' if the policy ID is unknown.
    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.
    resourceGroupName String
    The name of the resource group within the user's subscription. The name is case insensitive.
    sourceAccount String
    Required. Source account name.
    objectReplicationPolicyId String
    The ID of object replication policy or 'default' if the policy ID is unknown.
    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/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f 
    

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

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi