# REST Resource: projects.locations.fleets

- [Resource: Fleet](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#Fleet)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#Fleet.SCHEMA_REPRESENTATION)
- [FleetLifecycleState](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#FleetLifecycleState)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#FleetLifecycleState.SCHEMA_REPRESENTATION)
- [FleetLifecycleState.Code](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#FleetLifecycleState.Code)
- [DefaultClusterConfig](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#DefaultClusterConfig)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#DefaultClusterConfig.SCHEMA_REPRESENTATION)
- [SecurityPostureConfig](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig.SCHEMA_REPRESENTATION)
- [SecurityPostureConfig.Mode](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig.Mode)
- [SecurityPostureConfig.VulnerabilityMode](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig.VulnerabilityMode)
- [BinaryAuthorizationConfig](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.SCHEMA_REPRESENTATION)
- [BinaryAuthorizationConfig.EvaluationMode](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.EvaluationMode)
- [BinaryAuthorizationConfig.PolicyBinding](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.PolicyBinding)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.PolicyBinding.SCHEMA_REPRESENTATION)
- [CompliancePostureConfig](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.SCHEMA_REPRESENTATION)
- [CompliancePostureConfig.Mode](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.Mode)
- [CompliancePostureConfig.ComplianceStandard](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.ComplianceStandard)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.ComplianceStandard.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#METHODS_SUMMARY)

## Resource: Fleet

Fleet contains the Fleet-wide metadata and configuration.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "createTime": string, "updateTime": string, "deleteTime": string, "uid": string, "state": { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#FleetLifecycleState`) }, "defaultClusterConfig": { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#DefaultClusterConfig`) }, "labels": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each Google Cloud project can have at most one fleet resource, named "default". |
| `displayName` | `string` Optional. A user-assigned display name of the Fleet. When present, it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `Production Fleet` |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the Fleet was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the Fleet was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `deleteTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the Fleet was deleted. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `uid` | `string` Output only. Google-generated UUID for this resource. This is unique across all Fleet resources. If a Fleet resource is deleted and another resource with the same name is created, it gets a different uid. |
| `state` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#FleetLifecycleState`)`` Output only. State of the namespace resource. |
| `defaultClusterConfig` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#DefaultClusterConfig`)`` Optional. The default cluster configurations to apply across the fleet. |
| `labels` | `map (key: string, value: string)` Optional. Labels for this Fleet. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## FleetLifecycleState

FleetLifecycleState describes the state of a Fleet resource.

| JSON representation |
|---|
| ``` { "code": enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#FleetLifecycleState.Code`) } ``` |

| Fields ||
|---|---|
| `code` | ``enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#FleetLifecycleState.Code`)`` Output only. The current state of the Fleet resource. |

## FleetLifecycleState.Code

Code describes the state of a Fleet resource.

| Enums ||
|---|---|
| `CODE_UNSPECIFIED` | The code is not set. |
| `CREATING` | The fleet is being created. |
| `READY` | The fleet active. |
| `DELETING` | The fleet is being deleted. |
| `UPDATING` | The fleet is being updated. |

## DefaultClusterConfig

DefaultClusterConfig describes the default cluster configurations to be applied to all clusters born-in-fleet.

| JSON representation |
|---|
| ``` { "securityPostureConfig": { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig`) }, "binaryAuthorizationConfig": { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig`) }, "compliancePostureConfig": { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig`) } } ``` |

| Fields ||
|---|---|
| `securityPostureConfig` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig`)`` Enable/Disable Security Posture features for the cluster. |
| `binaryAuthorizationConfig` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig`)`` Optional. Enable/Disable binary authorization features for the cluster. |
| `compliancePostureConfig` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig`)`` Optional. Enable/Disable Compliance Posture features for the cluster. Note that on fleets.patch, only full replacement of this field is allowed. Users are not allowed for partial updates through field mask. |

## SecurityPostureConfig

SecurityPostureConfig defines the flags needed to enable/disable features for the Security Posture API.

| JSON representation |
|---|
| ``` { "mode": enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig.Mode`), "vulnerabilityMode": enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig.VulnerabilityMode`) } ``` |

| Fields ||
|---|---|
| `mode` | ``enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig.Mode`)`` Sets which mode to use for Security Posture features. |
| `vulnerabilityMode` | ``enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#SecurityPostureConfig.VulnerabilityMode`)`` Sets which mode to use for vulnerability scanning. |

## SecurityPostureConfig.Mode

Mode defines enablement mode for GKE Security posture features.

| Enums ||
|---|---|
| `MODE_UNSPECIFIED` | Default value not specified. |
| `DISABLED` | Disables Security Posture features on the cluster. |
| `BASIC` | Applies Security Posture features on the cluster. |
| `ENTERPRISE` | Applies the Security Posture off cluster Enterprise level features. |

## SecurityPostureConfig.VulnerabilityMode

VulnerabilityMode defines enablement mode for vulnerability scanning.

| Enums ||
|---|---|
| `VULNERABILITY_MODE_UNSPECIFIED` | Default value not specified. |
| `VULNERABILITY_DISABLED` | Disables vulnerability scanning on the cluster. |
| `VULNERABILITY_BASIC` | Applies basic vulnerability scanning on the cluster. |
| `VULNERABILITY_ENTERPRISE` | Applies the Security Posture's vulnerability on cluster Enterprise level features. |

## BinaryAuthorizationConfig

BinaryAuthorizationConfig defines the fleet level configuration of binary authorization feature.

| JSON representation |
|---|
| ``` { "evaluationMode": enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.EvaluationMode`), "policyBindings": [ { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.PolicyBinding`) } ] } ``` |

| Fields ||
|---|---|
| `evaluationMode` | ``enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.EvaluationMode`)`` Optional. Mode of operation for binauthz policy evaluation. |
| `policyBindings[]` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#BinaryAuthorizationConfig.PolicyBinding`)`` Optional. Binauthz policies that apply to this cluster. |

## BinaryAuthorizationConfig.EvaluationMode

Binary Authorization mode of operation.

| Enums ||
|---|---|
| `EVALUATION_MODE_UNSPECIFIED` | Default value |
| `DISABLED` | Disable BinaryAuthorization |
| `POLICY_BINDINGS` | Use Binary Authorization with the policies specified in policyBindings. |

## BinaryAuthorizationConfig.PolicyBinding

Binauthz policy that applies to this cluster.

| JSON representation |
|---|
| ``` { "name": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The relative resource name of the binauthz platform policy to audit. GKE platform policies have the following format: `projects/{project_number}/platforms/gke/policies/{policyId}`. |

## CompliancePostureConfig

CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.

| JSON representation |
|---|
| ``` { "mode": enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.Mode`), "complianceStandards": [ { object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.ComplianceStandard`) } ] } ``` |

| Fields ||
|---|---|
| `mode` | ``enum (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.Mode`)`` Defines the enablement mode for Compliance Posture. |
| `complianceStandards[]` | ``object (`https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets#CompliancePostureConfig.ComplianceStandard`)`` List of enabled compliance standards. |

## CompliancePostureConfig.Mode

| Enums ||
|---|---|
| `MODE_UNSPECIFIED` | Default value not specified. |
| `DISABLED` | Disables Compliance Posture features on the cluster. |
| `ENABLED` | Enables Compliance Posture features on the cluster. |

## CompliancePostureConfig.ComplianceStandard

| JSON representation |
|---|
| ``` { "standard": string } ``` |

| Fields ||
|---|---|
| `standard` | `string` Name of the compliance standard. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets/create` | Creates a fleet. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets/delete` | Removes a Fleet. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets/get` | Returns the details of a fleet. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets/list` | Returns all fleets within an organization or a project that the caller has access to. |
| ### `https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/reference/rest/v1alpha/projects.locations.fleets/patch` | Updates a fleet. |