1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. getSharedImage

We recommend using Azure Native.

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

azure.compute.getSharedImage

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 Shared Image within a Shared Image Gallery.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.compute.getSharedImage({
        name: "my-image",
        galleryName: "my-image-gallery",
        resourceGroupName: "example-resources",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.get_shared_image(name="my-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.LookupSharedImage(ctx, &compute.LookupSharedImageArgs{
    			Name:              "my-image",
    			GalleryName:       "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.GetSharedImage.Invoke(new()
        {
            Name = "my-image",
            GalleryName = "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.GetSharedImageArgs;
    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.getSharedImage(GetSharedImageArgs.builder()
                .name("my-image")
                .galleryName("my-image-gallery")
                .resourceGroupName("example-resources")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:compute:getSharedImage
          Arguments:
            name: my-image
            galleryName: my-image-gallery
            resourceGroupName: example-resources
    

    Using getSharedImage

    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 getSharedImage(args: GetSharedImageArgs, opts?: InvokeOptions): Promise<GetSharedImageResult>
    function getSharedImageOutput(args: GetSharedImageOutputArgs, opts?: InvokeOptions): Output<GetSharedImageResult>
    def get_shared_image(gallery_name: Optional[str] = None,
                         name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSharedImageResult
    def get_shared_image_output(gallery_name: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSharedImageResult]
    func LookupSharedImage(ctx *Context, args *LookupSharedImageArgs, opts ...InvokeOption) (*LookupSharedImageResult, error)
    func LookupSharedImageOutput(ctx *Context, args *LookupSharedImageOutputArgs, opts ...InvokeOption) LookupSharedImageResultOutput

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

    public static class GetSharedImage 
    {
        public static Task<GetSharedImageResult> InvokeAsync(GetSharedImageArgs args, InvokeOptions? opts = null)
        public static Output<GetSharedImageResult> Invoke(GetSharedImageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSharedImageResult> getSharedImage(GetSharedImageArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:compute/getSharedImage:getSharedImage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GalleryName string
    The name of the Shared Image Gallery in which the Shared Image exists.
    Name string
    The name of the Shared Image.
    ResourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    GalleryName string
    The name of the Shared Image Gallery in which the Shared Image exists.
    Name string
    The name of the Shared Image.
    ResourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    galleryName String
    The name of the Shared Image Gallery in which the Shared Image exists.
    name String
    The name of the Shared Image.
    resourceGroupName String
    The name of the Resource Group in which the Shared Image Gallery exists.
    galleryName string
    The name of the Shared Image Gallery in which the Shared Image exists.
    name string
    The name of the Shared Image.
    resourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    gallery_name str
    The name of the Shared Image Gallery in which the Shared Image exists.
    name str
    The name of the Shared Image.
    resource_group_name str
    The name of the Resource Group in which the Shared Image Gallery exists.
    galleryName String
    The name of the Shared Image Gallery in which the Shared Image exists.
    name String
    The name of the Shared Image.
    resourceGroupName String
    The name of the Resource Group in which the Shared Image Gallery exists.

    getSharedImage Result

    The following output properties are available:

    AcceleratedNetworkSupportEnabled bool
    Specifies if the Shared Image supports Accelerated Network.
    Architecture string
    ConfidentialVmEnabled bool
    Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines.
    ConfidentialVmSupported bool
    Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image.
    Description string
    The description of this Shared Image.
    Eula string
    The End User Licence Agreement for the Shared Image.
    GalleryName string
    HibernationEnabled bool
    Specifies if the Shared Image supports hibernation.
    HyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifiers List<GetSharedImageIdentifier>
    An identifier block as defined below.
    Location string
    The supported Azure location where the Shared Image Gallery exists.
    Name string
    (Required) The Purchase Plan Name for this Shared Image.
    OsType string
    The type of Operating System present in this Shared Image.
    PrivacyStatementUri string
    The URI containing the Privacy Statement for this Shared Image.
    PurchasePlans List<GetSharedImagePurchasePlan>
    (Optional) A purchase_plan block as defined below.
    ReleaseNoteUri string
    The URI containing the Release Notes for this Shared Image.
    ResourceGroupName string
    Specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run).
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Shared Image.
    TrustedLaunchEnabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image.
    TrustedLaunchSupported bool
    Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image.
    AcceleratedNetworkSupportEnabled bool
    Specifies if the Shared Image supports Accelerated Network.
    Architecture string
    ConfidentialVmEnabled bool
    Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines.
    ConfidentialVmSupported bool
    Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image.
    Description string
    The description of this Shared Image.
    Eula string
    The End User Licence Agreement for the Shared Image.
    GalleryName string
    HibernationEnabled bool
    Specifies if the Shared Image supports hibernation.
    HyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifiers []GetSharedImageIdentifier
    An identifier block as defined below.
    Location string
    The supported Azure location where the Shared Image Gallery exists.
    Name string
    (Required) The Purchase Plan Name for this Shared Image.
    OsType string
    The type of Operating System present in this Shared Image.
    PrivacyStatementUri string
    The URI containing the Privacy Statement for this Shared Image.
    PurchasePlans []GetSharedImagePurchasePlan
    (Optional) A purchase_plan block as defined below.
    ReleaseNoteUri string
    The URI containing the Release Notes for this Shared Image.
    ResourceGroupName string
    Specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run).
    Tags map[string]string
    A mapping of tags assigned to the Shared Image.
    TrustedLaunchEnabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image.
    TrustedLaunchSupported bool
    Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image.
    acceleratedNetworkSupportEnabled Boolean
    Specifies if the Shared Image supports Accelerated Network.
    architecture String
    confidentialVmEnabled Boolean
    Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines.
    confidentialVmSupported Boolean
    Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image.
    description String
    The description of this Shared Image.
    eula String
    The End User Licence Agreement for the Shared Image.
    galleryName String
    hibernationEnabled Boolean
    Specifies if the Shared Image supports hibernation.
    hyperVGeneration String
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on.
    id String
    The provider-assigned unique ID for this managed resource.
    identifiers List<GetSharedImageIdentifier>
    An identifier block as defined below.
    location String
    The supported Azure location where the Shared Image Gallery exists.
    name String
    (Required) The Purchase Plan Name for this Shared Image.
    osType String
    The type of Operating System present in this Shared Image.
    privacyStatementUri String
    The URI containing the Privacy Statement for this Shared Image.
    purchasePlans List<GetSharedImagePurchasePlan>
    (Optional) A purchase_plan block as defined below.
    releaseNoteUri String
    The URI containing the Release Notes for this Shared Image.
    resourceGroupName String
    specialized Boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run).
    tags Map<String,String>
    A mapping of tags assigned to the Shared Image.
    trustedLaunchEnabled Boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image.
    trustedLaunchSupported Boolean
    Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image.
    acceleratedNetworkSupportEnabled boolean
    Specifies if the Shared Image supports Accelerated Network.
    architecture string
    confidentialVmEnabled boolean
    Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines.
    confidentialVmSupported boolean
    Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image.
    description string
    The description of this Shared Image.
    eula string
    The End User Licence Agreement for the Shared Image.
    galleryName string
    hibernationEnabled boolean
    Specifies if the Shared Image supports hibernation.
    hyperVGeneration string
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on.
    id string
    The provider-assigned unique ID for this managed resource.
    identifiers GetSharedImageIdentifier[]
    An identifier block as defined below.
    location string
    The supported Azure location where the Shared Image Gallery exists.
    name string
    (Required) The Purchase Plan Name for this Shared Image.
    osType string
    The type of Operating System present in this Shared Image.
    privacyStatementUri string
    The URI containing the Privacy Statement for this Shared Image.
    purchasePlans GetSharedImagePurchasePlan[]
    (Optional) A purchase_plan block as defined below.
    releaseNoteUri string
    The URI containing the Release Notes for this Shared Image.
    resourceGroupName string
    specialized boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run).
    tags {[key: string]: string}
    A mapping of tags assigned to the Shared Image.
    trustedLaunchEnabled boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image.
    trustedLaunchSupported boolean
    Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image.
    accelerated_network_support_enabled bool
    Specifies if the Shared Image supports Accelerated Network.
    architecture str
    confidential_vm_enabled bool
    Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines.
    confidential_vm_supported bool
    Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image.
    description str
    The description of this Shared Image.
    eula str
    The End User Licence Agreement for the Shared Image.
    gallery_name str
    hibernation_enabled bool
    Specifies if the Shared Image supports hibernation.
    hyper_v_generation str
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on.
    id str
    The provider-assigned unique ID for this managed resource.
    identifiers Sequence[GetSharedImageIdentifier]
    An identifier block as defined below.
    location str
    The supported Azure location where the Shared Image Gallery exists.
    name str
    (Required) The Purchase Plan Name for this Shared Image.
    os_type str
    The type of Operating System present in this Shared Image.
    privacy_statement_uri str
    The URI containing the Privacy Statement for this Shared Image.
    purchase_plans Sequence[GetSharedImagePurchasePlan]
    (Optional) A purchase_plan block as defined below.
    release_note_uri str
    The URI containing the Release Notes for this Shared Image.
    resource_group_name str
    specialized bool
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run).
    tags Mapping[str, str]
    A mapping of tags assigned to the Shared Image.
    trusted_launch_enabled bool
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image.
    trusted_launch_supported bool
    Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image.
    acceleratedNetworkSupportEnabled Boolean
    Specifies if the Shared Image supports Accelerated Network.
    architecture String
    confidentialVmEnabled Boolean
    Specifies if Confidential Virtual Machines enabled. It will enable all the features of trusted, with higher confidentiality features for isolate machines or encrypted data. Available for Gen2 machines.
    confidentialVmSupported Boolean
    Specifies if supports creation of both Confidential virtual machines and Gen2 virtual machines with standard security from a compatible Gen2 OS disk VHD or Gen2 Managed image.
    description String
    The description of this Shared Image.
    eula String
    The End User Licence Agreement for the Shared Image.
    galleryName String
    hibernationEnabled Boolean
    Specifies if the Shared Image supports hibernation.
    hyperVGeneration String
    The generation of HyperV that the Virtual Machine used to create the Shared Image is based on.
    id String
    The provider-assigned unique ID for this managed resource.
    identifiers List<Property Map>
    An identifier block as defined below.
    location String
    The supported Azure location where the Shared Image Gallery exists.
    name String
    (Required) The Purchase Plan Name for this Shared Image.
    osType String
    The type of Operating System present in this Shared Image.
    privacyStatementUri String
    The URI containing the Privacy Statement for this Shared Image.
    purchasePlans List<Property Map>
    (Optional) A purchase_plan block as defined below.
    releaseNoteUri String
    The URI containing the Release Notes for this Shared Image.
    resourceGroupName String
    specialized Boolean
    Specifies that the Operating System used inside this Image has not been Generalized (for example, sysprep on Windows has not been run).
    tags Map<String>
    A mapping of tags assigned to the Shared Image.
    trustedLaunchEnabled Boolean
    Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image.
    trustedLaunchSupported Boolean
    Specifies if supports creation of both Trusted Launch virtual machines and Gen2 virtual machines with standard security created from the Shared Image.

    Supporting Types

    GetSharedImageIdentifier

    Offer string
    The Offer Name for this Shared Image.
    Publisher string
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    Sku string
    The Name of the SKU for this Gallery Image.
    Offer string
    The Offer Name for this Shared Image.
    Publisher string
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    Sku string
    The Name of the SKU for this Gallery Image.
    offer String
    The Offer Name for this Shared Image.
    publisher String
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    sku String
    The Name of the SKU for this Gallery Image.
    offer string
    The Offer Name for this Shared Image.
    publisher string
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    sku string
    The Name of the SKU for this Gallery Image.
    offer str
    The Offer Name for this Shared Image.
    publisher str
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    sku str
    The Name of the SKU for this Gallery Image.
    offer String
    The Offer Name for this Shared Image.
    publisher String
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    sku String
    The Name of the SKU for this Gallery Image.

    GetSharedImagePurchasePlan

    Name string
    The name of the Shared Image.
    Product string
    (Optional) The Purchase Plan Product for this Gallery Image.
    Publisher string
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    Name string
    The name of the Shared Image.
    Product string
    (Optional) The Purchase Plan Product for this Gallery Image.
    Publisher string
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    name String
    The name of the Shared Image.
    product String
    (Optional) The Purchase Plan Product for this Gallery Image.
    publisher String
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    name string
    The name of the Shared Image.
    product string
    (Optional) The Purchase Plan Product for this Gallery Image.
    publisher string
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    name str
    The name of the Shared Image.
    product str
    (Optional) The Purchase Plan Product for this Gallery Image.
    publisher str
    (Optional) The Purchase Plan Publisher for this Gallery Image.
    name String
    The name of the Shared Image.
    product String
    (Optional) The Purchase Plan Product for this Gallery Image.
    publisher String
    (Optional) The Purchase Plan Publisher for this Gallery Image.

    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