Update Namespace Templates
Updates a namespace template associated with cluster on which vSphere Namespaces are enabled in this vCenter Server. The specified configuration is applied partially and unset fields in spec will leave those parts of configuration as-is. A Supervisor can be running on one or multiple vSphere Zones, and each vSphere Zone is associated with one or more vSphere Clusters. If a Supervisor running on the specified vSphere Cluster is running on additional vSphere Clusters, this operation will apply to Supervisor components running on the other vSphere Clusters in addition to the specified vSphere Cluster. To call this API on a Supervisor with multiple vSphere Clusters, use com.vmware.vcenter.namespace_management.supervisors.Topology#get to get the vSphere Clusters associated with the given Supervisor. Any cluster from the list returned can be used as the input of this API.
Request
URLURL
Path Parameters
Path Parameters
Identifier for cluster on which vSphere Namespaces are enabled. The parameter must be an identifier for the resource type: ClusterComputeResource.
Name of the namespace template. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.NamespaceTemplate.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification for updating the namespace template.
{
"networks": [
"string"
],
"permissions": [
{
"domain": "string",
"subject": "string",
"subject_type": "enum"
}
],
"resource_spec": {},
"storage_specs": [
{
"limit": 0,
"policy": "string"
}
],
"vm_service_spec": {
"content_libraries": [
"string"
],
"vm_classes": [
"string"
]
}
}
vSphere Namespaces network objects to be associated with the namespace. The values of this list need to reference names of pre-existing com.vmware.vcenter.namespace_management.Networks.Info structures. The field must be left unset if the cluster hosting the namespace uses NSXT_CONTAINER_PLUGIN as the network provider, since the network(s) for this namespace will be managed by NSX-T Container Plugin. If field is unset when the cluster hosting the namespace uses VSPHERE_NETWORK as its network provider, the namespace will automatically be associated with the cluster’s Supervisor Primary Workload Network. The field currently accepts at most only 1 vSphere Namespaces network object reference. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vcenter.namespace_management.Network. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vcenter.namespace_management.Network.
Permissions associated with namespace template. If unset, only users with the Administrator role can use this template; for example, this template is applied to the namespace created by self-service-users with the Administrator role.
Resource quota on the namespace. Refer to com.vmware.vcenter.namespace_management.NamespaceResourceOptions.Info#createResourceQuotaType and use com.vmware.vcenter.namespace_management.NamespaceResourceOptions#get for retrieving the type for the value for this field. For an example of this, see ResourceQuotaOptionsV1. If unset, no resource limits will be set on the namespace.
Storage that this template defines and will be associated with a namespace after namespace realization. If unset then no update will be made.
VM Service specification to be associated with the namespace template. The virtual machine classes and Content Library associations of the template will be updated according to the NamespaceTemplates.UpdateSpec.vm-service-spec. If unset, the virtual machine classes and Content Library associations of the template will not be modified.
Authentication
Errors
Errors
com.vmware.vapi.std.errors.invalid_argument : if spec contain any errors. | com.vmware.vapi.std.errors.unsupported : if trying to grant access to a user or group from an external identity provider.
com.vmware.vapi.std.errors.unauthorized : if the user does not have Namespaces.SelfServiceManage privilege.
com.vmware.vapi.std.errors.not_found : if cluster doesn’t exist or if template doesn’t exist.
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
cURL Command
Vendor Extensions
x-vmw-doc-operation: update