UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

123 lines 5.47 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentityPool = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an AWS Cognito Identity Pool. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const _default = new aws.iam.SamlProvider("default", { * name: "my-saml-provider", * samlMetadataDocument: std.file({ * input: "saml-metadata.xml", * }).then(invoke => invoke.result), * }); * const main = new aws.cognito.IdentityPool("main", { * identityPoolName: "identity pool", * allowUnauthenticatedIdentities: false, * allowClassicFlow: false, * cognitoIdentityProviders: [ * { * clientId: "6lhlkkfbfb4q5kpp90urffae", * providerName: "cognito-idp.us-east-1.amazonaws.com/us-east-1_Tv0493apJ", * serverSideTokenCheck: false, * }, * { * clientId: "7kodkvfqfb4qfkp39eurffae", * providerName: "cognito-idp.us-east-1.amazonaws.com/eu-west-1_Zr231apJu", * serverSideTokenCheck: false, * }, * ], * supportedLoginProviders: { * "graph.facebook.com": "7346241598935552", * "accounts.google.com": "123456789012.apps.googleusercontent.com", * }, * samlProviderArns: [_default.arn], * openidConnectProviderArns: ["arn:aws:iam::123456789012:oidc-provider/id.example.com"], * }); * ``` * * ## Import * * Using `pulumi import`, import Cognito Identity Pool using its ID. For example: * * ```sh * $ pulumi import aws:cognito/identityPool:IdentityPool mypool us-west-2:1a234567-8901-234b-5cde-f6789g01h2i3 * ``` */ class IdentityPool extends pulumi.CustomResource { /** * Get an existing IdentityPool 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, id, state, opts) { return new IdentityPool(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of IdentityPool. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === IdentityPool.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowClassicFlow"] = state?.allowClassicFlow; resourceInputs["allowUnauthenticatedIdentities"] = state?.allowUnauthenticatedIdentities; resourceInputs["arn"] = state?.arn; resourceInputs["cognitoIdentityProviders"] = state?.cognitoIdentityProviders; resourceInputs["developerProviderName"] = state?.developerProviderName; resourceInputs["identityPoolName"] = state?.identityPoolName; resourceInputs["openidConnectProviderArns"] = state?.openidConnectProviderArns; resourceInputs["region"] = state?.region; resourceInputs["samlProviderArns"] = state?.samlProviderArns; resourceInputs["supportedLoginProviders"] = state?.supportedLoginProviders; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.identityPoolName === undefined && !opts.urn) { throw new Error("Missing required property 'identityPoolName'"); } resourceInputs["allowClassicFlow"] = args?.allowClassicFlow; resourceInputs["allowUnauthenticatedIdentities"] = args?.allowUnauthenticatedIdentities; resourceInputs["cognitoIdentityProviders"] = args?.cognitoIdentityProviders; resourceInputs["developerProviderName"] = args?.developerProviderName; resourceInputs["identityPoolName"] = args?.identityPoolName; resourceInputs["openidConnectProviderArns"] = args?.openidConnectProviderArns; resourceInputs["region"] = args?.region; resourceInputs["samlProviderArns"] = args?.samlProviderArns; resourceInputs["supportedLoginProviders"] = args?.supportedLoginProviders; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(IdentityPool.__pulumiType, name, resourceInputs, opts); } } exports.IdentityPool = IdentityPool; /** @internal */ IdentityPool.__pulumiType = 'aws:cognito/identityPool:IdentityPool'; //# sourceMappingURL=identityPool.js.map