# Get returns a cluster by identifier

Get cluster.

Endpoint: GET /gitops/api/v1/agents/{agentIdentifier}/clusters/{identifier}
Version: 1.0
Security: x-api-key

## Path parameters:

  - `agentIdentifier` (string, required)
    Agent identifier for entity.

  - `identifier` (string, required)

## Query parameters:

  - `accountIdentifier` (string)
    Account Identifier for the Entity.

  - `orgIdentifier` (string)
    Organization Identifier for the Entity.

  - `projectIdentifier` (string)
    Project Identifier for the Entity.

  - `query.server` (string)

  - `query.name` (string)

  - `query.id.type` (string)
    type is the type of the specified cluster identifier ( "server" - default, "name" ).

  - `query.id.value` (string)
    value holds the cluster server URL or cluster name.

  - `query.project` (string)

## Response 200 fields (application/json):

  - `accountIdentifier` (string)
    Account Identifier for the Entity.

  - `orgIdentifier` (string)
    Organization Identifier for the Entity.

  - `projectIdentifier` (string)
    Project Identifier for the Entity.

  - `agentIdentifier` (string)
    Agent identifier for entity.

  - `identifier` (string)

  - `cluster` (object)

  - `cluster.server` (string)

  - `cluster.name` (string)

  - `cluster.config` (object)
    ClusterConfig is the configuration attributes. This structure is subset of the go-client
rest.Config with annotations added for marshalling.

  - `cluster.config.username` (string)

  - `cluster.config.password` (string)

  - `cluster.config.bearerToken` (string)
    Server requires Bearer authentication. This client will not attempt to use
refresh tokens for an OAuth2 flow.
TODO: demonstrate an OAuth2 compatible client.

  - `cluster.config.tlsClientConfig` (object)

  - `cluster.config.tlsClientConfig.insecure` (boolean)
    Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only.

  - `cluster.config.tlsClientConfig.serverName` (string)
    ServerName is passed to the server for SNI and is used in the client to check server
certificates against. If ServerName is empty, the hostname used to contact the
server is used.

  - `cluster.config.tlsClientConfig.certData` (string)

  - `cluster.config.tlsClientConfig.keyData` (string)

  - `cluster.config.tlsClientConfig.caData` (string)

  - `cluster.config.awsAuthConfig` (object)

  - `cluster.config.awsAuthConfig.clusterName` (string)

  - `cluster.config.awsAuthConfig.roleARN` (string)
    RoleARN contains optional role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.

  - `cluster.config.execProviderConfig` (object)

  - `cluster.config.execProviderConfig.command` (string)

  - `cluster.config.execProviderConfig.args` (array)

  - `cluster.config.execProviderConfig.env` (object)

  - `cluster.config.execProviderConfig.apiVersion` (string)

  - `cluster.config.execProviderConfig.installHint` (string)

  - `cluster.config.clusterConnectionType` (string)

  - `cluster.config.roleARN` (string)
    RoleARN contains optional role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.

  - `cluster.config.awsClusterName` (string)
    AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster.

  - `cluster.config.disableCompression` (boolean)
    DisableCompression bypasses automatic GZip compression requests to the server.

  - `cluster.config.proxyUrl` (string)

  - `cluster.connectionState` (object)

  - `cluster.connectionState.status` (string)

  - `cluster.connectionState.message` (string)

  - `cluster.connectionState.attemptedAt` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `cluster.connectionState.attemptedAt.seconds` (string)
    Represents seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
9999-12-31T23:59:59Z inclusive.

  - `cluster.connectionState.attemptedAt.nanos` (integer)
    Non-negative fractions of a second at nanosecond resolution. Negative
second values with fractions must still have non-negative nanos values
that count forward in time. Must be from 0 to 999,999,999
inclusive. This field may be limited in precision depending on context.

  - `cluster.connectionState.attemptedAtTs` (string)

  - `cluster.serverVersion` (string)

  - `cluster.namespaces` (array)
    Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty.

  - `cluster.refreshRequestedAt` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `cluster.info` (object)

  - `cluster.info.connectionState` (object)

  - `cluster.info.serverVersion` (string)

  - `cluster.info.cacheInfo` (object)

  - `cluster.info.cacheInfo.resourcesCount` (string)

  - `cluster.info.cacheInfo.apisCount` (string)

  - `cluster.info.cacheInfo.lastCacheSyncTime` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `cluster.info.cacheInfo.lastCacheSyncTimeTs` (string)

  - `cluster.info.applicationsCount` (string)

  - `cluster.info.apiVersions` (array)

  - `cluster.shard_deprecated` (string)
    DEPRECATED: use Shard field instead.
Shard contains optional shard number. Calculated on the fly by the application controller if not specified.

  - `cluster.clusterResources` (boolean)
    Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode.

  - `cluster.project` (string)

  - `cluster.labels` (object)

  - `cluster.annotations` (object)

  - `cluster.type` (string)
    Enum: "CUSTOMER_PROVIDED", "HARNESS_HOSTED"

  - `cluster.refreshRequestedAtTs` (string)

  - `cluster.shard` (string)

  - `createdAt` (string)

  - `lastModifiedAt` (string)

  - `stale` (boolean)

  - `tags` (object)

## Response default fields (application/json):

  - `error` (string)

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.type_url` (string)
    A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading "." is not accepted).

In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:

* If no scheme is provided, https is assumed.
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
  value in binary format, or produce an error.
* Applications are allowed to cache lookup results based on the
  URL, or have them precompiled into a binary to avoid any
  lookup. Therefore, binary compatibility needs to be preserved
  on changes to types. (Use versioned type names to manage
  breaking changes.)

Note: this functionality is not currently available in the official
protobuf release, and it is not used for type URLs beginning with
type.googleapis.com. As of May 2023, there are no widely used type server
implementations and no plans to implement one.

Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.

  - `details.value` (string)
    Must be a valid serialized protocol buffer of the above specified type.


