1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getApiKey
Harness v0.8.1 published on Saturday, Aug 23, 2025 by Pulumi

harness.platform.getApiKey

Explore with Pulumi AI

harness logo
Harness v0.8.1 published on Saturday, Aug 23, 2025 by Pulumi

    Data source for retrieving a Harness ApiKey.

    Using getApiKey

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getApiKey(args: GetApiKeyArgs, opts?: InvokeOptions): Promise<GetApiKeyResult>
    function getApiKeyOutput(args: GetApiKeyOutputArgs, opts?: InvokeOptions): Output<GetApiKeyResult>
    def get_api_key(account_id: Optional[str] = None,
                    apikey_type: Optional[str] = None,
                    default_time_to_expire_token: Optional[int] = None,
                    identifier: Optional[str] = None,
                    name: Optional[str] = None,
                    org_id: Optional[str] = None,
                    parent_id: Optional[str] = None,
                    project_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetApiKeyResult
    def get_api_key_output(account_id: Optional[pulumi.Input[str]] = None,
                    apikey_type: Optional[pulumi.Input[str]] = None,
                    default_time_to_expire_token: Optional[pulumi.Input[int]] = None,
                    identifier: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    org_id: Optional[pulumi.Input[str]] = None,
                    parent_id: Optional[pulumi.Input[str]] = None,
                    project_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetApiKeyResult]
    func GetApiKey(ctx *Context, args *GetApiKeyArgs, opts ...InvokeOption) (*GetApiKeyResult, error)
    func GetApiKeyOutput(ctx *Context, args *GetApiKeyOutputArgs, opts ...InvokeOption) GetApiKeyResultOutput

    > Note: This function is named GetApiKey in the Go SDK.

    public static class GetApiKey 
    {
        public static Task<GetApiKeyResult> InvokeAsync(GetApiKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetApiKeyResult> Invoke(GetApiKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
    public static Output<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: harness:platform/getApiKey:getApiKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    Identifier string
    Unique identifier of the resource.
    ParentId string
    Parent Identifier for the Entity
    DefaultTimeToExpireToken int
    Expiry time of the apiKey
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    Identifier string
    Unique identifier of the resource.
    ParentId string
    Parent Identifier for the Entity
    DefaultTimeToExpireToken int
    Expiry time of the apiKey
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    identifier String
    Unique identifier of the resource.
    parentId String
    Parent Identifier for the Entity
    defaultTimeToExpireToken Integer
    Expiry time of the apiKey
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    accountId string
    Account Identifier for the Entity
    apikeyType string
    Type of the API Key
    identifier string
    Unique identifier of the resource.
    parentId string
    Parent Identifier for the Entity
    defaultTimeToExpireToken number
    Expiry time of the apiKey
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    account_id str
    Account Identifier for the Entity
    apikey_type str
    Type of the API Key
    identifier str
    Unique identifier of the resource.
    parent_id str
    Parent Identifier for the Entity
    default_time_to_expire_token int
    Expiry time of the apiKey
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    identifier String
    Unique identifier of the resource.
    parentId String
    Parent Identifier for the Entity
    defaultTimeToExpireToken Number
    Expiry time of the apiKey
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.

    getApiKey Result

    The following output properties are available:

    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    Description string
    Description of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the resource.
    ParentId string
    Parent Identifier for the Entity
    Tags List<string>
    Tags to associate with the resource.
    DefaultTimeToExpireToken int
    Expiry time of the apiKey
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    Description string
    Description of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the resource.
    ParentId string
    Parent Identifier for the Entity
    Tags []string
    Tags to associate with the resource.
    DefaultTimeToExpireToken int
    Expiry time of the apiKey
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    description String
    Description of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the resource.
    parentId String
    Parent Identifier for the Entity
    tags List<String>
    Tags to associate with the resource.
    defaultTimeToExpireToken Integer
    Expiry time of the apiKey
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    accountId string
    Account Identifier for the Entity
    apikeyType string
    Type of the API Key
    description string
    Description of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the resource.
    parentId string
    Parent Identifier for the Entity
    tags string[]
    Tags to associate with the resource.
    defaultTimeToExpireToken number
    Expiry time of the apiKey
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    account_id str
    Account Identifier for the Entity
    apikey_type str
    Type of the API Key
    description str
    Description of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Unique identifier of the resource.
    parent_id str
    Parent Identifier for the Entity
    tags Sequence[str]
    Tags to associate with the resource.
    default_time_to_expire_token int
    Expiry time of the apiKey
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    description String
    Description of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the resource.
    parentId String
    Parent Identifier for the Entity
    tags List<String>
    Tags to associate with the resource.
    defaultTimeToExpireToken Number
    Expiry time of the apiKey
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.8.1 published on Saturday, Aug 23, 2025 by Pulumi