UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

130 lines 3.6 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to get information on an existing IAM policy based on its ID. * For more information refer to the [IAM API documentation](https://developers.scaleway.com/en/products/iam/api/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * // Get policy by id * const findById = scaleway.iam.getPolicy({ * policyId: "11111111-1111-1111-1111-111111111111", * }); * // Get policy by name * const findByName = scaleway.iam.getPolicy({ * name: "my_policy", * }); * ``` */ export declare function getPolicy(args?: GetPolicyArgs, opts?: pulumi.InvokeOptions): Promise<GetPolicyResult>; /** * A collection of arguments for invoking getPolicy. */ export interface GetPolicyArgs { /** * The name of the IAM policy. */ name?: string; /** * The ID of the IAM policy. * * > **Note** You must specify at least one: `name` and/or `policyId`. */ policyId?: string; } /** * A collection of values returned by getPolicy. */ export interface GetPolicyResult { /** * ID of the application the policy is linked to */ readonly applicationId: string; /** * The date and time of the creation of the policy. */ readonly createdAt: string; /** * The description of the IAM policy. */ readonly description: string; /** * Whether the policy is editable. */ readonly editable: boolean; /** * ID of the group the policy is linked to */ readonly groupId: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly name?: string; /** * If the policy doesn't apply to a principal. */ readonly noPrincipal: boolean; /** * ID of organization scoped to the rule. */ readonly organizationId: string; readonly policyId?: string; /** * List of rules in the policy. */ readonly rules: outputs.iam.GetPolicyRule[]; /** * The tags associated with the IAM policy. */ readonly tags: string[]; /** * The date and time of the last update of the policy. */ readonly updatedAt: string; /** * ID of the user the policy is linked to */ readonly userId: string; } /** * Use this data source to get information on an existing IAM policy based on its ID. * For more information refer to the [IAM API documentation](https://developers.scaleway.com/en/products/iam/api/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * // Get policy by id * const findById = scaleway.iam.getPolicy({ * policyId: "11111111-1111-1111-1111-111111111111", * }); * // Get policy by name * const findByName = scaleway.iam.getPolicy({ * name: "my_policy", * }); * ``` */ export declare function getPolicyOutput(args?: GetPolicyOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPolicyResult>; /** * A collection of arguments for invoking getPolicy. */ export interface GetPolicyOutputArgs { /** * The name of the IAM policy. */ name?: pulumi.Input<string | undefined>; /** * The ID of the IAM policy. * * > **Note** You must specify at least one: `name` and/or `policyId`. */ policyId?: pulumi.Input<string | undefined>; } //# sourceMappingURL=getPolicy.d.ts.map