harness.platform.FeatureFlagApiKey
Explore with Pulumi AI
Resource for creating an environment SDK key for Feature Flags.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const testserverapikey = new harness.platform.FeatureFlagApiKey("testserverapikey", {
identifier: "testserver",
name: "TestServer",
description: "this is a server SDK key",
orgId: "test",
projectId: "testff",
envId: "testenv",
expiredAt: 1713729225,
type: "Server",
});
export const serversdkkey = testserverapikey.apiKey;
import pulumi
import pulumi_harness as harness
testserverapikey = harness.platform.FeatureFlagApiKey("testserverapikey",
identifier="testserver",
name="TestServer",
description="this is a server SDK key",
org_id="test",
project_id="testff",
env_id="testenv",
expired_at=1713729225,
type="Server")
pulumi.export("serversdkkey", testserverapikey.api_key)
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testserverapikey, err := platform.NewFeatureFlagApiKey(ctx, "testserverapikey", &platform.FeatureFlagApiKeyArgs{
Identifier: pulumi.String("testserver"),
Name: pulumi.String("TestServer"),
Description: pulumi.String("this is a server SDK key"),
OrgId: pulumi.String("test"),
ProjectId: pulumi.String("testff"),
EnvId: pulumi.String("testenv"),
ExpiredAt: pulumi.Int(1713729225),
Type: pulumi.String("Server"),
})
if err != nil {
return err
}
ctx.Export("serversdkkey", testserverapikey.ApiKey)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var testserverapikey = new Harness.Platform.FeatureFlagApiKey("testserverapikey", new()
{
Identifier = "testserver",
Name = "TestServer",
Description = "this is a server SDK key",
OrgId = "test",
ProjectId = "testff",
EnvId = "testenv",
ExpiredAt = 1713729225,
Type = "Server",
});
return new Dictionary<string, object?>
{
["serversdkkey"] = testserverapikey.ApiKey,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.FeatureFlagApiKey;
import com.pulumi.harness.platform.FeatureFlagApiKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testserverapikey = new FeatureFlagApiKey("testserverapikey", FeatureFlagApiKeyArgs.builder()
.identifier("testserver")
.name("TestServer")
.description("this is a server SDK key")
.orgId("test")
.projectId("testff")
.envId("testenv")
.expiredAt(1713729225)
.type("Server")
.build());
ctx.export("serversdkkey", testserverapikey.apiKey());
}
}
resources:
testserverapikey:
type: harness:platform:FeatureFlagApiKey
properties:
identifier: testserver
name: TestServer
description: this is a server SDK key
orgId: test
projectId: testff
envId: testenv
expiredAt: 1.713729225e+09
type: Server
outputs:
serversdkkey: ${testserverapikey.apiKey}
Create FeatureFlagApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FeatureFlagApiKey(name: string, args: FeatureFlagApiKeyArgs, opts?: CustomResourceOptions);
@overload
def FeatureFlagApiKey(resource_name: str,
args: FeatureFlagApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FeatureFlagApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
env_id: Optional[str] = None,
identifier: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
type: Optional[str] = None,
description: Optional[str] = None,
expired_at: Optional[int] = None,
name: Optional[str] = None)
func NewFeatureFlagApiKey(ctx *Context, name string, args FeatureFlagApiKeyArgs, opts ...ResourceOption) (*FeatureFlagApiKey, error)
public FeatureFlagApiKey(string name, FeatureFlagApiKeyArgs args, CustomResourceOptions? opts = null)
public FeatureFlagApiKey(String name, FeatureFlagApiKeyArgs args)
public FeatureFlagApiKey(String name, FeatureFlagApiKeyArgs args, CustomResourceOptions options)
type: harness:platform:FeatureFlagApiKey
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 FeatureFlagApiKeyArgs
- 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 FeatureFlagApiKeyArgs
- 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 FeatureFlagApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FeatureFlagApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FeatureFlagApiKeyArgs
- 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 featureFlagApiKeyResource = new Harness.Platform.FeatureFlagApiKey("featureFlagApiKeyResource", new()
{
EnvId = "string",
Identifier = "string",
OrgId = "string",
ProjectId = "string",
Type = "string",
Description = "string",
ExpiredAt = 0,
Name = "string",
});
example, err := platform.NewFeatureFlagApiKey(ctx, "featureFlagApiKeyResource", &platform.FeatureFlagApiKeyArgs{
EnvId: pulumi.String("string"),
Identifier: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
ExpiredAt: pulumi.Int(0),
Name: pulumi.String("string"),
})
var featureFlagApiKeyResource = new FeatureFlagApiKey("featureFlagApiKeyResource", FeatureFlagApiKeyArgs.builder()
.envId("string")
.identifier("string")
.orgId("string")
.projectId("string")
.type("string")
.description("string")
.expiredAt(0)
.name("string")
.build());
feature_flag_api_key_resource = harness.platform.FeatureFlagApiKey("featureFlagApiKeyResource",
env_id="string",
identifier="string",
org_id="string",
project_id="string",
type="string",
description="string",
expired_at=0,
name="string")
const featureFlagApiKeyResource = new harness.platform.FeatureFlagApiKey("featureFlagApiKeyResource", {
envId: "string",
identifier: "string",
orgId: "string",
projectId: "string",
type: "string",
description: "string",
expiredAt: 0,
name: "string",
});
type: harness:platform:FeatureFlagApiKey
properties:
description: string
envId: string
expiredAt: 0
identifier: string
name: string
orgId: string
projectId: string
type: string
FeatureFlagApiKey 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 FeatureFlagApiKey resource accepts the following input properties:
- Env
Id string - Environment Identifier
- Identifier string
- Identifier of the SDK API Key
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Type string
- Type of SDK. Valid values are
Server
orClient
. - Description string
- Description of the SDK API Key
- Expired
At int - Expiration datetime of the SDK API Key
- Name string
- Name of the SDK API Key
- Env
Id string - Environment Identifier
- Identifier string
- Identifier of the SDK API Key
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Type string
- Type of SDK. Valid values are
Server
orClient
. - Description string
- Description of the SDK API Key
- Expired
At int - Expiration datetime of the SDK API Key
- Name string
- Name of the SDK API Key
- env
Id String - Environment Identifier
- identifier String
- Identifier of the SDK API Key
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- type String
- Type of SDK. Valid values are
Server
orClient
. - description String
- Description of the SDK API Key
- expired
At Integer - Expiration datetime of the SDK API Key
- name String
- Name of the SDK API Key
- env
Id string - Environment Identifier
- identifier string
- Identifier of the SDK API Key
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- type string
- Type of SDK. Valid values are
Server
orClient
. - description string
- Description of the SDK API Key
- expired
At number - Expiration datetime of the SDK API Key
- name string
- Name of the SDK API Key
- env_
id str - Environment Identifier
- identifier str
- Identifier of the SDK API Key
- org_
id str - Organization Identifier
- project_
id str - Project Identifier
- type str
- Type of SDK. Valid values are
Server
orClient
. - description str
- Description of the SDK API Key
- expired_
at int - Expiration datetime of the SDK API Key
- name str
- Name of the SDK API Key
- env
Id String - Environment Identifier
- identifier String
- Identifier of the SDK API Key
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- type String
- Type of SDK. Valid values are
Server
orClient
. - description String
- Description of the SDK API Key
- expired
At Number - Expiration datetime of the SDK API Key
- name String
- Name of the SDK API Key
Outputs
All input properties are implicitly available as output properties. Additionally, the FeatureFlagApiKey resource produces the following output properties:
Look up Existing FeatureFlagApiKey Resource
Get an existing FeatureFlagApiKey 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?: FeatureFlagApiKeyState, opts?: CustomResourceOptions): FeatureFlagApiKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
description: Optional[str] = None,
env_id: Optional[str] = None,
expired_at: Optional[int] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
type: Optional[str] = None) -> FeatureFlagApiKey
func GetFeatureFlagApiKey(ctx *Context, name string, id IDInput, state *FeatureFlagApiKeyState, opts ...ResourceOption) (*FeatureFlagApiKey, error)
public static FeatureFlagApiKey Get(string name, Input<string> id, FeatureFlagApiKeyState? state, CustomResourceOptions? opts = null)
public static FeatureFlagApiKey get(String name, Output<String> id, FeatureFlagApiKeyState 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.
- Api
Key string - The value of the SDK API Key
- Description string
- Description of the SDK API Key
- Env
Id string - Environment Identifier
- Expired
At int - Expiration datetime of the SDK API Key
- Identifier string
- Identifier of the SDK API Key
- Name string
- Name of the SDK API Key
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Type string
- Type of SDK. Valid values are
Server
orClient
.
- Api
Key string - The value of the SDK API Key
- Description string
- Description of the SDK API Key
- Env
Id string - Environment Identifier
- Expired
At int - Expiration datetime of the SDK API Key
- Identifier string
- Identifier of the SDK API Key
- Name string
- Name of the SDK API Key
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Type string
- Type of SDK. Valid values are
Server
orClient
.
- api
Key String - The value of the SDK API Key
- description String
- Description of the SDK API Key
- env
Id String - Environment Identifier
- expired
At Integer - Expiration datetime of the SDK API Key
- identifier String
- Identifier of the SDK API Key
- name String
- Name of the SDK API Key
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- type String
- Type of SDK. Valid values are
Server
orClient
.
- api
Key string - The value of the SDK API Key
- description string
- Description of the SDK API Key
- env
Id string - Environment Identifier
- expired
At number - Expiration datetime of the SDK API Key
- identifier string
- Identifier of the SDK API Key
- name string
- Name of the SDK API Key
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- type string
- Type of SDK. Valid values are
Server
orClient
.
- api_
key str - The value of the SDK API Key
- description str
- Description of the SDK API Key
- env_
id str - Environment Identifier
- expired_
at int - Expiration datetime of the SDK API Key
- identifier str
- Identifier of the SDK API Key
- name str
- Name of the SDK API Key
- org_
id str - Organization Identifier
- project_
id str - Project Identifier
- type str
- Type of SDK. Valid values are
Server
orClient
.
- api
Key String - The value of the SDK API Key
- description String
- Description of the SDK API Key
- env
Id String - Environment Identifier
- expired
At Number - Expiration datetime of the SDK API Key
- identifier String
- Identifier of the SDK API Key
- name String
- Name of the SDK API Key
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- type String
- Type of SDK. Valid values are
Server
orClient
.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.