AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Represents the response from the server to create a user pool client.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.CognitoIdentityProvider.Model.CreateUserPoolClientResponse

Namespace: Amazon.CognitoIdentityProvider.Model
Assembly: AWSSDK.CognitoIdentityProvider.dll
Version: 3.x.y.z

Syntax

C#
public class CreateUserPoolClientResponse : AmazonWebServiceResponse

The CreateUserPoolClientResponse type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property UserPoolClient Amazon.CognitoIdentityProvider.Model.UserPoolClientType

Gets and sets the property UserPoolClient.

The user pool client that was just created.

Examples

The following example creates an app client with all configurable properties set to an example value. The resulting user pool client connects to an analytics client, allows sign-in with username and password, and has two external identity providers associated with it.

Example user pool app client with email and username sign-in


var client = new AmazonCognitoIdentityProviderClient();
var response = client.CreateUserPoolClient(new CreateUserPoolClientRequest 
{
    AccessTokenValidity = 6,
    AllowedOAuthFlows = new List<string> {
        "code"
    },
    AllowedOAuthFlowsUserPoolClient = true,
    AllowedOAuthScopes = new List<string> {
        "aws.cognito.signin.user.admin",
        "openid"
    },
    AnalyticsConfiguration = new AnalyticsConfigurationType {
        ApplicationId = "d70b2ba36a8c4dc5a04a0451a31a1e12",
        ExternalId = "my-external-id",
        RoleArn = "arn:aws:iam::123456789012:role/test-cognitouserpool-role",
        UserDataShared = true
    },
    CallbackURLs = new List<string> {
        "https://example.com",
        "http://localhost",
        "myapp://example"
    },
    ClientName = "my-test-app-client",
    DefaultRedirectURI = "https://example.com",
    ExplicitAuthFlows = new List<string> {
        "ALLOW_ADMIN_USER_PASSWORD_AUTH",
        "ALLOW_USER_PASSWORD_AUTH",
        "ALLOW_REFRESH_TOKEN_AUTH"
    },
    GenerateSecret = true,
    IdTokenValidity = 6,
    LogoutURLs = new List<string> {
        "https://example.com/logout"
    },
    PreventUserExistenceErrors = "ENABLED",
    ReadAttributes = new List<string> {
        "email",
        "address",
        "preferred_username"
    },
    RefreshTokenValidity = 6,
    SupportedIdentityProviders = new List<string> {
        "SignInWithApple",
        "MySSO"
    },
    TokenValidityUnits = new TokenValidityUnitsType {
        AccessToken = "hours",
        IdToken = "minutes",
        RefreshToken = "days"
    },
    UserPoolId = "us-east-1_EXAMPLE",
    WriteAttributes = new List<string> {
        "family_name",
        "email"
    }
});

UserPoolClientType userPoolClient = response.UserPoolClient;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5