Method: projects.locations.memberships.generateExclusivityManifest
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
memberships.generateExclusivityManifest 会生成清单,以根据需要更新集群中的排他性工件。
排他性工件包括成员资格自定义资源定义 (CRD) 和单例成员资格自定义资源 (CR)。与 memberships.validateExclusivity 结合使用时,排他性工件可保证 Kubernetes 集群仅注册到单个 GKE Hub。
成员资格 CRD 会进行版本控制,在 GKE Hub API 服务器开始提供较新版本的 CRD 和对应 CR 时可能需要转换。如果版本之间存在任何差异,则响应会是转换后的 CRD 和 CR。
HTTP 请求
GET https://gkehub.googleapis.com/v1beta1/{name=projects/*/locations/*/memberships/*}:generateExclusivityManifest
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。成员资格资源的名称,格式为 projects/*/locations/*/memberships/* 。
必须对指定的资源 name 具有以下 IAM 权限才能进行授权:
gkehub.memberships.generateConnectManifest
|
查询参数
参数 |
crdManifest |
string
可选。kubectl get customresourcedefinitions membership 检索的成员资格 CRD 的 YAML 清单。如果资源不存在,则留空。
|
crManifest |
string
可选。kubectl get memberships membership 检索的成员资格 CR 的 YAML 清单。如果资源不存在,则留空。
|
响应正文
供客户端应用的排他性工件清单的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"crdManifest": string,
"crManifest": string
} |
字段 |
crdManifest |
string
在有较新版本的 CRD 可用时要应用的成员资格 CRD 的 YAML 清单。如果不需要应用更新,则为空。
|
crManifest |
string
在有新版本的 CR 可用时要应用的成员资格 CR 的 YAML 清单。如果不需要应用更新,则为空。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/cloud-platform
如需了解详情,请参阅身份验证概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-05-16。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-05-16。"],[],[],null,["# Method: projects.locations.memberships.generateExclusivityManifest\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GenerateExclusivityManifestResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nmemberships.generateExclusivityManifest generates the manifests to update the exclusivity artifacts in the cluster if needed.\n\nExclusivity artifacts include the Membership custom resource definition (CRD) and the singleton Membership custom resource (CR). Combined with memberships.validateExclusivity, exclusivity artifacts guarantee that a Kubernetes cluster is only registered to a single GKE Hub.\n\nThe Membership CRD is versioned, and may require conversion when the GKE Hub API server begins serving a newer version of the CRD and corresponding CR. The response will be the converted CRD and CR if there are any differences between the versions.\n\n### HTTP request\n\n`GET https://gkehub.googleapis.com/v1beta1/{name=projects/*/locations/*/memberships/*}:generateExclusivityManifest`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe response of the exclusivity artifacts manifests for the client to apply.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]