@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
74 lines (73 loc) • 3.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Use this data source to get information about the purchased [licenses](https://developer.pagerduty.com/api-reference/4c10cb38f7381-list-licenses) that you can use for other managing PagerDuty user resources. To reference a unique license, see `pagerduty.getLicense` [data source](https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/data-sources/pagerduty_license). After applying changes to users' licenses, the `currentValue` and `allocationsAvailable` attributes of licenses will change.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const invalidRoles = ["owner"];
* const licenses = pagerduty.getLicenses({});
* const example = new pagerduty.User("example", {
* name: "Earline Greenholt",
* email: "125.greenholt.earline@graham.name",
* license: licenses.then(licenses => licenses.licenses?.[0]?.id),
* role: "user",
* });
* ```
*/
export declare function getLicenses(args?: GetLicensesArgs, opts?: pulumi.InvokeOptions): Promise<GetLicensesResult>;
/**
* A collection of arguments for invoking getLicenses.
*/
export interface GetLicensesArgs {
/**
* Allows to override the default behavior for setting the `id` attribute that is required for data sources.
*/
id?: string;
}
/**
* A collection of values returned by getLicenses.
*/
export interface GetLicensesResult {
/**
* ID of the license
*/
readonly id?: string;
/**
* The list of purchased licenses.
*/
readonly licenses: outputs.GetLicensesLicense[];
}
/**
* Use this data source to get information about the purchased [licenses](https://developer.pagerduty.com/api-reference/4c10cb38f7381-list-licenses) that you can use for other managing PagerDuty user resources. To reference a unique license, see `pagerduty.getLicense` [data source](https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/data-sources/pagerduty_license). After applying changes to users' licenses, the `currentValue` and `allocationsAvailable` attributes of licenses will change.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const invalidRoles = ["owner"];
* const licenses = pagerduty.getLicenses({});
* const example = new pagerduty.User("example", {
* name: "Earline Greenholt",
* email: "125.greenholt.earline@graham.name",
* license: licenses.then(licenses => licenses.licenses?.[0]?.id),
* role: "user",
* });
* ```
*/
export declare function getLicensesOutput(args?: GetLicensesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetLicensesResult>;
/**
* A collection of arguments for invoking getLicenses.
*/
export interface GetLicensesOutputArgs {
/**
* Allows to override the default behavior for setting the `id` attribute that is required for data sources.
*/
id?: pulumi.Input<string>;
}