1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. PhaApiKey
Viewing docs for ibm 2.1.0
published on Tuesday, May 5, 2026 by ibm-cloud
Viewing docs for ibm 2.1.0
published on Tuesday, May 5, 2026 by ibm-cloud

    Add and retrieve PHA API keys for the specified PowerHA instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const phaApiKeyInstance = new ibm.PhaApiKey("pha_api_key_instance", {
        acceptLanguage: "en-US",
        apiKey: "adfadfdsafsdfdsf",
        ifNoneMatch: "abcdef",
        instanceId: "8eefautr-4c02-0009-0086-8bd4d8cf61b6",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    pha_api_key_instance = ibm.PhaApiKey("pha_api_key_instance",
        accept_language="en-US",
        api_key="adfadfdsafsdfdsf",
        if_none_match="abcdef",
        instance_id="8eefautr-4c02-0009-0086-8bd4d8cf61b6")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewPhaApiKey(ctx, "pha_api_key_instance", &ibm.PhaApiKeyArgs{
    			AcceptLanguage: pulumi.String("en-US"),
    			ApiKey:         pulumi.String("adfadfdsafsdfdsf"),
    			IfNoneMatch:    pulumi.String("abcdef"),
    			InstanceId:     pulumi.String("8eefautr-4c02-0009-0086-8bd4d8cf61b6"),
    		})
    		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 phaApiKeyInstance = new Ibm.PhaApiKey("pha_api_key_instance", new()
        {
            AcceptLanguage = "en-US",
            ApiKey = "adfadfdsafsdfdsf",
            IfNoneMatch = "abcdef",
            InstanceId = "8eefautr-4c02-0009-0086-8bd4d8cf61b6",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PhaApiKey;
    import com.pulumi.ibm.PhaApiKeyArgs;
    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 phaApiKeyInstance = new PhaApiKey("phaApiKeyInstance", PhaApiKeyArgs.builder()
                .acceptLanguage("en-US")
                .apiKey("adfadfdsafsdfdsf")
                .ifNoneMatch("abcdef")
                .instanceId("8eefautr-4c02-0009-0086-8bd4d8cf61b6")
                .build());
    
        }
    }
    
    resources:
      phaApiKeyInstance:
        type: ibm:PhaApiKey
        name: pha_api_key_instance
        properties:
          acceptLanguage: en-US
          apiKey: adfadfdsafsdfdsf
          ifNoneMatch: abcdef
          instanceId: 8eefautr-4c02-0009-0086-8bd4d8cf61b6
    
    Example coming soon!
    

    Create PhaApiKey Resource

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

    Constructor syntax

    new PhaApiKey(name: string, args: PhaApiKeyArgs, opts?: CustomResourceOptions);
    @overload
    def PhaApiKey(resource_name: str,
                  args: PhaApiKeyArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def PhaApiKey(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  instance_id: Optional[str] = None,
                  accept_language: Optional[str] = None,
                  api_key: Optional[str] = None,
                  if_none_match: Optional[str] = None)
    func NewPhaApiKey(ctx *Context, name string, args PhaApiKeyArgs, opts ...ResourceOption) (*PhaApiKey, error)
    public PhaApiKey(string name, PhaApiKeyArgs args, CustomResourceOptions? opts = null)
    public PhaApiKey(String name, PhaApiKeyArgs args)
    public PhaApiKey(String name, PhaApiKeyArgs args, CustomResourceOptions options)
    
    type: ibm:PhaApiKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ibm_phaapikey" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PhaApiKeyArgs
    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 PhaApiKeyArgs
    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 PhaApiKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PhaApiKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PhaApiKeyArgs
    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 phaApiKeyResource = new Ibm.PhaApiKey("phaApiKeyResource", new()
    {
        InstanceId = "string",
        AcceptLanguage = "string",
        ApiKey = "string",
        IfNoneMatch = "string",
    });
    
    example, err := ibm.NewPhaApiKey(ctx, "phaApiKeyResource", &ibm.PhaApiKeyArgs{
    	InstanceId:     pulumi.String("string"),
    	AcceptLanguage: pulumi.String("string"),
    	ApiKey:         pulumi.String("string"),
    	IfNoneMatch:    pulumi.String("string"),
    })
    
    resource "ibm_phaapikey" "phaApiKeyResource" {
      instance_id     = "string"
      accept_language = "string"
      api_key         = "string"
      if_none_match   = "string"
    }
    
    var phaApiKeyResource = new PhaApiKey("phaApiKeyResource", PhaApiKeyArgs.builder()
        .instanceId("string")
        .acceptLanguage("string")
        .apiKey("string")
        .ifNoneMatch("string")
        .build());
    
    pha_api_key_resource = ibm.PhaApiKey("phaApiKeyResource",
        instance_id="string",
        accept_language="string",
        api_key="string",
        if_none_match="string")
    
    const phaApiKeyResource = new ibm.PhaApiKey("phaApiKeyResource", {
        instanceId: "string",
        acceptLanguage: "string",
        apiKey: "string",
        ifNoneMatch: "string",
    });
    
    type: ibm:PhaApiKey
    properties:
        acceptLanguage: string
        apiKey: string
        ifNoneMatch: string
        instanceId: string
    

    PhaApiKey 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 PhaApiKey resource accepts the following input properties:

    InstanceId string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    AcceptLanguage string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    ApiKey string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    IfNoneMatch string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    InstanceId string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    AcceptLanguage string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    ApiKey string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    IfNoneMatch string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instance_id string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    accept_language string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    api_key string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    if_none_match string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instanceId String
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    acceptLanguage String
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    apiKey String
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    ifNoneMatch String
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instanceId string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    acceptLanguage string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    apiKey string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    ifNoneMatch string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instance_id str
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    accept_language str
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    api_key str
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    if_none_match str
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instanceId String
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    acceptLanguage String
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    apiKey String
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    ifNoneMatch String
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.

    Outputs

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

    Etag string
    ETag identifier for pha_api_key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the API key retrieval request
    Etag string
    ETag identifier for pha_api_key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the API key retrieval request
    etag string
    ETag identifier for pha_api_key.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Status of the API key retrieval request
    etag String
    ETag identifier for pha_api_key.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the API key retrieval request
    etag string
    ETag identifier for pha_api_key.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Status of the API key retrieval request
    etag str
    ETag identifier for pha_api_key.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Status of the API key retrieval request
    etag String
    ETag identifier for pha_api_key.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the API key retrieval request

    Look up Existing PhaApiKey Resource

    Get an existing PhaApiKey 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?: PhaApiKeyState, opts?: CustomResourceOptions): PhaApiKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accept_language: Optional[str] = None,
            api_key: Optional[str] = None,
            etag: Optional[str] = None,
            if_none_match: Optional[str] = None,
            instance_id: Optional[str] = None,
            status: Optional[str] = None) -> PhaApiKey
    func GetPhaApiKey(ctx *Context, name string, id IDInput, state *PhaApiKeyState, opts ...ResourceOption) (*PhaApiKey, error)
    public static PhaApiKey Get(string name, Input<string> id, PhaApiKeyState? state, CustomResourceOptions? opts = null)
    public static PhaApiKey get(String name, Output<String> id, PhaApiKeyState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PhaApiKey    get:      id: ${id}
    import {
      to = ibm_phaapikey.example
      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:
    AcceptLanguage string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    ApiKey string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    Etag string
    ETag identifier for pha_api_key.
    IfNoneMatch string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    InstanceId string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    Status string
    Status of the API key retrieval request
    AcceptLanguage string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    ApiKey string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    Etag string
    ETag identifier for pha_api_key.
    IfNoneMatch string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    InstanceId string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    Status string
    Status of the API key retrieval request
    accept_language string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    api_key string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    etag string
    ETag identifier for pha_api_key.
    if_none_match string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instance_id string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    status string
    Status of the API key retrieval request
    acceptLanguage String
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    apiKey String
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    etag String
    ETag identifier for pha_api_key.
    ifNoneMatch String
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instanceId String
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    status String
    Status of the API key retrieval request
    acceptLanguage string
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    apiKey string
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    etag string
    ETag identifier for pha_api_key.
    ifNoneMatch string
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instanceId string
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    status string
    Status of the API key retrieval request
    accept_language str
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    api_key str
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    etag str
    ETag identifier for pha_api_key.
    if_none_match str
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instance_id str
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    status str
    Status of the API key retrieval request
    acceptLanguage String
    The language requested for the return document.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    apiKey String
    The API key associated with the request.

    • Constraints: The maximum length is 2048 characters. The minimum length is 1 character. The value must match regular expression /^[A-Za-z0-9._: -]+$/.
    etag String
    ETag identifier for pha_api_key.
    ifNoneMatch String
    ETag for conditional requests (optional).

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-_,;=.*]+$/.
    instanceId String
    Unique identifier of the provisioned instance.

    • Constraints: The maximum length is 50 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9-]+$/.
    status String
    Status of the API key retrieval request

    Import

    Import is not supported

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    Viewing docs for ibm 2.1.0
    published on Tuesday, May 5, 2026 by ibm-cloud
      Try Pulumi Cloud free. Your team will thank you.