@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
125 lines (124 loc) • 3.95 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to get the ARNs and Names of IAM Users.
*
* ## Example Usage
*
* ### All users in an account
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const users = aws.iam.getUsers({});
* ```
*
* ### Users filtered by name regex
*
* Users whose username contains `abc`
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const users = aws.iam.getUsers({
* nameRegex: ".*abc.*",
* });
* ```
*
* ### Users filtered by path prefix
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const users = aws.iam.getUsers({
* pathPrefix: "/custom-path",
* });
* ```
*/
export declare function getUsers(args?: GetUsersArgs, opts?: pulumi.InvokeOptions): Promise<GetUsersResult>;
/**
* A collection of arguments for invoking getUsers.
*/
export interface GetUsersArgs {
/**
* Regex string to apply to the IAM users list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
*/
nameRegex?: string;
/**
* Path prefix for filtering the results. For example, the prefix `/division_abc/subdivision_xyz/` gets all users whose path starts with `/division_abc/subdivision_xyz/`. If it is not included, it defaults to a slash (`/`), listing all users. For more details, check out [list-users in the AWS CLI reference][1].
*/
pathPrefix?: string;
}
/**
* A collection of values returned by getUsers.
*/
export interface GetUsersResult {
/**
* Set of ARNs of the matched IAM users.
*/
readonly arns: string[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly nameRegex?: string;
/**
* Set of Names of the matched IAM users.
*/
readonly names: string[];
readonly pathPrefix?: string;
}
/**
* Use this data source to get the ARNs and Names of IAM Users.
*
* ## Example Usage
*
* ### All users in an account
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const users = aws.iam.getUsers({});
* ```
*
* ### Users filtered by name regex
*
* Users whose username contains `abc`
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const users = aws.iam.getUsers({
* nameRegex: ".*abc.*",
* });
* ```
*
* ### Users filtered by path prefix
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const users = aws.iam.getUsers({
* pathPrefix: "/custom-path",
* });
* ```
*/
export declare function getUsersOutput(args?: GetUsersOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetUsersResult>;
/**
* A collection of arguments for invoking getUsers.
*/
export interface GetUsersOutputArgs {
/**
* Regex string to apply to the IAM users list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
*/
nameRegex?: pulumi.Input<string>;
/**
* Path prefix for filtering the results. For example, the prefix `/division_abc/subdivision_xyz/` gets all users whose path starts with `/division_abc/subdivision_xyz/`. If it is not included, it defaults to a slash (`/`), listing all users. For more details, check out [list-users in the AWS CLI reference][1].
*/
pathPrefix?: pulumi.Input<string>;
}