1. Packages
  2. Azure Classic
  3. API Docs
  4. storage
  5. Sync

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.storage.Sync

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a Storage Sync.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleSync = new azure.storage.Sync("example", {
        name: "example-storage-sync",
        resourceGroupName: example.name,
        location: example.location,
        tags: {
            foo: "bar",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_sync = azure.storage.Sync("example",
        name="example-storage-sync",
        resource_group_name=example.name,
        location=example.location,
        tags={
            "foo": "bar",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = storage.NewSync(ctx, "example", &storage.SyncArgs{
    			Name:              pulumi.String("example-storage-sync"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			Tags: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleSync = new Azure.Storage.Sync("example", new()
        {
            Name = "example-storage-sync",
            ResourceGroupName = example.Name,
            Location = example.Location,
            Tags = 
            {
                { "foo", "bar" },
            },
        });
    
    });
    
    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.Sync;
    import com.pulumi.azure.storage.SyncArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleSync = new Sync("exampleSync", SyncArgs.builder()
                .name("example-storage-sync")
                .resourceGroupName(example.name())
                .location(example.location())
                .tags(Map.of("foo", "bar"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleSync:
        type: azure:storage:Sync
        name: example
        properties:
          name: example-storage-sync
          resourceGroupName: ${example.name}
          location: ${example.location}
          tags:
            foo: bar
    

    Create Sync Resource

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

    Constructor syntax

    new Sync(name: string, args: SyncArgs, opts?: CustomResourceOptions);
    @overload
    def Sync(resource_name: str,
             args: SyncArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Sync(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             resource_group_name: Optional[str] = None,
             incoming_traffic_policy: Optional[str] = None,
             location: Optional[str] = None,
             name: Optional[str] = None,
             tags: Optional[Mapping[str, str]] = None)
    func NewSync(ctx *Context, name string, args SyncArgs, opts ...ResourceOption) (*Sync, error)
    public Sync(string name, SyncArgs args, CustomResourceOptions? opts = null)
    public Sync(String name, SyncArgs args)
    public Sync(String name, SyncArgs args, CustomResourceOptions options)
    
    type: azure:storage:Sync
    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 SyncArgs
    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 SyncArgs
    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 SyncArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SyncArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SyncArgs
    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 syncResource = new Azure.Storage.Sync("syncResource", new()
    {
        ResourceGroupName = "string",
        IncomingTrafficPolicy = "string",
        Location = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := storage.NewSync(ctx, "syncResource", &storage.SyncArgs{
    	ResourceGroupName:     pulumi.String("string"),
    	IncomingTrafficPolicy: pulumi.String("string"),
    	Location:              pulumi.String("string"),
    	Name:                  pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var syncResource = new Sync("syncResource", SyncArgs.builder()
        .resourceGroupName("string")
        .incomingTrafficPolicy("string")
        .location("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    sync_resource = azure.storage.Sync("syncResource",
        resource_group_name="string",
        incoming_traffic_policy="string",
        location="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const syncResource = new azure.storage.Sync("syncResource", {
        resourceGroupName: "string",
        incomingTrafficPolicy: "string",
        location: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:storage:Sync
    properties:
        incomingTrafficPolicy: string
        location: string
        name: string
        resourceGroupName: string
        tags:
            string: string
    

    Sync 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 Sync resource accepts the following input properties:

    ResourceGroupName string
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    IncomingTrafficPolicy string
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    Location string
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    Name string
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Storage Sync.
    ResourceGroupName string
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    IncomingTrafficPolicy string
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    Location string
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    Name string
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Storage Sync.
    resourceGroupName String
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    incomingTrafficPolicy String
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location String
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name String
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Storage Sync.
    resourceGroupName string
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    incomingTrafficPolicy string
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location string
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name string
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Storage Sync.
    resource_group_name str
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    incoming_traffic_policy str
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location str
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name str
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Storage Sync.
    resourceGroupName String
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    incomingTrafficPolicy String
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location String
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name String
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Storage Sync.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RegisteredServers List<string>
    A list of registered servers owned by this Storage Sync.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegisteredServers []string
    A list of registered servers owned by this Storage Sync.
    id String
    The provider-assigned unique ID for this managed resource.
    registeredServers List<String>
    A list of registered servers owned by this Storage Sync.
    id string
    The provider-assigned unique ID for this managed resource.
    registeredServers string[]
    A list of registered servers owned by this Storage Sync.
    id str
    The provider-assigned unique ID for this managed resource.
    registered_servers Sequence[str]
    A list of registered servers owned by this Storage Sync.
    id String
    The provider-assigned unique ID for this managed resource.
    registeredServers List<String>
    A list of registered servers owned by this Storage Sync.

    Look up Existing Sync Resource

    Get an existing Sync resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SyncState, opts?: CustomResourceOptions): Sync
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            incoming_traffic_policy: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            registered_servers: Optional[Sequence[str]] = None,
            resource_group_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> Sync
    func GetSync(ctx *Context, name string, id IDInput, state *SyncState, opts ...ResourceOption) (*Sync, error)
    public static Sync Get(string name, Input<string> id, SyncState? state, CustomResourceOptions? opts = null)
    public static Sync get(String name, Output<String> id, SyncState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    IncomingTrafficPolicy string
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    Location string
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    Name string
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    RegisteredServers List<string>
    A list of registered servers owned by this Storage Sync.
    ResourceGroupName string
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Storage Sync.
    IncomingTrafficPolicy string
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    Location string
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    Name string
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    RegisteredServers []string
    A list of registered servers owned by this Storage Sync.
    ResourceGroupName string
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Storage Sync.
    incomingTrafficPolicy String
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location String
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name String
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    registeredServers List<String>
    A list of registered servers owned by this Storage Sync.
    resourceGroupName String
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Storage Sync.
    incomingTrafficPolicy string
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location string
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name string
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    registeredServers string[]
    A list of registered servers owned by this Storage Sync.
    resourceGroupName string
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Storage Sync.
    incoming_traffic_policy str
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location str
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name str
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    registered_servers Sequence[str]
    A list of registered servers owned by this Storage Sync.
    resource_group_name str
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Storage Sync.
    incomingTrafficPolicy String
    Incoming traffic policy. Possible values are AllowAllTraffic and AllowVirtualNetworksOnly. Defaults to AllowAllTraffic.
    location String
    The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    name String
    The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
    registeredServers List<String>
    A list of registered servers owned by this Storage Sync.
    resourceGroupName String
    The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Storage Sync.

    Import

    Storage Syncs can be imported using the resource id, e.g.

    $ pulumi import azure:storage/sync:Sync example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi