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

We recommend using Azure Native.

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

azure.storage.SyncGroup

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 Group.

    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-ss",
        resourceGroupName: example.name,
        location: example.location,
    });
    const exampleSyncGroup = new azure.storage.SyncGroup("example", {
        name: "example-ss-group",
        storageSyncId: exampleSync.id,
    });
    
    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-ss",
        resource_group_name=example.name,
        location=example.location)
    example_sync_group = azure.storage.SyncGroup("example",
        name="example-ss-group",
        storage_sync_id=example_sync.id)
    
    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
    		}
    		exampleSync, err := storage.NewSync(ctx, "example", &storage.SyncArgs{
    			Name:              pulumi.String("example-ss"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = storage.NewSyncGroup(ctx, "example", &storage.SyncGroupArgs{
    			Name:          pulumi.String("example-ss-group"),
    			StorageSyncId: exampleSync.ID(),
    		})
    		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-ss",
            ResourceGroupName = example.Name,
            Location = example.Location,
        });
    
        var exampleSyncGroup = new Azure.Storage.SyncGroup("example", new()
        {
            Name = "example-ss-group",
            StorageSyncId = exampleSync.Id,
        });
    
    });
    
    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 com.pulumi.azure.storage.SyncGroup;
    import com.pulumi.azure.storage.SyncGroupArgs;
    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-ss")
                .resourceGroupName(example.name())
                .location(example.location())
                .build());
    
            var exampleSyncGroup = new SyncGroup("exampleSyncGroup", SyncGroupArgs.builder()
                .name("example-ss-group")
                .storageSyncId(exampleSync.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleSync:
        type: azure:storage:Sync
        name: example
        properties:
          name: example-ss
          resourceGroupName: ${example.name}
          location: ${example.location}
      exampleSyncGroup:
        type: azure:storage:SyncGroup
        name: example
        properties:
          name: example-ss-group
          storageSyncId: ${exampleSync.id}
    

    Create SyncGroup Resource

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

    Constructor syntax

    new SyncGroup(name: string, args: SyncGroupArgs, opts?: CustomResourceOptions);
    @overload
    def SyncGroup(resource_name: str,
                  args: SyncGroupArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def SyncGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  storage_sync_id: Optional[str] = None,
                  name: Optional[str] = None)
    func NewSyncGroup(ctx *Context, name string, args SyncGroupArgs, opts ...ResourceOption) (*SyncGroup, error)
    public SyncGroup(string name, SyncGroupArgs args, CustomResourceOptions? opts = null)
    public SyncGroup(String name, SyncGroupArgs args)
    public SyncGroup(String name, SyncGroupArgs args, CustomResourceOptions options)
    
    type: azure:storage:SyncGroup
    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 SyncGroupArgs
    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 SyncGroupArgs
    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 SyncGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SyncGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SyncGroupArgs
    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 syncGroupResource = new Azure.Storage.SyncGroup("syncGroupResource", new()
    {
        StorageSyncId = "string",
        Name = "string",
    });
    
    example, err := storage.NewSyncGroup(ctx, "syncGroupResource", &storage.SyncGroupArgs{
    	StorageSyncId: pulumi.String("string"),
    	Name:          pulumi.String("string"),
    })
    
    var syncGroupResource = new SyncGroup("syncGroupResource", SyncGroupArgs.builder()
        .storageSyncId("string")
        .name("string")
        .build());
    
    sync_group_resource = azure.storage.SyncGroup("syncGroupResource",
        storage_sync_id="string",
        name="string")
    
    const syncGroupResource = new azure.storage.SyncGroup("syncGroupResource", {
        storageSyncId: "string",
        name: "string",
    });
    
    type: azure:storage:SyncGroup
    properties:
        name: string
        storageSyncId: string
    

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

    StorageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    Name string
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    StorageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    Name string
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storageSyncId String
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name String
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name string
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storage_sync_id str
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name str
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storageSyncId String
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name String
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SyncGroup Resource

    Get an existing SyncGroup 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?: SyncGroupState, opts?: CustomResourceOptions): SyncGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            storage_sync_id: Optional[str] = None) -> SyncGroup
    func GetSyncGroup(ctx *Context, name string, id IDInput, state *SyncGroupState, opts ...ResourceOption) (*SyncGroup, error)
    public static SyncGroup Get(string name, Input<string> id, SyncGroupState? state, CustomResourceOptions? opts = null)
    public static SyncGroup get(String name, Output<String> id, SyncGroupState 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:
    Name string
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    StorageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    Name string
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    StorageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name String
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storageSyncId String
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name string
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name str
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storage_sync_id str
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
    name String
    The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
    storageSyncId String
    The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.

    Import

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

    $ pulumi import azure:storage/syncGroup:SyncGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.StorageSync/storageSyncServices/sync1/syncGroups/group1
    

    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