GetAppCommand

Returns an existing Amplify app specified by an app ID.

Example Syntax

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

import { AmplifyClient, GetAppCommand } from "@aws-sdk/client-amplify"; // ES Modules import
// const { AmplifyClient, GetAppCommand } = require("@aws-sdk/client-amplify"); // CommonJS import
const client = new AmplifyClient(config);
const input = { // GetAppRequest
  appId: "STRING_VALUE", // required
};
const command = new GetAppCommand(input);
const response = await client.send(command);
// { // GetAppResult
//   app: { // App
//     appId: "STRING_VALUE", // required
//     appArn: "STRING_VALUE", // required
//     name: "STRING_VALUE", // required
//     tags: { // TagMap
//       "<keys>": "STRING_VALUE",
//     },
//     description: "STRING_VALUE", // required
//     repository: "STRING_VALUE", // required
//     platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
//     createTime: new Date("TIMESTAMP"), // required
//     updateTime: new Date("TIMESTAMP"), // required
//     computeRoleArn: "STRING_VALUE",
//     iamServiceRoleArn: "STRING_VALUE",
//     environmentVariables: { // EnvironmentVariables // required
//       "<keys>": "STRING_VALUE",
//     },
//     defaultDomain: "STRING_VALUE", // required
//     enableBranchAutoBuild: true || false, // required
//     enableBranchAutoDeletion: true || false,
//     enableBasicAuth: true || false, // required
//     basicAuthCredentials: "STRING_VALUE",
//     customRules: [ // CustomRules
//       { // CustomRule
//         source: "STRING_VALUE", // required
//         target: "STRING_VALUE", // required
//         status: "STRING_VALUE",
//         condition: "STRING_VALUE",
//       },
//     ],
//     productionBranch: { // ProductionBranch
//       lastDeployTime: new Date("TIMESTAMP"),
//       status: "STRING_VALUE",
//       thumbnailUrl: "STRING_VALUE",
//       branchName: "STRING_VALUE",
//     },
//     buildSpec: "STRING_VALUE",
//     customHeaders: "STRING_VALUE",
//     enableAutoBranchCreation: true || false,
//     autoBranchCreationPatterns: [ // AutoBranchCreationPatterns
//       "STRING_VALUE",
//     ],
//     autoBranchCreationConfig: { // AutoBranchCreationConfig
//       stage: "PRODUCTION" || "BETA" || "DEVELOPMENT" || "EXPERIMENTAL" || "PULL_REQUEST",
//       framework: "STRING_VALUE",
//       enableAutoBuild: true || false,
//       environmentVariables: {
//         "<keys>": "STRING_VALUE",
//       },
//       basicAuthCredentials: "STRING_VALUE",
//       enableBasicAuth: true || false,
//       enablePerformanceMode: true || false,
//       buildSpec: "STRING_VALUE",
//       enablePullRequestPreview: true || false,
//       pullRequestEnvironmentName: "STRING_VALUE",
//     },
//     repositoryCloneMethod: "SSH" || "TOKEN" || "SIGV4",
//     cacheConfig: { // CacheConfig
//       type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required
//     },
//     webhookCreateTime: new Date("TIMESTAMP"),
//     wafConfiguration: { // WafConfiguration
//       webAclArn: "STRING_VALUE",
//       wafStatus: "ASSOCIATING" || "ASSOCIATION_FAILED" || "ASSOCIATION_SUCCESS" || "DISASSOCIATING" || "DISASSOCIATION_FAILED",
//       statusReason: "STRING_VALUE",
//     },
//   },
// };

GetAppCommand Input

See GetAppCommandInput for more details

Parameter
Type
Description
appId
Required
string | undefined

The unique ID for an Amplify app.

GetAppCommand Output

See GetAppCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
app
Required
App | undefined

Represents the different branches of a repository for building, deploying, and hosting an Amplify app.

Throws

Name
Fault
Details
BadRequestException
client

A request contains unexpected data.

InternalFailureException
server

The service failed to perform an operation due to an internal issue.

NotFoundException
client

An entity was not found during an operation.

UnauthorizedException
client

An operation failed due to a lack of access.

AmplifyServiceException
Base exception class for all service exceptions from Amplify service.