@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
154 lines (153 loc) • 6.32 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* * [Official documentation](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/)
* * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#create-a-token)
*
* Required access policy scopes:
*
* * accesspolicies:read
* * accesspolicies:write
* * accesspolicies:delete
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const current = grafana.cloud.getStack({
* slug: "<your slug>",
* });
* const test = new grafana.cloud.PrivateDataSourceConnectNetwork("test", {
* region: "prod-us-east-0",
* name: "my-pdc",
* displayName: "My PDC",
* stackIdentifier: current.then(current => current.id),
* });
* const testPrivateDataSourceConnectNetworkToken = new grafana.cloud.PrivateDataSourceConnectNetworkToken("test", {
* pdcNetworkId: test.pdcNetworkId,
* region: test.region,
* name: "my-pdc-token",
* displayName: "My PDC Token",
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_cloud_private_data_source_connect_network_token.name "{{ region }}:{{ tokenId }}"
* ```
*/
export declare class PrivateDataSourceConnectNetworkToken extends pulumi.CustomResource {
/**
* Get an existing PrivateDataSourceConnectNetworkToken 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?: PrivateDataSourceConnectNetworkTokenState, opts?: pulumi.CustomResourceOptions): PrivateDataSourceConnectNetworkToken;
/**
* Returns true if the given object is an instance of PrivateDataSourceConnectNetworkToken. 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 PrivateDataSourceConnectNetworkToken;
/**
* Creation date of the private data source network token.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Display name of the private data source network token. Defaults to the name.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* Expiration date of the private data source network token. Does not expire by default.
*/
readonly expiresAt: pulumi.Output<string | undefined>;
/**
* Name of the private data source network token.
*/
readonly name: pulumi.Output<string>;
/**
* ID of the private data source network for which to create a token.
*/
readonly pdcNetworkId: pulumi.Output<string>;
/**
* Region of the private data source network. Should be set to the same region as the private data source network. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
*/
readonly region: pulumi.Output<string>;
readonly token: pulumi.Output<string>;
/**
* Last update date of the private data source network token.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a PrivateDataSourceConnectNetworkToken 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: PrivateDataSourceConnectNetworkTokenArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PrivateDataSourceConnectNetworkToken resources.
*/
export interface PrivateDataSourceConnectNetworkTokenState {
/**
* Creation date of the private data source network token.
*/
createdAt?: pulumi.Input<string>;
/**
* Display name of the private data source network token. Defaults to the name.
*/
displayName?: pulumi.Input<string>;
/**
* Expiration date of the private data source network token. Does not expire by default.
*/
expiresAt?: pulumi.Input<string>;
/**
* Name of the private data source network token.
*/
name?: pulumi.Input<string>;
/**
* ID of the private data source network for which to create a token.
*/
pdcNetworkId?: pulumi.Input<string>;
/**
* Region of the private data source network. Should be set to the same region as the private data source network. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
*/
region?: pulumi.Input<string>;
token?: pulumi.Input<string>;
/**
* Last update date of the private data source network token.
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a PrivateDataSourceConnectNetworkToken resource.
*/
export interface PrivateDataSourceConnectNetworkTokenArgs {
/**
* Display name of the private data source network token. Defaults to the name.
*/
displayName?: pulumi.Input<string>;
/**
* Expiration date of the private data source network token. Does not expire by default.
*/
expiresAt?: pulumi.Input<string>;
/**
* Name of the private data source network token.
*/
name?: pulumi.Input<string>;
/**
* ID of the private data source network for which to create a token.
*/
pdcNetworkId: pulumi.Input<string>;
/**
* Region of the private data source network. Should be set to the same region as the private data source network. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
*/
region: pulumi.Input<string>;
}