全部产品
Search
文档中心

Resource Orchestration Service:DATASOURCE::CS::ClusterUserKubeconfig

更新时间:Jun 26, 2025

DATASOURCE::CS::ClusterUserKubeconfig digunakan untuk menanyakan file kubeconfig dari kluster Container Service for Kubernetes (ACK) berdasarkan ID kluster.

Sintaksis

{
  "Type": "DATASOURCE::CS::ClusterUserKubeconfig",
  "Properties": {
    "PrivateIpAddress": Boolean,
    "ClusterId": String,
    "TemporaryDurationMinutes": Integer,
    "RefreshOptions": String
  }
}

Properti

Properti

Tipe

Diperlukan

Dapat Diedit

Deskripsi

Batasan

PrivateIpAddress

Boolean

Tidak

Ya

Menentukan apakah hanya akan menanyakan file kubeconfig yang digunakan untuk terhubung ke kluster melalui jaringan internal.

Nilai valid:

  • true: hanya menanyakan file kubeconfig yang digunakan untuk terhubung ke kluster melalui jaringan internal.

  • false (default): hanya menanyakan file kubeconfig yang digunakan untuk terhubung ke kluster melalui Internet.

ClusterId

String

Ya

Ya

ID kluster.

Tidak ada.

TemporaryDurationMinutes

Integer

Tidak

Ya

Masa berlaku file kubeconfig sementara.

Unit: menit. Nilai valid: 15 hingga 4320.

Catatan

Jika Anda membiarkan properti ini kosong, sistem secara otomatis menentukan masa berlaku. Masa berlaku ditunjukkan oleh Expiration dalam nilai pengembalian.

RefreshOptions

String

Tidak

Ya

Kebijakan pembaruan untuk sumber daya sumber data ketika tumpukan diperbarui.

Nilai valid:

  • Never (default): tidak memperbarui sumber daya sumber data ketika tumpukan diperbarui.

  • Always: memperbarui sumber daya sumber data ketika tumpukan diperbarui.

Nilai Pengembalian

Fn::GetAtt

  • ClusterId: ID kluster.

  • Config: Konfigurasi akses kluster.

  • Expiration: Waktu kedaluwarsa file kubeconfig. Format waktu mengikuti RFC 3339 dan ditampilkan dalam UTC.

Contoh

YAML format

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 format

{
  "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"
        ]
      }
    }
  }
}