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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.storage.getSyncGroup

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:storage:getSyncGroup
      arguments:
        name: existing-ss-group
        storageSyncId: existing-ss-id
outputs:
  id: ${example.id}
Copy

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>
Copy
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]
Copy
func LookupSyncGroup(ctx *Context, args *LookupSyncGroupArgs, opts ...InvokeOption) (*LookupSyncGroupResult, error)
func LookupSyncGroupOutput(ctx *Context, args *LookupSyncGroupOutputArgs, opts ...InvokeOption) LookupSyncGroupResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSyncGroupResult> getSyncGroup(GetSyncGroupArgs args, InvokeOptions options)
public static Output<GetSyncGroupResult> getSyncGroup(GetSyncGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:storage/getSyncGroup:getSyncGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of this Storage Sync Group.
StorageSyncId This property is required. string
The resource ID of the Storage Sync where this Storage Sync Group is.
Name This property is required. string
The name of this Storage Sync Group.
StorageSyncId This property is required. string
The resource ID of the Storage Sync where this Storage Sync Group is.
name This property is required. String
The name of this Storage Sync Group.
storageSyncId This property is required. String
The resource ID of the Storage Sync where this Storage Sync Group is.
name This property is required. string
The name of this Storage Sync Group.
storageSyncId This property is required. string
The resource ID of the Storage Sync where this Storage Sync Group is.
name This property is required. str
The name of this Storage Sync Group.
storage_sync_id This property is required. str
The resource ID of the Storage Sync where this Storage Sync Group is.
name This property is required. String
The name of this Storage Sync Group.
storageSyncId This property is required. 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.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi