Activate With Template Namespace Self Service
Activate Namespace Self Service on the cluster after configuring namespace template. This is another variant of activate except configures template before activation. The template configuration includes either creating a new template or updating the existing template, depending on the template’s existence. Here is supported the flow of actions using the activateWithTemplate call: 1. Activate with the new template using activateWithTemplate call. 2. Deactivate using deactivate call. 3. Active with updating the existing template using activateWithTemplate. 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 the cluster on which vSphere Namespaces will be enabled. The parameter must be an identifier for the resource type: ClusterComputeResource.
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 activating namespace self service on the cluster by granting users/groups to create Supervisor Namespaces.
{
"permissions": [
{
"domain": "string",
"subject": "string",
"subject_type": "enum"
}
],
"resource_spec": {},
"storage_specs": [
{
"policy": "string"
}
],
"template": "string"
}
Namespace Self Service permission to subjects.
Resource quotas that the template defines. 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.
Storage associated with the self service namespace.
Identifier of the namespace template that is being activated. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.namespaces.NamespaceTemplate. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.namespaces.NamespaceTemplate.
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: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource.
VM Service specification to be associated with the namespace template. Namespaces created using this template will have access to the virtual machine classes and Content Libraries specified in the NamespaceSelfService.ActivateTemplateSpec.vm-service-spec by default. If unset, the namespaces created using this template will not have access to any virtual machine classes and Content Libraries by default.
Authentication
Errors
Errors
com.vmware.vapi.std.errors.already_exists : if the cluster already has Namespace Self Service activated. | com.vmware.vapi.std.errors.invalid_argument : if spec contain any errors. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the service is marked for deactivation or the associated cluster is being disabled.
com.vmware.vapi.std.errors.unauthorized : if the user does not have Namespaces.SelfServiceManage privilege.
com.vmware.vapi.std.errors.not_found : if cluster with vSphere Namespaces enabled could not be located.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.unable_to_allocate_resource : if the specified cluster is not licensed.
‘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-operation: activate_with_template