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

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.storage.getSyncGroup

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Use this data source to access information about an existing Storage Sync Group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.storage.getSyncGroup({
        name: "existing-ss-group",
        storageSyncId: "existing-ss-id",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.storage.get_sync_group(name="existing-ss-group",
        storage_sync_id="existing-ss-id")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := storage.LookupSyncGroup(ctx, &storage.LookupSyncGroupArgs{
    			Name:          "existing-ss-group",
    			StorageSyncId: "existing-ss-id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Storage.GetSyncGroup.Invoke(new()
        {
            Name = "existing-ss-group",
            StorageSyncId = "existing-ss-id",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getSyncGroupResult => getSyncGroupResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.storage.StorageFunctions;
    import com.pulumi.azure.storage.inputs.GetSyncGroupArgs;
    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) {
            final var example = StorageFunctions.getSyncGroup(GetSyncGroupArgs.builder()
                .name("existing-ss-group")
                .storageSyncId("existing-ss-id")
                .build());
    
            ctx.export("id", example.applyValue(getSyncGroupResult -> getSyncGroupResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:storage:getSyncGroup
          Arguments:
            name: existing-ss-group
            storageSyncId: existing-ss-id
    outputs:
      id: ${example.id}
    

    Using getSyncGroup

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSyncGroup(args: GetSyncGroupArgs, opts?: InvokeOptions): Promise<GetSyncGroupResult>
    function getSyncGroupOutput(args: GetSyncGroupOutputArgs, opts?: InvokeOptions): Output<GetSyncGroupResult>
    def get_sync_group(name: Optional[str] = None,
                       storage_sync_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSyncGroupResult
    def get_sync_group_output(name: Optional[pulumi.Input[str]] = None,
                       storage_sync_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetSyncGroupResult]
    func LookupSyncGroup(ctx *Context, args *LookupSyncGroupArgs, opts ...InvokeOption) (*LookupSyncGroupResult, error)
    func LookupSyncGroupOutput(ctx *Context, args *LookupSyncGroupOutputArgs, opts ...InvokeOption) LookupSyncGroupResultOutput

    > Note: This function is named LookupSyncGroup in the Go SDK.

    public static class GetSyncGroup 
    {
        public static Task<GetSyncGroupResult> InvokeAsync(GetSyncGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetSyncGroupResult> Invoke(GetSyncGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSyncGroupResult> getSyncGroup(GetSyncGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:storage/getSyncGroup:getSyncGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of this Storage Sync Group.
    StorageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is.
    Name string
    The name of this Storage Sync Group.
    StorageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is.
    name String
    The name of this Storage Sync Group.
    storageSyncId String
    The resource ID of the Storage Sync where this Storage Sync Group is.
    name string
    The name of this Storage Sync Group.
    storageSyncId string
    The resource ID of the Storage Sync where this Storage Sync Group is.
    name str
    The name of this Storage Sync Group.
    storage_sync_id str
    The resource ID of the Storage Sync where this Storage Sync Group is.
    name String
    The name of this Storage Sync Group.
    storageSyncId String
    The resource ID of the Storage Sync where this Storage Sync Group is.

    getSyncGroup Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    StorageSyncId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    StorageSyncId string
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    storageSyncId String
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    storageSyncId string
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    storage_sync_id str
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    storageSyncId String

    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 v6.2.0 published on Friday, Sep 27, 2024 by Pulumi