Create Resource Warning

Create Resource Warning
Create a new Resource Warning

Create a new Resource Warning

Request
URI
POST
https://{api_host}/v1/resource-warnings
COPY
Request Body
ResourceWarningCreationSpec of type(s) application/json
Required  

Show optional properties

{
    "resourceId": "string",
    "resourceName": "string",
    "resourceType": "HOST, CLUSTER, DOMAIN, VCENTER, NSXT_MANAGER, NSX_ALB, NSXT_EDGE_CLUSTER, SDDC_MANAGER, DEPOT_SERVICE",
    "warningType": "SKIPPED_RESOURCE, VALIDATION, CONFIGURATION, OTHER",
    "severity": "MINOR, MAJOR",
    "occurredAtTimestamp": 0,
    "localizableWarningPack": {
        "warningCode": "string",
        "localBundle": "string",
        "vipComponent": "string",
        "defaultMessage": "string"
    }
}
{
    "resourceId": "string",
    "resourceName": "string",
    "resourceType": "HOST, CLUSTER, DOMAIN, VCENTER, NSXT_MANAGER, NSX_ALB, NSXT_EDGE_CLUSTER, SDDC_MANAGER, DEPOT_SERVICE",
    "warningType": "SKIPPED_RESOURCE, VALIDATION, CONFIGURATION, OTHER",
    "severity": "MINOR, MAJOR",
    "occurredAtTimestamp": 0,
    "context": {
        "context": "string"
    },
    "localizableWarningPack": {
        "warningCode": "string",
        "localBundle": "string",
        "vipComponent": "string",
        "defaultMessage": "string",
        "arguments": [
            "string"
        ],
        "referenceToken": "string"
    },
    "associatedTask": {
        "taskId": "string",
        "subTaskId": "string"
    },
    "skipResourceValidation": false
}
string
resourceId
Required  
Constraints: minLength: 1

ID of the resource to which this warning will be associated

string
resourceName
Required  
Constraints: minLength: 1

Name of the resource to which this warning will be associated

string
resourceType
Required  
Constraints: minLength: 1

Type of the resource to which this warning will be associated

Enumeration: HOST, CLUSTER, DOMAIN, VCENTER, NSXT_MANAGER, NSX_ALB, NSXT_EDGE_CLUSTER, SDDC_MANAGER, DEPOT_SERVICE
string
warningType
Required  
Constraints: minLength: 1

The type of the warning

Enumeration: CONFIGURATION, OTHER, SKIPPED_RESOURCE, VALIDATION
string
severity
Required  
Constraints: minLength: 1

The severity of the warning

Enumeration: MAJOR, MINOR
integer As int64 As int64
occurredAtTimestamp
Required  

The Unix epoch timestamp of when the warning occurred

object
context
Optional

Optional additional context information to be associated to the warning

object
localizableWarningPack
Required  

Localization warning pack containing all required data to provide localized warning messages

object
associatedTask
Optional

Task association for a resource warning. Indicates in which task the resource warning occurred

boolean
skipResourceValidation
Optional

Optional to skip resource validation

Responses
201

Created

Returns ResourceWarning of type(s) application/json
{
    "id": "string",
    "warningCode": "string",
    "message": "string",
    "remediationMessage": "string",
    "referenceToken": "string",
    "resourceId": "string",
    "resourceType": "One among: HOST, CLUSTER, DOMAIN, VCENTER, NSXT_MANAGER, NSX_ALB, NSXT_EDGE_CLUSTER, SDDC_MANAGER, DEPOT_SERVICE",
    "resourceName": "string",
    "warningType": "One among: SKIPPED_RESOURCE, VALIDATION, CONFIGURATION, OTHER",
    "severity": "One among: MINOR, MAJOR",
    "occurredAtTimestamp": "string",
    "context": {
        "context": "string"
    },
    "associatedTask": {
        "taskId": "string",
        "subTaskId": "string"
    }
}
string
id
Optional

ID of the resource warning

string
warningCode
Optional

The warning code

string
message
Optional

The localized warning message

string
remediationMessage
Optional

The localized remediation warning message

string
referenceToken
Optional

A reference token correlating the warning with the relevant detailed logs. Should be sent to the service provider when reporting issues

string
resourceId
Optional

ID of the associated resource

string
resourceType
Optional

Type of the associated resource

string
resourceName
Optional

Name of the associated resource

string
warningType
Optional

Type of the warning

string
severity
Optional

Severity of the warning

string
occurredAtTimestamp
Required  

Timestamp when the warning occurred

object
context
Optional

Optional additional context information in a key value form

object
associatedTask
Optional

Task association for a resource warning. Indicates in which task the resource warning occurred


400

Bad Request

Returns Error of type(s) application/json
{
    "errorCode": "string",
    "errorType": "string",
    "arguments": [
        "string"
    ],
    "context": {
        "context": "string"
    },
    "notifications": [
        {
            "severity": "string",
            "message": "string",
            "remediations": [
                {
                    "message": "string",
                    "link": "string"
                }
            ],
            "impactMessage": "string"
        }
    ],
    "message": "string",
    "remediationMessage": "string",
    "causes": [
        {
            "type": "string",
            "message": "string"
        }
    ],
    "nestedErrors": [
        {
            "errorCode": "string",
            "errorType": "string",
            "arguments": [
                "string"
            ],
            "context": {
                "context": "string"
            },
            "notifications": [
                {
                    "severity": "string",
                    "message": "string",
                    "remediations": [
                        {
                            "message": "string",
                            "link": "string"
                        }
                    ],
                    "impactMessage": "string"
                }
            ],
            "message": "string",
            "remediationMessage": "string",
            "causes": [
                {
                    "type": "string",
                    "message": "string"
                }
            ],
            "nestedErrors": [
                "Error Object"
            ],
            "referenceToken": "string",
            "label": "string",
            "remediationUrl": "string"
        }
    ],
    "referenceToken": "string",
    "label": "string",
    "remediationUrl": "string"
}
string
errorCode
Read-Only  

The minor error code

string
errorType
Read-Only  

The error type

array of string
arguments
Read-Only  

The arguments used to localize the message, Can be used by scripts to automate the error processing.

object
context
Read-Only  

The error context (e.g. the component where it occurred).

array of object
notifications
Read-Only  

Detailed results of the precheck validation.

string
message
Read-Only  

The localized error message

string
remediationMessage
Optional

The localized remediation error message

array of object
causes
Optional

The underlying cause exceptions.

array of object
nestedErrors
Optional

The nested errors when the error is a composite one

string
referenceToken
Read-Only  

A reference token correlating the error with the relevant detailed error logs. Should be sent to the service provider when reporting issues.

string
label
Read-Only  

The localized label message

string
remediationUrl
Read-Only  

The URL string for remediation documentation link


500

Internal Server Error

Returns Error of type(s) application/json
"Error Object"
string
errorCode
Read-Only  

The minor error code

string
errorType
Read-Only  

The error type

array of string
arguments
Read-Only  

The arguments used to localize the message, Can be used by scripts to automate the error processing.

object
context
Read-Only  

The error context (e.g. the component where it occurred).

array of object
notifications
Read-Only  

Detailed results of the precheck validation.

string
message
Read-Only  

The localized error message

string
remediationMessage
Optional

The localized remediation error message

array of object
causes
Optional

The underlying cause exceptions.

array of Error
nestedErrors
Optional

The nested errors when the error is a composite one

string
referenceToken
Read-Only  

A reference token correlating the error with the relevant detailed error logs. Should be sent to the service provider when reporting issues.

string
label
Read-Only  

The localized label message

string
remediationUrl
Read-Only  

The URL string for remediation documentation link


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"localizableWarningPack":"object","occurredAtTimestamp":"integer","resourceId":"string","resourceName":"string","resourceType":"string","severity":"string","warningType":"string"}' https://{api_host}/v1/resource-warnings