- [Resource: FleetPackage](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#FleetPackage)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#FleetPackage.SCHEMA_REPRESENTATION)
- [ResourceBundleSelector](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#ResourceBundleSelector)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#ResourceBundleSelector.SCHEMA_REPRESENTATION)
- [ResourceBundleTag](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#ResourceBundleTag)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#ResourceBundleTag.SCHEMA_REPRESENTATION)
- [CloudBuildRepository](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#CloudBuildRepository)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#CloudBuildRepository.SCHEMA_REPRESENTATION)
- [Target](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#Target)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#Target.SCHEMA_REPRESENTATION)
- [Fleet](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#Fleet)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#Fleet.SCHEMA_REPRESENTATION)
- [LabelSelector](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#LabelSelector)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#LabelSelector.SCHEMA_REPRESENTATION)
- [VariantSelector](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#VariantSelector)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#VariantSelector.SCHEMA_REPRESENTATION)
- [FleetPackageInfo](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#FleetPackageInfo)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#FleetPackageInfo.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#State)
- [FleetPackageError](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#FleetPackageError)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#FleetPackageError.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#State_1)
- [Methods](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rest/v1/projects.locations.fleetPackages.md.txt#METHODS_SUMMARY)

## Resource: FleetPackage

A `FleetPackage` resource in the Config Delivery API.

A `FleetPackage` defines a package through which Kubernetes configuration is deployed to a fleet of Kubernetes clusters.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "resourceBundleSelector": { object (`ResourceBundleSelector`) }, "target": { object (`Target`) }, "rolloutStrategy": { object (`RolloutStrategy`) }, "variantSelector": { object (`VariantSelector`) }, "info": { object (`FleetPackageInfo`) }, "deletionPropagationPolicy": enum (`DeletionPropagationPolicy`), "state": enum (`State`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Name of the `FleetPackage`. Format is `projects/{project}/locations/{location}/fleetPackages/{fleetPackage}`. The `fleetPackage` component must match `[a-z][a-z0-9\-]{0,62}` |
| `createTime` | ``string (`Timestamp` format)`` Output only. Time at which the `FleetPackage` 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 (`Timestamp` format)`` Output only. Most recent time at which the `FleetPackage` was 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"`. |
| `labels` | `map (key: string, value: string)` Optional. Labels are attributes that can be set and used by both the user and by Config Delivery. Labels must meet the following constraints: - Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. - All characters must use UTF-8 encoding, and international characters are allowed. - Keys must start with a lowercase letter or international character. - Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be \<= 128 bytes. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `resourceBundleSelector` | ``object (`ResourceBundleSelector`)`` Required. Information specifying the source of Kubernetes configuration to deploy. |
| `target` | ``object (`Target`)`` Optional. Configuration to select target clusters to deploy Kubernetes configuration to. |
| `rolloutStrategy` | ``object (`RolloutStrategy`)`` Optional. The strategy to use to deploy Kubernetes configuration to clusters. |
| `variantSelector` | ``object (`VariantSelector`)`` Required. Information specifying how to map a `ResourceBundle` variant to a target cluster. |
| `info` | ``object (`FleetPackageInfo`)`` Output only. Information containing the rollout status of the `FleetPackage` across all the target clusters. |
| `deletionPropagationPolicy` | ``enum (`DeletionPropagationPolicy`)`` Optional. Information around how to handle Kubernetes resources at the target clusters when the `FleetPackage` is deleted. |
| `state` | ``enum (`State`)`` Optional. The desired state of the fleet package. |

## ResourceBundleSelector

Information specifying the source of Kubernetes configuration to deploy.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "resourceBundle": { object (`ResourceBundleTag`) }, "cloudBuildRepository": { object (`CloudBuildRepository`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Source can be a directly pushed `ResourceBundle` or `CloudBuildRepository` containing the Kubernetes configuration. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `resourceBundle` | ``object (`ResourceBundleTag`)`` Information specifying `ResourceBundle`. |
| `cloudBuildRepository` | ``object (`CloudBuildRepository`)`` Information specifying `CloudBuildRepository`. |
| End of mutually exclusive fields. ||

## ResourceBundleTag

ResourceBundleTag contains the information to refer to a release for a `ResourceBundle`.

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

| Fields ||
|---|---|
| `name` | `string` Required. Name of the `ResourceBundle`. Format is projects/{p}/locations/{l}/resourceBundles/{r}. |
| `tag` | `string` Required. The Git tag for a version of the release in a ResourceBundle. The tag must follow the semantic versioning format vX.Y.Z. |

## CloudBuildRepository

CloudBuildRepository contains information about fetching Kubernetes configuration from a `CloudBuildRepository`.

| JSON representation |
|---|
| ``` { "name": string, "path": string, "tag": string, "serviceAccount": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "variantsPattern": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. Name of the cloud build repository. Format is projects/{p}/locations/{l}/connections/{c}/repositories/{r}. |
| `path` | `string` Optional. Path to the directory or file within the repository that contains the Kubernetes configuration. If unspecified, path is assumed to the top level root directory of the repository. |
| `tag` | `string` Required. Git tag of the underlying git repository. The git tag must be in the semantic version format `vX.Y.Z`. |
| `serviceAccount` | `string` Required. Google service account to use in CloudBuild triggers to fetch and store Kubernetes configuration. |
| Specifies configuration for how to find variants in the repository. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `variantsPattern` | `string` Optional. Glob pattern that will be used to find variants in the repository. Examples: `variants/*.yaml`, `us-*` |
| End of mutually exclusive fields. ||

## Target

The target defines different ways to target set of Kubernetes clusters.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "fleet": { object (`Fleet`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Target for the fleet package. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `fleet` | ``object (`Fleet`)`` GKE fleet information to target rollout of the FleetPackage. |
| End of mutually exclusive fields. ||

## Fleet

The fleet where the `FleetPackage` should be deployed.

| JSON representation |
|---|
| ``` { "project": string, "selector": { object (`LabelSelector`) } } ``` |

| Fields ||
|---|---|
| `project` | `string` Required. The host project for the GKE fleet. Format is `projects/{project}`. |
| `selector` | ``object (`LabelSelector`)`` Optional. Selector allows targeting a subset of fleet members using their labels. |

## LabelSelector

A label selector is a label query over a set of resources. An empty label selector matches all objects.

| JSON representation |
|---|
| ``` { "matchLabels": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `matchLabels` | `map (key: string, value: string)` Optional. Map of {key,value} pairs. Each {key,value} pair must match an existing label key and value exactly in order to satisfy the match. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## VariantSelector

VariantSelector contains information for selecting a variant in `ResourceBundle` to deploy to a target cluster.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "variantNameTemplate": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| strategy for selecting a variant. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `variantNameTemplate` | `string` Required. variantNameTemplate is a template that can refer to variables containing cluster membership metadata such as location, name, and labels to generate the name of the variant for a target cluster. The variable syntax is similar to the unix shell variables. Available variables are `${membership.name}`, `${membership.location}`, `${membership.project}` and `${membership.labels['label_name']}`. If you want to deploy a specific variant, say "default" to all the clusters, you can use "default" (string without any variables) as the variantNameTemplate. |
| End of mutually exclusive fields. ||

## FleetPackageInfo

FleetPackageInfo represents the status of the `FleetPackage` across all the target clusters.

| JSON representation |
|---|
| ``` { "activeRollout": string, "lastCompletedRollout": string, "state": enum (`State`), "errors": [ { object (`FleetPackageError`) } ] } ``` |

| Fields ||
|---|---|
| `activeRollout` | `string` Optional. The active rollout, if any. Format is `projects/{project}/locations/{location}/fleetPackages/{fleetPackage}/rollouts/{rollout}`. |
| `lastCompletedRollout` | `string` Optional. The last completed rollout, if any. Format is `projects/{project}/locations/{location}/fleetPackages/{fleetPackage}/rollouts/{rollout}`. |
| `state` | ``enum (`State`)`` Optional. Output only. The current state of the `FleetPackage`. |
| `errors[]` | ``object (`FleetPackageError`)`` Optional. Output only. Errors encountered during configuration deployment (if any). |

## State

Possible values for the `FleetPackage` state.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state. |
| `ACTIVE` | `FleetPackage` is active. |
| `SUSPENDED` | `FleetPackage` is suspended. |
| `FAILED` | `FleetPackage` has failed to reconcile. |
| `DELETING` | `FleetPackage` is being deleted. |

## FleetPackageError

Information representing an error encountered during rolling out configurations.

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

| Fields ||
|---|---|
| `errorMessage` | `string` Optional. A description of the error. |

## State

State indicates the desired state for the fleet package. Unspecified value is equivalent to `ACTIVE`. If state is set to `SUSPENDED`, active rollout (if any) will continue but no new rollouts will be scheduled.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state. |
| `ACTIVE` | `FleetPackage` is intended to be active. |
| `SUSPENDED` | `FleetPackage` is intended to be suspended. |

| ## Methods ||
|---|---|
| ### `create` | Creates a new FleetPackage in a given project and location. |
| ### `delete` | Deletes a single FleetPackage. |
| ### `get` | Gets details of a single FleetPackage. |
| ### `list` | Lists FleetPackages in a given project and location. |
| ### `patch` | Updates the parameters of a single FleetPackage. |