import * as pulumi from "@pulumi/pulumi"; /** * The `pinecone.ApiKey` resource lets you create and manage API keys in Pinecone. Learn more about API keys in the [docs](https://docs.pinecone.io/guides/authentication/api-keys). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pinecone from "@pulumi/pinecone"; * * // Create API key with default roles (ProjectEditor) * const example = new pinecone.ApiKey("example", { * name: "example-api-key", * projectId: "your-project-id", * }); * // Create API key with custom roles * const customRoles = new pinecone.ApiKey("custom_roles", { * name: "custom-roles-api-key", * projectId: "your-project-id", * roles: [ * "ProjectViewer", * "DataPlaneViewer", * ], * }); * // Create an API key that can be updated later * const updatable = new pinecone.ApiKey("updatable", { * name: "example-updatable-key", * projectId: "your-project-id", * roles: ["ProjectEditor"], * }); * export const apiKeyRoles = example.roles; * ``` */ export declare class ApiKey extends pulumi.CustomResource { /** * Get an existing ApiKey resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ApiKeyState, opts?: pulumi.CustomResourceOptions): ApiKey; /** * Returns true if the given object is an instance of ApiKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ApiKey; /** * The generated API key value. */ readonly key: pulumi.Output; /** * The name of the API key to be created. Must be 1-80 characters long. */ readonly name: pulumi.Output; /** * The project ID where the API key will be created. Required for creation, optional for updates. */ readonly projectId: pulumi.Output; /** * The roles assigned to the API key. Valid values are: ProjectEditor, ProjectViewer, ControlPlaneEditor, ControlPlaneViewer, DataPlaneEditor, DataPlaneViewer. Defaults to ["ProjectEditor"]. */ readonly roles: pulumi.Output; /** * Create a ApiKey resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ApiKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ApiKey resources. */ export interface ApiKeyState { /** * The generated API key value. */ key?: pulumi.Input; /** * The name of the API key to be created. Must be 1-80 characters long. */ name?: pulumi.Input; /** * The project ID where the API key will be created. Required for creation, optional for updates. */ projectId?: pulumi.Input; /** * The roles assigned to the API key. Valid values are: ProjectEditor, ProjectViewer, ControlPlaneEditor, ControlPlaneViewer, DataPlaneEditor, DataPlaneViewer. Defaults to ["ProjectEditor"]. */ roles?: pulumi.Input[]>; } /** * The set of arguments for constructing a ApiKey resource. */ export interface ApiKeyArgs { /** * The name of the API key to be created. Must be 1-80 characters long. */ name?: pulumi.Input; /** * The project ID where the API key will be created. Required for creation, optional for updates. */ projectId?: pulumi.Input; /** * The roles assigned to the API key. Valid values are: ProjectEditor, ProjectViewer, ControlPlaneEditor, ControlPlaneViewer, DataPlaneEditor, DataPlaneViewer. Defaults to ["ProjectEditor"]. */ roles?: pulumi.Input[]>; }