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

ibm.PiImageExport

Explore with Pulumi AI

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

    Export an image to IBM Cloud Object Storage for Power Systems Virtual Server instance. For more information, about IBM power virtual server cloud, see getting started with IBM Power Systems Virtual Servers.

    Example Usage

    The following example enables you to export an image:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testaccImageExport = new ibm.PiImageExport("testaccImageExport", {
        piCloudInstanceId: "<value of the cloud_instance_id>",
        piImageAccessKey: "dummy-access-key",
        piImageBucketName: "images-public-bucket",
        piImageBucketRegion: "us-south",
        piImageId: "test_image",
        piImageSecretKey: "dummy-secret-key",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    testacc_image_export = ibm.PiImageExport("testaccImageExport",
        pi_cloud_instance_id="<value of the cloud_instance_id>",
        pi_image_access_key="dummy-access-key",
        pi_image_bucket_name="images-public-bucket",
        pi_image_bucket_region="us-south",
        pi_image_id="test_image",
        pi_image_secret_key="dummy-secret-key")
    
    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.NewPiImageExport(ctx, "testaccImageExport", &ibm.PiImageExportArgs{
    			PiCloudInstanceId:   pulumi.String("<value of the cloud_instance_id>"),
    			PiImageAccessKey:    pulumi.String("dummy-access-key"),
    			PiImageBucketName:   pulumi.String("images-public-bucket"),
    			PiImageBucketRegion: pulumi.String("us-south"),
    			PiImageId:           pulumi.String("test_image"),
    			PiImageSecretKey:    pulumi.String("dummy-secret-key"),
    		})
    		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 testaccImageExport = new Ibm.PiImageExport("testaccImageExport", new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
            PiImageAccessKey = "dummy-access-key",
            PiImageBucketName = "images-public-bucket",
            PiImageBucketRegion = "us-south",
            PiImageId = "test_image",
            PiImageSecretKey = "dummy-secret-key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PiImageExport;
    import com.pulumi.ibm.PiImageExportArgs;
    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) {
            var testaccImageExport = new PiImageExport("testaccImageExport", PiImageExportArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .piImageAccessKey("dummy-access-key")
                .piImageBucketName("images-public-bucket")
                .piImageBucketRegion("us-south")
                .piImageId("test_image")
                .piImageSecretKey("dummy-secret-key")
                .build());
    
        }
    }
    
    resources:
      testaccImageExport:
        type: ibm:PiImageExport
        properties:
          piCloudInstanceId: <value of the cloud_instance_id>
          piImageAccessKey: dummy-access-key
          piImageBucketName: images-public-bucket
          piImageBucketRegion: us-south
          piImageId: test_image
          piImageSecretKey: dummy-secret-key
    

    Notes

    • Ensure the exported file is cleaned up manually from the Cloud Object Storage when no longer needed. Power Systems Virtual Server does not support deleting the exported image. Updating any attribute will result in creating a new Export job.
    • 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) {
        }
    }
    
    {}
    

    Create PiImageExport Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PiImageExport(name: string, args: PiImageExportArgs, opts?: CustomResourceOptions);
    @overload
    def PiImageExport(resource_name: str,
                      args: PiImageExportArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiImageExport(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      pi_cloud_instance_id: Optional[str] = None,
                      pi_image_access_key: Optional[str] = None,
                      pi_image_bucket_name: Optional[str] = None,
                      pi_image_bucket_region: Optional[str] = None,
                      pi_image_id: Optional[str] = None,
                      pi_image_secret_key: Optional[str] = None,
                      pi_image_export_id: Optional[str] = None,
                      timeouts: Optional[PiImageExportTimeoutsArgs] = None)
    func NewPiImageExport(ctx *Context, name string, args PiImageExportArgs, opts ...ResourceOption) (*PiImageExport, error)
    public PiImageExport(string name, PiImageExportArgs args, CustomResourceOptions? opts = null)
    public PiImageExport(String name, PiImageExportArgs args)
    public PiImageExport(String name, PiImageExportArgs args, CustomResourceOptions options)
    
    type: ibm:PiImageExport
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PiImageExportArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PiImageExportArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PiImageExportArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiImageExportArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiImageExportArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var piImageExportResource = new Ibm.PiImageExport("piImageExportResource", new()
    {
        PiCloudInstanceId = "string",
        PiImageAccessKey = "string",
        PiImageBucketName = "string",
        PiImageBucketRegion = "string",
        PiImageId = "string",
        PiImageSecretKey = "string",
        PiImageExportId = "string",
        Timeouts = new Ibm.Inputs.PiImageExportTimeoutsArgs
        {
            Create = "string",
        },
    });
    
    example, err := ibm.NewPiImageExport(ctx, "piImageExportResource", &ibm.PiImageExportArgs{
    	PiCloudInstanceId:   pulumi.String("string"),
    	PiImageAccessKey:    pulumi.String("string"),
    	PiImageBucketName:   pulumi.String("string"),
    	PiImageBucketRegion: pulumi.String("string"),
    	PiImageId:           pulumi.String("string"),
    	PiImageSecretKey:    pulumi.String("string"),
    	PiImageExportId:     pulumi.String("string"),
    	Timeouts: &ibm.PiImageExportTimeoutsArgs{
    		Create: pulumi.String("string"),
    	},
    })
    
    var piImageExportResource = new PiImageExport("piImageExportResource", PiImageExportArgs.builder()
        .piCloudInstanceId("string")
        .piImageAccessKey("string")
        .piImageBucketName("string")
        .piImageBucketRegion("string")
        .piImageId("string")
        .piImageSecretKey("string")
        .piImageExportId("string")
        .timeouts(PiImageExportTimeoutsArgs.builder()
            .create("string")
            .build())
        .build());
    
    pi_image_export_resource = ibm.PiImageExport("piImageExportResource",
        pi_cloud_instance_id="string",
        pi_image_access_key="string",
        pi_image_bucket_name="string",
        pi_image_bucket_region="string",
        pi_image_id="string",
        pi_image_secret_key="string",
        pi_image_export_id="string",
        timeouts={
            "create": "string",
        })
    
    const piImageExportResource = new ibm.PiImageExport("piImageExportResource", {
        piCloudInstanceId: "string",
        piImageAccessKey: "string",
        piImageBucketName: "string",
        piImageBucketRegion: "string",
        piImageId: "string",
        piImageSecretKey: "string",
        piImageExportId: "string",
        timeouts: {
            create: "string",
        },
    });
    
    type: ibm:PiImageExport
    properties:
        piCloudInstanceId: string
        piImageAccessKey: string
        piImageBucketName: string
        piImageBucketRegion: string
        piImageExportId: string
        piImageId: string
        piImageSecretKey: string
        timeouts:
            create: string
    

    PiImageExport Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PiImageExport resource accepts the following input properties:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiImageAccessKey string
    The Cloud Object Storage access key; required for buckets with private access.
    PiImageBucketName string
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    PiImageBucketRegion string
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    PiImageId string
    The Image ID of existing source image; required for image export.
    PiImageSecretKey string
    The Cloud Object Storage secret key; required for buckets with private access.
    PiImageExportId string
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    Timeouts PiImageExportTimeouts
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiImageAccessKey string
    The Cloud Object Storage access key; required for buckets with private access.
    PiImageBucketName string
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    PiImageBucketRegion string
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    PiImageId string
    The Image ID of existing source image; required for image export.
    PiImageSecretKey string
    The Cloud Object Storage secret key; required for buckets with private access.
    PiImageExportId string
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    Timeouts PiImageExportTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piImageAccessKey String
    The Cloud Object Storage access key; required for buckets with private access.
    piImageBucketName String
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    piImageBucketRegion String
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    piImageId String
    The Image ID of existing source image; required for image export.
    piImageSecretKey String
    The Cloud Object Storage secret key; required for buckets with private access.
    piImageExportId String
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    timeouts PiImageExportTimeouts
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piImageAccessKey string
    The Cloud Object Storage access key; required for buckets with private access.
    piImageBucketName string
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    piImageBucketRegion string
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    piImageId string
    The Image ID of existing source image; required for image export.
    piImageSecretKey string
    The Cloud Object Storage secret key; required for buckets with private access.
    piImageExportId string
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    timeouts PiImageExportTimeouts
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_image_access_key str
    The Cloud Object Storage access key; required for buckets with private access.
    pi_image_bucket_name str
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    pi_image_bucket_region str
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    pi_image_id str
    The Image ID of existing source image; required for image export.
    pi_image_secret_key str
    The Cloud Object Storage secret key; required for buckets with private access.
    pi_image_export_id str
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    timeouts PiImageExportTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piImageAccessKey String
    The Cloud Object Storage access key; required for buckets with private access.
    piImageBucketName String
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    piImageBucketRegion String
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    piImageId String
    The Image ID of existing source image; required for image export.
    piImageSecretKey String
    The Cloud Object Storage secret key; required for buckets with private access.
    piImageExportId String
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PiImageExport resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PiImageExport Resource

    Get an existing PiImageExport resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PiImageExportState, opts?: CustomResourceOptions): PiImageExport
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            pi_cloud_instance_id: Optional[str] = None,
            pi_image_access_key: Optional[str] = None,
            pi_image_bucket_name: Optional[str] = None,
            pi_image_bucket_region: Optional[str] = None,
            pi_image_export_id: Optional[str] = None,
            pi_image_id: Optional[str] = None,
            pi_image_secret_key: Optional[str] = None,
            timeouts: Optional[PiImageExportTimeoutsArgs] = None) -> PiImageExport
    func GetPiImageExport(ctx *Context, name string, id IDInput, state *PiImageExportState, opts ...ResourceOption) (*PiImageExport, error)
    public static PiImageExport Get(string name, Input<string> id, PiImageExportState? state, CustomResourceOptions? opts = null)
    public static PiImageExport get(String name, Output<String> id, PiImageExportState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiImageExport    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiImageAccessKey string
    The Cloud Object Storage access key; required for buckets with private access.
    PiImageBucketName string
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    PiImageBucketRegion string
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    PiImageExportId string
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    PiImageId string
    The Image ID of existing source image; required for image export.
    PiImageSecretKey string
    The Cloud Object Storage secret key; required for buckets with private access.
    Timeouts PiImageExportTimeouts
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiImageAccessKey string
    The Cloud Object Storage access key; required for buckets with private access.
    PiImageBucketName string
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    PiImageBucketRegion string
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    PiImageExportId string
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    PiImageId string
    The Image ID of existing source image; required for image export.
    PiImageSecretKey string
    The Cloud Object Storage secret key; required for buckets with private access.
    Timeouts PiImageExportTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piImageAccessKey String
    The Cloud Object Storage access key; required for buckets with private access.
    piImageBucketName String
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    piImageBucketRegion String
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    piImageExportId String
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    piImageId String
    The Image ID of existing source image; required for image export.
    piImageSecretKey String
    The Cloud Object Storage secret key; required for buckets with private access.
    timeouts PiImageExportTimeouts
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piImageAccessKey string
    The Cloud Object Storage access key; required for buckets with private access.
    piImageBucketName string
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    piImageBucketRegion string
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    piImageExportId string
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    piImageId string
    The Image ID of existing source image; required for image export.
    piImageSecretKey string
    The Cloud Object Storage secret key; required for buckets with private access.
    timeouts PiImageExportTimeouts
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_image_access_key str
    The Cloud Object Storage access key; required for buckets with private access.
    pi_image_bucket_name str
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    pi_image_bucket_region str
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    pi_image_export_id str
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    pi_image_id str
    The Image ID of existing source image; required for image export.
    pi_image_secret_key str
    The Cloud Object Storage secret key; required for buckets with private access.
    timeouts PiImageExportTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piImageAccessKey String
    The Cloud Object Storage access key; required for buckets with private access.
    piImageBucketName String
    The Cloud Object Storage bucket name; bucket-name[/optional/folder]
    piImageBucketRegion String
    The Cloud Object Storage region. Supported COS regions are:au-syd, br-sao, ca-tor, che01, eu-de, eu-es, eu-gb, jp-osa, jp-tok, us-east, us-south.
    piImageExportId String
    (String) The unique identifier of an image export resource. The ID is composed of <image_id>/<bucket_name>/<bucket_region>.
    piImageId String
    The Image ID of existing source image; required for image export.
    piImageSecretKey String
    The Cloud Object Storage secret key; required for buckets with private access.
    timeouts Property Map

    Supporting Types

    PiImageExportTimeouts, PiImageExportTimeoutsArgs

    Create string
    Create string
    create String
    create string
    create str
    create String

    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