Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.cognito.IdentityProvider Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.cognito;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.cognito.IdentityProviderArgs;
import com.pulumi.aws.cognito.inputs.IdentityProviderState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a Cognito User Identity Provider resource.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.cognito.UserPool;
* import com.pulumi.aws.cognito.UserPoolArgs;
* import com.pulumi.aws.cognito.IdentityProvider;
* import com.pulumi.aws.cognito.IdentityProviderArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new UserPool("example", UserPoolArgs.builder()
* .name("example-pool")
* .autoVerifiedAttributes("email")
* .build());
*
* var exampleProvider = new IdentityProvider("exampleProvider", IdentityProviderArgs.builder()
* .userPoolId(example.id())
* .providerName("Google")
* .providerType("Google")
* .providerDetails(Map.ofEntries(
* Map.entry("authorize_scopes", "email"),
* Map.entry("client_id", "your client_id"),
* Map.entry("client_secret", "your client_secret")
* ))
* .attributeMapping(Map.ofEntries(
* Map.entry("email", "email"),
* Map.entry("username", "sub")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import `aws_cognito_identity_provider` resources using their User Pool ID and Provider Name. For example:
*
* ```sh
* $ pulumi import aws:cognito/identityProvider:IdentityProvider example us-west-2_abc123:CorpAD
* ```
*
*/
@ResourceType(type="aws:cognito/identityProvider:IdentityProvider")
public class IdentityProvider extends com.pulumi.resources.CustomResource {
/**
* The map of attribute mapping of user pool attributes. [AttributeMapping in AWS API documentation](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-AttributeMapping)
*
*/
@Export(name="attributeMapping", refs={Map.class,String.class}, tree="[0,1,1]")
private Output> attributeMapping;
/**
* @return The map of attribute mapping of user pool attributes. [AttributeMapping in AWS API documentation](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-AttributeMapping)
*
*/
public Output> attributeMapping() {
return this.attributeMapping;
}
/**
* The list of identity providers.
*
*/
@Export(name="idpIdentifiers", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> idpIdentifiers;
/**
* @return The list of identity providers.
*
*/
public Output>> idpIdentifiers() {
return Codegen.optional(this.idpIdentifiers);
}
/**
* The map of identity details, such as access token
*
*/
@Export(name="providerDetails", refs={Map.class,String.class}, tree="[0,1,1]")
private Output> providerDetails;
/**
* @return The map of identity details, such as access token
*
*/
public Output> providerDetails() {
return this.providerDetails;
}
/**
* The provider name
*
*/
@Export(name="providerName", refs={String.class}, tree="[0]")
private Output providerName;
/**
* @return The provider name
*
*/
public Output providerName() {
return this.providerName;
}
/**
* The provider type. [See AWS API for valid values](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-ProviderType)
*
*/
@Export(name="providerType", refs={String.class}, tree="[0]")
private Output providerType;
/**
* @return The provider type. [See AWS API for valid values](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-ProviderType)
*
*/
public Output providerType() {
return this.providerType;
}
/**
* The user pool id
*
*/
@Export(name="userPoolId", refs={String.class}, tree="[0]")
private Output userPoolId;
/**
* @return The user pool id
*
*/
public Output userPoolId() {
return this.userPoolId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public IdentityProvider(java.lang.String name) {
this(name, IdentityProviderArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public IdentityProvider(java.lang.String name, IdentityProviderArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public IdentityProvider(java.lang.String name, IdentityProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:cognito/identityProvider:IdentityProvider", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private IdentityProvider(java.lang.String name, Output id, @Nullable IdentityProviderState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:cognito/identityProvider:IdentityProvider", name, state, makeResourceOptions(options, id), false);
}
private static IdentityProviderArgs makeArgs(IdentityProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? IdentityProviderArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host 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
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static IdentityProvider get(java.lang.String name, Output id, @Nullable IdentityProviderState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new IdentityProvider(name, id, state, options);
}
}