×

POST /v1/imageintegrations/test

TestImageIntegration 检查给定的镜像集成是否配置正确,无需使用存储的凭据协调。

描述

参数

主体参数

名称 描述 必填 默认值 模式

主体

StorageImageIntegration

X

返回类型

对象

内容类型

  • application/json

响应

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

200

成功的响应。

对象

0

意外的错误响应。

GooglerpcStatus

示例

通用对象引用

ECRConfigAuthorizationData

授权数据表示IAM身份验证凭据,可用于访问IAM主体有权访问的任何Amazon ECR注册表。

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

用户名

字符串

密码

字符串

过期时间

日期

日期时间

GooglerpcStatus

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

代码

整数

int32

消息

字符串

详情

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(或空方案)之外的方案,并具有特定于实现的语义。

QuayConfigRobotAccount

Robot account is Quay's named tokens that can be granted permissions on multiple repositories under an organization. It's Quay's recommended authentication model when possible (i.e. registry integration)
字段名称 必填 可为空 类型 描述 格式

用户名

字符串

密码

字符串

服务器将在响应和日志中屏蔽此密码的值。

StorageAzureConfig

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

endpoint

字符串

用户名

字符串

密码

字符串

集成的密码。服务器将在响应和日志中屏蔽此凭据的值。

wifEnabled

布尔值

StorageClairConfig

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

endpoint

字符串

insecure

布尔值

StorageClairV4Config

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

endpoint

字符串

insecure

布尔值

StorageClairifyConfig

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

endpoint

字符串

grpcEndpoint

字符串

numConcurrentScans

整数

int32

StorageDockerConfig

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

endpoint

字符串

用户名

字符串

密码

字符串

集成的密码。服务器将在响应和日志中屏蔽此凭据的值。

insecure

布尔值

StorageECRConfig

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

registryId

字符串

accessKeyId

字符串

集成的访问密钥 ID。服务器将在响应和日志中屏蔽此凭据的值。

secretAccessKey

字符串

集成的密钥访问密钥。服务器将在响应和日志中屏蔽此凭据的值。

region

字符串

useIam

布尔值

endpoint

字符串

useAssumeRole

布尔值

assumeRoleId

字符串

assumeRoleExternalId

字符串

authorizationData

ECRConfigAuthorizationData

StorageGoogleConfig

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

endpoint

字符串

serviceAccount

字符串

集成的服务帐户。服务器将在响应和日志中屏蔽此凭据的值。

project

字符串

wifEnabled

布尔值

StorageIBMRegistryConfig

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

endpoint

字符串

apiKey

字符串

集成的 API 密钥。服务器将在响应和日志中屏蔽此凭据的值。

StorageImageIntegration

Next Tag: 25
字段名称 必填 可为空 类型 描述 格式

id

字符串

name

字符串

type

字符串

categories

StorageImageIntegrationCategory 列表

clairify

StorageClairifyConfig

scannerV4

StorageScannerV4Config

docker

StorageDockerConfig

quay

StorageQuayConfig

ecr

StorageECRConfig

google

StorageGoogleConfig

clair

StorageClairConfig

clairV4

StorageClairV4Config

ibm

StorageIBMRegistryConfig

azure

StorageAzureConfig

autogenerated

布尔值

clusterId

字符串

skipTestIntegration

布尔值

source

StorageImageIntegrationSource

StorageImageIntegrationCategory

  • NODE_SCANNER:图像和节点集成目前在 UI 中使用相同的表单完成,因此图像集成目前也用于节点集成。做出这个决定是因为我们目前只支持一个节点扫描器(我们的扫描器)。

枚举值

REGISTRY

SCANNER

NODE_SCANNER

StorageImageIntegrationSource

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

clusterId

字符串

namespace

字符串

imagePullSecretName

字符串

StorageQuayConfig

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

endpoint

字符串

oauthToken

字符串

集成的 OAuth 令牌。如果这是扫描器集成,则需要此令牌。服务器将在响应和日志中屏蔽此凭据的值。

insecure

布尔值

registryRobotCredentials

QuayConfigRobotAccount

StorageScannerV4Config

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

numConcurrentScans

整数

int32

indexerEndpoint

字符串

matcherEndpoint

字符串