1. Packages
  2. Harness
  3. API Docs
  4. PlatformApiKey
Harness v0.2.1 published on Friday, Jul 26, 2024 by Pulumi

harness.PlatformApiKey

Explore with Pulumi AI

harness logo
Harness v0.2.1 published on Friday, Jul 26, 2024 by Pulumi

    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:

    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    Identifier string
    Unique identifier of the resource.
    ParentId string
    Parent Entity Identifier of the API Key
    DefaultTimeToExpireToken int
    Default expiration time of the Token within API Key
    Description string
    Description of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags List<string>
    Tags to associate with the resource.
    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    Identifier string
    Unique identifier of the resource.
    ParentId string
    Parent Entity Identifier of the API Key
    DefaultTimeToExpireToken int
    Default expiration time of the Token within API Key
    Description string
    Description of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags []string
    Tags to associate with the resource.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    identifier String
    Unique identifier of the resource.
    parentId String
    Parent Entity Identifier of the API Key
    defaultTimeToExpireToken Integer
    Default expiration time of the Token within API Key
    description String
    Description of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.
    accountId string
    Account Identifier for the Entity
    apikeyType string
    Type of the API Key
    identifier string
    Unique identifier of the resource.
    parentId string
    Parent Entity Identifier of the API Key
    defaultTimeToExpireToken number
    Default expiration time of the Token within API Key
    description string
    Description of the resource.
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    tags 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_to_expire_token int
    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.
    tags Sequence[str]
    Tags to associate with the resource.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    identifier String
    Unique identifier of the resource.
    parentId String
    Parent Entity Identifier of the API Key
    defaultTimeToExpireToken Number
    Default expiration time of the Token within API Key
    description String
    Description of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags 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.
    The following state arguments are supported:
    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    DefaultTimeToExpireToken int
    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.
    OrgId string
    Unique identifier of the organization.
    ParentId string
    Parent Entity Identifier of the API Key
    ProjectId string
    Unique identifier of the project.
    Tags List<string>
    Tags to associate with the resource.
    AccountId string
    Account Identifier for the Entity
    ApikeyType string
    Type of the API Key
    DefaultTimeToExpireToken int
    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.
    OrgId string
    Unique identifier of the organization.
    ParentId string
    Parent Entity Identifier of the API Key
    ProjectId string
    Unique identifier of the project.
    Tags []string
    Tags to associate with the resource.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    defaultTimeToExpireToken Integer
    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.
    orgId String
    Unique identifier of the organization.
    parentId String
    Parent Entity Identifier of the API Key
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.
    accountId string
    Account Identifier for the Entity
    apikeyType string
    Type of the API Key
    defaultTimeToExpireToken number
    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.
    orgId string
    Unique identifier of the organization.
    parentId string
    Parent Entity Identifier of the API Key
    projectId string
    Unique identifier of the project.
    tags 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_to_expire_token int
    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.
    tags Sequence[str]
    Tags to associate with the resource.
    accountId String
    Account Identifier for the Entity
    apikeyType String
    Type of the API Key
    defaultTimeToExpireToken Number
    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.
    orgId String
    Unique identifier of the organization.
    parentId String
    Parent Entity Identifier of the API Key
    projectId String
    Unique identifier of the project.
    tags 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.
    harness logo
    Harness v0.2.1 published on Friday, Jul 26, 2024 by Pulumi