azure-native.storage.ObjectReplicationPolicy
Explore with Pulumi AI
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:
- Account
Name 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.
- Destination
Account string - Required. Destination account name.
- Resource
Group stringName - The name of the resource group within the user's subscription. The name is case insensitive.
- Source
Account string - Required. Source account name.
- Object
Replication stringPolicy Id - The ID of object replication policy or 'default' if the policy ID is unknown.
- Rules
List<Pulumi.
Azure Native. Storage. Inputs. Object Replication Policy Rule> - The storage account object replication rules.
- Account
Name 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.
- Destination
Account string - Required. Destination account name.
- Resource
Group stringName - The name of the resource group within the user's subscription. The name is case insensitive.
- Source
Account string - Required. Source account name.
- Object
Replication stringPolicy Id - The ID of object replication policy or 'default' if the policy ID is unknown.
- Rules
[]Object
Replication Policy Rule Args - The storage account object replication rules.
- account
Name 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.
- destination
Account String - Required. Destination account name.
- resource
Group StringName - The name of the resource group within the user's subscription. The name is case insensitive.
- source
Account String - Required. Source account name.
- object
Replication StringPolicy Id - The ID of object replication policy or 'default' if the policy ID is unknown.
- rules
List<Object
Replication Policy Rule> - The storage account object replication rules.
- account
Name 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.
- destination
Account string - Required. Destination account name.
- resource
Group stringName - The name of the resource group within the user's subscription. The name is case insensitive.
- source
Account string - Required. Source account name.
- object
Replication stringPolicy Id - The ID of object replication policy or 'default' if the policy ID is unknown.
- rules
Object
Replication Policy Rule[] - 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_ strname - 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_ strpolicy_ id - The ID of object replication policy or 'default' if the policy ID is unknown.
- rules
Sequence[Object
Replication Policy Rule Args] - The storage account object replication rules.
- account
Name 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.
- destination
Account String - Required. Destination account name.
- resource
Group StringName - The name of the resource group within the user's subscription. The name is case insensitive.
- source
Account String - Required. Source account name.
- object
Replication StringPolicy Id - 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:
- Enabled
Time 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
- Policy
Id 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 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
- Policy
Id 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 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
- policy
Id 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 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
- policy
Id 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"
- enabled
Time 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
- policy
Id 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
- Min
Creation stringTime - 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 List<string> - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- Min
Creation stringTime - 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 []string - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- min
Creation StringTime - 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 List<String> - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- min
Creation stringTime - 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 string[] - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- min_
creation_ strtime - 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.
- min
Creation StringTime - 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 List<String> - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
ObjectReplicationPolicyFilterResponse, ObjectReplicationPolicyFilterResponseArgs
- Min
Creation stringTime - 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 List<string> - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- Min
Creation stringTime - 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 []string - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- min
Creation StringTime - 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 List<String> - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- min
Creation stringTime - 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 string[] - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
- min_
creation_ strtime - 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.
- min
Creation StringTime - 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 List<String> - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
ObjectReplicationPolicyRule, ObjectReplicationPolicyRuleArgs
- Destination
Container string - Required. Destination container name.
- Source
Container string - Required. Source container name.
- Filters
Pulumi.
Azure Native. Storage. Inputs. Object Replication Policy Filter - Optional. An object that defines the filter set.
- Rule
Id string - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
- Destination
Container string - Required. Destination container name.
- Source
Container string - Required. Source container name.
- Filters
Object
Replication Policy Filter - Optional. An object that defines the filter set.
- Rule
Id string - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
- destination
Container String - Required. Destination container name.
- source
Container String - Required. Source container name.
- filters
Object
Replication Policy Filter - Optional. An object that defines the filter set.
- rule
Id String - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
- destination
Container string - Required. Destination container name.
- source
Container string - Required. Source container name.
- filters
Object
Replication Policy Filter - Optional. An object that defines the filter set.
- rule
Id 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
Object
Replication Policy Filter - 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.
- destination
Container String - Required. Destination container name.
- source
Container String - Required. Source container name.
- filters Property Map
- Optional. An object that defines the filter set.
- rule
Id String - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
ObjectReplicationPolicyRuleResponse, ObjectReplicationPolicyRuleResponseArgs
- Destination
Container string - Required. Destination container name.
- Source
Container string - Required. Source container name.
- Filters
Pulumi.
Azure Native. Storage. Inputs. Object Replication Policy Filter Response - Optional. An object that defines the filter set.
- Rule
Id string - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
- Destination
Container string - Required. Destination container name.
- Source
Container string - Required. Source container name.
- Filters
Object
Replication Policy Filter Response - Optional. An object that defines the filter set.
- Rule
Id string - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
- destination
Container String - Required. Destination container name.
- source
Container String - Required. Source container name.
- filters
Object
Replication Policy Filter Response - Optional. An object that defines the filter set.
- rule
Id String - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
- destination
Container string - Required. Destination container name.
- source
Container string - Required. Source container name.
- filters
Object
Replication Policy Filter Response - Optional. An object that defines the filter set.
- rule
Id 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
Object
Replication Policy Filter Response - 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.
- destination
Container String - Required. Destination container name.
- source
Container String - Required. Source container name.
- filters Property Map
- Optional. An object that defines the filter set.
- rule
Id 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