import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * * [Official documentation](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/) * * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#create-an-access-policy) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * import * as grafana from "@pulumi/grafana"; * * const current = grafana.getCloudOrganization({ * slug: "", * }); * const testCloudAccessPolicy = new grafana.CloudAccessPolicy("testCloudAccessPolicy", { * region: "us", * displayName: "My Policy", * scopes: [ * "metrics:read", * "logs:read", * ], * realms: [{ * type: "org", * identifier: current.then(current => current.id), * labelPolicies: [{ * selector: "{namespace=\"default\"}", * }], * }], * }); * const testCloudAccessPolicyToken = new grafana.CloudAccessPolicyToken("testCloudAccessPolicyToken", { * region: "us", * accessPolicyId: testCloudAccessPolicy.policyId, * displayName: "My Policy Token", * expiresAt: "2023-01-01T00:00:00Z", * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/cloudAccessPolicy:CloudAccessPolicy policyname {{region}}/{{policy_id}} * ``` */ export declare class CloudAccessPolicy extends pulumi.CustomResource { /** * Get an existing CloudAccessPolicy 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?: CloudAccessPolicyState, opts?: pulumi.CustomResourceOptions): CloudAccessPolicy; /** * Returns true if the given object is an instance of CloudAccessPolicy. 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 CloudAccessPolicy; /** * Creation date of the access policy. */ readonly createdAt: pulumi.Output; /** * Display name of the access policy. Defaults to the name. */ readonly displayName: pulumi.Output; /** * Name of the access policy. */ readonly name: pulumi.Output; /** * ID of the access policy. */ readonly policyId: pulumi.Output; readonly realms: pulumi.Output; /** * Region where the API is deployed. Generally where the stack is deployed. 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; /** * Scopes of the access policy. See https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/#scopes for possible values. */ readonly scopes: pulumi.Output; /** * Last update date of the access policy. */ readonly updatedAt: pulumi.Output; /** * Create a CloudAccessPolicy 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: CloudAccessPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CloudAccessPolicy resources. */ export interface CloudAccessPolicyState { /** * Creation date of the access policy. */ createdAt?: pulumi.Input; /** * Display name of the access policy. Defaults to the name. */ displayName?: pulumi.Input; /** * Name of the access policy. */ name?: pulumi.Input; /** * ID of the access policy. */ policyId?: pulumi.Input; realms?: pulumi.Input[]>; /** * Region where the API is deployed. Generally where the stack is deployed. 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; /** * Scopes of the access policy. See https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/#scopes for possible values. */ scopes?: pulumi.Input[]>; /** * Last update date of the access policy. */ updatedAt?: pulumi.Input; } /** * The set of arguments for constructing a CloudAccessPolicy resource. */ export interface CloudAccessPolicyArgs { /** * Display name of the access policy. Defaults to the name. */ displayName?: pulumi.Input; /** * Name of the access policy. */ name?: pulumi.Input; realms: pulumi.Input[]>; /** * Region where the API is deployed. Generally where the stack is deployed. 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; /** * Scopes of the access policy. See https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/#scopes for possible values. */ scopes: pulumi.Input[]>; }