

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Applications applicationId Templates templateId
<a name="applications-applicationid-templates-templateid"></a>

## URI
<a name="applications-applicationid-templates-templateid-url"></a>

`/applications/applicationId/templates/templateId`

## HTTP 方法
<a name="applications-applicationid-templates-templateid-http-methods"></a>

### GET
<a name="applications-applicationid-templates-templateidget"></a>

**操作 ID：**`GetCloudFormationTemplate`

取得指定的 AWS CloudFormation 範本。


**路徑參數**  

| 名稱 | 類型 | 必要 | Description | 
| --- |--- |--- |--- |
| applicationId | String | True | 應用程式的 Amazon Resource Name (ARN)。 | 
| templateId | String | True | CreateCloudFormationTemplate 傳回的 UUID。模式：【0-9a-fA-F】\$18\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$112\$1 | 


**回應**  

| 狀態碼 | 回應模型 | Description | 
| --- |--- |--- |
| 200 | TemplateDetails | 成功 | 
| 400 | BadRequestException | 請求中的其中一個參數無效。 | 
| 403 | ForbiddenException | 用戶端未驗證。 | 
| 404 | NotFoundException | 請求中指定的資源 （例如，存取政策陳述式） 不存在。 | 
| 429 | TooManyRequestsException | 用戶端傳送的請求數量超過每單位時間允許的請求數量。 | 
| 500 | InternalServerErrorException |  AWS Serverless Application Repository 服務遇到內部錯誤。 | 

### OPTIONS
<a name="applications-applicationid-templates-templateidoptions"></a>


**路徑參數**  

| 名稱 | 類型 | 必要 | Description | 
| --- |--- |--- |--- |
| applicationId | String | True | 應用程式的 Amazon Resource Name (ARN)。 | 
| templateId | String | True | CreateCloudFormationTemplate 傳回的 UUID。模式：【0-9a-fA-F】\$18\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$112\$1 | 


**回應**  

| 狀態碼 | 回應模型 | Description | 
| --- |--- |--- |
| 200 | None | 200 個回應 | 

## 結構描述
<a name="applications-applicationid-templates-templateid-schemas"></a>

### 回應內文
<a name="applications-applicationid-templates-templateid-response-examples"></a>

#### TemplateDetails 結構描述
<a name="applications-applicationid-templates-templateid-response-body-templatedetails-example"></a>

```
{
  "templateId": "string",
  "templateUrl": "string",
  "applicationId": "string",
  "semanticVersion": "string",
  "status": enum,
  "creationTime": "string",
  "expirationTime": "string"
}
```

#### BadRequestException 結構描述
<a name="applications-applicationid-templates-templateid-response-body-badrequestexception-example"></a>

```
{
  "message": "string",
  "errorCode": "string"
}
```

#### ForbiddenException 結構描述
<a name="applications-applicationid-templates-templateid-response-body-forbiddenexception-example"></a>

```
{
  "message": "string",
  "errorCode": "string"
}
```

#### NotFoundException 結構描述
<a name="applications-applicationid-templates-templateid-response-body-notfoundexception-example"></a>

```
{
  "message": "string",
  "errorCode": "string"
}
```

#### TooManyRequestsException 結構描述
<a name="applications-applicationid-templates-templateid-response-body-toomanyrequestsexception-example"></a>

```
{
  "message": "string",
  "errorCode": "string"
}
```

#### InternalServerErrorException 結構描述
<a name="applications-applicationid-templates-templateid-response-body-internalservererrorexception-example"></a>

```
{
  "message": "string",
  "errorCode": "string"
}
```

## Properties
<a name="applications-applicationid-templates-templateid-properties"></a>

### BadRequestException
<a name="applications-applicationid-templates-templateid-model-badrequestexception"></a>

請求中的其中一個參數無效。


| 屬性 | Type | 必要 | Description | 
| --- |--- |--- |--- |
| errorCode | string | False | 400 | 
| message | string | False | 請求中的其中一個參數無效。 | 

### ForbiddenException
<a name="applications-applicationid-templates-templateid-model-forbiddenexception"></a>

用戶端未驗證。


| 屬性 | Type | 必要 | Description | 
| --- |--- |--- |--- |
| errorCode | string | False | 403 | 
| message | string | False | 用戶端未驗證。 | 

### InternalServerErrorException
<a name="applications-applicationid-templates-templateid-model-internalservererrorexception"></a>

 AWS Serverless Application Repository 服務遇到內部錯誤。


| 屬性 | Type | 必要 | Description | 
| --- |--- |--- |--- |
| errorCode | string | False | 500 | 
| message | string | False |  AWS Serverless Application Repository 服務遇到內部錯誤。 | 

### NotFoundException
<a name="applications-applicationid-templates-templateid-model-notfoundexception"></a>

請求中指定的資源 （例如，存取政策陳述式） 不存在。


| 屬性 | Type | 必要 | Description | 
| --- |--- |--- |--- |
| errorCode | string | False | 404 | 
| message | string | False | 請求中指定的資源 （例如，存取政策陳述式） 不存在。 | 

### TemplateDetails
<a name="applications-applicationid-templates-templateid-model-templatedetails"></a>

範本的詳細資訊。


| 屬性 | Type | 必要 | Description | 
| --- |--- |--- |--- |
| applicationId | string | True | 應用程式 Amazon Resource Name (ARN)。 | 
| creationTime | string | True | 建立此資源的日期和時間。 | 
| expirationTime | string | True | 此範本過期的日期和時間。範本會在建立 1 小時後過期。 | 
| semanticVersion | string | True | 應用程式語意版本： [https://semver.org/](https://semver.org/)  | 
| status | string值： `PREPARING \| ACTIVE \| EXPIRED` | True | 範本建立工作流程的狀態。可能的值： `PREPARING \| ACTIVE \| EXPIRED` | 
| templateId | string | True | CreateCloudFormationTemplate 傳回的 UUID。模式：【0-9a-fA-F】\$18\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$14\$1\$1-【0-9a-fA-F】\$112\$1 | 
| templateUrl | string | True | 範本的連結，可用於使用 部署應用程式 AWS CloudFormation。 | 

### TooManyRequestsException
<a name="applications-applicationid-templates-templateid-model-toomanyrequestsexception"></a>

用戶端傳送的請求數量超過每單位時間允許的請求數量。


| 屬性 | Type | 必要 | Description | 
| --- |--- |--- |--- |
| errorCode | string | False | 429 | 
| message | string | False | 用戶端傳送的請求數量超過每單位時間允許的請求數量。 | 

## 另請參閱
<a name="applications-applicationid-templates-templateid-see-also"></a>

如需在其中一種語言特定 AWS SDKs和參考中使用此 API 的詳細資訊，請參閱下列內容：

### GetCloudFormationTemplate
<a name="GetCloudFormationTemplate-see-also"></a>
+ [AWS 命令列界面 V2](/goto/cli2/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 .NET V4 的 AWS 開發套件](/goto/DotNetSDKV4/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 C\$1\$1 的 AWS SDK](/goto/SdkForCpp/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 Go v2 的 AWS 開發套件](/goto/SdkForGoV2/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 Java 的 AWS SDK 第 2 版](/goto/SdkForJavaV2/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 JavaScript V3 的 AWS 開發套件](/goto/SdkForJavaScriptV3/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 Kotlin 的 AWS 開發套件](/goto/SdkForKotlin/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 PHP V3 的 AWS 開發套件](/goto/SdkForPHPV3/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 Python 的 AWS 開發套件](/goto/boto3/serverlessrepo-2017-09-08/GetCloudFormationTemplate)
+ [適用於 Ruby V3 的 AWS 開發套件](/goto/SdkForRubyV3/serverlessrepo-2017-09-08/GetCloudFormationTemplate)