1. Packages
  2. Packages
  3. Harness Provider
  4. API Docs
  5. fme
  6. ApiKey
Viewing docs for Harness v0.13.0
published on Friday, May 22, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.13.0
published on Friday, May 22, 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:

    ApiKeyType string
    Split API key type. Must be serverSide or clientSide.
    EnvironmentId string
    Split environment ID the key is scoped to.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    Name string
    API key display name.
    ApiKeyType string
    Split API key type. Must be serverSide or clientSide.
    EnvironmentId string
    Split environment ID the key is scoped to.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    Name string
    API key display name.
    api_key_type string
    Split API key type. Must be serverSide or clientSide.
    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.
    apiKeyType String
    Split API key type. Must be serverSide or clientSide.
    environmentId String
    Split environment ID the key is scoped to.
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    name String
    API key display name.
    apiKeyType string
    Split API key type. Must be serverSide or clientSide.
    environmentId string
    Split environment ID the key is scoped to.
    orgId string
    Harness organization identifier.
    projectId string
    Harness project identifier.
    name string
    API key display name.
    api_key_type str
    Split API key type. Must be serverSide or clientSide.
    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.
    apiKeyType String
    Split API key type. Must be serverSide or clientSide.
    environmentId String
    Split environment ID the key is scoped to.
    orgId String
    Harness organization identifier.
    projectId 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:

    ApiKeyValue string
    The secret API key value (only set on initial create).
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    ApiKey string
    The secret API key value (only set on initial create).
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    api_key string
    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 includes id, that is used; otherwise the returned key value.
    apiKey String
    The secret API key value (only set on initial create).
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    apiKey string
    The secret API key value (only set on initial create).
    id string
    The provider-assigned unique ID for this managed resource.
    keyId string
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    api_key str
    The secret API key value (only set on initial create).
    id str
    The provider-assigned unique ID for this managed resource.
    key_id str
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    apiKey String
    The secret API key value (only set on initial create).
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.

    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) -> ApiKey
    func 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.
    The following state arguments are supported:
    ApiKeyType string
    Split API key type. Must be serverSide or clientSide.
    ApiKeyValue string
    The secret API key value (only set on initial create).
    EnvironmentId string
    Split environment ID the key is scoped to.
    KeyId string
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    Name string
    API key display name.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    ApiKey string
    The secret API key value (only set on initial create).
    ApiKeyType string
    Split API key type. Must be serverSide or clientSide.
    EnvironmentId string
    Split environment ID the key is scoped to.
    KeyId string
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    Name string
    API key display name.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    api_key string
    The secret API key value (only set on initial create).
    api_key_type string
    Split API key type. Must be serverSide or clientSide.
    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 includes id, that is used; otherwise the returned key value.
    name string
    API key display name.
    org_id string
    Harness organization identifier.
    project_id string
    Harness project identifier.
    apiKey String
    The secret API key value (only set on initial create).
    apiKeyType String
    Split API key type. Must be serverSide or clientSide.
    environmentId String
    Split environment ID the key is scoped to.
    keyId String
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    name String
    API key display name.
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    apiKey string
    The secret API key value (only set on initial create).
    apiKeyType string
    Split API key type. Must be serverSide or clientSide.
    environmentId string
    Split environment ID the key is scoped to.
    keyId string
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    name string
    API key display name.
    orgId string
    Harness organization identifier.
    projectId string
    Harness project identifier.
    api_key str
    The secret API key value (only set on initial create).
    api_key_type str
    Split API key type. Must be serverSide or clientSide.
    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 includes id, that is used; otherwise the returned key value.
    name str
    API key display name.
    org_id str
    Harness organization identifier.
    project_id str
    Harness project identifier.
    apiKey String
    The secret API key value (only set on initial create).
    apiKeyType String
    Split API key type. Must be serverSide or clientSide.
    environmentId String
    Split environment ID the key is scoped to.
    keyId String
    Identifier used with the Split delete API (same as id). When the create response includes id, that is used; otherwise the returned key value.
    name String
    API key display name.
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.13.0
    published on Friday, May 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial