published on Thursday, May 28, 2026 by Pulumi
published on Thursday, May 28, 2026 by Pulumi
Create and delete a Harness FME (Split) API key. Only serverSide and clientSide keys are supported. The raw key value is only available immediately after create. Split may omit id on create and only return key; the provider then uses that value as id and for delete. Import id format: org_id/project_id/<id_or_key_from_Split> when the Admin API returns key metadata on GET, or org_id/project_id/environment_id/api_key_type/name/key_id (six segments; name must not contain /).
Create ApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiKey(name: string, args: ApiKeyArgs, opts?: CustomResourceOptions);@overload
def ApiKey(resource_name: str,
args: ApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_key_type: Optional[str] = None,
environment_id: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
name: Optional[str] = None)func NewApiKey(ctx *Context, name string, args ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)public ApiKey(string name, ApiKeyArgs args, CustomResourceOptions? opts = null)
public ApiKey(String name, ApiKeyArgs args)
public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
type: harness:fme:ApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "harness_fme_apikey" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ApiKeyArgs
- 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 ApiKeyArgs
- 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 ApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiKeyArgs
- 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 apiKeyResource = new Harness.Fme.ApiKey("apiKeyResource", new()
{
ApiKeyType = "string",
EnvironmentId = "string",
OrgId = "string",
ProjectId = "string",
Name = "string",
});
example, err := fme.NewApiKey(ctx, "apiKeyResource", &fme.ApiKeyArgs{
ApiKeyType: pulumi.String("string"),
EnvironmentId: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "harness_fme_apikey" "apiKeyResource" {
api_key_type = "string"
environment_id = "string"
org_id = "string"
project_id = "string"
name = "string"
}
var apiKeyResource = new ApiKey("apiKeyResource", ApiKeyArgs.builder()
.apiKeyType("string")
.environmentId("string")
.orgId("string")
.projectId("string")
.name("string")
.build());
api_key_resource = harness.fme.ApiKey("apiKeyResource",
api_key_type="string",
environment_id="string",
org_id="string",
project_id="string",
name="string")
const apiKeyResource = new harness.fme.ApiKey("apiKeyResource", {
apiKeyType: "string",
environmentId: "string",
orgId: "string",
projectId: "string",
name: "string",
});
type: harness:fme:ApiKey
properties:
apiKeyType: string
environmentId: string
name: string
orgId: string
projectId: string
ApiKey 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 ApiKey resource accepts the following input properties:
- Api
Key stringType - Split API key type. Must be
serverSideorclientSide. - Environment
Id string - Split environment ID the key is scoped to.
- Org
Id string - Harness organization identifier.
- Project
Id string - Harness project identifier.
- Name string
- API key display name.
- Api
Key stringType - Split API key type. Must be
serverSideorclientSide. - Environment
Id string - Split environment ID the key is scoped to.
- Org
Id string - Harness organization identifier.
- Project
Id string - Harness project identifier.
- Name string
- API key display name.
- api_
key_ stringtype - Split API key type. Must be
serverSideorclientSide. - environment_
id string - Split environment ID the key is scoped to.
- org_
id string - Harness organization identifier.
- project_
id string - Harness project identifier.
- name string
- API key display name.
- api
Key StringType - Split API key type. Must be
serverSideorclientSide. - environment
Id String - Split environment ID the key is scoped to.
- org
Id String - Harness organization identifier.
- project
Id String - Harness project identifier.
- name String
- API key display name.
- api
Key stringType - Split API key type. Must be
serverSideorclientSide. - environment
Id string - Split environment ID the key is scoped to.
- org
Id string - Harness organization identifier.
- project
Id string - Harness project identifier.
- name string
- API key display name.
- api_
key_ strtype - Split API key type. Must be
serverSideorclientSide. - environment_
id str - Split environment ID the key is scoped to.
- org_
id str - Harness organization identifier.
- project_
id str - Harness project identifier.
- name str
- API key display name.
- api
Key StringType - Split API key type. Must be
serverSideorclientSide. - environment
Id String - Split environment ID the key is scoped to.
- org
Id String - Harness organization identifier.
- project
Id String - Harness project identifier.
- name String
- API key display name.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiKey resource produces the following output properties:
- Api
Key stringValue - The secret API key value (only set on initial create).
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Id string - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue.
Look up Existing ApiKey Resource
Get an existing ApiKey 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?: ApiKeyState, opts?: CustomResourceOptions): ApiKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
api_key_type: Optional[str] = None,
environment_id: Optional[str] = None,
key_id: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None) -> ApiKeyfunc GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)public static ApiKey get(String name, Output<String> id, ApiKeyState state, CustomResourceOptions options)resources: _: type: harness:fme:ApiKey get: id: ${id}import {
to = harness_fme_apikey.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.
- Api
Key stringType - Split API key type. Must be
serverSideorclientSide. - Api
Key stringValue - The secret API key value (only set on initial create).
- Environment
Id string - Split environment ID the key is scoped to.
- Key
Id string - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue. - Name string
- API key display name.
- Org
Id string - Harness organization identifier.
- Project
Id string - Harness project identifier.
- Api
Key string - The secret API key value (only set on initial create).
- Api
Key stringType - Split API key type. Must be
serverSideorclientSide. - Environment
Id string - Split environment ID the key is scoped to.
- Key
Id string - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue. - Name string
- API key display name.
- Org
Id string - Harness organization identifier.
- Project
Id string - Harness project identifier.
- api_
key string - The secret API key value (only set on initial create).
- api_
key_ stringtype - Split API key type. Must be
serverSideorclientSide. - environment_
id string - Split environment ID the key is scoped to.
- key_
id string - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue. - name string
- API key display name.
- org_
id string - Harness organization identifier.
- project_
id string - Harness project identifier.
- api
Key String - The secret API key value (only set on initial create).
- api
Key StringType - Split API key type. Must be
serverSideorclientSide. - environment
Id String - Split environment ID the key is scoped to.
- key
Id String - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue. - name String
- API key display name.
- org
Id String - Harness organization identifier.
- project
Id String - Harness project identifier.
- api
Key string - The secret API key value (only set on initial create).
- api
Key stringType - Split API key type. Must be
serverSideorclientSide. - environment
Id string - Split environment ID the key is scoped to.
- key
Id string - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue. - name string
- API key display name.
- org
Id string - Harness organization identifier.
- project
Id string - Harness project identifier.
- api_
key str - The secret API key value (only set on initial create).
- api_
key_ strtype - Split API key type. Must be
serverSideorclientSide. - environment_
id str - Split environment ID the key is scoped to.
- key_
id str - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue. - name str
- API key display name.
- org_
id str - Harness organization identifier.
- project_
id str - Harness project identifier.
- api
Key String - The secret API key value (only set on initial create).
- api
Key StringType - Split API key type. Must be
serverSideorclientSide. - environment
Id String - Split environment ID the key is scoped to.
- key
Id String - Identifier used with the Split delete API (same as
id). When the create response includesid, that is used; otherwise the returnedkeyvalue. - name String
- API key display name.
- org
Id String - Harness organization identifier.
- project
Id String - Harness project identifier.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
published on Thursday, May 28, 2026 by Pulumi