@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
96 lines (95 loc) • 3.61 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this resource to create Metal User API Key resources in Equinix Metal. 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.UserApiKey("test", {
* description: "Read-only user key",
* readOnly: true,
* });
* ```
*/
export declare class UserApiKey extends pulumi.CustomResource {
/**
* Get an existing UserApiKey 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?: UserApiKeyState, opts?: pulumi.CustomResourceOptions): UserApiKey;
/**
* Returns true if the given object is an instance of UserApiKey. 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 UserApiKey;
/**
* Description string for the User API Key resource.
* * `read-only` - (Required) Flag indicating whether the API key shoud be read-only.
*/
readonly description: 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>;
/**
* UUID of the owner of the API key.
*/
readonly userId: pulumi.Output<string>;
/**
* Create a UserApiKey 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: UserApiKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering UserApiKey resources.
*/
export interface UserApiKeyState {
/**
* Description string for the User API Key resource.
* * `read-only` - (Required) Flag indicating whether the API key shoud be read-only.
*/
description?: 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>;
/**
* UUID of the owner of the API key.
*/
userId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a UserApiKey resource.
*/
export interface UserApiKeyArgs {
/**
* Description string for the User API Key resource.
* * `read-only` - (Required) Flag indicating whether the API key shoud be read-only.
*/
description: pulumi.Input<string>;
/**
* Flag indicating whether the API key shoud be read-only
*/
readOnly: pulumi.Input<boolean>;
}