Data Types

Last updated: 2020-06-24 11:17:39

    Cluster

    Cluster information struct

    Used by actions: DescribeClusters.

    Name Type Description
    ClusterId String Cluster ID
    ClusterName String Cluster name
    ClusterDescription String Cluster description
    ClusterVersion String Cluster version. The default value is 1.10.5.
    ClusterOs String Cluster operating system. centOS 7.2x86_64 or ubuntu 16.04.1 LTSx86_64. Default value: ubuntu 16.04.1 LTSx86_64
    ClusterType String Cluster type. Managed cluster: MANAGED_CLUSTER; Self-deployed cluster: INDEPENDENT_CLUSTER.
    ClusterNetworkSettings ClusterNetworkSettings Cluster network-related parameters
    ClusterNodeNum Integer Current number of nodes in the cluster
    ProjectId Integer ID of the project to which the cluster belongs
    TagSpecification Array of TagSpecification
    ClusterStatus String
    Property String
    ClusterMaterNodeNum Integer Number of master nodes currently in the cluster
    ImageId String ID of the image used by the cluster
    Note: this field may return null, indicating that no valid value is obtained.
    OsCustomizeType String Container image tag
    Note: This field may return null, indicating that no valid value was found.
    ContainerRuntime String Runtime environment of the cluster. Values can be docker or containerd.
    Note: this field may return null, indicating that no valid value is obtained.
    CreatedTime String Creation time
    Note: this field may return null, indicating that no valid value is obtained.
    DeletionProtection Boolean Whether Deletion Protection is enabled
    Note: this field may return null, indicating that no valid value is obtained.

    ClusterAdvancedSettings

    Cluster advanced configurations

    Used by actions: CreateCluster.

    Name Type Required Description
    IPVS Boolean No Whether IPVS is enabled
    AsEnabled Boolean No Whether auto-scaling is enabled for nodes in the cluster (Enabling this function is not supported when you create a cluster)
    ContainerRuntime String No Type of runtime component used by the cluster. The types include "docker" and "containerd". Default value: docker
    NodeNameType String No
    ExtraArgs ClusterExtraArgs No Cluster custom parameter
    NetworkType String No Cluster network type, which can be GR (Global Router) or VPC-CNI. The default value is GR.
    IsNonStaticIpMode Boolean No Whether a cluster in VPC-CNI mode uses dynamic IP addresses. The default value is FALSE, which indicates that static IP addresses are used.

    ClusterBasicSettings

    Describes the basic configuration information of a cluster

    Used by actions: CreateCluster.

    Name Type Required Description
    ClusterOs String No Cluster operating system. CentOS 7.2x86_64 or Ubuntu 16.04.1 LTSx86_64. Default value: Ubuntu 16.04.1 LTSx86_64
    ClusterVersion String No Cluster version. The default value is 1.10.5.
    ClusterName String No Cluster name
    ClusterDescription String No Cluster description
    VpcId String No VPC ID, in the format of vpc-xxx, which is required when you create an empty managed cluster.
    ProjectId Integer No ID of the project to which the new resources in the cluster belong.
    TagSpecification Array of TagSpecification No
    OsCustomizeType String No
    NeedWorkSecurityGroup Boolean No

    ClusterCIDRSettings

    Container networking parameters for the cluster

    Used by actions: CreateCluster.

    Name Type Required Description
    ClusterCIDR String No CIDR used to assign container and service IPs for the cluster. It cannot conflict with the VPC’s CIDR or the CIDRs of other clusters in the same VPC
    IgnoreClusterCIDRConflict Boolean No Whether to ignore ClusterCIDR conflict errors, which are not ignored by default
    MaxNodePodNum Integer No Maximum number of pods on each node in the cluster
    MaxClusterServiceNum Integer No Maximum number of cluster services
    ServiceCIDR String No The CIDR block used to assign cluster service IP addresses. It must conflict with neither the VPC CIDR block nor with CIDR blocks of other clusters in the same VPC instance. The IP range must be within the private network IP range, such as 10.1.0.0/14, 192.168.0.1/18, and 172.16.0.0/16.
    EniSubnetIds Array of String No Subnet ID of the ENI in VPC-CNI network mode
    ClaimExpiredSeconds Integer No Repossession time of ENI IP addresses in VPC-CNI network mode, whose range is [300,15768000)

    ClusterExtraArgs

    Cluster master custom parameter

    Used by actions: CreateCluster.

    Name Type Required Description
    KubeAPIServer Array of String No kube-apiserver custom parameter
    Note: this field may return null, indicating that no valid value is obtained.
    KubeControllerManager Array of String No kube-controller-manager custom parameter
    Note: this field may return null, indicating that no valid value is obtained.
    KubeScheduler Array of String No kube-scheduler custom parameter
    Note: this field may return null, indicating that no valid value is obtained.

    ClusterNetworkSettings

    Cluster network-related parameters

    Used by actions: DescribeClusters.

    Name Type Required Description
    ClusterCIDR String Yes CIDR used to assign container and service IPs for the cluster. It cannot conflict with the VPC’s CIDR or the CIDRs of other clusters in the same VPC.
    IgnoreClusterCIDRConflict Boolean No Whether to ignore ClusterCIDR conflict errors. It defaults to not ignore.
    MaxNodePodNum Integer No Maximum number of pods on each node in the cluster. Default value: 256
    MaxClusterServiceNum Integer No Maximum number of cluster services. Default value: 256
    Ipvs Boolean No Whether IPVS is enabled. Default value: disabled
    VpcId String No Cluster VPC ID, which is required when you create an empty cluster; otherwise, it is automatically set to be consistent with that of the nodes in the cluster
    Cni Boolean No Whether CNI is enabled for network plugin(s). Default value: enabled

    DataDisk

    Described the configuration and information of k8s node data disk.

    Used by actions: AddExistedInstances、CreateCluster、CreateClusterAsGroup、CreateClusterInstances、DescribeClusterInstances.

    Name Type Description
    DiskType String Disk type
    Note: this field may return null, indicating that no valid values can be obtained.
    FileSystem String File system (ext3/ext4/xfs)
    Note: This field may return null, indicating that no valid value was found.
    DiskSize Integer Disk size (G)
    Note: This field may return null, indicating that no valid value was found.
    AutoFormatAndMount Boolean Whether the disk is auto-formatted and mounted
    Note: this field may return null, indicating that no valid value is obtained.
    MountTarget String Mounting directory
    Note: This field may return null, indicating that no valid value was found.

    EnhancedService

    Describes the configuration of enhanced services, such as Cloud Security and Cloud Monitor.

    Used by actions: AddExistedInstances、CreateCluster.

    Name Type Required Description
    SecurityService RunSecurityServiceEnabled No Enables cloud security service. If this parameter is not specified, the cloud security service will be enabled by default.
    MonitorService RunMonitorServiceEnabled No Enables cloud monitor service. If this parameter is not specified, the cloud monitor service will be enabled by default.

    ExistedInstance

    Information of existing instances

    Used by actions: DescribeExistedInstances.

    Name Type Description
    Usable Boolean Whether the instance supports being added to the cluster (TRUE: support; FALSE: not support).
    Note: This field may return null, indicating that no valid values can be obtained.
    UnusableReason String Reason that the instance does not support being added.
    Note: This field may return null, indicating that no valid values can be obtained.
    AlreadyInCluster String ID of the cluster in which the instance currently resides.
    Note: This field may return null, indicating that no valid values can be obtained.
    InstanceId String Instance ID, in the format of ins-xxxxxxxx.
    InstanceName String Instance name.
    Note: This field may return null, indicating that no valid values can be obtained.
    PrivateIpAddresses Array of String List of private IPs of the instance’s primary ENI.
    Note: This field may return null, indicating that no valid values can be obtained.
    PublicIpAddresses Array of String List of public IPs of the instance’s primary ENI.
    Note: This field may return null, indicating that no valid values can be obtained.
    CreatedTime String Creation time, which follows the ISO8601 standard and uses UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    Note: This field may return null, indicating that no valid values can be obtained.
    CPU Integer Instance’s number of CPU cores. Unit: cores.
    Note: This field may return null, indicating that no valid values can be obtained.
    Memory Integer Instance’s memory capacity. Unit: GB.
    Note: This field may return null, indicating that no valid values can be obtained.
    OsName String Operating system name.
    Note: This field may return null, indicating that no valid values can be obtained.
    InstanceType String Instance model.
    Note: This field may return null, indicating that no valid values can be obtained.
    AutoscalingGroupId String Auto scaling group ID
    Note: This field may return null, indicating that no valid value was found.
    InstanceChargeType String Instance billing method. Valid values: POSTPAID_BY_HOUR (pay-as-you-go hourly); CDHPAID (billed based on CDH, i.e., only CDH is billed but not the instances on CDH)
    Note: This field may return null, indicating that no valid value was found.

    ExistedInstancesForNode

    Configuration parameters of existing nodes in different roles

    Used by actions: CreateCluster.

    Name Type Required Description
    NodeRole String Yes Node role. Values: MASTER_ETCD, WORKER. You only need to specify MASTER_ETCD when creating a self-deployed cluster (INDEPENDENT_CLUSTER).
    ExistedInstancesPara ExistedInstancesPara Yes Reinstallation parameter of existing instances
    InstanceAdvancedSettingsOverride InstanceAdvancedSettings No Advanced node setting, which overrides the InstanceAdvancedSettings item set at the cluster level (currently valid for the ExtraArgs node custom parameter only)

    ExistedInstancesPara

    Reinstallation parameter of existing instances

    Used by actions: CreateCluster.

    Name Type Required Description
    InstanceIds Array of String Yes Cluster ID
    InstanceAdvancedSettings InstanceAdvancedSettings No Additional parameter to be set for the instance
    EnhancedService EnhancedService No Enhanced services. This parameter is used to specify whether to enable Cloud Security, Cloud Monitor and other services. If this parameter is not specified, Cloud Monitor and Cloud Security are enabled by default.
    LoginSettings LoginSettings No Node login information (currently only supports using Password or single KeyIds)
    SecurityGroupIds Array of String No Security group to which the instance belongs. This parameter can be obtained from the sgId field in the returned values of DescribeSecurityGroups. If this parameter is not specified, the default security group is bound. (Currently, you can only set a single sgId)
    HostName String No

    Filter

    Key-value pair filters used for conditional queries, such as filtering results by ID, name, and state.

    • If there are multiple Filter parameters, they are evaluated using the logical AND operator.
    • If a Filter contains multiple Values, they are evaluated using the logical OR operator.

    Take DescribeInstances as an example. You can use the following filters to query the instances in availability zone (zone) Guangzhou Zone 1 and whose billing plan (instance-charge-type) is pay-as-you-go:

    Filters.0.Name=zone
    &Filters.0.Values.0=ap-guangzhou-1
    &Filters.1.Name=instance-charge-type
    &Filters.1.Values.0=POSTPAID_BY_HOUR

    Used by actions: DescribeClusters、DescribeExistedInstances.

    Name Type Required Description
    Name String Yes Filters.
    Values Array of String Yes Filter values.

    ImageInstance

    Image details

    Used by actions: DescribeImages.

    Name Type Description
    Alias String Image alias
    Note: this field may return null, indicating that no valid values can be obtained.
    OsName String Operating system name
    Note: this field may return null, indicating that no valid values can be obtained.
    ImageId String Image ID
    Note: this field may return null, indicating that no valid values can be obtained.
    OsCustomizeType String Container image tag, DOCKER_CUSTOMIZE (container customized tag), GENERAL (general tag, default value)
    Note: this field may return null, indicating that no valid values can be obtained.

    Instance

    Cluster’s instance information

    Used by actions: DescribeClusterInstances.

    Name Type Description
    InstanceId String Instance ID
    InstanceRole String Node role: MASTER, WORKER, ETCD, MASTER_ETCD, and ALL. Default value: WORKER
    FailedReason String Reason for instance exception (or initialization)
    InstanceState String Instance status (running, initializing, or failed)
    DrainStatus String Whether the instance is drained
    Note: this field may return null, indicating that no valid value is obtained.
    InstanceAdvancedSettings InstanceAdvancedSettings Node settings
    Note: this field may return null, indicating that no valid value is obtained.
    CreatedTime String Creation time
    LanIP String Node private IP
    Note: this field may return null, indicating that no valid values can be obtained.
    NodePoolId String Resource pool ID
    Note: this field may return null, indicating that no valid values can be obtained.
    AutoscalingGroupId String ID of the auto-scaling group
    Note: this field may return null, indicating that no valid value is obtained.

    InstanceAdvancedSettings

    Describes K8s cluster configuration and related information.

    Used by actions: AddExistedInstances、CreateCluster、CreateClusterAsGroup、CreateClusterInstances、DescribeClusterInstances.

    Name Type Description
    MountTarget String Data disk mount point. By default, no data disk is mounted. Data disks in ext3, ext4, or XFS file system formats will be mounted directly, while data disks in other file systems and unformatted data disks will automatically be formatted as ext4 and then mounted. Please back up your data in advance. This setting is only applicable to CVMs with a single data disk.
    Note: This field may return null, indicating that no valid value was found.
    DockerGraphPath String Specified value of dockerd --graph. Default value: /var/lib/docker
    Note: This field may return null, indicating that no valid value was found.
    UserScript String Base64-encoded user script, which will be executed after the K8s component starts running. You need to ensure the reentrant and retry logic of the script. The script and its log files can be viewed at the node path: /data/ccs_userscript/. If you want to initialize nodes before adding them to the scheduling list, you can use this parameter together with the unschedulable parameter. After the final initialization of userScript is completed, add the kubectl uncordon nodename --kubeconfig=/root/.kube/config command to enable the node for scheduling.
    Note: This field may return null, indicating that no valid value was found.
    Unschedulable Integer Sets whether the added node is schedulable. 0 (default): schedulable; other values: unschedulable. After node initialization is completed, you can run kubectl uncordon nodename to enable this node for scheduling.
    Labels Array of Label Node label array
    Note: This field may return null, indicating that no valid value was found.
    DataDisks Array of DataDisk Data disk information
    Note: This field may return null, indicating that no valid value was found.
    ExtraArgs InstanceExtraArgs Information about node custom parameters
    Note: This field may return null, indicating that no valid value was found.

    InstanceDataDiskMountSetting

    Mounting configuration of the CVM instance data disk

    Used by actions: CreateCluster.

    Name Type Required Description
    InstanceType String Yes CVM instance type
    DataDisks Array of DataDisk Yes Data disk mounting information
    Zone String Yes Availability zone where the CVM instance is located

    InstanceExtraArgs

    Node custom parameter

    Used by actions: AddExistedInstances、CreateCluster、CreateClusterAsGroup、CreateClusterInstances、DescribeClusterInstances.

    Name Type Required Description
    Kubelet Array of String No Kubelet custom parameter
    Note: this field may return null, indicating that no valid value is obtained.

    Label

    k8s tags, generally exist as an array

    Used by actions: AddExistedInstances、CreateCluster、CreateClusterAsGroup、CreateClusterInstances、DescribeClusterInstances.

    Name Type Required Description
    Name String Yes
    Value String Yes

    LoginSettings

    Describes login settings of an instance.

    Used by actions: AddExistedInstances、CreateCluster.

    Name Type Required Description
    Password String No Login password of the instance. The password requirements vary among different operating systems:
  • For Linux instances, the password must be 8-30 characters long and contain at least two of the following types: [a-z], [A-Z], [0-9] and [( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ].
  • For Windows instances, the password must be 12-30 characters long and contain at least three of the following categories: [a-z], [A-Z], [0-9] and [( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /].

    If this parameter is not specified, a random password will be generated and sent to you via the Message Center.
    Note: this field may return null, indicating that no valid value is obtained.
  • KeyIds Array of String No List of key IDs. After an instance is associated with a key, you can access the instance with the private key in the key pair. You can call DescribeKeyPairs to obtain KeyId. A key and password cannot be specified at the same time. Windows instances do not support keys. Currently, you can only specify one key when purchasing an instance.
    Note: this field may return null, indicating that no valid value is obtained.
    KeepImageLogin String No Whether to keep the original settings of an image. You cannot specify this parameter and Password or KeyIds.N at the same time. You can specify this parameter as TRUE only when you create an instance using a custom image, a shared image, or an imported image. Valid values:
  • TRUE: keep the login settings of the image
  • FALSE: do not keep the login settings of the image

    Default value: FALSE.
    Note: This field may return null, indicating that no valid value is found.
  • RegionInstance

    Region information

    Used by actions: DescribeRegions.

    Name Type Description
    RegionName String Region name
    Note: this field may return null, indicating that no valid values can be obtained.
    RegionId Integer Region ID
    Note: this field may return null, indicating that no valid values can be obtained.
    Status String Region status
    Note: this field may return null, indicating that no valid values can be obtained.
    FeatureGates String Status of region-related features (return all attributes in JSON format)
    Note: this field may return null, indicating that no valid values can be obtained.
    Alias String Region abbreviation
    Note: this field may return null, indicating that no valid values can be obtained.
    Remark String Whitelisted location
    Note: this field may return null, indicating that no valid values can be obtained.

    ResourceDeleteOption

    The policy to deal with resources in the cluster when the cluster is deleted.

    Used by actions: DeleteCluster.

    Name Type Required Description
    ResourceType String Yes Resource type, for example CBS
    DeleteMode String Yes Specifies the policy to deal with resources in the cluster when the cluster is deleted. It can be terminate or retain.

    RouteInfo

    Object of cluster route

    Used by actions: DescribeClusterRoutes.

    Name Type Description
    RouteTableName String Route table name.
    DestinationCidrBlock String Destination CIDR.
    GatewayIp String Next hop address.

    RouteTableConflict

    Object of route table conflict

    Used by actions: DescribeRouteTableConflicts.

    Name Type Description
    RouteTableType String Route table type.
    RouteTableCidrBlock String Route table CIDR.
    Note: This field may return null, indicating that no valid values can be obtained.
    RouteTableName String Route table name.
    Note: This field may return null, indicating that no valid values can be obtained.
    RouteTableId String Route table ID.
    Note: This field may return null, indicating that no valid values can be obtained.

    RouteTableInfo

    Object of cluster route table

    Used by actions: DescribeClusterRouteTables.

    Name Type Description
    RouteTableName String Route table name.
    RouteTableCidrBlock String Route table CIDR.
    VpcId String VPC instance ID.

    RunInstancesForNode

    Node configuration parameters of different roles

    Used by actions: CreateCluster.

    Name Type Required Description
    NodeRole String Yes Node role. Values: MASTER_ETCD, WORKER. You only need to specify MASTER_ETCD when creating a self-deployed cluster (INDEPENDENT_CLUSTER).
    RunInstancesPara Array of String Yes Pass-through parameter for CVM creation in the format of a JSON string. For more information, see the API for creating a CVM instance. Pass any parameter other than common parameters. ImageId will be replaced with the image corresponding to the TKE cluster operating system.
    InstanceAdvancedSettingsOverrides Array of InstanceAdvancedSettings No An advanced node setting. This parameter overrides the InstanceAdvancedSettings item set at the cluster level and corresponds to RunInstancesPara in a one-to-one sequential manner (currently valid for the ExtraArgs node custom parameter only).

    RunMonitorServiceEnabled

    Describes information related to the Cloud Monitor service.

    Used by actions: AddExistedInstances、CreateCluster.

    Name Type Required Description
    Enabled Boolean No Whether to enable Cloud Monitor. Valid values:
  • TRUE: enable Cloud Monitor
  • FALSE: do not enable Cloud Monitor

    Default value: TRUE.
  • RunSecurityServiceEnabled

    Describes information related to the Cloud Security service.

    Used by actions: AddExistedInstances、CreateCluster.

    Name Type Required Description
    Enabled Boolean No Whether to enable Cloud Security. Valid values:
  • TRUE: enable Cloud Security
  • FALSE: do not enable Cloud Security

    Default value: TRUE.
  • Tag

    The type of resource the label is bound to. Type currently supported is cluster.

    Used by actions: CreateCluster、DescribeClusters.

    Name Type Required Description
    Key String No Tag key.
    Value String No Tag value.

    TagSpecification

    List of tag descriptions. By specifying this parameter, you can bind tags to corresponding resource instances at the same time. Currently, only tags are bound to cloud host instances.

    Used by actions: CreateCluster、DescribeClusters.

    Name Type Required Description
    ResourceType String No
    Tags Array of Tag No

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help