REST API - create-task

vcenter trusted infrastructure trusted clusters attestation services: create-task

Configures the cluster to use a the given registered Attestation Service. This operation was added in vSphere API 7.0.0.

Request:

HTTP request

POST https://{server}/api/vcenter/trusted-infrastructure/trusted-clusters/{cluster}/attestation/services

?vmw-task=true
{
    "service""obj-103",
    "type""SERVICE",
    "trust_authority_cluster""string"
}

Path Parameters

Name Type Description
Required
cluster string The ID of the cluster.

Body Parameters:

Name Type Description
bold = required
- create_spec Describes the registered instance of the Attestation Service.
-.type string Source of truth for the configuration of the Attestation Service. This attribute was added in vSphere API 7.0.0.

Specifies the source of truth the Attestation Service will use for its configuration. This enumeration was added in vSphere API 7.0.0. Value is one of:
SERVICE: The Attestation Service will be configured based on an ID of an specific Attestation Service. This constant was added in vSphere API 7.0.0.
CLUSTER: The Attestation Service will be configured based on an ID of a whole attestation cluster. This constant was added in vSphere API 7.0.0.

-.service string The service's unique ID. This attribute was added in vSphere API 7.0.0.

Optional. It is only relevant when type has value SERVICE. This field is optional and it is only relevant when the value of type is SERVICE.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.trusted_infrastructure.attestation.Service. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.trusted_infrastructure.attestation.Service.

-.trust_authority_cluster string The attestation cluster's unique ID. This attribute was added in vSphere API 7.0.0.

Optional. It is only relevant when type has value CLUSTER. This field is optional and it is only relevant when the value of type is CLUSTER.

Response:

HTTP Status Code: 202

Response Body Structure:

"obj-103"

Headers:

None

Type:

Name Type Description
bold = required
- string ID of the configured Attestation Service instance.

Errors:

HTTP Status Code Type Description
400 already_exists if the Attestation Service is already configured for this cluster
500 error for any other error.
400 invalid_argument if the CreateSpec is not valid.
404 not_found if the cluster ID is not valid.
500 unable_to_allocate_resource if all the hosts in the cluster do not have VMware vSphere Trust Authority enabled license.
401 unauthenticated if the user can not be authenticated.