published on Tuesday, May 5, 2026 by ibm-cloud
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:
- Instance
Id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- Accept
Language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- Api
Key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- If
None stringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- Instance
Id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- Accept
Language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- Api
Key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- If
None stringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance_
id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- accept_
language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api_
key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- if_
none_ stringmatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance
Id String - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- accept
Language String - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api
Key String - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- if
None StringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance
Id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- accept
Language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api
Key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- if
None stringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance_
id str - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- accept_
language str - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api_
key str - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- if_
none_ strmatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance
Id String - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- accept
Language String - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api
Key String - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- if
None StringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
Outputs
All input properties are implicitly available as output properties. Additionally, the PhaApiKey resource produces the following output properties:
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) -> PhaApiKeyfunc 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.
- Accept
Language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- Api
Key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- Etag string
- ETag identifier for pha_api_key.
- If
None stringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- Instance
Id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- Status string
- Status of the API key retrieval request
- Accept
Language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- Api
Key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- Etag string
- ETag identifier for pha_api_key.
- If
None stringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- Instance
Id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- Status string
- Status of the API key retrieval request
- accept_
language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api_
key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- etag string
- ETag identifier for pha_api_key.
- if_
none_ stringmatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance_
id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- status string
- Status of the API key retrieval request
- accept
Language String - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api
Key String - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- etag String
- ETag identifier for pha_api_key.
- if
None StringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance
Id String - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- status String
- Status of the API key retrieval request
- accept
Language string - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api
Key string - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- etag string
- ETag identifier for pha_api_key.
- if
None stringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance
Id string - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- status string
- Status of the API key retrieval request
- accept_
language str - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api_
key str - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- etag str
- ETag identifier for pha_api_key.
- if_
none_ strmatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance_
id str - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- status str
- Status of the API key retrieval request
- accept
Language String - The language requested for the return document.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- api
Key String - The API key associated with the request.
- Constraints: The maximum length is
2048characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9._: -]+$/.
- Constraints: The maximum length is
- etag String
- ETag identifier for pha_api_key.
- if
None StringMatch - ETag for conditional requests (optional).
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9\\-_,;=.*]+$/.
- Constraints: The maximum length is
- instance
Id String - Unique identifier of the provisioned instance.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^[a-zA-Z0-9-]+$/.
- Constraints: The maximum length is
- 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
ibmTerraform Provider.
published on Tuesday, May 5, 2026 by ibm-cloud
