Skip to main content
Astra Automation
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

创建新组

POST /accounts/{account_id}/core/v1/groups

指示要创建的 Group API 资源的所需值。

参数

名称 Type Required Description

account_id

string

path

True

包含帐户资源的 ID

  • 示例:{{.Account}}

请求正文

指示要创建的 Group API 资源的所需值。

名称 Type Required Description

type

string

True

资源的媒体类型。定义的值为:

  • "application/astra-group"

version

string

True

资源的版本。定义的值为:

  • "1.0"

  • "1.1"

name

string

False

组资源的名称。如果在创建时未指定,则该值将设置为

  • 如果在 authID 中找到第一个公用名 (CN) 相对可分辨名称 (RDN),

  • authID,否则。如果在更新时未指定,则该值将不加修改地保留。定义的值为:

  • 最小长度:1

  • 最大长度:2048

authProvider

string

True

组资源的身份验证提供程序。定义的值是:

  • “ldap”

authID

string

True

LDAP 组的可分辨名称 (DN)。定义的值为:

  • 最小长度:1

  • 最大长度:2048

元数据

"type_astra_metadata_update"

False

与资源关联的客户端和服务指定的元数据。定义的值为:

  • 符合 Astra 元数据架构如果在创建时未指定,则将创建没有标签的元数据对象。如果在更新时未指定,则元数据对象的标签、creationTimestamp 和 createdBy 将保留而不进行修改。

请求示例
{
  "type": "application/astra-group",
  "version": "1.1",
  "name": "engineering-group",
  "authProvider": "ldap",
  "authID": "CN=Engineering,CN=Groups,DC=example,DC=com"
}

响应

Status: 201, Returns the newly created group resource in the JSON response body.
名称 Type Required Description

type

string

True

资源的媒体类型。定义的值为:

  • "application/astra-group"

version

string

True

资源的版本。定义的值为:

  • "1.0"

  • "1.1"

id

string

True

资源的全局唯一标识符。定义的值为:

  • 符合 UUIDv4 架构

name

string

True

组资源的名称。如果在创建时未指定,则该值将设置为

  • 如果在 authID 中找到第一个公用名 (CN) 相对可分辨名称 (RDN),

  • authID,否则。如果在更新时未指定,则该值将不加修改地保留。定义的值为:

  • 最小长度:1

  • 最大长度:2048

authProvider

string

True

组资源的身份验证提供程序。定义的值是:

  • “ldap”

authID

string

True

LDAP 组的可分辨名称 (DN)。定义的值为:

  • 最小长度:1

  • 最大长度:2048

元数据

"type_astra_metadata_update"

True

与资源关联的客户端和服务指定的元数据。定义的值为:

  • 符合 Astra 元数据架构如果在创建时未指定,则将创建没有标签的元数据对象。如果在更新时未指定,则元数据对象的标签、creationTimestamp 和 createdBy 将保留而不进行修改。

响应示例
{
  "type": "application/astra-group",
  "version": "1.1",
  "id": "77754011-b93f-515e-a145-5a343aecdece",
  "name": "engineering-group",
  "authProvider": "ldap",
  "authID": "CN=Engineering,CN=Groups,DC=example,DC=com",
  "metadata": {
    "labels": [],
    "creationTimestamp": "2022-10-06T20:58:16.305662Z",
    "modificationTimestamp": "2022-10-06T20:58:16.305662Z",
    "createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
  }
}

响应

Status: 409, Conflict
名称 Type Required Description

type

string

True

标题

string

True

详细信息

string

True

状态

string

True

correlationID

string

False

invalidFields

数组["invalidFields"]

False

无效请求正文字段列表

响应示例
{
  "type": "https://astra.netapp.io/problems/10",
  "title": "JSON resource conflict",
  "detail": "The request body JSON contains a field that conflicts with an idempotent value.",
  "status": "409"
}

响应

Status: 403, Forbidden
名称 Type Required Description

type

string

True

标题

string

True

详细信息

string

True

状态

string

True

correlationID

string

False

响应示例
{
  "type": "https://astra.netapp.io/problems/14",
  "title": "Unauthorized access",
  "detail": "The user isn't enabled.",
  "status": "403"
}

响应

Status: 406, Not acceptable
名称 Type Required Description

type

string

True

标题

string

True

详细信息

string

True

状态

string

True

correlationID

string

False

响应示例
{
  "type": "https://astra.netapp.io/problems/32",
  "title": "Unsupported content type",
  "detail": "The response can't be returned in the requested format.",
  "status": "406"
}

响应

Status: 500, Internal server error
名称 Type Required Description

type

string

True

标题

string

True

详细信息

string

True

状态

string

True

correlationID

string

False

响应示例
{
  "type": "https://astra.netapp.io/problems/34",
  "title": "Internal server error",
  "detail": "The server was unable to process this request.",
  "status": "500"
}

错误

Status: 400, Bad request
名称 Type Required Description

type

string

True

标题

string

True

详细信息

string

True

状态

string

True

correlationID

string

False

invalidParams

数组["invalidParams"]

False

无效查询参数列表

错误响应示例
{
  "type": "https://astra.netapp.io/problems/7",
  "title": "Invalid JSON payload",
  "detail": "The request body is not valid JSON.",
  "status": "400"
}

定义

查看定义

类型 Astra 标签

名称 Type Required Description

name

string

True

value

string

True

type_astra_metadata_update

与资源关联的客户端和服务指定的元数据。定义的值为:

  • 符合 Astra 元数据架构如果在创建时未指定,则将创建没有标签的元数据对象。如果在更新时未指定,则元数据对象的标签、creationTimestamp 和 createdBy 将保留而不进行修改。

名称 Type Required Description

labels

数组["类型 Astra 标签"]

False

creationTimestamp

string

False

modificationTimestamp

string

False

已创建

string

False

modifiedBy

string

False

invalidParams

名称 Type Required Description

name

string

True

无效查询参数的名称

原因

string

True

查询参数无效的原因

invalidFields

名称 Type Required Description

name

string

True

无效请求正文字段的名称

原因

string

True

请求正文字段无效的原因