import * as pulumi from "@pulumi/pulumi"; /** * Provides a Datadog `serviceAccessToken` resource. This can be used to create and manage Datadog service access tokens (SATs). A SAT is an access token scoped to a service account; this resource is intentionally limited to service-account-owned tokens. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as datadog from "@pulumi/datadog"; * * // Source the permissions for scoped tokens * const ddPerms = datadog.getPermissions({}); * // Create a long-lived Service Access Token (SAT) for monitor management * const monitorManagementToken = new datadog.ServiceAccessToken("monitor_management_token", { * serviceAccountId: "00000000-0000-1234-0000-000000000000", * name: "Monitor Management Service Access Token", * scopes: [ * ddPerms.then(ddPerms => ddPerms.permissions?.monitorsRead), * ddPerms.then(ddPerms => ddPerms.permissions?.monitorsWrite), * ], * }); * // Create a Service Access Token (SAT) with a fixed expiration date. * // The Datadog API caps expirations at 365 days from creation. expires_at is * // immutable after creation; to rotate it, destroy and re-create the resource. * const expiringToken = new datadog.ServiceAccessToken("expiring_token", { * serviceAccountId: "00000000-0000-1234-0000-000000000000", * name: "Short-lived CI Service Access Token", * scopes: [ddPerms.then(ddPerms => ddPerms.permissions?.dashboardsRead)], * expiresAt: "2027-01-01T00:00:00Z", * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Importing a service access token cannot import the value of the key. * * ```sh * $ pulumi import datadog:index/serviceAccessToken:ServiceAccessToken this ":" * ``` */ export declare class ServiceAccessToken extends pulumi.CustomResource { /** * Get an existing ServiceAccessToken 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, state?: ServiceAccessTokenState, opts?: pulumi.CustomResourceOptions): ServiceAccessToken; /** * Check whether an existing ServiceAccessToken resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: ServiceAccessTokenState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of ServiceAccessToken. 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 ServiceAccessToken; /** * Creation date of the access token, in RFC3339 format. */ readonly createdAt: pulumi.Output; /** * Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource. */ readonly expiresAt: pulumi.Output; /** * The value of the service access token. This value is only available at creation time and cannot be imported. */ readonly key: pulumi.Output; /** * Date the access token was last used, in RFC3339 format. Empty if the token has never been used. */ readonly lastUsedAt: pulumi.Output; /** * Name of the service access token. Must be non-empty. String length must be at least 1. */ readonly name: pulumi.Output; /** * The public portion of the access token, used for identification. */ readonly publicPortion: pulumi.Output; /** * Authorization scopes granted to the service access token. At least one scope is required. */ readonly scopes: pulumi.Output; /** * ID of the service account that owns this access token. */ readonly serviceAccountId: pulumi.Output; /** * Create a ServiceAccessToken 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: ServiceAccessTokenArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServiceAccessToken resources. */ export interface ServiceAccessTokenState { /** * Creation date of the access token, in RFC3339 format. */ createdAt?: pulumi.Input; /** * Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource. */ expiresAt?: pulumi.Input; /** * The value of the service access token. This value is only available at creation time and cannot be imported. */ key?: pulumi.Input; /** * Date the access token was last used, in RFC3339 format. Empty if the token has never been used. */ lastUsedAt?: pulumi.Input; /** * Name of the service access token. Must be non-empty. String length must be at least 1. */ name?: pulumi.Input; /** * The public portion of the access token, used for identification. */ publicPortion?: pulumi.Input; /** * Authorization scopes granted to the service access token. At least one scope is required. */ scopes?: pulumi.Input[] | undefined>; /** * ID of the service account that owns this access token. */ serviceAccountId?: pulumi.Input; } /** * The set of arguments for constructing a ServiceAccessToken resource. */ export interface ServiceAccessTokenArgs { /** * Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource. */ expiresAt?: pulumi.Input; /** * Name of the service access token. Must be non-empty. String length must be at least 1. */ name: pulumi.Input; /** * Authorization scopes granted to the service access token. At least one scope is required. */ scopes: pulumi.Input[]>; /** * ID of the service account that owns this access token. */ serviceAccountId: pulumi.Input; } //# sourceMappingURL=serviceAccessToken.d.ts.map