@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
169 lines (168 loc) • 5.89 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* The `scaleway.observability.Token` resource allows you to create and manage your Cockpit [tokens](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#tokens).
*
* Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information.
*
* ## Example Usage
*
* ### Use a Cockpit token
*
* The following commands allow you to:
*
* - create a Scaleway Project named `my-project`
* - create a Cockpit token named `my-awesome-token` inside the Project
* - assign `read` permissions to the token for metrics and logs
* - disable `write` permissions for metrics and logs
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const project = new scaleway.account.Project("project", {name: "my-project"});
* const main = new scaleway.observability.Token("main", {
* projectId: project.id,
* name: "my-awesome-token",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const project = new scaleway.account.Project("project", {name: "my-project"});
* // Create a token that can read metrics and logs but not write
* const main = new scaleway.observability.Token("main", {
* projectId: project.id,
* name: "my-awesome-token",
* scopes: {
* queryMetrics: true,
* writeMetrics: false,
* queryLogs: true,
* writeLogs: false,
* },
* });
* ```
*
* ## Import
*
* This section explains how to import a Cockpit token using the `{region}/{id}` format.
*
* bash
*
* ```sh
* $ pulumi import scaleway:index/cockpitToken:CockpitToken main fr-par/11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/cockpittoken.CockpitToken has been deprecated in favor of scaleway.observability/token.Token
*/
export declare class CockpitToken extends pulumi.CustomResource {
/**
* Get an existing CockpitToken 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?: CockpitTokenState, opts?: pulumi.CustomResourceOptions): CockpitToken;
/**
* Returns true if the given object is an instance of CockpitToken. 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 CockpitToken;
/**
* The date and time of the creation of the Cockpit Token (Format ISO 8601)
*/
readonly createdAt: pulumi.Output<string>;
/**
* The name of the token.
*/
readonly name: pulumi.Output<string>;
/**
* ) The ID of the Project the Cockpit is associated with.
*/
readonly projectId: pulumi.Output<string>;
/**
* ) The region where the Cockpit token is located.
*/
readonly region: pulumi.Output<string>;
/**
* Scopes allowed, each with default values:
*/
readonly scopes: pulumi.Output<outputs.CockpitTokenScopes>;
/**
* The secret key of the token.
*/
readonly secretKey: pulumi.Output<string>;
/**
* The date and time of the last update of the Cockpit Token (Format ISO 8601)
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a CockpitToken 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.
*/
/** @deprecated scaleway.index/cockpittoken.CockpitToken has been deprecated in favor of scaleway.observability/token.Token */
constructor(name: string, args?: CockpitTokenArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CockpitToken resources.
*/
export interface CockpitTokenState {
/**
* The date and time of the creation of the Cockpit Token (Format ISO 8601)
*/
createdAt?: pulumi.Input<string>;
/**
* The name of the token.
*/
name?: pulumi.Input<string>;
/**
* ) The ID of the Project the Cockpit is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* ) The region where the Cockpit token is located.
*/
region?: pulumi.Input<string>;
/**
* Scopes allowed, each with default values:
*/
scopes?: pulumi.Input<inputs.CockpitTokenScopes>;
/**
* The secret key of the token.
*/
secretKey?: pulumi.Input<string>;
/**
* The date and time of the last update of the Cockpit Token (Format ISO 8601)
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a CockpitToken resource.
*/
export interface CockpitTokenArgs {
/**
* The name of the token.
*/
name?: pulumi.Input<string>;
/**
* ) The ID of the Project the Cockpit is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* ) The region where the Cockpit token is located.
*/
region?: pulumi.Input<string>;
/**
* Scopes allowed, each with default values:
*/
scopes?: pulumi.Input<inputs.CockpitTokenScopes>;
}