1. Packages
  2. Azure Classic
  3. API Docs
  4. devcenter
  5. getGallery

We recommend using Azure Native.

Azure v6.24.0 published on Wednesday, Jun 18, 2025 by Pulumi

azure.devcenter.getGallery

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.24.0 published on Wednesday, Jun 18, 2025 by Pulumi

    Use this data source to access information about an existing Dev Center Gallery.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.devcenter.getGallery({
        name: exampleAzurermDevCenterGallery.name,
        devCenterId: exampleAzurermDevCenterGallery.devCenterId,
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.devcenter.get_gallery(name=example_azurerm_dev_center_gallery["name"],
        dev_center_id=example_azurerm_dev_center_gallery["devCenterId"])
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devcenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := devcenter.LookupGallery(ctx, &devcenter.LookupGalleryArgs{
    			Name:        exampleAzurermDevCenterGallery.Name,
    			DevCenterId: exampleAzurermDevCenterGallery.DevCenterId,
    		}, 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.DevCenter.GetGallery.Invoke(new()
        {
            Name = exampleAzurermDevCenterGallery.Name,
            DevCenterId = exampleAzurermDevCenterGallery.DevCenterId,
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getGalleryResult => getGalleryResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.devcenter.DevcenterFunctions;
    import com.pulumi.azure.devcenter.inputs.GetGalleryArgs;
    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 = DevcenterFunctions.getGallery(GetGalleryArgs.builder()
                .name(exampleAzurermDevCenterGallery.name())
                .devCenterId(exampleAzurermDevCenterGallery.devCenterId())
                .build());
    
            ctx.export("id", example.id());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: azure:devcenter:getGallery
          arguments:
            name: ${exampleAzurermDevCenterGallery.name}
            devCenterId: ${exampleAzurermDevCenterGallery.devCenterId}
    outputs:
      id: ${example.id}
    

    API Providers

    This data source uses the following Azure API Providers:

    • Microsoft.DevCenter: 2025-02-01

    Using getGallery

    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 getGallery(args: GetGalleryArgs, opts?: InvokeOptions): Promise<GetGalleryResult>
    function getGalleryOutput(args: GetGalleryOutputArgs, opts?: InvokeOptions): Output<GetGalleryResult>
    def get_gallery(dev_center_id: Optional[str] = None,
                    name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetGalleryResult
    def get_gallery_output(dev_center_id: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetGalleryResult]
    func LookupGallery(ctx *Context, args *LookupGalleryArgs, opts ...InvokeOption) (*LookupGalleryResult, error)
    func LookupGalleryOutput(ctx *Context, args *LookupGalleryOutputArgs, opts ...InvokeOption) LookupGalleryResultOutput

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

    public static class GetGallery 
    {
        public static Task<GetGalleryResult> InvokeAsync(GetGalleryArgs args, InvokeOptions? opts = null)
        public static Output<GetGalleryResult> Invoke(GetGalleryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGalleryResult> getGallery(GetGalleryArgs args, InvokeOptions options)
    public static Output<GetGalleryResult> getGallery(GetGalleryArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:devcenter/getGallery:getGallery
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DevCenterId string
    The ID of the Dev Center which contains the Dev Center Gallery.
    Name string
    The name of this Dev Center Gallery.
    DevCenterId string
    The ID of the Dev Center which contains the Dev Center Gallery.
    Name string
    The name of this Dev Center Gallery.
    devCenterId String
    The ID of the Dev Center which contains the Dev Center Gallery.
    name String
    The name of this Dev Center Gallery.
    devCenterId string
    The ID of the Dev Center which contains the Dev Center Gallery.
    name string
    The name of this Dev Center Gallery.
    dev_center_id str
    The ID of the Dev Center which contains the Dev Center Gallery.
    name str
    The name of this Dev Center Gallery.
    devCenterId String
    The ID of the Dev Center which contains the Dev Center Gallery.
    name String
    The name of this Dev Center Gallery.

    getGallery Result

    The following output properties are available:

    DevCenterId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SharedGalleryId string
    The ID of the Shared Gallery connected to the Dev Center Gallery.
    DevCenterId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SharedGalleryId string
    The ID of the Shared Gallery connected to the Dev Center Gallery.
    devCenterId String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    sharedGalleryId String
    The ID of the Shared Gallery connected to the Dev Center Gallery.
    devCenterId string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    sharedGalleryId string
    The ID of the Shared Gallery connected to the Dev Center Gallery.
    dev_center_id str
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    shared_gallery_id str
    The ID of the Shared Gallery connected to the Dev Center Gallery.
    devCenterId String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    sharedGalleryId String
    The ID of the Shared Gallery connected to the Dev Center Gallery.

    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 v6.24.0 published on Wednesday, Jun 18, 2025 by Pulumi