ObjectReplication

class ObjectReplication : KotlinCustomResource

Manages a Storage Object Replication.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.inputs.AccountBlobPropertiesArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.storage.ObjectReplication;
import com.pulumi.azure.storage.ObjectReplicationArgs;
import com.pulumi.azure.storage.inputs.ObjectReplicationRuleArgs;
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 srcResourceGroup = new ResourceGroup("srcResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var srcAccount = new Account("srcAccount", AccountArgs.builder()
.resourceGroupName(srcResourceGroup.name())
.location(srcResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.blobProperties(AccountBlobPropertiesArgs.builder()
.versioningEnabled(true)
.changeFeedEnabled(true)
.build())
.build());
var srcContainer = new Container("srcContainer", ContainerArgs.builder()
.storageAccountName(srcAccount.name())
.containerAccessType("private")
.build());
var dstResourceGroup = new ResourceGroup("dstResourceGroup", ResourceGroupArgs.builder()
.location("East US")
.build());
var dstAccount = new Account("dstAccount", AccountArgs.builder()
.resourceGroupName(dstResourceGroup.name())
.location(dstResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.blobProperties(AccountBlobPropertiesArgs.builder()
.versioningEnabled(true)
.changeFeedEnabled(true)
.build())
.build());
var dstContainer = new Container("dstContainer", ContainerArgs.builder()
.storageAccountName(dstAccount.name())
.containerAccessType("private")
.build());
var example = new ObjectReplication("example", ObjectReplicationArgs.builder()
.sourceStorageAccountId(srcAccount.id())
.destinationStorageAccountId(dstAccount.id())
.rules(ObjectReplicationRuleArgs.builder()
.sourceContainerName(srcContainer.name())
.destinationContainerName(dstContainer.name())
.build())
.build());
}
}

Import

Storage Object Replication Policies can be imported using the resource id, e.g.

$ pulumi import azure:storage/objectReplication:ObjectReplication example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/storageAccount1/objectReplicationPolicies/objectReplicationPolicy1;/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group2/providers/Microsoft.Storage/storageAccounts/storageAccount2/objectReplicationPolicies/objectReplicationPolicy2

Properties

Link copied to clipboard

The ID of the Object Replication in the destination storage account.

Link copied to clipboard

The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

One or more rules blocks as defined below.

Link copied to clipboard

The ID of the Object Replication in the source storage account.

Link copied to clipboard

The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.

Link copied to clipboard
val urn: Output<String>