×

GET /v1/compliance/runresults

描述 (Description)

参数 (Parameters)

查询参数 (Query Parameters)

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

clusterId

-

空 (null)

standardId

-

空 (null)

runId

指定要返回结果的运行 ID。如果为空,则返回最近一次运行的结果。警告:设置此字段会绕过服务器端的缓存,这可能会导致内存压力显著增加并降低性能。(Specifies the run ID for which to return results. If empty, the most recent run is returned. CAVEAT: Setting this field circumvents the results cache on the server-side, which may lead to significantly increased memory pressure and decreased performance.)

-

空 (null)

返回类型 (Return Type)

内容类型 (Content Type)

  • application/json

响应 (Responses)

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

200

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

V1GetComplianceRunResultsResponse

0

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

GooglerpcStatus

示例 (Samples)

公共对象引用 (Common object reference)

ComplianceResultValueEvidence

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

state

StorageComplianceState

COMPLIANCE_STATE_UNKNOWN, COMPLIANCE_STATE_SKIP, COMPLIANCE_STATE_NOTE, COMPLIANCE_STATE_SUCCESS, COMPLIANCE_STATE_FAILURE, COMPLIANCE_STATE_ERROR,

message

字符串 (String)

messageId

整数 (Integer)

int32

ComplianceRunResultsEntityResults

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

controlResults

StorageComplianceResultValue 的映射 (Map of StorageComplianceResultValue)

GooglerpcStatus

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

code

整数 (Integer)

int32

message

字符串 (String)

details

ProtobufAny 的列表 (List of 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"
}
字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

@type

字符串 (String)

唯一标识序列化协议缓冲区消息类型的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(或空方案)之外的其他方案可能与特定于实现的语义一起使用。

StorageComplianceDomain

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

id

字符串 (String)

集群

StorageComplianceDomainCluster

节点

StorageComplianceDomainNode的映射

部署

StorageComplianceDomainDeployment的映射

StorageComplianceDomainCluster

These must mirror the tags _exactly_ in cluster.proto for backwards compatibility
字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

名称

字符串 (String)

StorageComplianceDomainDeployment

This must mirror the tags _exactly_ in deployment.proto for backwards compatibility
字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

名称

字符串 (String)

类型

字符串 (String)

命名空间

字符串 (String)

namespaceId

字符串 (String)

clusterId

字符串 (String)

集群名称

字符串 (String)

StorageComplianceDomainNode

These must mirror the tags _exactly_ in node.proto for backwards compatibility
字段名称 (Field Name) 必填 (Required) 可为空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

名称

字符串 (String)

clusterId

字符串 (String)

集群名称

字符串 (String)

StorageComplianceResultValue

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

证据

ComplianceResultValueEvidence列表

整体状态

StorageComplianceState

COMPLIANCE_STATE_UNKNOWN, COMPLIANCE_STATE_SKIP, COMPLIANCE_STATE_NOTE, COMPLIANCE_STATE_SUCCESS, COMPLIANCE_STATE_FAILURE, COMPLIANCE_STATE_ERROR,

StorageComplianceRunMetadata

Next available tag: 5

StorageComplianceRunResults

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

StorageComplianceDomain

运行元数据

StorageComplianceRunMetadata

集群结果

ComplianceRunResultsEntityResults

节点结果

ComplianceRunResultsEntityResults的映射

部署结果

ComplianceRunResultsEntityResults的映射

机器配置结果

ComplianceRunResultsEntityResults的映射

StorageComplianceState

枚举值

COMPLIANCE_STATE_UNKNOWN

COMPLIANCE_STATE_SKIP

COMPLIANCE_STATE_NOTE

COMPLIANCE_STATE_SUCCESS

COMPLIANCE_STATE_FAILURE

COMPLIANCE_STATE_ERROR

V1GetComplianceRunResultsResponse

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

结果

StorageComplianceRunResults

失败的运行

StorageComplianceRunMetadata列表