1. Packages
  2. Ibm Provider
  3. API Docs
  4. getPiImage
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getPiImage

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Import the details of an existing IBM Power Virtual Server Cloud image as a read-only data source. For more information, about IBM power virtual server cloud, see getting started with IBM Power Systems Virtual Servers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dsImage = ibm.getPiImage({
        piCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
        piImageName: "7200-03-03",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_image = ibm.get_pi_image(pi_cloud_instance_id="49fba6c9-23f8-40bc-9899-aca322ee7d5b",
        pi_image_name="7200-03-03")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupPiImage(ctx, &ibm.LookupPiImageArgs{
    			PiCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
    			PiImageName:       "7200-03-03",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var dsImage = Ibm.GetPiImage.Invoke(new()
        {
            PiCloudInstanceId = "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
            PiImageName = "7200-03-03",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetPiImageArgs;
    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 dsImage = IbmFunctions.getPiImage(GetPiImageArgs.builder()
                .piCloudInstanceId("49fba6c9-23f8-40bc-9899-aca322ee7d5b")
                .piImageName("7200-03-03")
                .build());
    
        }
    }
    
    variables:
      dsImage:
        fn::invoke:
          function: ibm:getPiImage
          arguments:
            piCloudInstanceId: 49fba6c9-23f8-40bc-9899-aca322ee7d5b
            piImageName: 7200-03-03
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Using getPiImage

    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 getPiImage(args: GetPiImageArgs, opts?: InvokeOptions): Promise<GetPiImageResult>
    function getPiImageOutput(args: GetPiImageOutputArgs, opts?: InvokeOptions): Output<GetPiImageResult>
    def get_pi_image(id: Optional[str] = None,
                     pi_cloud_instance_id: Optional[str] = None,
                     pi_image_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetPiImageResult
    def get_pi_image_output(id: Optional[pulumi.Input[str]] = None,
                     pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                     pi_image_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetPiImageResult]
    func LookupPiImage(ctx *Context, args *LookupPiImageArgs, opts ...InvokeOption) (*LookupPiImageResult, error)
    func LookupPiImageOutput(ctx *Context, args *LookupPiImageOutputArgs, opts ...InvokeOption) LookupPiImageResultOutput

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

    public static class GetPiImage 
    {
        public static Task<GetPiImageResult> InvokeAsync(GetPiImageArgs args, InvokeOptions? opts = null)
        public static Output<GetPiImageResult> Invoke(GetPiImageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiImageResult> getPiImage(GetPiImageArgs args, InvokeOptions options)
    public static Output<GetPiImageResult> getPiImage(GetPiImageArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiImage:getPiImage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiImageName string
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    Id string
    (String) The unique identifier of the image.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiImageName string
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    Id string
    (String) The unique identifier of the image.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piImageName String
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    id String
    (String) The unique identifier of the image.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piImageName string
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    id string
    (String) The unique identifier of the image.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_image_name str
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    id str
    (String) The unique identifier of the image.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piImageName String
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    id String
    (String) The unique identifier of the image.

    getPiImage Result

    The following output properties are available:

    Architecture string
    (String) The CPU architecture that the image is designed for.
    Crn string
    (String) The CRN of this resource.
    Hypervisor string
    (String) Hypervisor type.
    Id string
    (String) The unique identifier of the image.
    ImageType string
    (String) The identifier of this image type.
    OperatingSystem string
    (String) The operating system that is installed with the image.
    PiCloudInstanceId string
    PiImageName string
    Size double
    (String) The size of the image in megabytes.
    SourceChecksum string
    (String) Checksum of the image.
    State string
    (String) The state for this image.
    StoragePool string
    (String) Storage pool where image resides.
    StorageType string
    (String) The storage type for this image.
    UserTags List<string>
    (List) List of user tags attached to the resource.
    Architecture string
    (String) The CPU architecture that the image is designed for.
    Crn string
    (String) The CRN of this resource.
    Hypervisor string
    (String) Hypervisor type.
    Id string
    (String) The unique identifier of the image.
    ImageType string
    (String) The identifier of this image type.
    OperatingSystem string
    (String) The operating system that is installed with the image.
    PiCloudInstanceId string
    PiImageName string
    Size float64
    (String) The size of the image in megabytes.
    SourceChecksum string
    (String) Checksum of the image.
    State string
    (String) The state for this image.
    StoragePool string
    (String) Storage pool where image resides.
    StorageType string
    (String) The storage type for this image.
    UserTags []string
    (List) List of user tags attached to the resource.
    architecture String
    (String) The CPU architecture that the image is designed for.
    crn String
    (String) The CRN of this resource.
    hypervisor String
    (String) Hypervisor type.
    id String
    (String) The unique identifier of the image.
    imageType String
    (String) The identifier of this image type.
    operatingSystem String
    (String) The operating system that is installed with the image.
    piCloudInstanceId String
    piImageName String
    size Double
    (String) The size of the image in megabytes.
    sourceChecksum String
    (String) Checksum of the image.
    state String
    (String) The state for this image.
    storagePool String
    (String) Storage pool where image resides.
    storageType String
    (String) The storage type for this image.
    userTags List<String>
    (List) List of user tags attached to the resource.
    architecture string
    (String) The CPU architecture that the image is designed for.
    crn string
    (String) The CRN of this resource.
    hypervisor string
    (String) Hypervisor type.
    id string
    (String) The unique identifier of the image.
    imageType string
    (String) The identifier of this image type.
    operatingSystem string
    (String) The operating system that is installed with the image.
    piCloudInstanceId string
    piImageName string
    size number
    (String) The size of the image in megabytes.
    sourceChecksum string
    (String) Checksum of the image.
    state string
    (String) The state for this image.
    storagePool string
    (String) Storage pool where image resides.
    storageType string
    (String) The storage type for this image.
    userTags string[]
    (List) List of user tags attached to the resource.
    architecture str
    (String) The CPU architecture that the image is designed for.
    crn str
    (String) The CRN of this resource.
    hypervisor str
    (String) Hypervisor type.
    id str
    (String) The unique identifier of the image.
    image_type str
    (String) The identifier of this image type.
    operating_system str
    (String) The operating system that is installed with the image.
    pi_cloud_instance_id str
    pi_image_name str
    size float
    (String) The size of the image in megabytes.
    source_checksum str
    (String) Checksum of the image.
    state str
    (String) The state for this image.
    storage_pool str
    (String) Storage pool where image resides.
    storage_type str
    (String) The storage type for this image.
    user_tags Sequence[str]
    (List) List of user tags attached to the resource.
    architecture String
    (String) The CPU architecture that the image is designed for.
    crn String
    (String) The CRN of this resource.
    hypervisor String
    (String) Hypervisor type.
    id String
    (String) The unique identifier of the image.
    imageType String
    (String) The identifier of this image type.
    operatingSystem String
    (String) The operating system that is installed with the image.
    piCloudInstanceId String
    piImageName String
    size Number
    (String) The size of the image in megabytes.
    sourceChecksum String
    (String) Checksum of the image.
    state String
    (String) The state for this image.
    storagePool String
    (String) Storage pool where image resides.
    storageType String
    (String) The storage type for this image.
    userTags List<String>
    (List) List of user tags attached to the resource.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud