GetBackendAuthCommand

Gets a backend auth details.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AmplifyBackendClient, GetBackendAuthCommand } from "@aws-sdk/client-amplifybackend"; // ES Modules import
// const { AmplifyBackendClient, GetBackendAuthCommand } = require("@aws-sdk/client-amplifybackend"); // CommonJS import
const client = new AmplifyBackendClient(config);
const input = { // GetBackendAuthRequest
  AppId: "STRING_VALUE", // required
  BackendEnvironmentName: "STRING_VALUE", // required
  ResourceName: "STRING_VALUE", // required
};
const command = new GetBackendAuthCommand(input);
const response = await client.send(command);
// { // GetBackendAuthResponse
//   AppId: "STRING_VALUE",
//   BackendEnvironmentName: "STRING_VALUE",
//   Error: "STRING_VALUE",
//   ResourceConfig: { // CreateBackendAuthResourceConfig
//     AuthResources: "USER_POOL_ONLY" || "IDENTITY_POOL_AND_USER_POOL", // required
//     IdentityPoolConfigs: { // CreateBackendAuthIdentityPoolConfig
//       IdentityPoolName: "STRING_VALUE", // required
//       UnauthenticatedLogin: true || false, // required
//     },
//     Service: "COGNITO", // required
//     UserPoolConfigs: { // CreateBackendAuthUserPoolConfig
//       ForgotPassword: { // CreateBackendAuthForgotPasswordConfig
//         DeliveryMethod: "EMAIL" || "SMS", // required
//         EmailSettings: { // EmailSettings
//           EmailMessage: "STRING_VALUE",
//           EmailSubject: "STRING_VALUE",
//         },
//         SmsSettings: { // SmsSettings
//           SmsMessage: "STRING_VALUE",
//         },
//       },
//       Mfa: { // CreateBackendAuthMFAConfig
//         MFAMode: "ON" || "OFF" || "OPTIONAL", // required
//         Settings: { // Settings
//           MfaTypes: [ // ListOfMfaTypesElement
//             "SMS" || "TOTP",
//           ],
//           SmsMessage: "STRING_VALUE",
//         },
//       },
//       OAuth: { // CreateBackendAuthOAuthConfig
//         DomainPrefix: "STRING_VALUE",
//         OAuthGrantType: "CODE" || "IMPLICIT", // required
//         OAuthScopes: [ // ListOfOAuthScopesElement // required
//           "PHONE" || "EMAIL" || "OPENID" || "PROFILE" || "AWS_COGNITO_SIGNIN_USER_ADMIN",
//         ],
//         RedirectSignInURIs: [ // ListOf__string // required
//           "STRING_VALUE",
//         ],
//         RedirectSignOutURIs: [ // required
//           "STRING_VALUE",
//         ],
//         SocialProviderSettings: { // SocialProviderSettings
//           Facebook: { // BackendAuthSocialProviderConfig
//             ClientId: "STRING_VALUE",
//             ClientSecret: "STRING_VALUE",
//           },
//           Google: {
//             ClientId: "STRING_VALUE",
//             ClientSecret: "STRING_VALUE",
//           },
//           LoginWithAmazon: {
//             ClientId: "STRING_VALUE",
//             ClientSecret: "STRING_VALUE",
//           },
//           SignInWithApple: { // BackendAuthAppleProviderConfig
//             ClientId: "STRING_VALUE",
//             KeyId: "STRING_VALUE",
//             PrivateKey: "STRING_VALUE",
//             TeamId: "STRING_VALUE",
//           },
//         },
//       },
//       PasswordPolicy: { // CreateBackendAuthPasswordPolicyConfig
//         AdditionalConstraints: [ // ListOfAdditionalConstraintsElement
//           "REQUIRE_DIGIT" || "REQUIRE_LOWERCASE" || "REQUIRE_SYMBOL" || "REQUIRE_UPPERCASE",
//         ],
//         MinimumLength: Number("double"), // required
//       },
//       RequiredSignUpAttributes: [ // ListOfRequiredSignUpAttributesElement // required
//         "ADDRESS" || "BIRTHDATE" || "EMAIL" || "FAMILY_NAME" || "GENDER" || "GIVEN_NAME" || "LOCALE" || "MIDDLE_NAME" || "NAME" || "NICKNAME" || "PHONE_NUMBER" || "PICTURE" || "PREFERRED_USERNAME" || "PROFILE" || "UPDATED_AT" || "WEBSITE" || "ZONE_INFO",
//       ],
//       SignInMethod: "EMAIL" || "EMAIL_AND_PHONE_NUMBER" || "PHONE_NUMBER" || "USERNAME", // required
//       UserPoolName: "STRING_VALUE", // required
//       VerificationMessage: { // CreateBackendAuthVerificationMessageConfig
//         DeliveryMethod: "EMAIL" || "SMS", // required
//         EmailSettings: {
//           EmailMessage: "STRING_VALUE",
//           EmailSubject: "STRING_VALUE",
//         },
//         SmsSettings: {
//           SmsMessage: "STRING_VALUE",
//         },
//       },
//     },
//   },
//   ResourceName: "STRING_VALUE",
// };

GetBackendAuthCommand Input

See GetBackendAuthCommandInput for more details

Parameter
Type
Description
AppId
Required
string | undefined

The app ID.

BackendEnvironmentName
Required
string | undefined

The name of the backend environment.

ResourceName
Required
string | undefined

The name of this resource.

GetBackendAuthCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
AppId
string | undefined

The app ID.

BackendEnvironmentName
string | undefined

The name of the backend environment.

Error
string | undefined

If the request fails, this error is returned.

ResourceConfig
CreateBackendAuthResourceConfig | undefined

The resource configuration for authorization requests to the backend of your Amplify project.

ResourceName
string | undefined

The name of this resource.

Throws

Name
Fault
Details
BadRequestException
client

An error returned if a request is not formed properly.

GatewayTimeoutException
server

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

NotFoundException
client

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

TooManyRequestsException
client

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

AmplifyBackendServiceException
Base exception class for all service exceptions from AmplifyBackend service.