backend_auths
Creates, updates, deletes, gets or lists a backend_auths resource.
Overview
| Name | backend_auths |
| Type | Resource |
| Id | aws.amplifybackend.backend_auths |
Fields
The following fields are returned by SELECT queries:
- get_backend_auth
| Name | Datatype | Description |
|---|---|---|
app_id | string | The app ID. |
backend_environment_name | string | The name of the backend environment. |
error | string | If the request fails, this error is returned. |
resource_config | object | Defines the resource configuration when creating an auth resource in your Amplify project. |
resource_name | string | The name of this resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_backend_auth | select | app_id, backend_environment_name, region | Gets a backend auth details. | |
create_backend_auth | insert | app_id, region, BackendEnvironmentName, ResourceConfig, ResourceName | Creates a new backend authentication resource. | |
update_backend_auth | update | app_id, backend_environment_name, region, ResourceConfig, ResourceName | Updates an existing backend authentication resource. | |
delete_backend_auth | delete | app_id, backend_environment_name, region | Deletes an existing backend authentication resource. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
app_id | string | The app ID. |
backend_environment_name | string | The name of the backend environment. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_backend_auth
Gets a backend auth details.
SELECT
app_id,
backend_environment_name,
error,
resource_config,
resource_name
FROM aws.amplifybackend.backend_auths
WHERE app_id = '{{ app_id }}' -- required
AND backend_environment_name = '{{ backend_environment_name }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_backend_auth
- Manifest
Creates a new backend authentication resource.
INSERT INTO aws.amplifybackend.backend_auths (
BackendEnvironmentName,
ResourceConfig,
ResourceName,
app_id,
region
)
SELECT
'{{ BackendEnvironmentName }}' /* required */,
'{{ ResourceConfig }}' /* required */,
'{{ ResourceName }}' /* required */,
'{{ app_id }}',
'{{ region }}'
RETURNING
app_id,
backend_environment_name,
error,
job_id,
operation,
status
;
# Description fields are for documentation purposes
- name: backend_auths
props:
- name: app_id
value: "{{ app_id }}"
description: Required parameter for the backend_auths resource.
- name: region
value: "{{ region }}"
description: Required parameter for the backend_auths resource.
- name: BackendEnvironmentName
value: "{{ BackendEnvironmentName }}"
- name: ResourceConfig
description: |
Defines the resource configuration when creating an auth resource in your Amplify project.
value:
AuthResources: "{{ AuthResources }}"
IdentityPoolConfigs:
IdentityPoolName: "{{ IdentityPoolName }}"
UnauthenticatedLogin: {{ UnauthenticatedLogin }}
Service: "{{ Service }}"
UserPoolConfigs:
ForgotPassword:
DeliveryMethod: "{{ DeliveryMethod }}"
EmailSettings:
EmailMessage: "{{ EmailMessage }}"
EmailSubject: "{{ EmailSubject }}"
SmsSettings:
SmsMessage: "{{ SmsMessage }}"
Mfa:
MFAMode: "{{ MFAMode }}"
Settings:
MfaTypes:
- "{{ MfaTypes }}"
SmsMessage: "{{ SmsMessage }}"
OAuth:
DomainPrefix: "{{ DomainPrefix }}"
OAuthGrantType: "{{ OAuthGrantType }}"
OAuthScopes:
- "{{ OAuthScopes }}"
RedirectSignInURIs:
- "{{ RedirectSignInURIs }}"
RedirectSignOutURIs:
- "{{ RedirectSignOutURIs }}"
SocialProviderSettings:
Facebook:
ClientId: "{{ ClientId }}"
ClientSecret: "{{ ClientSecret }}"
Google:
ClientId: "{{ ClientId }}"
ClientSecret: "{{ ClientSecret }}"
LoginWithAmazon:
ClientId: "{{ ClientId }}"
ClientSecret: "{{ ClientSecret }}"
SignInWithApple:
ClientId: "{{ ClientId }}"
KeyId: "{{ KeyId }}"
PrivateKey: "{{ PrivateKey }}"
TeamId: "{{ TeamId }}"
PasswordPolicy:
AdditionalConstraints:
- "{{ AdditionalConstraints }}"
MinimumLength: {{ MinimumLength }}
RequiredSignUpAttributes:
- "{{ RequiredSignUpAttributes }}"
SignInMethod: "{{ SignInMethod }}"
UserPoolName: "{{ UserPoolName }}"
VerificationMessage:
DeliveryMethod: "{{ DeliveryMethod }}"
EmailSettings:
EmailMessage: "{{ EmailMessage }}"
EmailSubject: "{{ EmailSubject }}"
SmsSettings:
SmsMessage: "{{ SmsMessage }}"
- name: ResourceName
value: "{{ ResourceName }}"
UPDATE examples
- update_backend_auth
Updates an existing backend authentication resource.
UPDATE aws.amplifybackend.backend_auths
SET
ResourceConfig = '{{ ResourceConfig }}',
ResourceName = '{{ ResourceName }}'
WHERE
app_id = '{{ app_id }}' --required
AND backend_environment_name = '{{ backend_environment_name }}' --required
AND region = '{{ region }}' --required
AND ResourceConfig = '{{ ResourceConfig }}' --required
AND ResourceName = '{{ ResourceName }}' --required
RETURNING
app_id,
backend_environment_name,
error,
job_id,
operation,
status;
DELETE examples
- delete_backend_auth
Deletes an existing backend authentication resource.
DELETE FROM aws.amplifybackend.backend_auths
WHERE app_id = '{{ app_id }}' --required
AND backend_environment_name = '{{ backend_environment_name }}' --required
AND region = '{{ region }}' --required
;