NAME

Paws::CognitoIdp::CreateUserPoolClient - Arguments for method CreateUserPoolClient on Paws::CognitoIdp

DESCRIPTION

This class represents the parameters used for calling the method CreateUserPoolClient on the Amazon Cognito Identity Provider service. Use the attributes of this class as arguments to method CreateUserPoolClient.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateUserPoolClient.

SYNOPSIS

my $cognito-idp = Paws->service('CognitoIdp');
my $CreateUserPoolClientResponse = $cognito -idp->CreateUserPoolClient(
  ClientName          => 'MyClientNameType',
  UserPoolId          => 'MyUserPoolIdType',
  AccessTokenValidity => 1,                    # OPTIONAL
  AllowedOAuthFlows   => [
    'code', ...    # values: code, implicit, client_credentials
  ],    # OPTIONAL
  AllowedOAuthFlowsUserPoolClient => 1,    # OPTIONAL
  AllowedOAuthScopes              => [
    'MyScopeType', ...                     # min: 1, max: 256
  ],    # OPTIONAL
  AnalyticsConfiguration => {
    ApplicationArn => 'MyArnType',          # min: 20, max: 2048; OPTIONAL
    ApplicationId  => 'MyHexStringType',    # OPTIONAL
    ExternalId     => 'MyStringType',       # OPTIONAL
    RoleArn        => 'MyArnType',          # min: 20, max: 2048; OPTIONAL
    UserDataShared => 1,
  },    # OPTIONAL
  CallbackURLs => [
    'MyRedirectUrlType', ...    # min: 1, max: 1024
  ],    # OPTIONAL
  DefaultRedirectURI    => 'MyRedirectUrlType',    # OPTIONAL
  EnableTokenRevocation => 1,                      # OPTIONAL
  ExplicitAuthFlows     => [
    'ADMIN_NO_SRP_AUTH',
    ... # values: ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY, USER_PASSWORD_AUTH, ALLOW_ADMIN_USER_PASSWORD_AUTH, ALLOW_CUSTOM_AUTH, ALLOW_USER_PASSWORD_AUTH, ALLOW_USER_SRP_AUTH, ALLOW_REFRESH_TOKEN_AUTH
  ],    # OPTIONAL
  GenerateSecret  => 1,    # OPTIONAL
  IdTokenValidity => 1,    # OPTIONAL
  LogoutURLs      => [
    'MyRedirectUrlType', ...    # min: 1, max: 1024
  ],    # OPTIONAL
  PreventUserExistenceErrors => 'LEGACY',    # OPTIONAL
  ReadAttributes             => [
    'MyClientPermissionType', ...            # min: 1, max: 2048
  ],    # OPTIONAL
  RefreshTokenValidity       => 1,    # OPTIONAL
  SupportedIdentityProviders => [
    'MyProviderNameType', ...         # min: 1, max: 32
  ],    # OPTIONAL
  TokenValidityUnits => {
    AccessToken =>
      'seconds',    # values: seconds, minutes, hours, days; OPTIONAL
    IdToken => 'seconds',  # values: seconds, minutes, hours, days; OPTIONAL
    RefreshToken =>
      'seconds',           # values: seconds, minutes, hours, days; OPTIONAL
  },    # OPTIONAL
  WriteAttributes => [
    'MyClientPermissionType', ...    # min: 1, max: 2048
  ],    # OPTIONAL
);

# Results:
my $UserPoolClient = $CreateUserPoolClientResponse->UserPoolClient;

# Returns a L<Paws::CognitoIdp::CreateUserPoolClientResponse> object.

Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/cognito-idp/CreateUserPoolClient

ATTRIBUTES

AccessTokenValidity => Int

The time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used. This value will be overridden if you have entered a value in TokenValidityUnits.

AllowedOAuthFlows => ArrayRef[Str|Undef]

The allowed OAuth flows.

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination of client and client_secret.

AllowedOAuthFlowsUserPoolClient => Bool

Set to true if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

AllowedOAuthScopes => ArrayRef[Str|Undef]

The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values provided by AWS are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.

AnalyticsConfiguration => Paws::CognitoIdp::AnalyticsConfigurationType

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

In regions where Pinpoint is not available, Cognito User Pools only supports sending events to Amazon Pinpoint projects in us-east-1. In regions where Pinpoint is available, Cognito User Pools will support sending events to Amazon Pinpoint projects within that same region.

CallbackURLs => ArrayRef[Str|Undef]

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2).

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

REQUIRED ClientName => Str

The client name for the user pool client you would like to create.

DefaultRedirectURI => Str

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2).

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

EnableTokenRevocation => Bool

Enables or disables token revocation. For more information about revoking tokens, see RevokeToken (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RevokeToken.html).

If you don't include this parameter, token revocation is automatically enabled for the new user pool client.

ExplicitAuthFlows => ArrayRef[Str|Undef]

The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are deprecated in favor of new names with the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along with values without ALLOW_ prefix.

Valid values include:

  • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Cognito receives the password in the request instead of using the SRP (Secure Remote Password protocol) protocol to verify passwords.

  • ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.

  • ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Cognito receives the password in the request instead of using the SRP protocol to verify passwords.

  • ALLOW_USER_SRP_AUTH: Enable SRP based authentication.

  • ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.

GenerateSecret => Bool

Boolean to specify whether you want to generate a secret for the user pool client being created.

IdTokenValidity => Int

The time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used. This value will be overridden if you have entered a value in TokenValidityUnits.

LogoutURLs => ArrayRef[Str|Undef]

A list of allowed logout URLs for the identity providers.

PreventUserExistenceErrors => Str

Use this setting to choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to ENABLED and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs will return a UserNotFoundException exception if the user does not exist in the user pool.

Valid values include:

  • ENABLED - This prevents user existence-related errors.

  • LEGACY - This represents the old behavior of Cognito where user existence related errors are not prevented.

After February 15th 2020, the value of PreventUserExistenceErrors will default to ENABLED for newly created user pool clients if no value is provided.

Valid values are: "LEGACY", "ENABLED"

ReadAttributes => ArrayRef[Str|Undef]

The read attributes.

RefreshTokenValidity => Int

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

SupportedIdentityProviders => ArrayRef[Str|Undef]

A list of provider names for the identity providers that are supported on this client. The following are supported: COGNITO, Facebook, Google and LoginWithAmazon.

TokenValidityUnits => Paws::CognitoIdp::TokenValidityUnitsType

The units in which the validity times are represented in. Default for RefreshToken is days, and default for ID and access tokens are hours.

REQUIRED UserPoolId => Str

The user pool ID for the user pool where you want to create a user pool client.

WriteAttributes => ArrayRef[Str|Undef]

The user pool attributes that the app client can write to.

If your app client allows users to sign in through an identity provider, this array must include all attributes that are mapped to identity provider attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If your app client lacks write access to a mapped attribute, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html).

SEE ALSO

This class forms part of Paws, documenting arguments for method CreateUserPoolClient in Paws::CognitoIdp

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues