@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
95 lines (94 loc) • 3.42 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to get a list of cognito user pools.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const selected = aws.apigateway.getRestApi({
* name: apiGatewayName,
* });
* const selectedGetUserPools = aws.cognito.getUserPools({
* name: cognitoUserPoolName,
* });
* const cognito = new aws.apigateway.Authorizer("cognito", {
* name: "cognito",
* type: "COGNITO_USER_POOLS",
* restApi: selected.then(selected => selected.id),
* providerArns: selectedGetUserPools.then(selectedGetUserPools => selectedGetUserPools.arns),
* });
* ```
*/
export declare function getUserPools(args: GetUserPoolsArgs, opts?: pulumi.InvokeOptions): Promise<GetUserPoolsResult>;
/**
* A collection of arguments for invoking getUserPools.
*/
export interface GetUserPoolsArgs {
/**
* Name of the cognito user pools. Name is not a unique attribute for cognito user pool, so multiple pools might be returned with given name. If the pool name is expected to be unique, you can reference the pool id via ```tolist(data.aws_cognito_user_pools.selected.ids)[0]```
*/
name: string;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
}
/**
* A collection of values returned by getUserPools.
*/
export interface GetUserPoolsResult {
/**
* Set of cognito user pool Amazon Resource Names (ARNs).
*/
readonly arns: string[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* Set of cognito user pool ids.
*/
readonly ids: string[];
readonly name: string;
readonly region: string;
}
/**
* Use this data source to get a list of cognito user pools.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const selected = aws.apigateway.getRestApi({
* name: apiGatewayName,
* });
* const selectedGetUserPools = aws.cognito.getUserPools({
* name: cognitoUserPoolName,
* });
* const cognito = new aws.apigateway.Authorizer("cognito", {
* name: "cognito",
* type: "COGNITO_USER_POOLS",
* restApi: selected.then(selected => selected.id),
* providerArns: selectedGetUserPools.then(selectedGetUserPools => selectedGetUserPools.arns),
* });
* ```
*/
export declare function getUserPoolsOutput(args: GetUserPoolsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetUserPoolsResult>;
/**
* A collection of arguments for invoking getUserPools.
*/
export interface GetUserPoolsOutputArgs {
/**
* Name of the cognito user pools. Name is not a unique attribute for cognito user pool, so multiple pools might be returned with given name. If the pool name is expected to be unique, you can reference the pool id via ```tolist(data.aws_cognito_user_pools.selected.ids)[0]```
*/
name: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}