Set Placement Settings

Set Placement Settings

To set host level placement constraints, VMware Cloud Foundation Operations will automatically create and manage DRS rules. All conflicting user-created DRS rules need to be DEACTIVATED. These include the following:

  • VM-VM affinity / anti-affinity

  • VM-Host affinity / anti-affinity

Request
URI
PUT
https://{api_host}/suite-api/api/optimization/workloadplacement/{dataCenterId}/settings
COPY
Path Parameters
string
dataCenterId
Required

Identifier of the dataCenter

Query Parameters
boolean
deactivateDRSRules
Optional
Constraints: default: false

During HOST_BASED configuration, set this flag to true to deactivate all conflicting user-created DRS rules


Request Body

Placement settings object

workload-placement-settings of type(s) application/json
Required
"{\n  \"taggingScope\" : \"CLUSTER_BASED\",\n  \"tagGroups\" : [ {\n    \"name\" : \"Operating System\",\n    \"prioritized\" : true,\n    \"tags\" : [ ],\n    \"resourceTags\" : [ {\n      \"category\" : \"tag_category_1\",\n      \"name\" : \"tag_name_1\"\n    }, {\n      \"category\" : \"tag_category_1\",\n      \"name\" : \"tag_name_2\"\n    } ]\n  }, {\n    \"name\" : \"Network\",\n    \"prioritized\" : false,\n    \"tags\" : [ ],\n    \"resourceTags\" : [ ]\n  } ],\n  \"excludedClusterTagGroups\" : [ {\n    \"name\" : \"Operating System\",\n    \"tags\" : [ ],\n    \"resourceTags\" : [ {\n      \"category\" : \"tag_category_2\",\n      \"name\" : \"tag_name_1\"\n    }, {\n      \"category\" : \"tag_category_2\",\n      \"name\" : \"tag_name_2\"\n    } ]\n  } ],\n  \"excludedVmTagGroups\" : [ ],\n  \"placementSettingsEnabled\" : true,\n  \"clusterExclusionEnabled\" : false,\n  \"vmExclusionEnabled\" : false\n}"
string
taggingScope
Optional

Tagging Scope

Possible values are : CLUSTER_BASED, HOST_BASED, UNKNOWN,
array of object
tagGroups
Optional

All tag groups

array of object
excludedClusterTagGroups
Optional

Collection of cluster excluded tag groups

array of object
excludedVmTagGroups
Optional

Collection of VM excluded tag groups

boolean
placementSettingsEnabled
Optional

Turn off placement settings. Criteria defined in 'tagGroups' will no longer be considered for VM placement. By default 'true'.

boolean
clusterExclusionEnabled
Optional

Turn off exclusion settings for Cluster. By default 'false'.

boolean
vmExclusionEnabled
Optional

Turn off exclusion settings for VM. By default 'false'.

Authentication
This operation uses the following authentication methods.
Responses
200

Update placement settings

Returns workload-placement-settings of type(s) application/json
"{\n  \"taggingScope\" : \"CLUSTER_BASED\",\n  \"tagGroups\" : [ {\n    \"name\" : \"Operating System\",\n    \"prioritized\" : true,\n    \"tags\" : [ ],\n    \"resourceTags\" : [ {\n      \"category\" : \"tag_category_1\",\n      \"name\" : \"tag_name_1\"\n    }, {\n      \"category\" : \"tag_category_1\",\n      \"name\" : \"tag_name_2\"\n    } ]\n  }, {\n    \"name\" : \"Network\",\n    \"prioritized\" : false,\n    \"tags\" : [ ],\n    \"resourceTags\" : [ ]\n  } ],\n  \"excludedClusterTagGroups\" : [ {\n    \"name\" : \"Operating System\",\n    \"tags\" : [ ],\n    \"resourceTags\" : [ {\n      \"category\" : \"tag_category_2\",\n      \"name\" : \"tag_name_1\"\n    }, {\n      \"category\" : \"tag_category_2\",\n      \"name\" : \"tag_name_2\"\n    } ]\n  } ],\n  \"excludedVmTagGroups\" : [ ],\n  \"placementSettingsEnabled\" : true,\n  \"clusterExclusionEnabled\" : false,\n  \"vmExclusionEnabled\" : false\n}"
string
taggingScope
Optional

Tagging Scope

Possible values are : CLUSTER_BASED, HOST_BASED, UNKNOWN,
array of object
tagGroups
Optional

All tag groups

array of object
excludedClusterTagGroups
Optional

Collection of cluster excluded tag groups

array of object
excludedVmTagGroups
Optional

Collection of VM excluded tag groups

boolean
placementSettingsEnabled
Optional

Turn off placement settings. Criteria defined in 'tagGroups' will no longer be considered for VM placement. By default 'true'.

boolean
clusterExclusionEnabled
Optional

Turn off exclusion settings for Cluster. By default 'false'.

boolean
vmExclusionEnabled
Optional

Turn off exclusion settings for VM. By default 'false'.


Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/suite-api/api/optimization/workloadplacement/{dataCenterId}/settings