Import From File Clusters Enablement Configuration Transition
The API imports the desired configuration from a file. Import API does not validate the configuration against the schema. The result will specify if the configuration was imported successfully. The result will provide localized error message if the import operation failed. Warning: This operation is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if you do not have all of the privileges described as follows: - Operation execution requires VcIntegrity.ClusterConfiguration.Modify. - The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.ClusterConfiguration.Modify.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the cluster. 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
Input structure containing file information.
{
"config": "string",
"filename": "string"
}
Configuration from the imported file. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.
Filename of the imported configuration. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.
Authentication
Response
Response BodyResponse Body
Output structure containing the status of the operation and error if any.
{
"draft": "string",
"error": {
"args": [
"string"
],
"default_message": "string",
"id": "string",
"localized": "string",
"params": {
"key": {
"d": 0,
"dt": "string",
"format": "SHORT_DATE",
"i": 0,
"l": {
"id": "string",
"params": "StdLocalizationParam Object"
},
"precision": 0,
"s": "string"
}
}
},
"status": "RUNNING",
"warnings": [
{
"args": [
"string"
],
"default_message": "string",
"id": "string",
"localized": "string",
"params": {
"key": {
"d": 0,
"dt": "string",
"format": "SHORT_DATE",
"i": 0,
"l": {
"id": "string",
"params": "StdLocalizationParam Object"
},
"precision": 0,
"s": "string"
}
}
}
]
}
The DraftImportResult.Status enumerated type contains the possible status codes describing the result of importing desired configuration for a cluster.
RUNNING : The task is in-progress.
OK : Desired configuration imported successfully.
ERROR : Desired configuration import failed with error.
CANCELED :
Possible values are: RUNNING , OK , ERROR , CANCELED
This identifier refers to the commit action of importing the desired configuration document. This identifier can be used in the apply API. This field is optional and it is only relevant when the value of DraftImportResult.status is OK. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.esx.settings.draft. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.esx.settings.draft.
Localized message describing the error encountered while importing desired configuration. The import operation will fail if the configuration document is an invalid JSON. This field is optional and it is only relevant when the value of DraftImportResult.status is ERROR.
Any issues found during the import are reported in this list.
Errors
com.vmware.vapi.std.errors.not_found : If there is no cluster associated with cluster in the system.
com.vmware.vapi.std.errors.error : If there is unknown internal error. The accompanying error message will give more details about the failure.
‘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: import_from_file