{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-container-instances/json-schema/azure-container-instances-ngroup-patch-schema.json",
  "title": "NGroupPatch",
  "description": "Describes the NGroups resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-container-instances-subscriptions-api-openapi.yml#/components/schemas/NGroupPatch",
  "type": "object",
  "properties": {
    "systemData": {
      "$ref": "#/$defs/systemData",
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "readOnly": true
    },
    "properties": {
      "$ref": "#/$defs/NGroupProperties",
      "description": "Describes the properties of the NGroups resource.",
      "x-ms-client-flatten": true
    },
    "identity": {
      "$ref": "#/$defs/NGroupIdentity",
      "description": "The identity of the NGroup, if configured."
    },
    "tags": {
      "type": "object",
      "description": "The resource tags.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "zones": {
      "type": "array",
      "description": "The zones for the NGroup.",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "ApiEntityReference": {
      "type": "object",
      "description": "The API entity reference.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/..."
        }
      }
    },
    "ApplicationGateway": {
      "type": "object",
      "description": "Application Gateway the CG profile will use to interact with CGs in a backend pool",
      "properties": {
        "resource": {
          "type": "string",
          "description": "The Application Gateway ARM resource Id."
        },
        "backendAddressPools": {
          "type": "array",
          "description": "List of Application Gateway Backend Address Pools.",
          "items": {
            "$ref": "#/$defs/ApplicationGatewayBackendAddressPool"
          },
          "x-ms-identifiers": [
            "resource"
          ]
        }
      }
    },
    "ApplicationGatewayBackendAddressPool": {
      "type": "object",
      "description": "NGroups application gateway backend address pool",
      "properties": {
        "resource": {
          "type": "string",
          "description": "The application gateway backend address pool ARM resource Id."
        }
      }
    },
    "AzureFileShareAccessType": {
      "type": "string",
      "description": "Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going to have exclusive file share.",
      "enum": [
        "Shared",
        "Exclusive"
      ],
      "x-ms-enum": {
        "name": "AzureFileShareAccessType",
        "modelAsString": false,
        "values": [
          {
            "name": "Shared",
            "value": "Shared",
            "description": "Shared"
          },
          {
            "name": "Exclusive",
            "value": "Exclusive",
            "description": "Exclusive"
          }
        ]
      }
    },
    "AzureFileVolume": {
      "type": "object",
      "description": "The properties of the Azure File volume. Azure File shares are mounted as volumes.",
      "properties": {
        "shareName": {
          "type": "string",
          "description": "The name of the Azure File share to be mounted as a volume."
        },
        "readOnly": {
          "type": "boolean",
          "description": "The flag indicating whether the Azure File shared mounted as a volume is read-only."
        },
        "storageAccountName": {
          "type": "string",
          "description": "The name of the storage account that contains the Azure File share."
        },
        "storageAccountKey": {
          "type": "string",
          "format": "password",
          "description": "The storage account access key used to access the Azure File share.",
          "x-ms-secret": true
        },
        "storageAccountKeyReference": {
          "type": "string",
          "description": "The reference to the storage account access key used to access the Azure File share."
        },
        "userManagedIdentityClientId": {
          "type": "string",
          "description": "The client id of the user-assigned managed identity that has access to the Azure File share."
        }
      },
      "required": [
        "shareName",
        "storageAccountName"
      ]
    },
    "ContainerGroupProfileStub": {
      "type": "object",
      "description": "The object that contains a reference to a Container Group Profile and it's other related properties.",
      "properties": {
        "resource": {
          "$ref": "#/$defs/ApiEntityReference",
          "description": "A reference to the container group profile ARM resource hosted in ACI RP."
        },
        "revision": {
          "type": "integer",
          "format": "int32",
          "description": "The revision of the CG profile is an optional property. If customer does not to provide a revision then NGroups will pickup the latest revision of CGProfile."
        },
        "networkProfile": {
          "$ref": "#/$defs/NetworkProfile",
          "description": "A network profile for network settings of a ContainerGroupProfile."
        },
        "storageProfile": {
          "$ref": "#/$defs/StorageProfile",
          "description": "Storage profile for storage related settings of a container group profile."
        },
        "containerGroupProperties": {
          "$ref": "#/$defs/NGroupContainerGroupProperties",
          "description": "Container Group properties which can be set while creating or updating the NGroups."
        }
      }
    },
    "ContainerGroupSubnetId": {
      "type": "object",
      "description": "Container group subnet information.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID of virtual network and subnet."
        },
        "name": {
          "type": "string",
          "description": "Friendly name for the subnet."
        }
      },
      "required": [
        "id"
      ]
    },
    "ElasticProfile": {
      "type": "object",
      "description": "Describes the elastic profile of the NGroup",
      "properties": {
        "desiredCount": {
          "type": "integer",
          "format": "int32"
        },
        "maintainDesiredCount": {
          "type": "boolean",
          "description": "Flag that indicates whether desiredCount should be maintained when customer deletes SPECIFIC container groups (CGs) from the NGroups. In this case, new CGs will be created by NGroup to compensate for the specific deleted ones."
        },
        "containerGroupNamingPolicy": {
          "$ref": "#/$defs/ElasticProfileContainerGroupNamingPolicy",
          "description": "Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation."
        }
      }
    },
    "ElasticProfileContainerGroupNamingPolicy": {
      "type": "object",
      "description": "Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation.",
      "properties": {
        "guidNamingPolicy": {
          "$ref": "#/$defs/ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy"
        }
      }
    },
    "ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy": {
      "type": "object",
      "properties": {
        "prefix": {
          "type": "string",
          "description": "The prefix can be used when there are tooling limitations (e.g. on the Azure portal where CGs from multiple NGroups exist in the same RG). The prefix with the suffixed resource name must still follow Azure resource naming guidelines."
        }
      }
    },
    "FileShare": {
      "type": "object",
      "description": "File shares that can be mounted on container groups.",
      "properties": {
        "name": {
          "type": "string"
        },
        "resourceGroupName": {
          "type": "string"
        },
        "storageAccountName": {
          "type": "string"
        },
        "properties": {
          "$ref": "#/$defs/FileShareProperties"
        }
      }
    },
    "FileShareProperties": {
      "type": "object",
      "properties": {
        "shareAccessType": {
          "$ref": "#/$defs/AzureFileShareAccessType",
          "description": "Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going to have exclusive file share."
        },
        "shareAccessTier": {
          "type": "string",
          "description": "Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Learn more at: https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier",
          "default": "TransactionOptimized",
          "enum": [
            "Cool",
            "Hot",
            "Premium",
            "TransactionOptimized"
          ],
          "x-ms-enum": {
            "name": "AzureFileShareAccessTier",
            "modelAsString": false,
            "values": [
              {
                "name": "Cool",
                "value": "Cool",
                "description": "Cool"
              },
              {
                "name": "Hot",
                "value": "Hot",
                "description": "Hot"
              },
              {
                "name": "Premium",
                "value": "Premium",
                "description": "Premium"
              },
              {
                "name": "TransactionOptimized",
                "value": "TransactionOptimized",
                "description": "TransactionOptimized"
              }
            ]
          }
        }
      }
    },
    "LoadBalancer": {
      "type": "object",
      "description": "LoadBalancer the CG profile will use to interact with CGs in a backend pool",
      "properties": {
        "backendAddressPools": {
          "type": "array",
          "description": "List of Load Balancer Backend Address Pools.",
          "items": {
            "$ref": "#/$defs/LoadBalancerBackendAddressPool"
          },
          "x-ms-identifiers": [
            "resource"
          ]
        }
      }
    },
    "LoadBalancerBackendAddressPool": {
      "type": "object",
      "description": "NGroups load balancer backend address pool",
      "properties": {
        "resource": {
          "type": "string",
          "description": "The Load Balancer backend address pool ARM resource Id."
        }
      }
    },
    "NGroupCGPropertyContainer": {
      "type": "object",
      "description": "Container properties that can be provided with NGroups object.",
      "properties": {
        "name": {
          "type": "string",
          "description": "container name"
        },
        "properties": {
          "$ref": "#/$defs/NGroupCGPropertyContainerProperties",
          "description": "container properties"
        }
      }
    },
    "NGroupCGPropertyContainerProperties": {
      "type": "object",
      "description": "container properties",
      "properties": {
        "volumeMounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VolumeMount"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "NGroupCGPropertyVolume": {
      "type": "object",
      "description": "Contains information about the volumes that can be mounted by Containers in the Container Groups.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the volume."
        },
        "azureFile": {
          "$ref": "#/$defs/AzureFileVolume",
          "description": "The Azure File volume."
        }
      },
      "required": [
        "name"
      ]
    },
    "NGroupContainerGroupProperties": {
      "type": "object",
      "description": "Container Group properties which can be set while creating or updating the NGroups.",
      "properties": {
        "subnetIds": {
          "type": "array",
          "description": "Contains information about Virtual Network Subnet ARM Resource",
          "items": {
            "$ref": "#/$defs/ContainerGroupSubnetId"
          }
        },
        "volumes": {
          "type": "array",
          "description": "Contains information about the volumes that can be mounted by Containers in the Container Groups.",
          "items": {
            "$ref": "#/$defs/NGroupCGPropertyVolume"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "containers": {
          "type": "array",
          "description": "Contains information about Container which can be set while creating or updating the NGroups.",
          "items": {
            "$ref": "#/$defs/NGroupCGPropertyContainer"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "NGroupIdentity": {
      "type": "object",
      "description": "Identity for the NGroup.",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "The principal id of the NGroup identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant id associated with the NGroup. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ResourceIdentityType",
          "description": "The type of identity used for the NGroup. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the NGroup."
        },
        "userAssignedIdentities": {
          "type": "object",
          "description": "The list of user identities associated with the NGroup.",
          "additionalProperties": {
            "$ref": "#/$defs/UserAssignedIdentities"
          }
        }
      }
    },
    "NGroupProperties": {
      "type": "object",
      "description": "Describes the properties of the NGroups resource.",
      "properties": {
        "elasticProfile": {
          "$ref": "#/$defs/ElasticProfile",
          "description": "The elastic profile."
        },
        "placementProfile": {
          "$ref": "#/$defs/PlacementProfile",
          "description": "Provides options w.r.t allocation and management w.r.t certain placement policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for high availability scenarios. E.g., distributing CGs across fault domains."
        },
        "containerGroupProfiles": {
          "type": "array",
          "description": "The Container Group Profiles that could be used in the NGroups resource.",
          "items": {
            "$ref": "#/$defs/ContainerGroupProfileStub"
          },
          "x-ms-identifiers": []
        },
        "provisioningState": {
          "$ref": "#/$defs/NGroupProvisioningState",
          "description": "The provisioning state, which only appears in the response.",
          "readOnly": true
        },
        "updateProfile": {
          "$ref": "#/$defs/UpdateProfile",
          "description": "Used by the customer to specify the way to update the Container Groups in NGroup."
        }
      }
    },
    "NGroupProvisioningState": {
      "type": "string",
      "description": "The provisioning state, which only appears in the response.",
      "enum": [
        "Creating",
        "Updating",
        "Failed",
        "Succeeded",
        "Canceled",
        "Deleting",
        "Migrating"
      ],
      "x-ms-enum": {
        "name": "NGroupProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          },
          {
            "name": "Migrating",
            "value": "Migrating",
            "description": "Migrating"
          }
        ]
      }
    },
    "NGroupUpdateMode": {
      "type": "string",
      "enum": [
        "Manual",
        "Rolling"
      ],
      "x-ms-enum": {
        "name": "NGroupUpdateMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Manual",
            "value": "Manual",
            "description": "Manual"
          },
          {
            "name": "Rolling",
            "value": "Rolling",
            "description": "Rolling"
          }
        ]
      }
    },
    "NetworkProfile": {
      "type": "object",
      "description": "A network profile for network settings of a ContainerGroupProfile. Used to manage load balancer and application gateway backend pools, specifically updating the IP addresses of CGs within the backend pool.",
      "properties": {
        "loadBalancer": {
          "$ref": "#/$defs/LoadBalancer",
          "description": "LoadBalancer the CG profile will use to interact with CGs in a backend pool"
        },
        "applicationGateway": {
          "$ref": "#/$defs/ApplicationGateway",
          "description": "Application Gateway the CG profile will use to interact with CGs in a backend pool"
        }
      }
    },
    "PlacementProfile": {
      "type": "object",
      "description": "Provides options w.r.t allocation and management w.r.t certain placement policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for high availability scenarios. E.g., distributing CGs across fault domains.",
      "properties": {
        "faultDomainCount": {
          "type": "integer",
          "format": "int32",
          "description": "The number of fault domains to be used to spread CGs in the NGroups resource. This can only be specified during NGroup creation and is immutable after that."
        }
      }
    },
    "ResourceIdentityType": {
      "type": "string",
      "description": "The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group.",
      "enum": [
        "SystemAssigned",
        "UserAssigned",
        "SystemAssigned, UserAssigned",
        "None"
      ],
      "x-ms-enum": {
        "name": "ResourceIdentityType",
        "modelAsString": false,
        "values": [
          {
            "name": "SystemAssigned",
            "value": "SystemAssigned",
            "description": "SystemAssigned"
          },
          {
            "name": "UserAssigned",
            "value": "UserAssigned",
            "description": "UserAssigned"
          },
          {
            "name": "SystemAssigned, UserAssigned",
            "value": "SystemAssigned, UserAssigned",
            "description": "SystemAssigned, UserAssigned"
          },
          {
            "name": "None",
            "value": "None",
            "description": "None"
          }
        ]
      }
    },
    "StorageProfile": {
      "type": "object",
      "description": "Storage profile for storage related settings of a container group profile.",
      "properties": {
        "fileShares": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FileShare"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "UpdateProfile": {
      "type": "object",
      "description": "Used by the customer to specify the way to update the Container Groups in NGroup.",
      "properties": {
        "updateMode": {
          "$ref": "#/$defs/NGroupUpdateMode"
        },
        "rollingUpdateProfile": {
          "$ref": "#/$defs/UpdateProfileRollingUpdateProfile",
          "description": "This profile allows the customers to customize the rolling update."
        }
      }
    },
    "UpdateProfileRollingUpdateProfile": {
      "type": "object",
      "description": "This profile allows the customers to customize the rolling update.",
      "properties": {
        "maxBatchPercent": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum percentage of total Container Groups which can be updated simultaneously by rolling update in one batch."
        },
        "maxUnhealthyPercent": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum percentage of the updated Container Groups which can be in unhealthy state after each batch is updated."
        },
        "pauseTimeBetweenBatches": {
          "type": "string",
          "description": "The wait time between batches after completing the one batch of the rolling update and starting the next batch. The time duration should be specified in ISO 8601 format for duration."
        },
        "inPlaceUpdate": {
          "type": "boolean",
          "description": "Default is false. If set to true, the CGs will be updated in-place instead of creating new CG and deleting old ones."
        }
      }
    },
    "UserAssignedIdentities": {
      "type": "object",
      "description": "The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "The principal id of user assigned identity.",
          "readOnly": true
        },
        "clientId": {
          "type": "string",
          "description": "The client id of user assigned identity.",
          "readOnly": true
        }
      }
    },
    "VolumeMount": {
      "type": "object",
      "description": "The properties of the volume mount.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the volume mount."
        },
        "mountPath": {
          "type": "string",
          "description": "The path within the container where the volume should be mounted. Must not contain colon (:)."
        },
        "readOnly": {
          "type": "boolean",
          "description": "The flag indicating whether the volume mount is read-only."
        }
      },
      "required": [
        "name",
        "mountPath"
      ]
    },
    "systemData": {
      "type": "object",
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      },
      "readOnly": true
    }
  }
}