# GKE Hub API . projects . locations . fleets

## Instance Methods

Close httplib2 connections.

Creates a fleet.

Removes a Fleet. There must be no memberships remaining in the Fleet.

Returns the details of a fleet.

Returns all fleets within an organization or a project that the caller has access to.

Retrieves the next page of results.

Updates a fleet.

### Method Details

`close()`

    Close httplib2 connections.

`create(parent, body=None, x__xgafv=None)`

    Creates a fleet.

    Args:
      parent: string, Required. The parent (project and location) where the Fleet will be created. Specified in the format `projects/*/locations/*`. (required)
      body: object, The request body.
        The object takes the form of:

    { # Fleet contains the Fleet-wide metadata and configuration.
      "createTime": "A String", # Output only. When the Fleet was created.
      "deleteTime": "A String", # Output only. When the Fleet was deleted.
      "displayName": "A 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`
      "fleetName": "A String", # The name for the fleet. The name must meet the following constraints: + The name of a fleet should be unique within the organization; + It must consist of lower case alphanumeric characters or `-`; + The length of the name must be less than or equal to 63; + Unicode names must be expressed in Punycode format (rfc3492). Examples: + prod-fleet + xn--wlq33vhyw9jb （Punycode form for "生产环境")
      "name": "A String", # Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each GCP project can have at most one fleet resource, named "default".
      "uid": "A 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.
      "updateTime": "A String", # Output only. When the Fleet was last updated.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Fleet contains the Fleet-wide metadata and configuration.
      "createTime": "A String", # Output only. When the Fleet was created.
      "deleteTime": "A String", # Output only. When the Fleet was deleted.
      "displayName": "A 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`
      "fleetName": "A String", # The name for the fleet. The name must meet the following constraints: + The name of a fleet should be unique within the organization; + It must consist of lower case alphanumeric characters or `-`; + The length of the name must be less than or equal to 63; + Unicode names must be expressed in Punycode format (rfc3492). Examples: + prod-fleet + xn--wlq33vhyw9jb （Punycode form for "生产环境")
      "name": "A String", # Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each GCP project can have at most one fleet resource, named "default".
      "uid": "A 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.
      "updateTime": "A String", # Output only. When the Fleet was last updated.
    }

`delete(name, x__xgafv=None)`

    Removes a Fleet. There must be no memberships remaining in the Fleet.

    Args:
      name: string, Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
    }

`get(name, x__xgafv=None)`

    Returns the details of a fleet.

    Args:
      name: string, Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Fleet contains the Fleet-wide metadata and configuration.
      "createTime": "A String", # Output only. When the Fleet was created.
      "deleteTime": "A String", # Output only. When the Fleet was deleted.
      "displayName": "A 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`
      "fleetName": "A String", # The name for the fleet. The name must meet the following constraints: + The name of a fleet should be unique within the organization; + It must consist of lower case alphanumeric characters or `-`; + The length of the name must be less than or equal to 63; + Unicode names must be expressed in Punycode format (rfc3492). Examples: + prod-fleet + xn--wlq33vhyw9jb （Punycode form for "生产环境")
      "name": "A String", # Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each GCP project can have at most one fleet resource, named "default".
      "uid": "A 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.
      "updateTime": "A String", # Output only. When the Fleet was last updated.
    }

`list(parent, pageToken=None, x__xgafv=None)`

    Returns all fleets within an organization or a project that the caller has access to.

    Args:
      parent: string, Required. The organization or project to list for Fleets under, in the format `organizations/*/locations/*` or `projects/*/locations/*`. (required)
      pageToken: string, A page token, received from a previous `ListFleets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListFleets` must match the call that provided the page token.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Response message for the `GkeHub.ListFleetsResponse` method.
      "fleets": [ # The list of matching fleets.
        { # Fleet contains the Fleet-wide metadata and configuration.
          "createTime": "A String", # Output only. When the Fleet was created.
          "deleteTime": "A String", # Output only. When the Fleet was deleted.
          "displayName": "A 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`
          "fleetName": "A String", # The name for the fleet. The name must meet the following constraints: + The name of a fleet should be unique within the organization; + It must consist of lower case alphanumeric characters or `-`; + The length of the name must be less than or equal to 63; + Unicode names must be expressed in Punycode format (rfc3492). Examples: + prod-fleet + xn--wlq33vhyw9jb （Punycode form for "生产环境")
          "name": "A String", # Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each GCP project can have at most one fleet resource, named "default".
          "uid": "A 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.
          "updateTime": "A String", # Output only. When the Fleet was last updated.
        },
      ],
      "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
    }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.

`patch(name, body=None, updateMask=None, x__xgafv=None)`

    Updates a fleet.

    Args:
      name: string, Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each GCP project can have at most one fleet resource, named "default". (required)
      body: object, The request body.
        The object takes the form of:

    { # Fleet contains the Fleet-wide metadata and configuration.
      "createTime": "A String", # Output only. When the Fleet was created.
      "deleteTime": "A String", # Output only. When the Fleet was deleted.
      "displayName": "A 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`
      "fleetName": "A String", # The name for the fleet. The name must meet the following constraints: + The name of a fleet should be unique within the organization; + It must consist of lower case alphanumeric characters or `-`; + The length of the name must be less than or equal to 63; + Unicode names must be expressed in Punycode format (rfc3492). Examples: + prod-fleet + xn--wlq33vhyw9jb （Punycode form for "生产环境")
      "name": "A String", # Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each GCP project can have at most one fleet resource, named "default".
      "uid": "A 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.
      "updateTime": "A String", # Output only. When the Fleet was last updated.
    }

      updateMask: string, Required. The fields to be updated;
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Fleet contains the Fleet-wide metadata and configuration.
      "createTime": "A String", # Output only. When the Fleet was created.
      "deleteTime": "A String", # Output only. When the Fleet was deleted.
      "displayName": "A 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`
      "fleetName": "A String", # The name for the fleet. The name must meet the following constraints: + The name of a fleet should be unique within the organization; + It must consist of lower case alphanumeric characters or `-`; + The length of the name must be less than or equal to 63; + Unicode names must be expressed in Punycode format (rfc3492). Examples: + prod-fleet + xn--wlq33vhyw9jb （Punycode form for "生产环境")
      "name": "A String", # Output only. The full, unique resource name of this fleet in the format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each GCP project can have at most one fleet resource, named "default".
      "uid": "A 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.
      "updateTime": "A String", # Output only. When the Fleet was last updated.
    }