DATASOURCE::CS::ClusterUserKubeconfig類型用於根據叢集ID查詢訪問該叢集的Kubeconfig配置。
文法
{
"Type": "DATASOURCE::CS::ClusterUserKubeconfig",
"Properties": {
"PrivateIpAddress": Boolean,
"ClusterId": String,
"TemporaryDurationMinutes": Integer,
"RefreshOptions": String
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
PrivateIpAddress | Boolean | 否 | 是 | 是否擷取內網串連配置。 | 取值:
|
ClusterId | String | 是 | 是 | 叢集ID。 | 無 |
TemporaryDurationMinutes | Integer | 否 | 是 | 臨時kubeconfig有效期間。 | 單位:分鐘。取值範圍:15~4320。 說明 當不設定該參數時,將由系統自動確定一個更長的有效期間,具體到期時間通過返回的 |
RefreshOptions | String | 否 | 是 | 當資源棧更新時,資料來源資源的重新整理策略。 | 取值:
|
傳回值
Fn::GetAtt
ClusterId:ACK叢集的ID。
Config:叢集訪問配置。
Expiration:Kubeconfig的到期時間。以
RFC3339
格式顯示的UTC時間。
樣本
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ClusterId:
Description: The ID of the ACK cluster.
Type: String
Resources:
ClusterUserKubeconfig:
Properties:
ClusterId:
Ref: ClusterId
Type: DATASOURCE::CS::ClusterUserKubeconfig
Outputs:
ClusterId:
Description: The ID of the ACK cluster.
Value:
Fn::GetAtt:
- ClusterUserKubeconfig
- ClusterId
Config:
Description: The content of the kubeconfig file.
Value:
Fn::GetAtt:
- ClusterUserKubeconfig
- Config
Expiration:
Description: The expiration time of the kubeconfig file. The value is the UTC
time displayed in RFC3339 format.
Value:
Fn::GetAtt:
- ClusterUserKubeconfig
- Expiration
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ClusterId": {
"Type": "String",
"Description": "The ID of the ACK cluster."
}
},
"Resources": {
"ClusterUserKubeconfig": {
"Type": "DATASOURCE::CS::ClusterUserKubeconfig",
"Properties": {
"ClusterId": {
"Ref": "ClusterId"
}
}
}
},
"Outputs": {
"ClusterId": {
"Description": "The ID of the ACK cluster.",
"Value": {
"Fn::GetAtt": [
"ClusterUserKubeconfig",
"ClusterId"
]
}
},
"Config": {
"Description": "The content of the kubeconfig file.",
"Value": {
"Fn::GetAtt": [
"ClusterUserKubeconfig",
"Config"
]
}
},
"Expiration": {
"Description": "The expiration time of the kubeconfig file. The value is the UTC time displayed in RFC3339 format.",
"Value": {
"Fn::GetAtt": [
"ClusterUserKubeconfig",
"Expiration"
]
}
}
}
}