×

GET /v1/clusters

描述 (Description)

参数 (Parameters)

查询参数 (Query Parameters)

名称 (Name) 描述 (Description) 必填 (Required) 默认值 (Default) 模式 (Pattern)

查询 (query)

-

空 (null)

返回类型 (Return Type)

内容类型 (Content Type)

  • application/json

响应 (Responses)

表 1. HTTP 响应代码 (Table 1. HTTP Response Codes)
代码 (Code) 消息 (Message) 数据类型 (Datatype)

200

成功的响应。(A successful response.)

V1ClustersList

0

意外的错误响应。(An unexpected error response.)

GooglerpcStatus

示例 (Samples)

常用对象引用 (Common object reference)

ClusterHealthStatusHealthStatusLabel

  • UNAVAILABLE: 只有收集器才能具有不可用状态 (UNAVAILABLE: Only collector can have unavailable status)

枚举值 (Enum Values)

UNINITIALIZED

UNAVAILABLE

UNHEALTHY

DEGRADED

HEALTHY

ClusterUpgradeStatusUpgradability

  • SENSOR_VERSION_HIGHER: 当我们检测到传感器运行的版本高于此中心时,就会出现 SENSOR_VERSION_HIGHER。这是意外情况,但根据客户执行的修补程序可能会发生。在这种情况下,我们不会自动“升级”传感器,因为即使自动升级设置已启用,这也将是降级。用户将被允许手动触发升级,但强烈建议他们在先升级中心之前不要这样做,因为这是不受支持的配置。(SENSOR_VERSION_HIGHER: SENSOR_VERSION_HIGHER occurs when we detect that the sensor is running a newer version than this Central. This is unexpected, but can occur depending on the patches a customer does. In this case, we will NOT automatically "upgrade" the sensor, since that would be a downgrade, even if the autoupgrade setting is on. The user will be allowed to manually trigger the upgrade, but they are strongly discouraged from doing so without upgrading Central first, since this is an unsupported configuration.)

枚举值 (Enum Values)

UNSET

UP_TO_DATE

MANUAL_UPGRADE_REQUIRED

AUTO_UPGRADE_POSSIBLE

SENSOR_VERSION_HIGHER

ClusterUpgradeStatusUpgradeProcessStatus

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

active

布尔值

id

字符串

targetVersion

字符串

upgraderImage

字符串

initiatedAt

日期

日期时间

progress

StorageUpgradeProgress

type

UpgradeProcessStatusUpgradeProcessType

UPGRADE, CERT_ROTATION,

GooglerpcStatus

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

code

整数

int32

message

字符串

details

ProtobufAny 列表 ProtobufAny

ProtobufAny

Any包含任意序列化协议缓冲区消息以及描述序列化消息类型的URL。

Protobuf库提供支持,以实用函数或Any类型的附加生成方法的形式打包/解包Any值。

示例1:在C++中打包和解包消息。

Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
  ...
}

示例2:在Java中打包和解包消息。

Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
  foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
  foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
  any.Unpack(foo)
  ...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
  ...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
  ...
}

Protobuf库提供的打包方法默认使用“type.googleapis.com/full.type.name”作为类型URL,解包方法仅使用类型URL中最后一个“/”后的完全限定类型名称,例如“foo.bar.com/x/y.z”将产生类型名称“y.z”。

JSON表示

Any值的JSON表示使用反序列化、嵌入消息的常规表示,以及包含类型URL的附加字段@type。示例

package google.profile;
message Person {
  string first_name = 1;
  string last_name = 2;
}
{
  "@type": "type.googleapis.com/google.profile.Person",
  "firstName": <string>,
  "lastName": <string>
}

如果嵌入的消息类型是众所周知的并且具有自定义JSON表示,则该表示将被嵌入,添加一个字段value,该字段除了@type字段外还包含自定义JSON。示例(对于消息[google.protobuf.Duration][])

{
  "@type": "type.googleapis.com/google.protobuf.Duration",
  "value": "1.212s"
}
字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

@type

字符串

唯一标识序列化协议缓冲区消息类型的URL/资源名称。此字符串必须包含至少一个“/”字符。URL路径的最后一部分必须表示类型的完全限定名称(如path/google.protobuf.Duration)。名称应采用规范形式(例如,不接受前导“.”)。在实践中,团队通常会预编译他们期望在Any上下文中使用的所有类型到二进制文件中。但是,对于使用方案httphttps或无方案的URL,可以选择设置一个类型服务器,将类型URL映射到消息定义,如下所示:* 如果没有提供方案,则假定为https。* 对URL的HTTP GET必须产生二进制格式的[google.protobuf.Type][]值,或产生错误。* 应用程序允许根据URL缓存查找结果,或将其预编译到二进制文件中以避免任何查找。因此,需要在类型更改时保留二进制兼容性。(使用版本化的类型名称来管理重大更改。)注意:此功能目前在官方protobuf版本中不可用,并且不用于以type.googleapis.com开头的类型URL。截至2023年5月,没有广泛使用的类型服务器实现,也没有计划实现一个。除了httphttps(或空方案)之外的方案可能会与特定于实现的语义一起使用。

StorageAWSProviderMetadata

StorageAdmissionControlHealthInfo

AdmissionControlHealthInfo承载有关准入控制部署的数据,但不包括从此数据派生的准入控制健康状态。不包含聚合的准入控制健康状态,因为它是在中心派生的,而不是在首先报告AdmissionControlHealthInfo(传感器)的组件中派生的。

以下字段被设置为可选/可为空,因为尝试获取它们时可能会出现错误,并且0的默认值可能会与实际值0混淆。如果尝试获取某个字段时发生错误,则该字段将不存在(而不是具有默认值)。

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

totalDesiredPods

整数

int32

totalReadyPods

整数

int32

statusErrors

字符串列表

尝试获取准入控制健康信息时发生的错误集合。

StorageAdmissionControllerConfig

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

enabled

布尔值

timeoutSeconds

整数

int32

scanInline

布尔值

disableBypass

布尔值

enforceOnUpdates

布尔值

StorageAuditLogFileState

AuditLogFileState tracks the last audit log event timestamp and ID that was collected by Compliance For internal use only
字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

collectLogsSince

日期

日期时间

lastAuditId

字符串

StorageAzureProviderMetadata

StorageCluster

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

id

字符串

name

字符串

type

StorageClusterType

GENERIC_CLUSTER, KUBERNETES_CLUSTER, OPENSHIFT_CLUSTER, OPENSHIFT4_CLUSTER,

labels

字符串映射

mainImage

字符串

collectorImage

字符串

centralApiEndpoint

字符串

runtimeSupport

布尔值

collectionMethod

StorageCollectionMethod

UNSET_COLLECTION, NO_COLLECTION, KERNEL_MODULE, EBPF, CORE_BPF,

admissionController

布尔值

admissionControllerUpdates

布尔值

admissionControllerEvents

布尔值

status

StorageClusterStatus

dynamicConfig

StorageDynamicClusterConfig

tolerationsConfig

StorageTolerationsConfig

priority

字符串

int64

healthStatus

StorageClusterHealthStatus

slimCollector

布尔值

helmConfig

StorageCompleteClusterConfig

mostRecentSensorId

StorageSensorDeploymentIdentification

auditLogState

StorageAuditLogFileState 映射 StorageAuditLogFileState

仅供内部使用。

initBundleId

字符串

managedBy

StorageManagerType

MANAGER_TYPE_UNKNOWN, MANAGER_TYPE_MANUAL, MANAGER_TYPE_HELM_CHART, MANAGER_TYPE_KUBERNETES_OPERATOR,

StorageClusterCertExpiryStatus

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

sensorCertExpiry

日期

日期时间

sensorCertNotBefore

日期

日期时间

StorageClusterHealthStatus

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

id

字符串

collectorHealthInfo

StorageCollectorHealthInfo

admissionControlHealthInfo

StorageAdmissionControlHealthInfo

scannerHealthInfo

StorageScannerHealthInfo

sensorHealthStatus

ClusterHealthStatusHealthStatusLabel

UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY,

collectorHealthStatus

ClusterHealthStatusHealthStatusLabel

UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY,

overallHealthStatus

ClusterHealthStatusHealthStatusLabel

UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY,

admissionControlHealthStatus

ClusterHealthStatusHealthStatusLabel

UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY,

scannerHealthStatus

ClusterHealthStatusHealthStatusLabel

UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY,

lastContact

日期

日期时间

healthInfoComplete

布尔值

StorageClusterMetadata

ClusterMetadata包含有关集群基础设施的元数据信息。

StorageClusterMetadataType

枚举值 (Enum Values)

UNSPECIFIED

AKS

ARO

EKS

GKE

OCP

OSD

ROSA

StorageClusterStatus

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

sensorVersion

字符串

DEPRECATEDLastContact

日期

此字段已从49.0版本开始弃用。请改用healthStatus.lastContact。

日期时间

providerMetadata

StorageProviderMetadata

orchestratorMetadata

StorageOrchestratorMetadata

upgradeStatus

StorageClusterUpgradeStatus

certExpiryStatus

StorageClusterCertExpiryStatus

StorageClusterType

枚举值 (Enum Values)

GENERIC_CLUSTER

KUBERNETES_CLUSTER

OPENSHIFT_CLUSTER

OPENSHIFT4_CLUSTER

StorageClusterUpgradeStatus

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

upgradability

ClusterUpgradeStatusUpgradability

UNSET, UP_TO_DATE, MANUAL_UPGRADE_REQUIRED, AUTO_UPGRADE_POSSIBLE, SENSOR_VERSION_HIGHER,

upgradabilityStatusReason

字符串

mostRecentProcess

ClusterUpgradeStatusUpgradeProcessStatus

StorageCollectionMethod

枚举值 (Enum Values)

UNSET_COLLECTION

NO_COLLECTION

KERNEL_MODULE

EBPF

CORE_BPF

StorageCollectorHealthInfo

CollectorHealthInfo 包含收集器部署数据,但不包含从此数据派生的收集器运行状况状态。未包含聚合的收集器运行状况状态,因为它是在中心派生的,而不是在首先报告 CollectorHealthInfo(传感器)的组件中派生的。

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

版本

字符串

totalDesiredPods

整数

int32

totalReadyPods

整数

int32

已注册节点总数

整数

int32

statusErrors

字符串列表

尝试获取收集器运行状况信息时发生的错误集合。

StorageCompleteClusterConfig

编码完整的集群配置,不包括 ID/名称标识符,包括静态和动态设置。

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

dynamicConfig

StorageDynamicClusterConfig

静态配置

StorageStaticClusterConfig

配置指纹

字符串

集群标签

字符串映射

StorageDynamicClusterConfig

静态和动态集群配置之间的区别在于,动态值通过中心到传感器的 gRPC 连接发送。这样做的好处是可以允许在不重启安全集群组件的情况下“热重载”值。

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

准入控制器配置

StorageAdmissionControllerConfig

注册表覆盖

字符串

禁用审计日志

布尔值

StorageGoogleProviderMetadata

StorageManagerType

枚举值 (Enum Values)

MANAGER_TYPE_UNKNOWN

MANAGER_TYPE_MANUAL

MANAGER_TYPE_HELM_CHART

MANAGER_TYPE_KUBERNETES_OPERATOR

StorageOrchestratorMetadata

StorageProviderMetadata

StorageScannerHealthInfo

ScannerHealthInfo 代表部署在安全集群(所谓的“本地扫描器”)上的扫描器实例的运行状况信息。当扫描器部署在中央集群上时,不使用以下消息。ScannerHealthInfo 包含有关扫描器部署的数据,但不包含从此数据派生的扫描器运行状况状态。未包含聚合的扫描器运行状况状态,因为它是在中心派生的,而不是在首先报告 ScannerHealthInfo(传感器)的组件中派生的。

以下字段被设置为可选/可为空,因为尝试获取它们时可能会出现错误,并且0的默认值可能会与实际值0混淆。如果尝试获取某个字段时发生错误,则该字段将不存在(而不是具有默认值)。

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

所需的分析器 Pod 总数

整数

int32

已准备好的分析器 Pod 总数

整数

int32

所需的数据库 Pod 总数

整数

int32

已准备好的数据库 Pod 总数

整数

int32

statusErrors

字符串列表

尝试获取扫描器运行状况信息时发生的错误集合。

StorageSensorDeploymentIdentification

StackRoxDeploymentIdentification 旨在唯一标识 StackRox Sensor 部署。它用于确定传感器连接来自已重新启动或重新创建(可能在网络分区之后)的传感器 Pod,还是来自不同命名空间或集群中的部署。

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

系统命名空间 ID

字符串

默认命名空间 ID

字符串

应用命名空间

字符串

应用命名空间 ID

字符串

应用服务帐户 ID

字符串

k8s 节点名称

字符串

StorageStaticClusterConfig

静态和动态集群配置之间的区别在于,静态值不会通过中心到传感器的 gRPC 连接发送。例如,它们用于生成可用于设置安全集群的 k8s 组件的清单。它们**不会**动态重新加载。

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

type

StorageClusterType

GENERIC_CLUSTER, KUBERNETES_CLUSTER, OPENSHIFT_CLUSTER, OPENSHIFT4_CLUSTER,

mainImage

字符串

centralApiEndpoint

字符串

collectionMethod

StorageCollectionMethod

UNSET_COLLECTION, NO_COLLECTION, KERNEL_MODULE, EBPF, CORE_BPF,

collectorImage

字符串

admissionController

布尔值

admissionControllerUpdates

布尔值

tolerationsConfig

StorageTolerationsConfig

slimCollector

布尔值

admissionControllerEvents

布尔值

StorageTolerationsConfig

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

已禁用

布尔值

StorageUpgradeProgress

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

升级状态

UpgradeProgressUpgradeState

UPGRADE_INITIALIZING, UPGRADER_LAUNCHING, UPGRADER_LAUNCHED, PRE_FLIGHT_CHECKS_COMPLETE, UPGRADE_OPERATIONS_DONE, UPGRADE_COMPLETE, UPGRADE_INITIALIZATION_ERROR, PRE_FLIGHT_CHECKS_FAILED, UPGRADE_ERROR_ROLLING_BACK, UPGRADE_ERROR_ROLLED_BACK, UPGRADE_ERROR_ROLLBACK_FAILED, UPGRADE_ERROR_UNKNOWN, UPGRADE_TIMED_OUT,

升级状态详情

字符串

日期

日期时间

UpgradeProcessStatusUpgradeProcessType

  • UPGRADE:UPGRADE 代表传感器版本升级。

  • CERT_ROTATION:CERT_ROTATION 代表仅轮换集群使用的 TLS 证书的升级过程,而无需更改任何其他内容。

枚举值 (Enum Values)

UPGRADE

CERT_ROTATION

UpgradeProgressUpgradeState

  • UPGRADER_LAUNCHING:进行中状态。

  • UPGRADE_COMPLETE:成功状态。请将所有进行中状态编号在此上方,所有错误状态编号在此下方。

  • UPGRADE_INITIALIZATION_ERROR:错误状态。

枚举值 (Enum Values)

UPGRADE_INITIALIZING

UPGRADER_LAUNCHING

UPGRADER_LAUNCHED

PRE_FLIGHT_CHECKS_COMPLETE

UPGRADE_OPERATIONS_DONE

UPGRADE_COMPLETE

UPGRADE_INITIALIZATION_ERROR

PRE_FLIGHT_CHECKS_FAILED

UPGRADE_ERROR_ROLLING_BACK

UPGRADE_ERROR_ROLLED_BACK

UPGRADE_ERROR_ROLLBACK_FAILED

UPGRADE_ERROR_UNKNOWN

UPGRADE_TIMED_OUT

V1ClustersList

字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

集群

StorageCluster 列表

clusterIdToRetentionInfo

V1DecommissionedClusterRetentionInfo 映射

V1DecommissionedClusterRetentionInfo

next available tag: 3
字段名称 必填 (Required) 可为空 类型 描述 (Description) 格式

已排除

布尔值

剩余删除天数

整数

int32