在一個阿里雲地區下根據資源棧組名稱查詢資源棧組詳情。
介面說明
本文將提供一個樣本,查詢杭州地區已有的自助系統管理權限模式的資源棧組MyStackGroup的資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ros:GetStackGroup |
get |
*StackGroup
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
資源棧組所屬的地區 ID。您可以調用 DescribeRegions 查看最新的阿里雲地區列表。 |
cn-hangzhou |
| StackGroupName |
string |
否 |
資源棧組名稱。名稱在單個地區內唯一。 說明
您必須且僅能指定 StackGroupName 或 StackGroupId 其中一個參數。 |
MyStackGroup |
| StackGroupId |
string |
否 |
資源棧組 ID。 說明
您必須且僅能指定 StackGroupName 或 StackGroupId 其中一個參數。 |
fd0ddef9-9540-4b42-a464-94f77835**** |
關於公用請求參數的詳情,請參見公用參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
14A07460-EBE7-47CA-9757-12CC4761D47A |
| StackGroup |
object |
資源棧組詳情。 |
|
| StackGroupId |
string |
資源棧組 ID。 |
fd0ddef9-9540-4b42-a464-94f77835**** |
| Status |
string |
資源棧組狀態。 取值:
|
ACTIVE |
| AdministrationRoleName |
string |
建立自助系統管理權限模式的資源棧組時,指定的供 ROS 扮演的 RAM 管理員角色名稱。若不指定,則預設返回 AliyunROSStackGroupAdministrationRole。 |
AliyunROSStackGroupAdministrationRole |
| Parameters |
array<object> |
資源棧組參數列表。 |
|
|
object |
|||
| ParameterKey |
string |
參數的名稱。 |
Amount |
| ParameterValue |
string |
參數的值。 |
12 |
| Description |
string |
資源棧組描述。 |
StackGroup Description |
| StackGroupName |
string |
資源棧組名稱。 |
MyStackGroup |
| ExecutionRoleName |
string |
建立自助系統管理權限模式的資源棧組時,需指定的供管理員角色(AliyunROSStackGroupAdministrationRole)扮演的 RAM 執行角色名稱。若不指定,則預設返回 AliyunROSStackGroupExecutionRole。 |
AliyunROSStackGroupExecutionRole |
| TemplateBody |
string |
模板主體的結構。 說明
不建議使用該返回參數,建議使用 TemplateContent 代替。 |
{"ROSTemplateFormatVersion": "2015-09-01"} |
| StackGroupDriftDetectionDetail |
object |
資源棧組最近一次成功完成偏差檢測的詳情。 |
|
| DriftDetectionTime |
string |
資源棧組偏差檢測時間。 |
2020-02-27T07:47:47 |
| TotalStackInstancesCount |
integer |
資源棧執行個體的數量。 |
2 |
| FailedStackInstancesCount |
integer |
偏差檢測失敗的資源棧執行個體的數量。 |
0 |
| DriftDetectionStatus |
string |
資源棧組偏差檢測狀態。 取值:
|
COMPLETED |
| StackGroupDriftStatus |
string |
資源棧組偏差狀態。 取值:
|
DRIFTED |
| InProgressStackInstancesCount |
integer |
偏差檢測中的資源棧執行個體的數量。 |
0 |
| InSyncStackInstancesCount |
integer |
處於同步狀態的資源棧執行個體的數量。 |
1 |
| CancelledStackInstancesCount |
integer |
取消偏差檢測的資源棧執行個體的數量。 |
0 |
| DriftedStackInstancesCount |
integer |
處於偏差狀態的資源棧執行個體的數量。 |
1 |
| ResourceGroupId |
string |
資源群組 ID。取決於建立資源棧組時,指定的資源群組 ID。 |
rg-acfmxazb4ph6aiy**** |
| PermissionModel |
string |
授權模式。 取值:
說明
關於資源棧組的授權模式,請參見概覽。 |
SELF_MANAGED |
| AutoDeployment |
object |
自動部署設定資訊。 說明
僅當 PermissionModel 為 SERVICE_MANAGED 時,才會返回此參數。 |
|
| Enabled |
boolean |
啟用或者禁用自動部署。 取值:
|
true |
| RetainStacksOnAccountRemoval |
boolean |
目標資源夾中刪除成員帳號時,是否保留成員帳號中的資源棧。 取值:
說明
僅當 Enabled 返回 true 時,才會返回此參數。 |
true |
| RdFolderIds |
array |
資來源目錄中的目標資源夾 ID 列表。用於將資源棧執行個體部署在此資源夾中的所有帳號中。 說明
僅當 PermissionModel 為 SERVICE_MANAGED 時,才會返回此參數。 |
|
|
string |
資來源目錄中的目標資源夾 ID 列表。用於將資源棧執行個體部署在此資源夾中的所有帳號中。 說明
僅當 PermissionModel 為 SERVICE_MANAGED 時,才會返回此參數。 |
["fd-4PvlVLOL8v"] |
|
| TemplateContent |
string |
模板主體的結構,JSON 格式。 更多資訊,請參見模板文法。 |
{ "ROSTemplateFormatVersion": "2015-09-01" } |
| CreateTime |
string |
資源棧組建立時間。 |
2024-06-14T02:13:50 |
| UpdateTime |
string |
資源棧組更新時間。 |
2024-06-15T02:01:00 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
"StackGroup": {
"StackGroupId": "fd0ddef9-9540-4b42-a464-94f77835****",
"Status": "ACTIVE",
"AdministrationRoleName": "AliyunROSStackGroupAdministrationRole",
"Parameters": [
{
"ParameterKey": "Amount",
"ParameterValue": "12"
}
],
"Description": "StackGroup Description",
"StackGroupName": "MyStackGroup",
"ExecutionRoleName": "AliyunROSStackGroupExecutionRole",
"TemplateBody": "{\"ROSTemplateFormatVersion\": \"2015-09-01\"}",
"StackGroupDriftDetectionDetail": {
"DriftDetectionTime": "2020-02-27T07:47:47",
"TotalStackInstancesCount": 2,
"FailedStackInstancesCount": 0,
"DriftDetectionStatus": "COMPLETED",
"StackGroupDriftStatus": "DRIFTED",
"InProgressStackInstancesCount": 0,
"InSyncStackInstancesCount": 1,
"CancelledStackInstancesCount": 0,
"DriftedStackInstancesCount": 1
},
"ResourceGroupId": "rg-acfmxazb4ph6aiy****",
"PermissionModel": "SELF_MANAGED",
"AutoDeployment": {
"Enabled": true,
"RetainStacksOnAccountRemoval": true
},
"RdFolderIds": [
"[\"fd-4PvlVLOL8v\"]"
],
"TemplateContent": "{\n \"ROSTemplateFormatVersion\": \"2015-09-01\"\n}",
"CreateTime": "2024-06-14T02:13:50",
"UpdateTime": "2024-06-15T02:01:00"
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。