We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.compute.getSharedImageGallery
Explore with Pulumi AI
Use this data source to access information about an existing Shared Image Gallery.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.compute.getSharedImageGallery({
name: "my-image-gallery",
resourceGroupName: "example-resources",
});
import pulumi
import pulumi_azure as azure
example = azure.compute.get_shared_image_gallery(name="my-image-gallery",
resource_group_name="example-resources")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.LookupSharedImageGallery(ctx, &compute.LookupSharedImageGalleryArgs{
Name: "my-image-gallery",
ResourceGroupName: "example-resources",
}, nil)
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 = Azure.Compute.GetSharedImageGallery.Invoke(new()
{
Name = "my-image-gallery",
ResourceGroupName = "example-resources",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.compute.ComputeFunctions;
import com.pulumi.azure.compute.inputs.GetSharedImageGalleryArgs;
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 = ComputeFunctions.getSharedImageGallery(GetSharedImageGalleryArgs.builder()
.name("my-image-gallery")
.resourceGroupName("example-resources")
.build());
}
}
variables:
example:
fn::invoke:
Function: azure:compute:getSharedImageGallery
Arguments:
name: my-image-gallery
resourceGroupName: example-resources
Using getSharedImageGallery
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 getSharedImageGallery(args: GetSharedImageGalleryArgs, opts?: InvokeOptions): Promise<GetSharedImageGalleryResult>
function getSharedImageGalleryOutput(args: GetSharedImageGalleryOutputArgs, opts?: InvokeOptions): Output<GetSharedImageGalleryResult>
def get_shared_image_gallery(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSharedImageGalleryResult
def get_shared_image_gallery_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSharedImageGalleryResult]
func LookupSharedImageGallery(ctx *Context, args *LookupSharedImageGalleryArgs, opts ...InvokeOption) (*LookupSharedImageGalleryResult, error)
func LookupSharedImageGalleryOutput(ctx *Context, args *LookupSharedImageGalleryOutputArgs, opts ...InvokeOption) LookupSharedImageGalleryResultOutput
> Note: This function is named LookupSharedImageGallery
in the Go SDK.
public static class GetSharedImageGallery
{
public static Task<GetSharedImageGalleryResult> InvokeAsync(GetSharedImageGalleryArgs args, InvokeOptions? opts = null)
public static Output<GetSharedImageGalleryResult> Invoke(GetSharedImageGalleryInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSharedImageGalleryResult> getSharedImageGallery(GetSharedImageGalleryArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:compute/getSharedImageGallery:getSharedImageGallery
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the Shared Image Gallery.
- Resource
Group stringName - The name of the Resource Group in which the Shared Image Gallery exists.
- Name string
- The name of the Shared Image Gallery.
- Resource
Group stringName - The name of the Resource Group in which the Shared Image Gallery exists.
- name String
- The name of the Shared Image Gallery.
- resource
Group StringName - The name of the Resource Group in which the Shared Image Gallery exists.
- name string
- The name of the Shared Image Gallery.
- resource
Group stringName - The name of the Resource Group in which the Shared Image Gallery exists.
- name str
- The name of the Shared Image Gallery.
- resource_
group_ strname - The name of the Resource Group in which the Shared Image Gallery exists.
- name String
- The name of the Shared Image Gallery.
- resource
Group StringName - The name of the Resource Group in which the Shared Image Gallery exists.
getSharedImageGallery Result
The following output properties are available:
- Description string
- A description for the Shared Image Gallery.
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Names List<string> - A list of Shared Image names within this Shared Image Gallery.
- Location string
- Name string
- Resource
Group stringName - Dictionary<string, string>
- A mapping of tags which are assigned to the Shared Image Gallery.
- Unique
Name string - The unique name assigned to the Shared Image Gallery.
- Description string
- A description for the Shared Image Gallery.
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Names []string - A list of Shared Image names within this Shared Image Gallery.
- Location string
- Name string
- Resource
Group stringName - map[string]string
- A mapping of tags which are assigned to the Shared Image Gallery.
- Unique
Name string - The unique name assigned to the Shared Image Gallery.
- description String
- A description for the Shared Image Gallery.
- id String
- The provider-assigned unique ID for this managed resource.
- image
Names List<String> - A list of Shared Image names within this Shared Image Gallery.
- location String
- name String
- resource
Group StringName - Map<String,String>
- A mapping of tags which are assigned to the Shared Image Gallery.
- unique
Name String - The unique name assigned to the Shared Image Gallery.
- description string
- A description for the Shared Image Gallery.
- id string
- The provider-assigned unique ID for this managed resource.
- image
Names string[] - A list of Shared Image names within this Shared Image Gallery.
- location string
- name string
- resource
Group stringName - {[key: string]: string}
- A mapping of tags which are assigned to the Shared Image Gallery.
- unique
Name string - The unique name assigned to the Shared Image Gallery.
- description str
- A description for the Shared Image Gallery.
- id str
- The provider-assigned unique ID for this managed resource.
- image_
names Sequence[str] - A list of Shared Image names within this Shared Image Gallery.
- location str
- name str
- resource_
group_ strname - Mapping[str, str]
- A mapping of tags which are assigned to the Shared Image Gallery.
- unique_
name str - The unique name assigned to the Shared Image Gallery.
- description String
- A description for the Shared Image Gallery.
- id String
- The provider-assigned unique ID for this managed resource.
- image
Names List<String> - A list of Shared Image names within this Shared Image Gallery.
- location String
- name String
- resource
Group StringName - Map<String>
- A mapping of tags which are assigned to the Shared Image Gallery.
- unique
Name String - The unique name assigned to the Shared Image Gallery.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.