IdentityProvider
Provides a Cognito User Identity Provider resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Cognito.UserPool("example", new Aws.Cognito.UserPoolArgs
{
AutoVerifiedAttributes =
{
"email",
},
});
var exampleProvider = new Aws.Cognito.IdentityProvider("exampleProvider", new Aws.Cognito.IdentityProviderArgs
{
AttributeMapping =
{
{ "email", "email" },
{ "username", "sub" },
},
ProviderDetails =
{
{ "authorize_scopes", "email" },
{ "client_id", "your client_id" },
{ "client_secret", "your client_secret" },
},
ProviderName = "Google",
ProviderType = "Google",
UserPoolId = example.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cognito"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cognito.NewUserPool(ctx, "example", &cognito.UserPoolArgs{
AutoVerifiedAttributes: pulumi.StringArray{
pulumi.String("email"),
},
})
if err != nil {
return err
}
_, err = cognito.NewIdentityProvider(ctx, "exampleProvider", &cognito.IdentityProviderArgs{
AttributeMapping: pulumi.StringMap{
"email": pulumi.String("email"),
"username": pulumi.String("sub"),
},
ProviderDetails: pulumi.StringMap{
"authorize_scopes": pulumi.String("email"),
"client_id": pulumi.String("your client_id"),
"client_secret": pulumi.String("your client_secret"),
},
ProviderName: pulumi.String("Google"),
ProviderType: pulumi.String("Google"),
UserPoolId: example.ID(),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.cognito.UserPool("example", auto_verified_attributes=["email"])
example_provider = aws.cognito.IdentityProvider("exampleProvider",
attribute_mapping={
"email": "email",
"username": "sub",
},
provider_details={
"authorize_scopes": "email",
"client_id": "your client_id",
"client_secret": "your client_secret",
},
provider_name="Google",
provider_type="Google",
user_pool_id=example.id)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cognito.UserPool("example", {
autoVerifiedAttributes: ["email"],
});
const exampleProvider = new aws.cognito.IdentityProvider("example_provider", {
attributeMapping: {
email: "email",
username: "sub",
},
providerDetails: {
authorize_scopes: "email",
client_id: "your client_id",
client_secret: "your client_secret",
},
providerName: "Google",
providerType: "Google",
userPoolId: example.id,
});Create a IdentityProvider Resource
new IdentityProvider(name: string, args: IdentityProviderArgs, opts?: CustomResourceOptions);def IdentityProvider(resource_name, opts=None, attribute_mapping=None, idp_identifiers=None, provider_details=None, provider_name=None, provider_type=None, user_pool_id=None, __props__=None);func NewIdentityProvider(ctx *Context, name string, args IdentityProviderArgs, opts ...ResourceOption) (*IdentityProvider, error)public IdentityProvider(string name, IdentityProviderArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args IdentityProviderArgs
- 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 IdentityProviderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IdentityProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
IdentityProvider Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The IdentityProvider resource accepts the following input properties:
- Provider
Details Dictionary<string, string> The map of identity details, such as access token
- Provider
Name string The provider name
- Provider
Type string The provider type. See AWS API for valid values
- User
Pool stringId The user pool id
- Attribute
Mapping Dictionary<string, string> The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- Idp
Identifiers List<string> The list of identity providers.
- Provider
Details map[string]string The map of identity details, such as access token
- Provider
Name string The provider name
- Provider
Type string The provider type. See AWS API for valid values
- User
Pool stringId The user pool id
- Attribute
Mapping map[string]string The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- Idp
Identifiers []string The list of identity providers.
- provider
Details {[key: string]: string} The map of identity details, such as access token
- provider
Name string The provider name
- provider
Type string The provider type. See AWS API for valid values
- user
Pool stringId The user pool id
- attribute
Mapping {[key: string]: string} The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- idp
Identifiers string[] The list of identity providers.
- provider_
details Dict[str, str] The map of identity details, such as access token
- provider_
name str The provider name
- provider_
type str The provider type. See AWS API for valid values
- user_
pool_ strid The user pool id
- attribute_
mapping Dict[str, str] The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- idp_
identifiers List[str] The list of identity providers.
Outputs
All input properties are implicitly available as output properties. Additionally, the IdentityProvider resource produces the following output properties:
Look up an Existing IdentityProvider Resource
Get an existing IdentityProvider 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?: IdentityProviderState, opts?: CustomResourceOptions): IdentityProviderstatic get(resource_name, id, opts=None, attribute_mapping=None, idp_identifiers=None, provider_details=None, provider_name=None, provider_type=None, user_pool_id=None, __props__=None);func GetIdentityProvider(ctx *Context, name string, id IDInput, state *IdentityProviderState, opts ...ResourceOption) (*IdentityProvider, error)public static IdentityProvider Get(string name, Input<string> id, IdentityProviderState? 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:
- Attribute
Mapping Dictionary<string, string> The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- Idp
Identifiers List<string> The list of identity providers.
- Provider
Details Dictionary<string, string> The map of identity details, such as access token
- Provider
Name string The provider name
- Provider
Type string The provider type. See AWS API for valid values
- User
Pool stringId The user pool id
- Attribute
Mapping map[string]string The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- Idp
Identifiers []string The list of identity providers.
- Provider
Details map[string]string The map of identity details, such as access token
- Provider
Name string The provider name
- Provider
Type string The provider type. See AWS API for valid values
- User
Pool stringId The user pool id
- attribute
Mapping {[key: string]: string} The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- idp
Identifiers string[] The list of identity providers.
- provider
Details {[key: string]: string} The map of identity details, such as access token
- provider
Name string The provider name
- provider
Type string The provider type. See AWS API for valid values
- user
Pool stringId The user pool id
- attribute_
mapping Dict[str, str] The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation
- idp_
identifiers List[str] The list of identity providers.
- provider_
details Dict[str, str] The map of identity details, such as access token
- provider_
name str The provider name
- provider_
type str The provider type. See AWS API for valid values
- user_
pool_ strid The user pool id
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.