×

POST /v1/clusters

描述 (Description)

参数 (Parameters)

请求体参数 (Body Parameter)

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

请求体 (body)

存储集群 (StorageCluster)

是 (X)

返回类型 (Return Type)

内容类型 (Content Type)

  • application/json

响应 (Responses)

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

200

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

V1ClusterResponse

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

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

active

布尔值 (Boolean)

id

字符串 (String)

targetVersion

字符串 (String)

upgraderImage

字符串 (String)

initiatedAt

日期 (Date)

日期时间 (date-time)

progress

StorageUpgradeProgress

type

UpgradeProcessStatusUpgradeProcessType

UPGRADE, CERT_ROTATION,

GooglerpcStatus

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

code

整数 (Integer)

int32

message

字符串 (String)

details

ProtobufAny 列表

ProtobufAny

Any 包含任意序列化的 Protocol Buffer 消息以及描述序列化消息类型的 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"
}
字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

@type

字符串 (String)

唯一标识序列化 Protocol Buffer 消息类型的 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 混淆。如果尝试获取某个字段时发生错误,则该字段将不存在(而不是具有默认值)。

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

totalDesiredPods

整数 (Integer)

int32

totalReadyPods

整数 (Integer)

int32

statusErrors

string 列表

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

StorageAdmissionControllerConfig

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

enabled

布尔值 (Boolean)

timeoutSeconds

整数 (Integer)

int32

scanInline

布尔值 (Boolean)

disableBypass

布尔值 (Boolean)

enforceOnUpdates

布尔值 (Boolean)

StorageAuditLogFileState

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

collectLogsSince

日期 (Date)

日期时间 (date-time)

lastAuditId

字符串 (String)

StorageAzureProviderMetadata

StorageCluster

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

name

字符串 (String)

type

StorageClusterType

GENERIC_CLUSTER, KUBERNETES_CLUSTER, OPENSHIFT_CLUSTER, OPENSHIFT4_CLUSTER,

labels

string 映射

mainImage

字符串 (String)

collectorImage

字符串 (String)

centralApiEndpoint

字符串 (String)

runtimeSupport

布尔值 (Boolean)

collectionMethod

StorageCollectionMethod

UNSET_COLLECTION, NO_COLLECTION, KERNEL_MODULE, EBPF, CORE_BPF,

admissionController

布尔值 (Boolean)

admissionControllerUpdates

布尔值 (Boolean)

admissionControllerEvents

布尔值 (Boolean)

status

StorageClusterStatus

dynamicConfig

StorageDynamicClusterConfig

tolerationsConfig

StorageTolerationsConfig

priority

字符串 (String)

int64

healthStatus

StorageClusterHealthStatus

slimCollector

布尔值 (Boolean)

helmConfig

StorageCompleteClusterConfig

mostRecentSensorId

StorageSensorDeploymentIdentification

auditLogState

StorageAuditLogFileState 映射

仅供内部使用。

initBundleId

字符串 (String)

managedBy

StorageManagerType

MANAGER_TYPE_UNKNOWN, MANAGER_TYPE_MANUAL, MANAGER_TYPE_HELM_CHART, MANAGER_TYPE_KUBERNETES_OPERATOR,

StorageClusterCertExpiryStatus

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

sensorCertExpiry

日期 (Date)

日期时间 (date-time)

sensorCertNotBefore

日期 (Date)

日期时间 (date-time)

StorageClusterHealthStatus

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

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

日期 (Date)

日期时间 (date-time)

healthInfoComplete

布尔值 (Boolean)

StorageClusterMetadata

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

StorageClusterMetadataType

枚举值 (Enum Values)

UNSPECIFIED

AKS

ARO

EKS

GKE

OCP

OSD

ROSA

StorageClusterStatus

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

sensorVersion

字符串 (String)

DEPRECATEDLastContact

日期 (Date)

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

日期时间 (date-time)

providerMetadata

StorageProviderMetadata

orchestratorMetadata

StorageOrchestratorMetadata

upgradeStatus

StorageClusterUpgradeStatus

certExpiryStatus

StorageClusterCertExpiryStatus

StorageClusterType

枚举值 (Enum Values)

GENERIC_CLUSTER

KUBERNETES_CLUSTER

OPENSHIFT_CLUSTER

OPENSHIFT4_CLUSTER

StorageClusterUpgradeStatus

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

upgradability

ClusterUpgradeStatusUpgradability

UNSET, UP_TO_DATE, MANUAL_UPGRADE_REQUIRED, AUTO_UPGRADE_POSSIBLE, SENSOR_VERSION_HIGHER,

upgradabilityStatusReason

字符串 (String)

mostRecentProcess

ClusterUpgradeStatusUpgradeProcessStatus

StorageCollectionMethod

枚举值 (Enum Values)

UNSET_COLLECTION

NO_COLLECTION

KERNEL_MODULE

EBPF

CORE_BPF

StorageCollectorHealthInfo

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

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

version

字符串 (String)

totalDesiredPods

整数 (Integer)

int32

totalReadyPods

整数 (Integer)

int32

totalRegisteredNodes

整数 (Integer)

int32

statusErrors

string 列表

尝试获取收集器健康信息时发生的错误集合。

StorageCompleteClusterConfig

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

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

dynamicConfig

StorageDynamicClusterConfig

staticConfig

StorageStaticClusterConfig

configFingerprint

字符串 (String)

clusterLabels

string 映射

StorageDynamicClusterConfig

静态和动态集群配置的区别在于,动态值通过中心到传感器的 gRPC 连接发送。这使得无需重启安全集群组件即可“热重载”值,从而带来了好处。

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

admissionControllerConfig

StorageAdmissionControllerConfig

registryOverride

字符串 (String)

disableAuditLogs

布尔值 (Boolean)

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 混淆。如果尝试获取某个字段时发生错误,则该字段将不存在(而不是具有默认值)。

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

totalDesiredAnalyzerPods

整数 (Integer)

int32

totalReadyAnalyzerPods

整数 (Integer)

int32

totalDesiredDbPods

整数 (Integer)

int32

totalReadyDbPods

整数 (Integer)

int32

statusErrors

string 列表

尝试获取扫描器健康信息时发生的错误集合。

StorageSensorDeploymentIdentification

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

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

systemNamespaceId

字符串 (String)

defaultNamespaceId

字符串 (String)

appNamespace

字符串 (String)

appNamespaceId

字符串 (String)

appServiceaccountId

字符串 (String)

k8sNodeName

字符串 (String)

StorageStaticClusterConfig

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

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

type

StorageClusterType

GENERIC_CLUSTER, KUBERNETES_CLUSTER, OPENSHIFT_CLUSTER, OPENSHIFT4_CLUSTER,

mainImage

字符串 (String)

centralApiEndpoint

字符串 (String)

collectionMethod

StorageCollectionMethod

UNSET_COLLECTION, NO_COLLECTION, KERNEL_MODULE, EBPF, CORE_BPF,

collectorImage

字符串 (String)

admissionController

布尔值 (Boolean)

admissionControllerUpdates

布尔值 (Boolean)

tolerationsConfig

StorageTolerationsConfig

slimCollector

布尔值 (Boolean)

admissionControllerEvents

布尔值 (Boolean)

StorageTolerationsConfig

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

disabled

布尔值 (Boolean)

StorageUpgradeProgress

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

upgradeState

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,

upgradeStatusDetail

字符串 (String)

since

日期 (Date)

日期时间 (date-time)

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

V1ClusterResponse

字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

cluster

存储集群 (StorageCluster)

clusterRetentionInfo

V1DecommissionedClusterRetentionInfo

V1DecommissionedClusterRetentionInfo

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

isExcluded

布尔值 (Boolean)

daysUntilDeletion

整数 (Integer)

int32