---
title: "PATCH /projects/{project}/regions/{region}/commitments/{commitment}"
method: PATCH
path: "/projects/{project}/regions/{region}/commitments/{commitment}"
tags: ["regionCommitments"]
---

# PATCH /projects/{project}/regions/{region}/commitments/{commitment}

`PATCH /projects/{project}/regions/{region}/commitments/{commitment}`

Updates the specified commitment with the data included in the request.
Update is performed only on selected fields included as part of
update-mask. Only the following fields can be updated: auto_renew and plan.

## Path parameters

- `project` string, required
- `region` string, required
- `commitment` string, required

## Query parameters

- `paths` string[]
- `requestId` string
- `updateMask` string

## Request body

- Commitment — Represents a regional resource-based commitment resource. Creating this commitment resource means that you are purchasing a resource-based committed use contract, with an explicit start and end time. You can purchase resource-based commitments for both hardware and software resources. For more information, read Resource-based committed use discounts
  - `name` string — Name of the commitment. You must specify a name when you purchase the commitment. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
  - `kind` string — Output only. [Output Only] Type of the resource. Always compute#commitment for commitments.
  - `description` string — An optional description of the commitment. You can provide this property when you create the resource.
  - `region` string — Output only. [Output Only] URL of the region where the commitment and committed resources are located.
  - `category` 'CATEGORY_UNSPECIFIED' | 'LICENSE' | 'MACHINE' — The category of the commitment; specifies whether the commitment is for hardware or software resources. Category MACHINE specifies that you are committing to hardware machine resources such asVCPU or MEMORY, listed in resources. Category LICENSE specifies that you are committing to software licenses, listed in licenseResources. Note that if you specify MACHINE commitments, then you must also specify a type to indicate the machine series of the hardware resource that you are committing to.
  - `plan` 'INVALID' | 'THIRTY_SIX_MONTH' | 'TWELVE_MONTH' — The minimum time duration that you commit to purchasing resources. The plan that you choose determines the preset term length of the commitment (which is 1 year or 3 years) and affects the discount rate that you receive for your resources. Committing to a longer time duration typically gives you a higher discount rate. The supported values for this field are TWELVE_MONTH (1 year), andTHIRTY_SIX_MONTH (3 years).
  - `customEndTimestamp` string — [Input Only] Optional, specifies the requested commitment end time inRFC3339 text format. Use this option when the desired commitment's end date is later than the start date + term duration.
  - `creationTimestamp` string — Output only. [Output Only] Creation timestamp inRFC3339 text format.
  - `startTimestamp` string — Output only. [Output Only] Commitment start time inRFC3339 text format.
  - `autoRenew` boolean — Specifies whether to automatically renew the commitment at the end of its current term. The default value is false. If you set the field to true, each time your commitment reaches the end of its term, Compute Engine automatically renews it for another term. You can update this field anytime before the commitment expires. For example, if the commitment is set to expire at 12 AM UTC-8 on January 3, 2027, you can update this field until 11:59 PM UTC-8 on January 2, 2027.
  - `endTimestamp` string — Output only. [Output Only] Commitment end time inRFC3339 text format.
  - `licenseResource` LicenseResourceCommitment — Commitment for a particular license resource.
    - `amount` string, int64 — The number of licenses you plan to purchase.
    - `coresPerLicense` string — The number of cores per license.
    - `license` string — The applicable license URI.
  - `resourceStatus` CommitmentResourceStatus — [Output Only] Contains output only fields.
    - `customTermEligibilityEndTimestamp` string — Output only. [Output Only] Indicates the end time of customer's eligibility to send custom term requests in RFC3339 text format. Term extension requests that (not the end time in the request) after this time will be rejected.
  - `type` 'ACCELERATOR_OPTIMIZED' | 'ACCELERATOR_OPTIMIZED_A3' | 'ACCELERATOR_OPTIMIZED_A3_MEGA' | 'ACCELERATOR_OPTIMIZED_A3_ULTRA' | 'ACCELERATOR_OPTIMIZED_A4' | 'COMPUTE_OPTIMIZED' | 'COMPUTE_OPTIMIZED_C2D' | 'COMPUTE_OPTIMIZED_C3' | 'COMPUTE_OPTIMIZED_C3D' | 'COMPUTE_OPTIMIZED_H3' | 'COMPUTE_OPTIMIZED_H4D' | 'GENERAL_PURPOSE' | 'GENERAL_PURPOSE_C4' | 'GENERAL_PURPOSE_C4A' | 'GENERAL_PURPOSE_C4D' | 'GENERAL_PURPOSE_E2' | 'GENERAL_PURPOSE_N2' | 'GENERAL_PURPOSE_N2D' | 'GENERAL_PURPOSE_N4' | 'GENERAL_PURPOSE_N4A' | 'GENERAL_PURPOSE_N4D' | 'GENERAL_PURPOSE_T2D' | 'GRAPHICS_OPTIMIZED' | 'GRAPHICS_OPTIMIZED_G4' | 'GRAPHICS_OPTIMIZED_G4_VGPU' | 'MEMORY_OPTIMIZED' | 'MEMORY_OPTIMIZED_M3' | 'MEMORY_OPTIMIZED_M4' | 'MEMORY_OPTIMIZED_M4_6TB' | 'MEMORY_OPTIMIZED_X4_1440_24T' | 'MEMORY_OPTIMIZED_X4_16TB' | 'MEMORY_OPTIMIZED_X4_1920_32T' | 'MEMORY_OPTIMIZED_X4_24TB' | 'MEMORY_OPTIMIZED_X4_32TB' | 'MEMORY_OPTIMIZED_X4_480_6T' | 'MEMORY_OPTIMIZED_X4_480_8T' | 'MEMORY_OPTIMIZED_X4_960_12T' | 'MEMORY_OPTIMIZED_X4_960_16T' | 'STORAGE_OPTIMIZED_Z3' | 'TYPE_UNSPECIFIED' — The type of commitment; specifies the machine series for which you want to commit to purchasing resources. The choice of machine series affects the discount rate and the eligible resource types. The type must be one of the following:ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE,GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, GRAPHICS_OPTIMIZED_G4,GRAPHICS_OPTIMIZED_G4_VGPU,MEMORY_OPTIMIZED, MEMORY_OPTIMIZED_M3,MEMORY_OPTIMIZED_X4, STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED specifies a commitment that applies only to eligible resources of memory optimized M1 and M2 machine series. Type GENERAL_PURPOSE specifies a commitment that applies only to eligible resources of general purpose N1 machine series.
  - `statusMessage` string — Output only. [Output Only] An optional, human-readable explanation of the status.
  - `selfLink` string — Output only. [Output Only] Server-defined URL for the resource.
  - `mergeSourceCommitments` string[] — The list of source commitments that you are merging to create the new merged commitment. For more information, see Merging commitments.
  - `status` 'ACTIVE' | 'CANCELLED' | 'CREATING' | 'EXPIRED' | 'NOT_YET_ACTIVE' — Output only. [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). Status can be one of the following values: NOT_YET_ACTIVE, ACTIVE, orEXPIRED.
  - `resources` ResourceCommitment[] — The list of all the hardware resources, with their types and amounts, that you want to commit to. Specify as a separate entry in the list for each individual resource type.
    - `acceleratorType` string — Name of the accelerator type or GPU resource. Specify this field only when the type of hardware resource is ACCELERATOR.
    - `type` 'ACCELERATOR' | 'LOCAL_SSD' | 'MEMORY' | 'UNSPECIFIED' | 'VCPU' — The type of hardware resource that you want to specify. You can specify any of the following values: - VCPU - MEMORY - LOCAL_SSD - ACCELERATOR Specify as a separate entry in the list for each individual resource type.
    - `amount` string, int64 — The quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit). - For vCPUs, you must specify an integer value. - For memory, you specify the amount of MB that you want. The value you specify must be a multiple of 256 MB, with up to 6.5 GB of memory per every vCPU. - For GPUs, you must specify an integer value. - For Local SSD disks, you must specify the amount in GB. The size of a single Local SSD disk is 375 GB.
  - `params` CommitmentParams — Additional commitment params.
    - `resourceManagerTags` object — Input only. Resource manager tags to be bound to the commitment. Tag keys and values have the same definition as resource manager tags. Keys and values can be either in numeric format, such as `tagKeys/{tag_key_id}` and `tagValues/{tag_value_id}` or in namespaced format such as `{org_id|project_id}/{tag_key_short_name}` and `{tag_value_short_name}`. The field is ignored (both PUT & PATCH) when empty.
  - `splitSourceCommitment` string — The source commitment from which you are transferring resources to create the new split commitment. For more information, see Split commitments.
  - `id` string, uint64 — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
  - `reservations` Reservation[] — The list of new reservations that you want to create and attach to this commitment. You must attach reservations to your commitment if your commitment specifies any GPUs or Local SSD disks. For more information, see Attach reservations to resource-based commitments. Specify this property only if you want to create new reservations to attach. To attach existing reservations, specify theexistingReservations property instead.
    - `description` string — An optional description of this resource. Provide this property when you create the resource.
    - `commitment` string — Output only. [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
    - `deploymentType` 'DENSE' | 'DEPLOYMENT_TYPE_UNSPECIFIED' — Specifies the deployment strategy for this reservation.
    - `confidentialComputeType` 'CONFIDENTIAL_COMPUTE_TYPE_TDX' | 'CONFIDENTIAL_COMPUTE_TYPE_UNSPECIFIED'
    - `deleteAfterDuration` Duration — A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years.
      - `nanos` integer — Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
      - `seconds` string, int64 — Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
    - `shareSettings` ShareSettings — The share setting for reservations and sole tenancy node groups.
      - `shareType` 'LOCAL' | 'ORGANIZATION' | 'SHARE_TYPE_UNSPECIFIED' | 'SPECIFIC_PROJECTS' — Type of sharing for this shared-reservation
      - `projectMap` object — A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.
    - `kind` string — Output only. [Output Only] Type of the resource. Alwayscompute#reservations for reservations.
    - `satisfiesPzs` boolean — Output only. [Output Only] Reserved for future use.
    - `schedulingType` 'GROUPED' | 'GROUP_MAINTENANCE_TYPE_UNSPECIFIED' | 'INDEPENDENT' — The type of maintenance for the reservation.
    - `linkedCommitments` string[] — Output only. [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
    - `status` 'CREATING' | 'DELETING' | 'INVALID' | 'READY' | 'UPDATING' — Output only. [Output Only] The status of the reservation. - CREATING: Reservation resources are being allocated. - READY: Reservation resources have been allocated, and the reservation is ready for use. - DELETING: Reservation deletion is in progress. - UPDATING: Reservation update is in progress.
    - `specificReservation` AllocationSpecificSKUReservation — This reservation type allows to pre allocate specific instance configuration.
      - `instanceProperties` AllocationSpecificSKUAllocationReservedInstanceProperties — Properties of the SKU instances being reserved. Next ID: 10
        - `localSsds` AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk[] — Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
          - `diskSizeGb` string, int64 — Specifies the size of the disk in base-2 GB.
          - `interface` 'NVME' | 'SCSI' — Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default isSCSI. For performance characteristics of SCSI over NVMe, seeLocal SSD performance.
        - `minCpuPlatform` string — Minimum cpu platform the reservation.
        - `machineType` string — Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
        - `guestAccelerators` AcceleratorConfig[] — Specifies accelerator type and count.
          - `acceleratorType` string — Full or partial URL of the accelerator type resource to attach to this instance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
          - `acceleratorCount` integer — The number of the guest accelerator cards exposed to this instance.
        - `locationHint` string — An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
      - `sourceInstanceTemplate` string — Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field. This field is optional, and it can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate
      - `count` string, int64 — Specifies the number of resources that are allocated.
      - `assuredCount` string, int64 — Output only. [Output Only] Indicates how many instances are actually usable currently.
      - `inUseCount` string, int64 — Output only. [Output Only] Indicates how many instances are in use.
    - `resourceStatus` AllocationResourceStatus — [Output Only] Contains output only fields.
      - `specificSkuAllocation` AllocationResourceStatusSpecificSKUAllocation — Contains Properties set for the reservation.
        - `sourceInstanceTemplateId` string — ID of the instance template used to populate reservation properties.
        - `utilizations` object — Per service utilization breakdown. The Key is the Google Cloud managed service name.
      - `healthInfo` AllocationResourceStatusHealthInfo — Health information for the reservation.
        - `healthyBlockCount` integer — The number of reservation blocks that are healthy.
        - `healthStatus` 'DEGRADED' | 'HEALTHY' | 'HEALTH_STATUS_UNSPECIFIED' — The health status of the reservation.
        - `degradedBlockCount` integer — The number of reservation blocks that are degraded.
      - `reservationBlockCount` integer — The number of reservation blocks associated with this reservation.
      - `reservationMaintenance` GroupMaintenanceInfo — Maintenance Info for ReservationBlocks.
        - `maintenanceOngoingCount` integer — Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance.
        - `maintenancePendingCount` integer — Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have pending maintenance.
        - `subblockInfraMaintenancePendingCount` integer — Describes number of subblock Infrastructure that has pending maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family (e.g. NVLink Domains). Not all VM Families will support this field.
        - `instanceMaintenancePendingCount` integer — Describes number of instances that have pending maintenance.
        - `subblockInfraMaintenanceOngoingCount` integer — Describes number of subblock Infrastructure that has ongoing maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family(e.g. NVLink Domains). Not all VM Families will support this field.
        - `upcomingGroupMaintenance` UpcomingMaintenance — Upcoming Maintenance notification information.
          - `type` 'MULTIPLE' | 'SCHEDULED' | 'UNKNOWN_TYPE' | 'UNSCHEDULED' — Defines the type of maintenance.
          - `maintenanceStatus` 'ONGOING' | 'PENDING' | 'UNKNOWN'
          - `canReschedule` boolean — Indicates if the maintenance can be customer triggered.
          - `windowEndTime` string — The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format.
          - `maintenanceReasons` string[] — The reasons for the maintenance. Only valid for vms.
          - `windowStartTime` string — The current start time of the maintenance window. This timestamp value is in RFC3339 text format.
          - `maintenanceOnShutdown` boolean — Indicates whether the UpcomingMaintenance will be triggered on VM shutdown.
          - `latestWindowStartTime` string — The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format.
        - `schedulingType` 'GROUPED' | 'GROUP_MAINTENANCE_TYPE_UNSPECIFIED' | 'INDEPENDENT' — The type of maintenance for the reservation.
        - `instanceMaintenanceOngoingCount` integer — Describes number of instances that have ongoing maintenance.
    - `reservationSharingPolicy` AllocationReservationSharingPolicy
      - `serviceShareType` 'ALLOW_ALL' | 'DISALLOW_ALL' | 'SERVICE_SHARE_TYPE_UNSPECIFIED' — Sharing config for all Google Cloud services.
    - `protectionTier` 'CAPACITY_OPTIMIZED' | 'PROTECTION_TIER_UNSPECIFIED' | 'STANDARD' — Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. power and/or cooling failures).
    - `selfLink` string — Output only. [Output Only] Server-defined fully-qualified URL for this resource.
    - `deleteAtTime` string — Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text format.
    - `earlyAccessMaintenance` 'NO_EARLY_ACCESS' | 'WAVE1' | 'WAVE2' — Indicates the early access maintenance for the reservation. If this field is absent or set to NO_EARLY_ACCESS, the reservation is not enrolled in early access maintenance and the standard notice applies.
    - `advancedDeploymentControl` ReservationAdvancedDeploymentControl — Advance control for cluster management, applicable only to DENSE deployment type reservations.
      - `reservationOperationalMode` 'ALL_CAPACITY' | 'HIGHLY_AVAILABLE_CAPACITY' | 'RESERVATION_OPERATIONAL_MODE_UNSPECIFIED' — Indicates chosen reservation operational mode for the reservation.
    - `specificReservationRequired` boolean — Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
    - `creationTimestamp` string — Output only. [Output Only] Creation timestamp inRFC3339 text format.
    - `aggregateReservation` AllocationAggregateReservation — This reservation type is specified by total resource amounts (e.g. total count of CPUs) and can account for multiple instance SKUs. In other words, one can create instances of varying shapes against this reservation.
      - `reservedResources` AllocationAggregateReservationReservedResourceInfo[] — List of reserved resources (CPUs, memory, accelerators).
        - `accelerator` AllocationAggregateReservationReservedResourceInfoAccelerator
          - `acceleratorType` string — Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l"
          - `acceleratorCount` integer — Number of accelerators of specified type.
      - `inUseResources` AllocationAggregateReservationReservedResourceInfo[] — Output only. [Output only] List of resources currently in use.
        - `accelerator` AllocationAggregateReservationReservedResourceInfoAccelerator
          - `acceleratorType` string — Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l"
          - `acceleratorCount` integer — Number of accelerators of specified type.
      - `workloadType` 'BATCH' | 'SERVING' | 'UNSPECIFIED' — The workload type of the instances that will target this reservation.
      - `vmFamily` 'VM_FAMILY_CLOUD_TPU_DEVICE_CT3' | 'VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L' | 'VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP' | 'VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E' | 'VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P' | 'VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P' | 'VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P' | 'VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X' — The VM family that all instances scheduled against this reservation must belong to.
    - `name` string — The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    - `enableEmergentMaintenance` boolean — Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.
    - `params` ReservationParams — Additional reservation params.
      - `resourceManagerTags` object — Input only. Resource manager tags to be bound to the reservation. Tag keys and values have the same definition as resource manager tags. Keys and values can be either in numeric format, such as `tagKeys/{tag_key_id}` and `tagValues/{tag_value_id}` or in namespaced format such as `{org_id|project_id}/{tag_key_short_name}` and `{tag_value_short_name}`. The field is ignored (both PUT & PATCH) when empty.
    - `id` string, uint64 — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    - `zone` string — Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
    - `resourcePolicies` object — Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
  - `existingReservations` string[]

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/revisions/6120ed8969d4/schema)
