harness.PlatformApiKey
Explore with Pulumi AI
Resource for creating apikeys.
Create PlatformApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PlatformApiKey(name: string, args: PlatformApiKeyArgs, opts?: CustomResourceOptions);
@overload
def PlatformApiKey(resource_name: str,
args: PlatformApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PlatformApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
apikey_type: Optional[str] = None,
identifier: Optional[str] = None,
parent_id: Optional[str] = None,
default_time_to_expire_token: Optional[int] = None,
description: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
func NewPlatformApiKey(ctx *Context, name string, args PlatformApiKeyArgs, opts ...ResourceOption) (*PlatformApiKey, error)
public PlatformApiKey(string name, PlatformApiKeyArgs args, CustomResourceOptions? opts = null)
public PlatformApiKey(String name, PlatformApiKeyArgs args)
public PlatformApiKey(String name, PlatformApiKeyArgs args, CustomResourceOptions options)
type: harness:PlatformApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PlatformApiKeyArgs
- 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 PlatformApiKeyArgs
- 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 PlatformApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PlatformApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PlatformApiKeyArgs
- 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 platformApiKeyResource = new Harness.PlatformApiKey("platformApiKeyResource", new()
{
AccountId = "string",
ApikeyType = "string",
Identifier = "string",
ParentId = "string",
DefaultTimeToExpireToken = 0,
Description = "string",
Name = "string",
OrgId = "string",
ProjectId = "string",
Tags = new[]
{
"string",
},
});
example, err := harness.NewPlatformApiKey(ctx, "platformApiKeyResource", &harness.PlatformApiKeyArgs{
AccountId: pulumi.String("string"),
ApikeyType: pulumi.String("string"),
Identifier: pulumi.String("string"),
ParentId: pulumi.String("string"),
DefaultTimeToExpireToken: pulumi.Int(0),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var platformApiKeyResource = new PlatformApiKey("platformApiKeyResource", PlatformApiKeyArgs.builder()
.accountId("string")
.apikeyType("string")
.identifier("string")
.parentId("string")
.defaultTimeToExpireToken(0)
.description("string")
.name("string")
.orgId("string")
.projectId("string")
.tags("string")
.build());
platform_api_key_resource = harness.PlatformApiKey("platformApiKeyResource",
account_id="string",
apikey_type="string",
identifier="string",
parent_id="string",
default_time_to_expire_token=0,
description="string",
name="string",
org_id="string",
project_id="string",
tags=["string"])
const platformApiKeyResource = new harness.PlatformApiKey("platformApiKeyResource", {
accountId: "string",
apikeyType: "string",
identifier: "string",
parentId: "string",
defaultTimeToExpireToken: 0,
description: "string",
name: "string",
orgId: "string",
projectId: "string",
tags: ["string"],
});
type: harness:PlatformApiKey
properties:
accountId: string
apikeyType: string
defaultTimeToExpireToken: 0
description: string
identifier: string
name: string
orgId: string
parentId: string
projectId: string
tags:
- string
PlatformApiKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The PlatformApiKey resource accepts the following input properties:
- Account
Id string - Account Identifier for the Entity
- Apikey
Type string - Type of the API Key
- Identifier string
- Unique identifier of the resource.
- Parent
Id string - Parent Entity Identifier of the API Key
- Default
Time intTo Expire Token - Default expiration time of the Token within API Key
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Account
Id string - Account Identifier for the Entity
- Apikey
Type string - Type of the API Key
- Identifier string
- Unique identifier of the resource.
- Parent
Id string - Parent Entity Identifier of the API Key
- Default
Time intTo Expire Token - Default expiration time of the Token within API Key
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- account
Id String - Account Identifier for the Entity
- apikey
Type String - Type of the API Key
- identifier String
- Unique identifier of the resource.
- parent
Id String - Parent Entity Identifier of the API Key
- default
Time IntegerTo Expire Token - Default expiration time of the Token within API Key
- description String
- Description of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- account
Id string - Account Identifier for the Entity
- apikey
Type string - Type of the API Key
- identifier string
- Unique identifier of the resource.
- parent
Id string - Parent Entity Identifier of the API Key
- default
Time numberTo Expire Token - Default expiration time of the Token within API Key
- description string
- Description of the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- 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 Entity Identifier of the API Key
- default_
time_ intto_ expire_ token - Default expiration time of the Token within API Key
- description str
- Description of the resource.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- account
Id String - Account Identifier for the Entity
- apikey
Type String - Type of the API Key
- identifier String
- Unique identifier of the resource.
- parent
Id String - Parent Entity Identifier of the API Key
- default
Time NumberTo Expire Token - Default expiration time of the Token within API Key
- description String
- Description of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PlatformApiKey resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PlatformApiKey Resource
Get an existing PlatformApiKey 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?: PlatformApiKeyState, opts?: CustomResourceOptions): PlatformApiKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
apikey_type: Optional[str] = None,
default_time_to_expire_token: Optional[int] = None,
description: Optional[str] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
parent_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> PlatformApiKey
func GetPlatformApiKey(ctx *Context, name string, id IDInput, state *PlatformApiKeyState, opts ...ResourceOption) (*PlatformApiKey, error)
public static PlatformApiKey Get(string name, Input<string> id, PlatformApiKeyState? state, CustomResourceOptions? opts = null)
public static PlatformApiKey get(String name, Output<String> id, PlatformApiKeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Account
Id string - Account Identifier for the Entity
- Apikey
Type string - Type of the API Key
- Default
Time intTo Expire Token - Default expiration time of the Token within API Key
- Description string
- Description of the resource.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Parent
Id string - Parent Entity Identifier of the API Key
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Account
Id string - Account Identifier for the Entity
- Apikey
Type string - Type of the API Key
- Default
Time intTo Expire Token - Default expiration time of the Token within API Key
- Description string
- Description of the resource.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Parent
Id string - Parent Entity Identifier of the API Key
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- account
Id String - Account Identifier for the Entity
- apikey
Type String - Type of the API Key
- default
Time IntegerTo Expire Token - Default expiration time of the Token within API Key
- description String
- Description of the resource.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- parent
Id String - Parent Entity Identifier of the API Key
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- account
Id string - Account Identifier for the Entity
- apikey
Type string - Type of the API Key
- default
Time numberTo Expire Token - Default expiration time of the Token within API Key
- description string
- Description of the resource.
- identifier string
- Unique identifier of the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- parent
Id string - Parent Entity Identifier of the API Key
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- account_
id str - Account Identifier for the Entity
- apikey_
type str - Type of the API Key
- default_
time_ intto_ expire_ token - Default expiration time of the Token within API Key
- description str
- Description of the resource.
- identifier str
- Unique identifier of the resource.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- parent_
id str - Parent Entity Identifier of the API Key
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- account
Id String - Account Identifier for the Entity
- apikey
Type String - Type of the API Key
- default
Time NumberTo Expire Token - Default expiration time of the Token within API Key
- description String
- Description of the resource.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- parent
Id String - Parent Entity Identifier of the API Key
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
Import
Import account level apikey
$ pulumi import harness:index/platformApiKey:PlatformApiKey harness_platform_apikey <parent_id>/<apikey_id>/<apikey_type>
Import org level apikey
$ pulumi import harness:index/platformApiKey:PlatformApiKey harness_platform_apikey <org_id>/<parent_id>/<apikey_id>/<apikey_type>
Import project level apikey
$ pulumi import harness:index/platformApiKey:PlatformApiKey harness_platform_apikey <org_id>/<project_id>/<parent_id>/<apikey_id>/<apikey_type>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.