@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
101 lines (100 loc) • 3.94 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this resource to create Metal Project API Key resources in Equinix Metal. Project API keys can be used to create and read resources in a single project. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`).
*
* Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.
*
* ## Example Usage
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = new equinix.metal.ProjectApiKey("test", {
* projectId: existingProjectId,
* description: "Read-only key scoped to a projct",
* readOnly: true,
* });
* ```
*/
export declare class ProjectApiKey extends pulumi.CustomResource {
/**
* Get an existing ProjectApiKey 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<pulumi.ID>, state?: ProjectApiKeyState, opts?: pulumi.CustomResourceOptions): ProjectApiKey;
/**
* Returns true if the given object is an instance of ProjectApiKey. 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 ProjectApiKey;
/**
* Description string for the Project API Key resource.
* * `read-only` - (Optional) Flag indicating whether the API key shoud be read-only.
*/
readonly description: pulumi.Output<string>;
/**
* UUID of the project where the API key is scoped to.
*/
readonly projectId: pulumi.Output<string>;
/**
* Flag indicating whether the API key shoud be read-only
*/
readonly readOnly: pulumi.Output<boolean>;
/**
* API token which can be used in Equinix Metal API clients
*/
readonly token: pulumi.Output<string>;
/**
* Create a ProjectApiKey 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: ProjectApiKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ProjectApiKey resources.
*/
export interface ProjectApiKeyState {
/**
* Description string for the Project API Key resource.
* * `read-only` - (Optional) Flag indicating whether the API key shoud be read-only.
*/
description?: pulumi.Input<string>;
/**
* UUID of the project where the API key is scoped to.
*/
projectId?: pulumi.Input<string>;
/**
* Flag indicating whether the API key shoud be read-only
*/
readOnly?: pulumi.Input<boolean>;
/**
* API token which can be used in Equinix Metal API clients
*/
token?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ProjectApiKey resource.
*/
export interface ProjectApiKeyArgs {
/**
* Description string for the Project API Key resource.
* * `read-only` - (Optional) Flag indicating whether the API key shoud be read-only.
*/
description: pulumi.Input<string>;
/**
* UUID of the project where the API key is scoped to.
*/
projectId: pulumi.Input<string>;
/**
* Flag indicating whether the API key shoud be read-only
*/
readOnly: pulumi.Input<boolean>;
}