Pbm Compliance Manager Pbm Check Compliance

Pbm Compliance Manager Pbm Check Compliance

Checks compliance of the profiles associated with one or more virtual machines and/or virtual disks.

The Server stores the compliance results for all of the storage entities associated with the virtual machines and disks. You can call the PbmFetchComplianceResult method to retrieve the stored results. However, for storage entities placed on vSAN, both fetchComplianceResult and checkCompliance methods have the same behaviour of recomputing the compliance.

Required privileges: StorageProfile.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/pbm/PbmComplianceManager/{moId}/PbmCheckCompliance
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case PbmComplianceManager/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.


Request Body
PbmCheckComplianceRequestType of type(s) application/json
Required

Show optional properties

{
    "entities": [
        {
            "objectType": "string",
            "key": "string"
        }
    ]
}
{
    "entities": [
        {
            "_typeName": "string",
            "objectType": "string",
            "key": "string",
            "serverUuid": "string"
        }
    ],
    "profile": {
        "_typeName": "string",
        "uniqueId": "string"
    }
}
entities
Required

One or more references to storage entities. You can specify virtual machines and virtual disks A maximum of 1000 virtual machines and/or virtual disks can be specified in a call. The results of calling the checkCompliance API with more than a 1000 entities is undefined.

  • If the list of entities also contains datastores, the Server will ignore the datastores.
  • If the list contains valid and invalid entities, the Server ignores the invalid entities and returns results for the valid entities. Invalid entities are entities that are not in the vCenter inventory.
  • If the list contains only datastores, the method throws an InvalidArgument fault.
  • If the list contains virtual machines and disks and the entities are invalid or have been deleted by the time of the request, the method throws an InvalidArgument fault.

If an entity does not have an associated storage profile, the entity is removed from the list.

profile
Optional

Profile unique identifier.

This structure may be used only with operations rendered under /pbm.

Authentication
This operation uses the following authentication methods.
Responses
200

Result of the compliance check. The returned array contains one result object for each entity specified in the method call.

Returns Array of PbmComplianceResult of type(s) application/json
[
    {
        "_typeName": "string",
        "checkTime": "string",
        "entity": {
            "_typeName": "string",
            "objectType": "string",
            "key": "string",
            "serverUuid": "string"
        },
        "profile": {
            "_typeName": "string",
            "uniqueId": "string"
        },
        "complianceTaskStatus": "string",
        "complianceStatus": "string",
        "mismatch": false,
        "violatedPolicies": [
            {
                "_typeName": "string",
                "expectedValue": {
                    "_typeName": "string",
                    "id": {
                        "_typeName": "string",
                        "namespace": "string",
                        "id": "string"
                    },
                    "constraint": [
                        {
                            "_typeName": "string",
                            "propertyInstance": [
                                {
                                    "_typeName": "string",
                                    "id": "string",
                                    "operator": "string",
                                    "value": {
                                        "_typeName": "string"
                                    }
                                }
                            ]
                        }
                    ]
                },
                "currentValue": {
                    "_typeName": "string",
                    "id": {
                        "_typeName": "string",
                        "namespace": "string",
                        "id": "string"
                    },
                    "constraint": [
                        {
                            "_typeName": "string",
                            "propertyInstance": [
                                {
                                    "_typeName": "string",
                                    "id": "string",
                                    "operator": "string",
                                    "value": {
                                        "_typeName": "string"
                                    }
                                }
                            ]
                        }
                    ]
                }
            }
        ],
        "errorCause": [
            {
                "_typeName": "string",
                "faultCause": "MethodFault Object",
                "faultMessage": [
                    {
                        "_typeName": "string",
                        "key": "string",
                        "arg": [
                            {
                                "_typeName": "string",
                                "key": "string",
                                "value": {
                                    "_typeName": "string"
                                }
                            }
                        ],
                        "message": "string"
                    }
                ]
            }
        ],
        "operationalStatus": {
            "_typeName": "string",
            "healthy": false,
            "operationETA": "string",
            "operationProgress": 0,
            "transitional": false
        },
        "info": {
            "_typeName": "string",
            "label": "string",
            "summary": "string",
            "key": "string",
            "messageCatalogKeyPrefix": "string",
            "messageArg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ]
        }
    }
]

500

InvalidArgument: If one of the following situations occurs:

  • You do not specify an entity.
  • You specify only datastores.
  • All of the specified storage entities are invalid.

PbmFault: If there is an internal server error.

Returns PbmFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}