REST API - create

vcenter files nfc tickets datastore: create

Creates NFC tickets for datastore access. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Request:

HTTP request

POST https://{server}/api/vcenter/files/nfc/tickets/datastore
[
    {
        "datastore""obj-103",
        "hosts"[
            "obj-103",
            "obj-103"
        ]
    },
    {
        "datastore""obj-103",
        "hosts"[
            "obj-103",
            "obj-103"
        ]
    }
]

Body Parameters:

Name Type Description
bold = required
- create_spec[] List of create specs for which a vcenter.files.nfc.ticket needs to be created.
-[].datastore string Identifier of the datastore whose files are being requested to be accessed. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datastore. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore.

-[].hosts string[] Set of candidate host identifiers where the NFC connection can be initiated. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. If unset, all hosts with read-write access to the datastore are considered as candidates to initiate an NFC connection.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem.

Response:

HTTP Status Code: 201

Response Body Structure:

{
    "obj-103"{
        "ticket"{
            "identifier""secret string",
            "port"1,
            "ssl_thumbprint""string",
            "host""string"
        },
        "host""obj-103"
    }
}

Headers:

None

Type:

Name Type Description
bold = required
- object NFC ticket information vcenter.files.nfc.tickets.datastore.create_result.ticket for all the datastores specified in the input spec(s).Object with element values of type create_result.
-.* create_result
-.*.host string Identifier of the host. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: HostSystem. When operations return a value of this structure as a result, the field will be an identifier for the resource type: HostSystem.

-.*.ticket ticket NFC access information for the host. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

-.*.ticket.host string The IP address of the host. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

-.*.ticket.port long Port number on the host to establish the NFC connection. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

-.*.ticket.ssl_thumbprint string The SSL thumbprint of the host. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

-.*.ticket.identifier secret Identifier of the NFC session. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Errors:

HTTP Status Code Type Description
400 invalid_argument if hosts are provided in the vcenter.files.nfc.tickets.datastore.create_spec.hosts and they don't have read-write access to the datastores provided in the vcenter.files.nfc.tickets.datastore.create_spec.datastore.
404 not_found if any of the identifiers in the vcenter.files.nfc.tickets.datastore.create_spec is not known to this vCenter Server.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user doesn't have the required privileges.
400 unsupported if the number of input specs is greater than 2.
500 unable_to_allocate_resource if there are no suitable hosts to initiate an NFC connection.