@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
163 lines (162 loc) • 5.92 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The `dynatrace.Credentials` data source queries for Credentials stored within the Credentials Vault using the properties `name`, `scope` and `type`. At least one of `name`, `scope` or `type` needs to be specified as a non empty value. Combinations of the three properties are also possible.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumi/dynatrace";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const creds = dynatrace.getCredentials({
* name: "Office365 Access Token",
* });
* const _name_ = new dynatrace.HttpMonitor("#name#", {
* enabled: true,
* frequency: 60,
* locations: ["SYNTHETIC_LOCATION-781752216580B1BC"],
* anomalyDetections: [{
* loadingTimeThresholds: [{
* enabled: true,
* }],
* outageHandlings: [{
* globalOutage: true,
* localOutage: false,
* retryOnError: false,
* }],
* }],
* script: {
* requests: [{
* description: "google.com",
* method: "GET",
* url: "https://www.google.com",
* authentication: {
* type: "BASIC_AUTHENTICATION",
* credentials: creds.then(creds => creds.id),
* },
* configuration: {
* acceptAnyCertificate: true,
* followRedirects: true,
* },
* validation: {
* rules: [{
* type: "httpStatusesList",
* passIfFound: false,
* value: ">=400",
* }],
* },
* }],
* },
* });
* ```
*/
export declare function getCredentials(args?: GetCredentialsArgs, opts?: pulumi.InvokeOptions): Promise<GetCredentialsResult>;
/**
* A collection of arguments for invoking getCredentials.
*/
export interface GetCredentialsArgs {
/**
* The name of the credential as shown within the Dynatrace WebUI. If not specified all names will match
*/
name?: string;
/**
* The scope of the credential. Possible values are `ALL`, `EXTENSION` and `SYNTHETIC`. If not specified all scopes will match.
*/
scope?: string;
/**
* The type of the credential. Possible values are `CERTIFICATE`, `PUBLIC_CERTIFICATE`, `TOKEN`, `USERNAME_PASSWORD` and `UNKNOWN`. If not specified all credential types will match
*/
type?: string;
}
/**
* A collection of values returned by getCredentials.
*/
export interface GetCredentialsResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The name of the credential as shown within the Dynatrace WebUI. If not specified all names will match
*/
readonly name?: string;
/**
* The scope of the credential. Possible values are `ALL`, `EXTENSION` and `SYNTHETIC`. If not specified all scopes will match.
*/
readonly scope?: string;
/**
* The type of the credential. Possible values are `CERTIFICATE`, `PUBLIC_CERTIFICATE`, `TOKEN`, `USERNAME_PASSWORD` and `UNKNOWN`. If not specified all credential types will match
*/
readonly type?: string;
}
/**
* The `dynatrace.Credentials` data source queries for Credentials stored within the Credentials Vault using the properties `name`, `scope` and `type`. At least one of `name`, `scope` or `type` needs to be specified as a non empty value. Combinations of the three properties are also possible.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumi/dynatrace";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const creds = dynatrace.getCredentials({
* name: "Office365 Access Token",
* });
* const _name_ = new dynatrace.HttpMonitor("#name#", {
* enabled: true,
* frequency: 60,
* locations: ["SYNTHETIC_LOCATION-781752216580B1BC"],
* anomalyDetections: [{
* loadingTimeThresholds: [{
* enabled: true,
* }],
* outageHandlings: [{
* globalOutage: true,
* localOutage: false,
* retryOnError: false,
* }],
* }],
* script: {
* requests: [{
* description: "google.com",
* method: "GET",
* url: "https://www.google.com",
* authentication: {
* type: "BASIC_AUTHENTICATION",
* credentials: creds.then(creds => creds.id),
* },
* configuration: {
* acceptAnyCertificate: true,
* followRedirects: true,
* },
* validation: {
* rules: [{
* type: "httpStatusesList",
* passIfFound: false,
* value: ">=400",
* }],
* },
* }],
* },
* });
* ```
*/
export declare function getCredentialsOutput(args?: GetCredentialsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCredentialsResult>;
/**
* A collection of arguments for invoking getCredentials.
*/
export interface GetCredentialsOutputArgs {
/**
* The name of the credential as shown within the Dynatrace WebUI. If not specified all names will match
*/
name?: pulumi.Input<string>;
/**
* The scope of the credential. Possible values are `ALL`, `EXTENSION` and `SYNTHETIC`. If not specified all scopes will match.
*/
scope?: pulumi.Input<string>;
/**
* The type of the credential. Possible values are `CERTIFICATE`, `PUBLIC_CERTIFICATE`, `TOKEN`, `USERNAME_PASSWORD` and `UNKNOWN`. If not specified all credential types will match
*/
type?: pulumi.Input<string>;
}