# APIQuotaPreference

| **Property** | **Value** |
|---|---|
| Google Cloud Service Name | Cloud Quotas |
| Google Cloud Service Documentation | [/docs/quotas/](https://docs.cloud.google.com/docs/quotas) |
| Google Cloud REST Resource Name | v1.projects.locations.quotaPreferences |
| Google Cloud REST Resource Documentation | <https://docs.cloud.google.com/docs/quotas/reference/rest/v1/projects.locations.quotaPreferences> |
| Config Connector Resource Short Names | apiquotapreference gcpapiquotapreference gcpapiquotapreferences |
| Config Connector Service Name | cloudquotas.googleapis.com |
| Config Connector Resource Fully Qualified Name | apiquotapreferences.cloudquota.cnrm.cloud.google.com |
| Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
| Config Connector Default Average Reconcile Interval In Seconds | 600 |

## Custom Resource Definition Properties

### Spec

#### Schema

    contactEmail: string
    dimensions:
      string: string
    folderRef:
      external: string
      name: string
      namespace: string
    justification: string
    organizationRef:
      external: string
    projectRef:
      external: string
      kind: string
      name: string
      namespace: string
    quotaConfig:
      annotations:
        string: string
      preferredValue: integer
    quotaID: string
    resourceID: string
    service: string

| Fields ||
|---|---|
| `contactEmail` *Optional* | `string` Input only. An email address that can be used to contact the the user, in case Google Cloud needs more information to make a decision before additional quota can be granted. When requesting a quota increase, the email address is required. When requesting a quota decrease, the email address is optional. For example, the email address is optional when the \`QuotaConfig.preferred_value\` is smaller than the \`QuotaDetails.reset_value\`. |
| `dimensions` *Optional* | `map (key: string, value: string)` Immutable. The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user" and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: {"provider", "Foo Inc"} where "provider" is a service specific dimension. |
| `folderRef` *Optional* | `object` The Folder that contains this resource. |
| `folderRef.external` *Optional* | `string` The 'name' field of a folder, when not managed by Config Connector. This field must be set when 'name' field is not set. |
| `folderRef.name` *Optional* | `string` The 'name' field of a 'Folder' resource. This field must be set when 'external' field is not set. |
| `folderRef.namespace` *Optional* | `string` The 'namespace' field of a 'Folder' resource. If unset, the namespace is defaulted to the namespace of the referencer resource. |
| `justification` *Optional* | `string` The reason / justification for this quota preference. |
| `organizationRef` *Optional* | `object` OrganizationRef represents the Organization that this resource belongs to. |
| `organizationRef.external` *Required\** | `string` The 'name' field of an organization, when not managed by Config Connector. |
| `projectRef` *Optional* | `object` The Project that this resource belongs to. |
| `projectRef.external` *Optional* | `string` The \`projectID\` field of a project, when not managed by Config Connector. |
| `projectRef.kind` *Optional* | `string` The kind of the Project resource; optional but must be \`Project\` if provided. |
| `projectRef.name` *Optional* | `string` The \`name\` field of a \`Project\` resource. |
| `projectRef.namespace` *Optional* | `string` The \`namespace\` field of a \`Project\` resource. |
| `quotaConfig` *Required* | `object` Required. Preferred quota configuration. |
| `quotaConfig.annotations` *Optional* | `map (key: string, value: string)` Optional. The annotations map for clients to store small amounts of arbitrary data. Do not put PII or other sensitive information here. See https://google.aip.dev/128#annotations |
| `quotaConfig.preferredValue` *Optional* | `integer` Required. The preferred value. Must be greater than or equal to -1. If set to -1, it means the value is "unlimited". |
| `quotaID` *Required* | `string` Required. The id of the quota to which the quota preference is applied. A quota name is unique in the service. Example: \`CpusPerProjectPerRegion\` |
| `resourceID` *Optional* | `string` The APIQuotaPreference name. If not given, the metadata.name will be used. |
| `service` *Required* | `string` Required. The name of the service to which the quota preference is applied. |

\* Field is required when parent field is specified

### Status

#### Schema

    conditions:
    - lastTransitionTime: string
      message: string
      reason: string
      status: string
      type: string
    externalRef: string
    observedGeneration: integer
    observedState:
      createTime: string
      etag: string
      quotaConfig:
        grantedValue: integer
        requestOrigin: string
        stateDetail: string
        traceID: string
      reconciling: boolean
      updateTime: string

| Fields ||
|---|---|
| `conditions` | `list (object)` Conditions represent the latest available observations of the object's current state. |
| `conditions[]` | `object` <br /> |
| `conditions[].lastTransitionTime` | `string` Last time the condition transitioned from one status to another. |
| `conditions[].message` | `string` Human-readable message indicating details about last transition. |
| `conditions[].reason` | `string` Unique, one-word, CamelCase reason for the condition's last transition. |
| `conditions[].status` | `string` Status is the status of the condition. Can be True, False, Unknown. |
| `conditions[].type` | `string` Type is the type of the condition. |
| `externalRef` | `string` A unique specifier for the APIQuotaPreference resource in Google Cloud. |
| `observedGeneration` | `integer` ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
| `observedState` | `object` ObservedState is the state of the resource as most recently observed in Google Cloud. |
| `observedState.createTime` | `string` Output only. Create time stamp |
| `observedState.etag` | `string` Optional. The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags for more details on etags. |
| `observedState.quotaConfig` | `object` Required. Preferred quota configuration. |
| `observedState.quotaConfig.grantedValue` | `integer` Output only. Granted quota value. |
| `observedState.quotaConfig.requestOrigin` | `string` Output only. The origin of the quota preference request. |
| `observedState.quotaConfig.stateDetail` | `string` Output only. Optional details about the state of this quota preference. |
| `observedState.quotaConfig.traceID` | `string` Output only. The trace id that the Google Cloud uses to provision the requested quota. This trace id may be used by the client to contact Cloud support to track the state of a quota preference request. The trace id is only produced for increase requests and is unique for each request. The quota decrease requests do not have a trace id. |
| `observedState.reconciling` | `boolean` Output only. Is the quota preference pending Google Cloud approval and fulfillment. |
| `observedState.updateTime` | `string` Output only. Update time stamp |

## Sample YAML(s)

> [!NOTE]
> **Note:** If you have any trouble with instantiating the resource, refer to [Troubleshoot Config Connector](https://docs.cloud.google.com/config-connector/docs/troubleshooting).