Create Registries Harbor
Creates a Harbor registry in the cluster.
Request
URLURL
Header Parameters
Header Parameters
A unique token generated on the client for each creation request. The token should be a universally unique identifier (UUID), for example: b8a2a2e3-2314-43cd-a871-6ede0f429751. This token can be used to guarantee idempotent creation. If not specified, creation is not idempotent.
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification for creating the Harbor registry.
{
"storage": [
{
"policy": "string"
}
]
}
Storage associated with the Harbor registry. The list contains only one storage backing in this version.
Identifier of the cluster hosting the registry. If unset, registry will not be created on a specified cluster. This is required in current version, since Harbor can only be created on a cluster with Kubernetes enabled. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ClusterComputeResource.
Garbage collection configuration for the Harbor registry. If unset, a default configuration is set, Recurrence#WEEKLY, DayOfWeek#SATURDAY, GarbageCollection#hour is 2, GarbageCollection#minute is 0.
Authentication
Response
Response BodyResponse Body
Identifier of the deployed registry. The result will be an identifier for the resource type: com.vmware.vcenter.content.Registry.
Errors
com.vmware.vapi.std.errors.already_exists : if a Harbor already exists in the associated cluster. | com.vmware.vapi.std.errors.unsupported : if Harbor.CreateSpec.cluster does not have vSphere namespace enabled. | com.vmware.vapi.std.errors.invalid_argument : if spec contains any errors.
com.vmware.vapi.std.errors.unauthorized : if the user does not have ContentLibrary.ManageRegistry and/or CertificateAuthority.Manage privilege, or user does not have ContentLibrary.ManageClusterRegistryResource privilege on Harbor.CreateSpec.cluster.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/vcenter/content/registries/harbor
x-vmw-doc-operation: create