IdentityPool
Provides an AWS Cognito Identity Pool.
Example Usage
using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var @default = new Aws.Iam.SamlProvider("default", new Aws.Iam.SamlProviderArgs
{
SamlMetadataDocument = File.ReadAllText("saml-metadata.xml"),
});
var main = new Aws.Cognito.IdentityPool("main", new Aws.Cognito.IdentityPoolArgs
{
AllowUnauthenticatedIdentities = false,
CognitoIdentityProviders =
{
new Aws.Cognito.Inputs.IdentityPoolCognitoIdentityProviderArgs
{
ClientId = "6lhlkkfbfb4q5kpp90urffae",
ProviderName = "cognito-idp.us-east-1.amazonaws.com/us-east-1_Tv0493apJ",
ServerSideTokenCheck = false,
},
new Aws.Cognito.Inputs.IdentityPoolCognitoIdentityProviderArgs
{
ClientId = "7kodkvfqfb4qfkp39eurffae",
ProviderName = "cognito-idp.us-east-1.amazonaws.com/eu-west-1_Zr231apJu",
ServerSideTokenCheck = false,
},
},
IdentityPoolName = "identity pool",
OpenidConnectProviderArns =
{
"arn:aws:iam::123456789012:oidc-provider/foo.example.com",
},
SamlProviderArns =
{
@default.Arn,
},
SupportedLoginProviders =
{
{ "accounts.google.com", "123456789012.apps.googleusercontent.com" },
{ "graph.facebook.com", "7346241598935552" },
},
});
}
}
Coming soon!
import pulumi
import pulumi_aws as aws
default = aws.iam.SamlProvider("default", saml_metadata_document=(lambda path: open(path).read())("saml-metadata.xml"))
main = aws.cognito.IdentityPool("main",
allow_unauthenticated_identities=False,
cognito_identity_providers=[
{
"client_id": "6lhlkkfbfb4q5kpp90urffae",
"provider_name": "cognito-idp.us-east-1.amazonaws.com/us-east-1_Tv0493apJ",
"serverSideTokenCheck": False,
},
{
"client_id": "7kodkvfqfb4qfkp39eurffae",
"provider_name": "cognito-idp.us-east-1.amazonaws.com/eu-west-1_Zr231apJu",
"serverSideTokenCheck": False,
},
],
identity_pool_name="identity pool",
openid_connect_provider_arns=["arn:aws:iam::123456789012:oidc-provider/foo.example.com"],
saml_provider_arns=[default.arn],
supported_login_providers={
"accounts.google.com": "123456789012.apps.googleusercontent.com",
"graph.facebook.com": "7346241598935552",
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";
const defaultSamlProvider = new aws.iam.SamlProvider("default", {
samlMetadataDocument: fs.readFileSync("saml-metadata.xml", "utf-8"),
});
const main = new aws.cognito.IdentityPool("main", {
allowUnauthenticatedIdentities: 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,
},
],
identityPoolName: "identity pool",
openidConnectProviderArns: ["arn:aws:iam::123456789012:oidc-provider/foo.example.com"],
samlProviderArns: [defaultSamlProvider.arn],
supportedLoginProviders: {
"accounts.google.com": "123456789012.apps.googleusercontent.com",
"graph.facebook.com": "7346241598935552",
},
});Create a IdentityPool Resource
new IdentityPool(name: string, args: IdentityPoolArgs, opts?: CustomResourceOptions);def IdentityPool(resource_name, opts=None, allow_unauthenticated_identities=None, cognito_identity_providers=None, developer_provider_name=None, identity_pool_name=None, openid_connect_provider_arns=None, saml_provider_arns=None, supported_login_providers=None, tags=None, __props__=None);func NewIdentityPool(ctx *Context, name string, args IdentityPoolArgs, opts ...ResourceOption) (*IdentityPool, error)public IdentityPool(string name, IdentityPoolArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args IdentityPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IdentityPoolArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IdentityPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
IdentityPool Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The IdentityPool resource accepts the following input properties:
- Identity
Pool stringName The Cognito Identity Pool name.
- Allow
Unauthenticated boolIdentities Whether the identity pool supports unauthenticated logins or not.
- Cognito
Identity List<IdentityProviders Pool Cognito Identity Provider Args> An array of Amazon Cognito Identity user pools and their client IDs.
- Developer
Provider stringName The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- Openid
Connect List<string>Provider Arns A list of OpendID Connect provider ARNs.
- Saml
Provider List<string>Arns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- Supported
Login Dictionary<string, string>Providers Key-Value pairs mapping provider names to provider app IDs.
- Dictionary<string, string>
A map of tags to assign to the Identity Pool.
- Identity
Pool stringName The Cognito Identity Pool name.
- Allow
Unauthenticated boolIdentities Whether the identity pool supports unauthenticated logins or not.
- Cognito
Identity []IdentityProviders Pool Cognito Identity Provider An array of Amazon Cognito Identity user pools and their client IDs.
- Developer
Provider stringName The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- Openid
Connect []stringProvider Arns A list of OpendID Connect provider ARNs.
- Saml
Provider []stringArns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- Supported
Login map[string]stringProviders Key-Value pairs mapping provider names to provider app IDs.
- map[string]string
A map of tags to assign to the Identity Pool.
- identity
Pool stringName The Cognito Identity Pool name.
- allow
Unauthenticated booleanIdentities Whether the identity pool supports unauthenticated logins or not.
- cognito
Identity IdentityProviders Pool Cognito Identity Provider[] An array of Amazon Cognito Identity user pools and their client IDs.
- developer
Provider stringName The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- openid
Connect string[]Provider Arns A list of OpendID Connect provider ARNs.
- saml
Provider string[]Arns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- supported
Login {[key: string]: string}Providers Key-Value pairs mapping provider names to provider app IDs.
- {[key: string]: string}
A map of tags to assign to the Identity Pool.
- identity_
pool_ strname The Cognito Identity Pool name.
- allow_
unauthenticated_ boolidentities Whether the identity pool supports unauthenticated logins or not.
- cognito_
identity_ List[Identityproviders Pool Cognito Identity Provider] An array of Amazon Cognito Identity user pools and their client IDs.
- developer_
provider_ strname The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- openid_
connect_ List[str]provider_ arns A list of OpendID Connect provider ARNs.
- saml_
provider_ List[str]arns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- supported_
login_ Dict[str, str]providers Key-Value pairs mapping provider names to provider app IDs.
- Dict[str, str]
A map of tags to assign to the Identity Pool.
Outputs
All input properties are implicitly available as output properties. Additionally, the IdentityPool resource produces the following output properties:
Look up an Existing IdentityPool Resource
Get an existing IdentityPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IdentityPoolState, opts?: CustomResourceOptions): IdentityPoolstatic get(resource_name, id, opts=None, allow_unauthenticated_identities=None, arn=None, cognito_identity_providers=None, developer_provider_name=None, identity_pool_name=None, openid_connect_provider_arns=None, saml_provider_arns=None, supported_login_providers=None, tags=None, __props__=None);func GetIdentityPool(ctx *Context, name string, id IDInput, state *IdentityPoolState, opts ...ResourceOption) (*IdentityPool, error)public static IdentityPool Get(string name, Input<string> id, IdentityPoolState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Allow
Unauthenticated boolIdentities Whether the identity pool supports unauthenticated logins or not.
- Arn string
The ARN of the identity pool.
- Cognito
Identity List<IdentityProviders Pool Cognito Identity Provider Args> An array of Amazon Cognito Identity user pools and their client IDs.
- Developer
Provider stringName The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- Identity
Pool stringName The Cognito Identity Pool name.
- Openid
Connect List<string>Provider Arns A list of OpendID Connect provider ARNs.
- Saml
Provider List<string>Arns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- Supported
Login Dictionary<string, string>Providers Key-Value pairs mapping provider names to provider app IDs.
- Dictionary<string, string>
A map of tags to assign to the Identity Pool.
- Allow
Unauthenticated boolIdentities Whether the identity pool supports unauthenticated logins or not.
- Arn string
The ARN of the identity pool.
- Cognito
Identity []IdentityProviders Pool Cognito Identity Provider An array of Amazon Cognito Identity user pools and their client IDs.
- Developer
Provider stringName The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- Identity
Pool stringName The Cognito Identity Pool name.
- Openid
Connect []stringProvider Arns A list of OpendID Connect provider ARNs.
- Saml
Provider []stringArns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- Supported
Login map[string]stringProviders Key-Value pairs mapping provider names to provider app IDs.
- map[string]string
A map of tags to assign to the Identity Pool.
- allow
Unauthenticated booleanIdentities Whether the identity pool supports unauthenticated logins or not.
- arn string
The ARN of the identity pool.
- cognito
Identity IdentityProviders Pool Cognito Identity Provider[] An array of Amazon Cognito Identity user pools and their client IDs.
- developer
Provider stringName The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- identity
Pool stringName The Cognito Identity Pool name.
- openid
Connect string[]Provider Arns A list of OpendID Connect provider ARNs.
- saml
Provider string[]Arns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- supported
Login {[key: string]: string}Providers Key-Value pairs mapping provider names to provider app IDs.
- {[key: string]: string}
A map of tags to assign to the Identity Pool.
- allow_
unauthenticated_ boolidentities Whether the identity pool supports unauthenticated logins or not.
- arn str
The ARN of the identity pool.
- cognito_
identity_ List[Identityproviders Pool Cognito Identity Provider] An array of Amazon Cognito Identity user pools and their client IDs.
- developer_
provider_ strname The “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider.
- identity_
pool_ strname The Cognito Identity Pool name.
- openid_
connect_ List[str]provider_ arns A list of OpendID Connect provider ARNs.
- saml_
provider_ List[str]arns An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
- supported_
login_ Dict[str, str]providers Key-Value pairs mapping provider names to provider app IDs.
- Dict[str, str]
A map of tags to assign to the Identity Pool.
Supporting Types
IdentityPoolCognitoIdentityProvider
- Client
Id string The client ID for the Amazon Cognito Identity User Pool.
- Provider
Name string The provider name for an Amazon Cognito Identity User Pool.
- Server
Side boolToken Check Whether server-side token validation is enabled for the identity provider’s token or not.
- Client
Id string The client ID for the Amazon Cognito Identity User Pool.
- Provider
Name string The provider name for an Amazon Cognito Identity User Pool.
- Server
Side boolToken Check Whether server-side token validation is enabled for the identity provider’s token or not.
- client
Id string The client ID for the Amazon Cognito Identity User Pool.
- provider
Name string The provider name for an Amazon Cognito Identity User Pool.
- server
Side booleanToken Check Whether server-side token validation is enabled for the identity provider’s token or not.
- client_
id str The client ID for the Amazon Cognito Identity User Pool.
- provider_
name str The provider name for an Amazon Cognito Identity User Pool.
- server
Side boolToken Check Whether server-side token validation is enabled for the identity provider’s token or not.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.