×

GET /v1/report/configurations/{id}

描述

参数

路径参数

名称 描述 必需 默认值 模式

id

内容类型

  • application/json

响应

表 1. HTTP 响应代码
代码 消息 数据类型

200

成功的响应。

V1GetReportConfigurationResponse

0

意外的错误响应。

GooglerpcStatus

示例

常用对象引用

GooglerpcStatus

字段名称 必需 可为空 类型 描述 格式

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 库提供的 pack 方法默认使用“type.googleapis.com/full.type.name”作为类型 URL,unpack 方法只使用类型 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"
}
字段名称 必需 可为空 类型 描述 格式

@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(或空方案)之外的方案可能会与特定于实现的语义一起使用。

ReportConfigurationReportType

枚举值

VULNERABILITY

ReportLastRunStatusRunStatus

枚举值

SUCCESS

FAILURE

ScheduleDaysOfMonth

1 for 1st, 2 for 2nd .... 31 for 31st
字段名称 必需 可为空 类型 描述 格式

days

integer列表

int32

ScheduleDaysOfWeek

Sunday = 0, Monday = 1, .... Saturday =  6
字段名称 必需 可为空 类型 描述 格式

days

integer列表

int32

ScheduleIntervalType

枚举值

UNSET

DAILY

WEEKLY

MONTHLY

ScheduleWeeklyInterval

字段名称 必需 可为空 类型 描述 格式

day

整数

int32

SimpleAccessScopeRules

任何重复字段的每个元素都是一个单独的规则。规则由逻辑OR连接:如果存在允许资源x的规则,则x位于访问范围内。

字段名称 必需 可为空 类型 描述 格式

includedClusters

string列表

includedNamespaces

SimpleAccessScopeRulesNamespace列表

clusterLabelSelectors

StorageSetBasedLabelSelector列表

namespaceLabelSelectors

StorageSetBasedLabelSelector列表

SimpleAccessScopeRulesNamespace

字段名称 必需 可为空 类型 描述 格式

clusterName

字符串

必须设置这两个字段。

namespaceName

字符串

StorageEmailNotifierConfiguration

字段名称 必需 可为空 类型 描述 格式

notifierId

字符串

mailingLists

string列表

customSubject

字符串

customBody

字符串

StorageNotifierConfiguration

字段名称 必需 可为空 类型 描述 格式

emailConfig

StorageEmailNotifierConfiguration

id

字符串

StorageReportConfiguration

字段名称 必需 可为空 类型 描述 格式

id

字符串

name

字符串

description

字符串

type

ReportConfigurationReportType

VULNERABILITY,

vulnReportFilters

StorageVulnerabilityReportFilters

scopeId

字符串

emailConfig

StorageEmailNotifierConfiguration

schedule

StorageSchedule

lastRunStatus

StorageReportLastRunStatus

lastSuccessfulRunTime

日期

日期时间

resourceScope

StorageResourceScope

notifiers

StorageNotifierConfiguration列表

creator

StorageSlimUser

version

整数

int32

StorageReportLastRunStatus

字段名称 必需 可为空 类型 描述 格式

reportStatus

ReportLastRunStatusRunStatus

SUCCESS, FAILURE,

lastRunTime

日期

日期时间

errorMsg

字符串

StorageResourceScope

字段名称 必需 可为空 类型 描述 格式

collectionId

字符串

StorageSchedule

字段名称 必需 可为空 类型 描述 格式

intervalType

ScheduleIntervalType

UNSET, DAILY, WEEKLY, MONTHLY,

hour

整数

int32

minute

整数

int32

weekly

ScheduleWeeklyInterval

daysOfWeek

ScheduleDaysOfWeek

daysOfMonth

ScheduleDaysOfMonth

StorageSetBasedLabelSelector

SetBasedLabelSelector只允许基于集合的标签要求。

下一个可用标签:3

字段名称 必需 可为空 类型 描述 格式

requirements

StorageSetBasedLabelSelectorRequirement列表

StorageSetBasedLabelSelectorOperator

枚举值

UNKNOWN

IN

NOT_IN

EXISTS

NOT_EXISTS

StorageSetBasedLabelSelectorRequirement

Next available tag: 4
字段名称 必需 可为空 类型 描述 格式

key

字符串

op

StorageSetBasedLabelSelectorOperator

UNKNOWN, IN, NOT_IN, EXISTS, NOT_EXISTS,

values

string列表

StorageSlimUser

字段名称 必需 可为空 类型 描述 格式

id

字符串

name

字符串

StorageVulnerabilityReportFilters

字段名称 必需 可为空 类型 描述 格式

fixability

VulnerabilityReportFiltersFixability

BOTH, FIXABLE, NOT_FIXABLE,

sinceLastReport

布尔值

severities

StorageVulnerabilitySeverity列表

imageTypes

VulnerabilityReportFiltersImageType列表

allVuln

布尔值

sinceLastSentScheduledReport

布尔值

sinceStartDate

日期

日期时间

accessScopeRules

SimpleAccessScopeRules列表

includeNvdCvss

布尔值

StorageVulnerabilitySeverity

枚举值

UNKNOWN_VULNERABILITY_SEVERITY

LOW_VULNERABILITY_SEVERITY

MODERATE_VULNERABILITY_SEVERITY

IMPORTANT_VULNERABILITY_SEVERITY

CRITICAL_VULNERABILITY_SEVERITY

V1GetReportConfigurationResponse

字段名称 必需 可为空 类型 描述 格式

reportConfig

StorageReportConfiguration

VulnerabilityReportFiltersFixability

枚举值

BOTH

FIXABLE

NOT_FIXABLE

VulnerabilityReportFiltersImageType

枚举值

DEPLOYED

WATCHED