Update Infra Policy

Update Infra Policy
Update an infra policy.

Updates an existing infra policy.

Request
URI
PUT
https://{api_host}/cloudapi/v1/infraPolicies/{urn}
COPY
Path Parameters
string
urn
Required

The URN of the infra policy to update.


Request Body

The updated infra policy.

InfraPolicy of type(s) application/json
Required

Show optional properties

{
    "name": "string"
}
{
    "id": "string",
    "name": "string",
    "description": "string",
    "vcComputePolicyName": "string",
    "isMandatory": false,
    "policyRule": {
        "operator": "string",
        "rules": [
            {
                "operator": "string",
                "rules": [
                    "PolicyRule Object"
                ],
                "workloadPolicyRule": {
                    "guestOsRule": {
                        "operator": "string",
                        "value": "string"
                    },
                    "guestOsFamilyRule": {
                        "operator": "string",
                        "value": "string"
                    },
                    "labelSelectorRules": [
                        {
                            "operator": "string",
                            "ruleKey": "string",
                            "values": [
                                "string"
                            ]
                        }
                    ]
                }
            }
        ],
        "workloadPolicyRule": {
            "guestOsRule": {
                "operator": "string",
                "value": "string"
            },
            "guestOsFamilyRule": {
                "operator": "string",
                "value": "string"
            },
            "labelSelectorRules": [
                {
                    "operator": "string",
                    "ruleKey": "string",
                    "values": [
                        "string"
                    ]
                }
            ]
        }
    },
    "compatibleRegionZones": [
        {
            "region": {
                "name": "string",
                "id": "string"
            },
            "zones": [
                {
                    "name": "string",
                    "id": "string"
                }
            ]
        }
    ],
    "creationStatus": "string",
    "creationTime": "string",
    "syncedToVCenters": false
}
string
id
Optional

The URN of the infra policy.

string
name
Required

The name of the infra policy. Must adhere to Kubernetes naming standards (RFC 1123 DNS label format) - must be no longer than 63 characters, start and end with a lowercase letter or number, and may contain lowercase letters, numbers, and hyphens.

string
description
Optional

The description of the infra policy.

string
vcComputePolicyName
Optional

The name of the vCenter compute policy to be used.

boolean
isMandatory
Optional

Indicates if the policy is mandatory.

object
policyRule
Optional

A compute policy rule that defines the criteria against which the policy will be evaluated for a VM. A PolicyRule can contain either a workloadPolicyRule or a list of nested PolicyRules combined with a boolean operator. The nested rules in the 'rules' field are evaluated using the boolean operation specified in the 'operator' field. The workloadPolicyRule is always AND'd together with the results of the nested rules.

array of object
compatibleRegionZones
Optional
Constraints: maxItems: 128

The list of region-zone mappings that are compatible with this infra policy.

string
creationStatus
Optional

The creation status of the infra policy. Possible values are:

  • PENDING
  • SUCCESS
  • FAILED
string As date-time As date-time
creationTime
Optional

The ISO-8601 timestamp representing when this infra policy was created.

boolean
syncedToVCenters
Optional

Indicates whether this VCFA infra policy definition is in sync across all vCenters that participate in this policy. A vCenter participates if it has a matching vCenter compute policy name defined in the VCFA infra policy.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns InfraPolicy of type(s) application/json;version=9.1.0
{
    "id": "string",
    "name": "string",
    "description": "string",
    "vcComputePolicyName": "string",
    "isMandatory": false,
    "policyRule": {
        "operator": "string",
        "rules": [
            "PolicyRule Object"
        ],
        "workloadPolicyRule": {
            "guestOsRule": {
                "operator": "string",
                "value": "string"
            },
            "guestOsFamilyRule": {
                "operator": "string",
                "value": "string"
            },
            "labelSelectorRules": [
                {
                    "operator": "string",
                    "ruleKey": "string",
                    "values": [
                        "string"
                    ]
                }
            ]
        }
    },
    "compatibleRegionZones": [
        {
            "region": {
                "name": "string",
                "id": "string"
            },
            "zones": [
                {
                    "name": "string",
                    "id": "string"
                }
            ]
        }
    ],
    "creationStatus": "string",
    "creationTime": "string",
    "syncedToVCenters": false
}

Vendor Extension

This operation contains the following vendor extensions defined in the spec:

                    [{"type":"Modern"}]
                
Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name":"string"}' https://{api_host}/cloudapi/v1/infraPolicies/{urn}