• 沒有找到結果。

Backend appId Auth backendEnvironmentName

在文檔中 Amplify Admin UI (頁 65-74)

The authentication and authorization settings from your Amplify project.

URI

/prod/backend/appId/auth/backendEnvironmentName

HTTP methods

POST

Operation ID: UpdateBackendAuth

Updates an existing backend authentication resource.

Path parameters

Name Type Required Description

appId String True The app ID.

backendEnvironmentNameString True The name of the backend environment.

Schemas

Responses

Status code Response model Description

200 BackendAuthRespObj (p. 61)200 response

400 BadRequestException (p. 61)400 response

404 NotFoundException (p. 61) 404 response

429 LimitExceededException (p. 61)429 response 504 InternalServiceException (p. 62)504 response

OPTIONS

Enables CORS by returning the correct headers.

Path parameters

Name Type Required Description

appId String True The app ID.

backendEnvironmentNameString True The name of the backend environment.

Responses

Status code Response model Description

200 None 200 response

Schemas

Request bodies

POST schema

{

"resourceConfig": { "userPoolConfigs": { "forgotPassword": {

Schemas

"authResources": enum, "service": enum,

"identityPoolConfigs": {

"unauthenticatedLogin": boolean }

}, "resourceName": "string"

}

Response bodies

BackendAuthRespObj schema

{ "jobId": "string", "appId": "string", "error": "string", "operation": "string",

"backendEnvironmentName": "string", "status": "string"

}

BadRequestException schema

{ "message": "string"

}

NotFoundException schema

{

"message": "string", "resourceType": "string"

}

LimitExceededException schema

{ "message": "string",

Properties

"limitType": "string"

}

InternalServiceException schema

{ "message": "string"

}

Properties

BackendAuthRespObj

The response object for this operation.

jobId

The ID for the job.

Type: string Required: False

appId

The app ID.

Type: string Required: True

error

If the request fails, this error is returned.

Type: string Required: False

operation

The name of the operation.

Type: string Required: False

backendEnvironmentName

The name of the backend environment.

Type: string Required: True

status

The current status of the request.

Properties

Type: string Required: False

BadRequestException

An error returned if a request is not formed properly.

message

An error message to inform that the request failed.

Type: string Required: False

InternalServiceException

An error returned if there's a temporary issue with the service.

message

An error message to inform that the request failed.

Type: string Required: False

LimitExceededException

An error that is returned when a limit of a specific type has been exceeded.

message

An error message to inform that the request has failed.

Type: string Required: False

limitType

The type of limit that was exceeded.

Type: string Required: False

NotFoundException

An error returned when a specific resource type is not found.

message

An error message to inform that the request has failed.

Type: string Required: False

Properties

resourceType

The type of resource that is not found.

Type: string Required: False

UpdateBackendAuthForgotPasswordConfig

Describes the forgot password policy for authenticating into the Amplify app.

smsSettings

The configuration for the SMS message sent when an Amplify app user forgets their password.

Type: object Required: False

deliveryMethod

Describes which mode to use (either SMS or email) to deliver messages to app users that want to recover their password.

Type: string Required: False Values: EMAIL | SMS

emailSettings

The configuration for the email sent when an app user forgets their password.

Type: object Required: False

UpdateBackendAuthIdentityPoolConfig

Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.

unauthenticatedLogin

A boolean value that can be set to allow or disallow guest-level authorization into your Amplify app.

Type: boolean Required: False

UpdateBackendAuthMFAConfig

Updates the multi-factor authentication (MFA) configuration for the backend of your Amplify project.

MFAMode

The MFA mode for the backend of your Amplify project.

Type: string

Properties

Required: False

Values: ON | OFF | OPTIONAL

settings

The settings of your MFA configuration for the backend of your Amplify project.

Type: object Required: False

UpdateBackendAuthOAuthConfig

The OAuth configurations for authenticating users into your Amplify app.

redirectSignOutURIs

Redirect URLs that OAuth uses when a user signs out of an Amplify app.

Type: Array of type string Required: False

domainPrefix

The Amazon Cognito domain prefix used to create a hosted UI for authentication.

Type: string Required: False

redirectSignInURIs

Redirect URLs that OAuth uses when a user signs in to an Amplify app.

Type: Array of type string Required: False

oAuthScopes

The list of OAuth-related flows that can allow users to authenticate from your Amplify app.

Type: Array of type string Required: False

Values: PHONE | EMAIL | OPENID | PROFILE | AWS_COGNITO_SIGNIN_USER_ADMIN

socialProviderSettings

Describes third-party social federation configurations for allowing your users to sign in with OAuth.

Type: object Required: False

oAuthGrantType

The OAuth grant type to allow app users to authenticate from your Amplify app.

Properties

Type: string Required: False

Values: CODE | IMPLICIT

UpdateBackendAuthPasswordPolicyConfig

Describes the password policy for your Amazon Cognito user pool configured as a part of your Amplify project.

minimumLength

Describes the minimum length of the password required to sign in to the auth resource, configured as a part of your Amplify project.

Type: number Required: False

additionalConstraints

Describes additional constraints on password requirements to sign in to the auth resource, configured as a part of your Amplify project.

Type: Array of type string Required: False

Values: REQUIRE_DIGIT | REQUIRE_LOWERCASE | REQUIRE_SYMBOL | REQUIRE_UPPERCASE

UpdateBackendAuthReqObj

The request object for this operation.

resourceConfig

The resource configuration for this request object.

Type: UpdateBackendAuthResourceConfig (p. 66) Required: True

resourceName

The name of this resource.

Type: string Required: True

UpdateBackendAuthResourceConfig

Defines the resource configuration when updating an authentication resource in your Amplify project.

userPoolConfigs

Describes the authentication configuration for the Amazon Cognito user pool, provisioned as a part of your auth resource in the Amplify project.

Type: UpdateBackendAuthUserPoolConfig (p. 67)

Properties

Required: True

authResources

Defines the service name to use when configuring an authentication resource in your Amplify project.

Type: string Required: True

Values: USER_POOL_ONLY | IDENTITY_POOL_AND_USER_POOL

service

Defines the service name to use when configuring an authentication resource in your Amplify project.

Type: string Required: True Values: COGNITO

identityPoolConfigs

Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.

Type: UpdateBackendAuthIdentityPoolConfig (p. 64) Required: False

UpdateBackendAuthUserPoolConfig

Describes the Amazon Cognito user pool configuration for the authorization resource to be configured for your Amplify project on an update.

forgotPassword

Describes the forgot password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.

Type: UpdateBackendAuthForgotPasswordConfig (p. 64) Required: False

passwordPolicy

Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.

Type: UpdateBackendAuthPasswordPolicyConfig (p. 66) Required: False

mfa

Describes whether to apply multi-factor authentication policies for your Amazon Cognito user pool configured as a part of your Amplify project.

Type: UpdateBackendAuthMFAConfig (p. 64) Required: False

See also

oAuth

Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.

Type: UpdateBackendAuthOAuthConfig (p. 65) Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

UpdateBackendAuth

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Backend appId Auth backendEnvironmentName

在文檔中 Amplify Admin UI (頁 65-74)

相關文件