@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
111 lines • 4.74 kB
JavaScript
;
// *** 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.IdentityPoolProviderPrincipalTag = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an AWS Cognito Identity Principal Mapping.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as std from "@pulumi/std";
*
* const example = new aws.cognito.UserPool("example", {
* name: "user pool",
* autoVerifiedAttributes: ["email"],
* });
* const exampleUserPoolClient = new aws.cognito.UserPoolClient("example", {
* name: "client",
* userPoolId: example.id,
* supportedIdentityProviders: std.compact({
* input: ["COGNITO"],
* }).then(invoke => invoke.result),
* });
* const exampleIdentityPool = new aws.cognito.IdentityPool("example", {
* identityPoolName: "identity pool",
* allowUnauthenticatedIdentities: false,
* cognitoIdentityProviders: [{
* clientId: exampleUserPoolClient.id,
* providerName: example.endpoint,
* serverSideTokenCheck: false,
* }],
* });
* const exampleIdentityPoolProviderPrincipalTag = new aws.cognito.IdentityPoolProviderPrincipalTag("example", {
* identityPoolId: exampleIdentityPool.id,
* identityProviderName: example.endpoint,
* useDefaults: false,
* principalTags: {
* test: "value",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Cognito Identity Pool Roles Attachment using the Identity Pool ID and provider name. For example:
*
* ```sh
* $ pulumi import aws:cognito/identityPoolProviderPrincipalTag:IdentityPoolProviderPrincipalTag example us-west-2_abc123:CorpAD
* ```
*/
class IdentityPoolProviderPrincipalTag extends pulumi.CustomResource {
/**
* Get an existing IdentityPoolProviderPrincipalTag 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 IdentityPoolProviderPrincipalTag(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of IdentityPoolProviderPrincipalTag. 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'] === IdentityPoolProviderPrincipalTag.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["identityPoolId"] = state?.identityPoolId;
resourceInputs["identityProviderName"] = state?.identityProviderName;
resourceInputs["principalTags"] = state?.principalTags;
resourceInputs["region"] = state?.region;
resourceInputs["useDefaults"] = state?.useDefaults;
}
else {
const args = argsOrState;
if (args?.identityPoolId === undefined && !opts.urn) {
throw new Error("Missing required property 'identityPoolId'");
}
if (args?.identityProviderName === undefined && !opts.urn) {
throw new Error("Missing required property 'identityProviderName'");
}
resourceInputs["identityPoolId"] = args?.identityPoolId;
resourceInputs["identityProviderName"] = args?.identityProviderName;
resourceInputs["principalTags"] = args?.principalTags;
resourceInputs["region"] = args?.region;
resourceInputs["useDefaults"] = args?.useDefaults;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(IdentityPoolProviderPrincipalTag.__pulumiType, name, resourceInputs, opts);
}
}
exports.IdentityPoolProviderPrincipalTag = IdentityPoolProviderPrincipalTag;
/** @internal */
IdentityPoolProviderPrincipalTag.__pulumiType = 'aws:cognito/identityPoolProviderPrincipalTag:IdentityPoolProviderPrincipalTag';
//# sourceMappingURL=identityPoolProviderPrincipalTag.js.map