> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/software-delivery-agent-apis/gitops/clusters.md).

# Clusters

## Get a cluster managed by an agent by name

> Get a cluster managed by agent using name

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/cluster_byname":{"get":{"summary":"Get a cluster managed by an agent by name","description":"Get a cluster managed by agent using name","operationId":"AgentClusterService_GetByName","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/servicev1Cluster"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"fetchScopePrefixedIdentifier","description":"Indicates whether the identifier of cluster fetched must contain harness scope prefix (account./org.)","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["Clusters"]}}},"components":{"schemas":{"servicev1Cluster":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"cluster":{"$ref":"#/components/schemas/clustersCluster"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"}},"uuid":{"type":"string","description":"Kubernetes ObjectMeta.UID of the cluster Secret."},"subId":{"type":"string","description":"Sub-identifier for ConfigMap-extracted entities; empty for Clusters."},"agentUuid":{"type":"string","description":"UID of the parent agent document."}}},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## Get a cluster managed by an agent by URL

> Get a cluster managed by agent using URL

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/cluster_byurl":{"get":{"summary":"Get a cluster managed by an agent by URL","description":"Get a cluster managed by agent using URL","operationId":"AgentClusterService_GetByUrl","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/servicev1Cluster"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"server","in":"query","required":false,"schema":{"type":"string"}},{"name":"fetchScopePrefixedIdentifier","description":"Indicates whether the identifier of cluster fetched must contain harness scope prefix (account./org.)","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["Clusters"]}}},"components":{"schemas":{"servicev1Cluster":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"cluster":{"$ref":"#/components/schemas/clustersCluster"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"}},"uuid":{"type":"string","description":"Kubernetes ObjectMeta.UID of the cluster Secret."},"subId":{"type":"string","description":"Sub-identifier for ConfigMap-extracted entities; empty for Clusters."},"agentUuid":{"type":"string","description":"UID of the parent agent document."}}},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## List returns list of clusters

> List clusters.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/clusters":{"get":{"summary":"List returns list of clusters","description":"List clusters.","operationId":"AgentClusterService_List","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clustersClusterList"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.server","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.name","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.id.type","description":"type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.id.value","description":"value holds the cluster server URL or cluster name.","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.project","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Clusters"]}}},"components":{"schemas":{"clustersClusterList":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/v1ListMeta"},"items":{"type":"array","items":{"$ref":"#/components/schemas/clustersCluster"}}},"description":"ClusterList is a collection of Clusters."},"v1ListMeta":{"type":"object","properties":{"selfLink":{"type":"string","title":"Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.\n+optional"},"resourceVersion":{"type":"string","title":"String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional"},"continue":{"type":"string","description":"continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage."},"remainingItemCount":{"type":"string","format":"int64","title":"remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact.\n+optional"},"shardInfo":{"$ref":"#/components/schemas/v1ShardInfo"}},"description":"ListMeta describes metadata that synthetic resources must have, including lists and\nvarious status objects. A resource may have only one of {ObjectMeta, ListMeta}."},"v1ShardInfo":{"type":"object","properties":{"selector":{"type":"string","title":"selector is the shard selector string from the request, echoed back so clients\ncan verify which shard they received and merge responses from multiple shards.\n+required"}},"description":"ShardInfo describes the shard selector that was applied to produce a list response.\nIts presence on a list response indicates the list is a filtered subset."},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## Create creates a cluster

> Create cluster.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/clusters":{"post":{"summary":"Create creates a cluster","description":"Create cluster.","operationId":"AgentClusterService_Create","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/servicev1Cluster"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/clustersClusterCreateRequest"}}},"required":true},"tags":["Clusters"]}}},"components":{"schemas":{"servicev1Cluster":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"cluster":{"$ref":"#/components/schemas/clustersCluster"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"}},"uuid":{"type":"string","description":"Kubernetes ObjectMeta.UID of the cluster Secret."},"subId":{"type":"string","description":"Sub-identifier for ConfigMap-extracted entities; empty for Clusters."},"agentUuid":{"type":"string","description":"UID of the parent agent document."}}},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"clustersClusterCreateRequest":{"type":"object","properties":{"cluster":{"$ref":"#/components/schemas/clustersCluster"},"upsert":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"},"description":"Maps credential field names to Harness secret expressions.\nUsed to reference secrets instead of inline plain-text values."}}}}}}
```

## Get returns a cluster by identifier

> Get cluster.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/clusters/{identifier}":{"get":{"summary":"Get returns a cluster by identifier","description":"Get cluster.","operationId":"AgentClusterService_Get","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/servicev1Cluster"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.server","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.name","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.id.type","description":"type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.id.value","description":"value holds the cluster server URL or cluster name.","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.project","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Clusters"]}}},"components":{"schemas":{"servicev1Cluster":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"cluster":{"$ref":"#/components/schemas/clustersCluster"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"}},"uuid":{"type":"string","description":"Kubernetes ObjectMeta.UID of the cluster Secret."},"subId":{"type":"string","description":"Sub-identifier for ConfigMap-extracted entities; empty for Clusters."},"agentUuid":{"type":"string","description":"UID of the parent agent document."}}},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## Update updates a cluster

> Update cluster.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/clusters/{identifier}":{"put":{"summary":"Update updates a cluster","description":"Update cluster.","operationId":"AgentClusterService_Update","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/servicev1Cluster"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"forceUpdate","in":"query","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/clustersClusterUpdateRequest"}}},"required":true},"tags":["Clusters"]}}},"components":{"schemas":{"servicev1Cluster":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"cluster":{"$ref":"#/components/schemas/clustersCluster"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"}},"uuid":{"type":"string","description":"Kubernetes ObjectMeta.UID of the cluster Secret."},"subId":{"type":"string","description":"Sub-identifier for ConfigMap-extracted entities; empty for Clusters."},"agentUuid":{"type":"string","description":"UID of the parent agent document."}}},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"clustersClusterUpdateRequest":{"type":"object","properties":{"cluster":{"$ref":"#/components/schemas/clustersCluster"},"updatedFields":{"type":"array","items":{"type":"string"}},"updateMask":{"$ref":"#/components/schemas/protobufFieldMask"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"id":{"$ref":"#/components/schemas/clustersClusterID"},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"},"description":"Maps credential field names to Harness secret expressions.\nUsed to reference secrets instead of inline plain-text values."}}},"protobufFieldMask":{"type":"object","properties":{"paths":{"type":"array","items":{"type":"string"},"description":"The set of field mask paths."}},"description":"paths: \"f.a\"\n    paths: \"f.b.d\"\n\nHere `f` represents a field in some root message, `a` and `b`\nfields in the message found in `f`, and `d` a field found in the\nmessage in `f.b`.\n\nField masks are used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation.\nField masks also have a custom JSON encoding (see below).\n\n# Field Masks in Projections\n\nWhen used in the context of a projection, a response message or\nsub-message is filtered by the API to only contain those fields as\nspecified in the mask. For example, if the mask in the previous\nexample is applied to a response message as follows:\n\n    f {\n      a : 22\n      b {\n        d : 1\n        x : 2\n      }\n      y : 13\n    }\n    z: 8\n\nThe result will not contain specific values for fields x,y and z\n(their value will be set to the default, and omitted in proto text\noutput):\n\n\n    f {\n      a : 22\n      b {\n        d : 1\n      }\n    }\n\nA repeated field is not allowed except at the last position of a\npaths string.\n\nIf a FieldMask object is not present in a get operation, the\noperation applies to all fields (as if a FieldMask of all fields\nhad been specified).\n\nNote that a field mask does not necessarily apply to the\ntop-level response message. In case of a REST get operation, the\nfield mask applies directly to the response, but in case of a REST\nlist operation, the mask instead applies to each individual message\nin the returned resource list. In case of a REST custom method,\nother definitions may be used. Where the mask applies will be\nclearly documented together with its declaration in the API.  In\nany case, the effect on the returned resource/resources is required\nbehavior for APIs.\n\n# Field Masks in Update Operations\n\nA field mask in update operations specifies which fields of the\ntargeted resource are going to be updated. The API is required\nto only change the values of the fields as specified in the mask\nand leave the others untouched. If a resource is passed in to\ndescribe the updated values, the API ignores the values of all\nfields not covered by the mask.\n\nIf a repeated field is specified for an update operation, new values will\nbe appended to the existing repeated field in the target resource. Note that\na repeated field is only allowed in the last position of a `paths` string.\n\nIf a sub-message is specified in the last position of the field mask for an\nupdate operation, then new value will be merged into the existing sub-message\nin the target resource.\n\nFor example, given the target message:\n\n    f {\n      b {\n        d: 1\n        x: 2\n      }\n      c: [1]\n    }\n\nAnd an update message:\n\n    f {\n      b {\n        d: 10\n      }\n      c: [2]\n    }\n\nthen if the field mask is:\n\n paths: [\"f.b\", \"f.c\"]\n\nthen the result will be:\n\n    f {\n      b {\n        d: 10\n        x: 2\n      }\n      c: [1, 2]\n    }\n\nAn implementation may provide options to override this default behavior for\nrepeated and message fields.\n\nIn order to reset a field's value to the default, the field must\nbe in the mask and set to the default value in the provided resource.\nHence, in order to reset all fields of a resource, provide a default\ninstance of the resource and set all fields in the mask, or do\nnot provide a mask as described below.\n\nIf a field mask is not present on update, the operation applies to\nall fields (as if a field mask of all fields has been specified).\nNote that in the presence of schema evolution, this may mean that\nfields the client does not know and has therefore not filled into\nthe request will be reset to their default. If this is unwanted\nbehavior, a specific service may require a client to always specify\na field mask, producing an error if not.\n\nAs with get operations, the location of the resource which\ndescribes the updated values in the request message depends on the\noperation kind. In any case, the effect of the field mask is\nrequired to be honored by the API.\n\n## Considerations for HTTP REST\n\nThe HTTP kind of an update operation which uses a field mask must\nbe set to PATCH instead of PUT in order to satisfy HTTP semantics\n(PUT must only be used for full updates).\n\n# JSON Encoding of Field Masks\n\nIn JSON, a field mask is encoded as a single string where paths are\nseparated by a comma. Fields name in each path are converted\nto/from lower-camel naming conventions.\n\nAs an example, consider the following message declarations:\n\n    message Profile {\n      User user = 1;\n      Photo photo = 2;\n    }\n    message User {\n      string display_name = 1;\n      string address = 2;\n    }\n\nIn proto a field mask for `Profile` may look as such:\n\n    mask {\n      paths: \"user.display_name\"\n      paths: \"photo\"\n    }\n\nIn JSON, the same mask is represented as below:\n\n    {\n      mask: \"user.displayName,photo\"\n    }\n\n# Field Masks and Oneof Fields\n\nField masks treat fields in oneofs just as regular fields. Consider the\nfollowing message:\n\n    message SampleMessage {\n      oneof test_oneof {\n        string name = 4;\n        SubMessage sub_message = 9;\n      }\n    }\n\nThe field mask can be:\n\n    mask {\n      paths: \"name\"\n    }\n\nOr:\n\n    mask {\n      paths: \"sub_message\"\n    }\n\nNote that oneof type names (\"test_oneof\" in this case) cannot be used in\npaths.\n\n## Field Mask Verification\n\nThe implementation of any API method which has a FieldMask type field in the\nrequest should verify the included field paths, and return an\n`INVALID_ARGUMENT` error if any path is unmappable.","title":"`FieldMask` represents a set of symbolic field paths, for example:"},"clustersClusterID":{"type":"object","properties":{"type":{"type":"string","title":"type is the type of the specified cluster identifier ( \"server\" - default, \"name\" )"},"value":{"type":"string","title":"value holds the cluster server URL or cluster name"}},"title":"ClusterID holds a cluster server URL or cluster name"}}}}
```

## Delete deletes a cluster

> Delete cluster.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/clusters/{identifier}":{"delete":{"summary":"Delete deletes a cluster","description":"Delete cluster.","operationId":"AgentClusterService_Delete","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clustersClusterResponse"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.server","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.name","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.id.type","description":"type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.id.value","description":"value holds the cluster server URL or cluster name.","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.project","in":"query","required":false,"schema":{"type":"string"}},{"name":"forceDelete","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["Clusters"]}}},"components":{"schemas":{"clustersClusterResponse":{"type":"object"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## List all available repository certificates

> List all available repository certificates.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/gpgkeys":{"get":{"summary":"List all available repository certificates","description":"List all available repository certificates.","operationId":"AgentGPGKeyService_List","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gpgkeysGnuPGPublicKeyList"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"query.keyID","description":"The GPG key ID to query for.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Clusters"]}}},"components":{"schemas":{"gpgkeysGnuPGPublicKeyList":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/v1ListMeta"},"items":{"type":"array","items":{"$ref":"#/components/schemas/gpgkeysGnuPGPublicKey"}}},"title":"GnuPGPublicKeyList is a collection of GnuPGPublicKey objects"},"v1ListMeta":{"type":"object","properties":{"selfLink":{"type":"string","title":"Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.\n+optional"},"resourceVersion":{"type":"string","title":"String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional"},"continue":{"type":"string","description":"continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage."},"remainingItemCount":{"type":"string","format":"int64","title":"remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact.\n+optional"},"shardInfo":{"$ref":"#/components/schemas/v1ShardInfo"}},"description":"ListMeta describes metadata that synthetic resources must have, including lists and\nvarious status objects. A resource may have only one of {ObjectMeta, ListMeta}."},"v1ShardInfo":{"type":"object","properties":{"selector":{"type":"string","title":"selector is the shard selector string from the request, echoed back so clients\ncan verify which shard they received and merge responses from multiple shards.\n+required"}},"description":"ShardInfo describes the shard selector that was applied to produce a list response.\nIts presence on a list response indicates the list is a filtered subset."},"gpgkeysGnuPGPublicKey":{"type":"object","properties":{"keyID":{"type":"string","title":"KeyID specifies the key ID, in hexadecimal string format"},"fingerprint":{"type":"string","title":"Fingerprint is the fingerprint of the key"},"owner":{"type":"string","title":"Owner holds the owner identification, e.g. a name and e-mail address"},"trust":{"type":"string","title":"Trust holds the level of trust assigned to this key"},"subType":{"type":"string","title":"SubType holds the key's subtype (e.g. rsa4096)"},"keyData":{"type":"string","title":"KeyData holds the raw key data, in base64 encoded format"}},"title":"GnuPGPublicKey is a representation of a GnuPG public key"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## CreateHosted creates a harness hosted cluster

> Creates Harness hosted cluster.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/agents/{agentIdentifier}/hosted/cluster":{"post":{"summary":"CreateHosted creates a harness hosted cluster","description":"Creates Harness hosted cluster.","operationId":"AgentClusterService_CreateHosted","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/servicev1Cluster"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Clusters"]}}},"components":{"schemas":{"servicev1Cluster":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"cluster":{"$ref":"#/components/schemas/clustersCluster"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"}},"uuid":{"type":"string","description":"Kubernetes ObjectMeta.UID of the cluster Secret."},"subId":{"type":"string","description":"Sub-identifier for ConfigMap-extracted entities; empty for Clusters."},"agentUuid":{"type":"string","description":"UID of the parent agent document."}}},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```

## List clusters

> ListClusters returns a list of clusters.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/clusters":{"post":{"summary":"List clusters","description":"ListClusters returns a list of clusters.","operationId":"ClusterService_ListClusters","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1Clusterlist"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/servicev1ClusterQuery"}}},"required":true},"tags":["Clusters"]}}},"components":{"schemas":{"v1Clusterlist":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/servicev1Cluster"}},"totalPages":{"type":"integer","format":"int32"},"totalItems":{"type":"integer","format":"int32"},"pageItemCount":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"servicev1Cluster":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"cluster":{"$ref":"#/components/schemas/clustersCluster"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"secretExpressions":{"type":"object","additionalProperties":{"type":"string"}},"uuid":{"type":"string","description":"Kubernetes ObjectMeta.UID of the cluster Secret."},"subId":{"type":"string","description":"Sub-identifier for ConfigMap-extracted entities; empty for Clusters."},"agentUuid":{"type":"string","description":"UID of the parent agent document."}}},"clustersCluster":{"type":"object","properties":{"server":{"type":"string","title":"Server is the API server URL of the Kubernetes cluster"},"name":{"type":"string","title":"Name of the cluster. If omitted, will use the server address"},"config":{"$ref":"#/components/schemas/clustersClusterConfig"},"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"DEPRECATED: use Info.ServerVersion field instead.\nThe server version"},"namespaces":{"type":"array","items":{"type":"string"},"description":"Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty."},"refreshRequestedAt":{"$ref":"#/components/schemas/v1Time"},"info":{"$ref":"#/components/schemas/clustersClusterInfo"},"shard_deprecated":{"type":"string","format":"int64","description":"DEPRECATED: use Shard field instead.\nShard contains optional shard number. Calculated on the fly by the application controller if not specified."},"clusterResources":{"type":"boolean","description":"Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode."},"project":{"type":"string","title":"Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity"},"labels":{"type":"object","additionalProperties":{"type":"string"},"title":"Labels for cluster secret metadata"},"annotations":{"type":"object","additionalProperties":{"type":"string"},"title":"Annotations for cluster secret metadata"},"type":{"$ref":"#/components/schemas/clustersClusterType"},"refreshRequestedAtTs":{"type":"string","format":"date-time","title":"refreshRequestedAtTs is the google timestamp variation of refreshRequestedAt"},"shard":{"type":"string","format":"int64"}},"title":"Cluster is the definition of a cluster resource"},"clustersClusterConfig":{"type":"object","properties":{"username":{"type":"string","title":"Server requires Basic authentication"},"password":{"type":"string"},"bearerToken":{"type":"string","description":"Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client."},"tlsClientConfig":{"$ref":"#/components/schemas/clustersTLSClientConfig"},"awsAuthConfig":{"$ref":"#/components/schemas/clustersAWSAuthConfig"},"execProviderConfig":{"$ref":"#/components/schemas/clustersExecProviderConfig"},"clusterConnectionType":{"type":"string","title":"Identifies the authentication method used to connect to the cluster"},"roleARN":{"type":"string","description":"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."},"awsClusterName":{"type":"string","description":"AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster."},"disableCompression":{"type":"boolean","description":"DisableCompression bypasses automatic GZip compression requests to the server."},"proxyUrl":{"type":"string","title":"ProxyURL is the URL to the proxy to be used for all requests send to the server"}},"description":"ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling."},"clustersTLSClientConfig":{"type":"object","properties":{"insecure":{"type":"boolean","description":"Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only."},"serverName":{"type":"string","description":"ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used."},"certData":{"type":"string","format":"byte","title":"CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile"},"keyData":{"type":"string","format":"byte","title":"KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile"},"caData":{"type":"string","format":"byte","title":"CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile"}},"title":"TLSClientConfig contains settings to enable transport layer security"},"clustersAWSAuthConfig":{"type":"object","properties":{"clusterName":{"type":"string","title":"ClusterName contains AWS cluster name"},"roleARN":{"type":"string","description":"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."}},"title":"AWSAuthConfig is an AWS IAM authentication configuration"},"clustersExecProviderConfig":{"type":"object","properties":{"command":{"type":"string","title":"Command to execute"},"args":{"type":"array","items":{"type":"string"},"title":"Arguments to pass to the command when executing it"},"env":{"type":"object","additionalProperties":{"type":"string"},"title":"Env defines additional environment variables to expose to the process"},"apiVersion":{"type":"string","title":"Preferred input version of the ExecInfo"},"installHint":{"type":"string","title":"This text is shown to the user when the executable doesn't seem to be present"},"provideClusterInfo":{"type":"boolean","title":"ProvideClusterInfo determines whether or not to provide cluster information,\nwhich could potentially contain very large CA data, to this exec plugin as a\npart of the KUBERNETES_EXEC_INFO environment variable.\nComment mirrored from k8s.io/client-go/tools/clientcmd/api.ExecConfig.ProvideClusterInfo"},"config":{"$ref":"#/components/schemas/runtimeRawExtension"}},"title":"ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig"},"runtimeRawExtension":{"type":"object","properties":{"raw":{"type":"string","format":"byte","description":"Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data."}},"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true"},"commonsConnectionState":{"type":"object","properties":{"status":{"type":"string","title":"Status contains the current status indicator for the connection"},"message":{"type":"string","title":"Message contains human readable information about the connection status"},"attemptedAt":{"$ref":"#/components/schemas/v1Time"},"attemptedAtTs":{"type":"string","format":"date-time","title":"attemptedAtTs is the google timestamp variation of attemptedAt"}},"title":"ConnectionState contains information about remote resource connection state, currently used for clusters and repositories"},"v1Time":{"type":"object","properties":{"seconds":{"type":"string","format":"int64","description":"Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive."},"nanos":{"type":"integer","format":"int32","description":"Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context."}},"description":"Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON.  Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false"},"clustersClusterInfo":{"type":"object","properties":{"connectionState":{"$ref":"#/components/schemas/commonsConnectionState"},"serverVersion":{"type":"string","title":"ServerVersion contains information about the Kubernetes version of the cluster"},"cacheInfo":{"$ref":"#/components/schemas/clustersClusterCacheInfo"},"applicationsCount":{"type":"string","format":"int64","title":"ApplicationsCount is the number of applications managed by Argo CD on the cluster"},"apiVersions":{"type":"array","items":{"type":"string"},"title":"APIVersions contains list of API versions supported by the cluster"}},"title":"ClusterInfo contains information about the cluster"},"clustersClusterCacheInfo":{"type":"object","properties":{"resourcesCount":{"type":"string","format":"int64","title":"ResourcesCount holds number of observed Kubernetes resources"},"apisCount":{"type":"string","format":"int64","title":"APIsCount holds number of observed Kubernetes API count"},"lastCacheSyncTime":{"$ref":"#/components/schemas/v1Time"},"lastCacheSyncTimeTs":{"type":"string","format":"date-time","title":"lastCacheSyncTimeTs is the google timestamp variation of lastCacheSyncTime"}},"title":"ClusterCacheInfo contains information about the cluster cache"},"clustersClusterType":{"type":"string","enum":["CUSTOMER_PROVIDED","HARNESS_HOSTED"],"default":"CUSTOMER_PROVIDED"},"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"},"servicev1ClusterQuery":{"type":"object","properties":{"accountIdentifier":{"type":"string","description":"Account Identifier for the Entity."},"projectIdentifier":{"type":"string","description":"Project Identifier for the Entity."},"orgIdentifier":{"type":"string","description":"Organization Identifier for the Entity."},"agentIdentifier":{"type":"string","description":"Agent identifier for entity."},"identifier":{"type":"string"},"searchTerm":{"type":"string"},"pageSize":{"type":"integer","format":"int32"},"pageIndex":{"type":"integer","format":"int32"},"filter":{"type":"object","description":"Filters for Clusters. Eg. \"identifier\": { \"$in\": [\"id1\", \"id2\"]"},"sortBy":{"$ref":"#/components/schemas/ClusterQueryClusterSortByOptions"},"sortOrder":{"$ref":"#/components/schemas/v1SortOrderOptions"},"includeChildScopes":{"type":"boolean","description":"When true and agentIdentifier is set, retrieves clusters across hierarchical scopes based on agent prefix: account.* agents see account/org/project clusters, org.* agents see org/project clusters, unprefixed agents see only project clusters."}}},"ClusterQueryClusterSortByOptions":{"type":"string","enum":["SORT_BY_NOT_SET","NAME","GITOPS_AGENT","URL","VERSION","CONNECTIVITY_STATUS"],"default":"SORT_BY_NOT_SET"},"v1SortOrderOptions":{"type":"string","enum":["SORT_ORDER_NOT_SET","ASC","DESC"],"default":"SORT_ORDER_NOT_SET"}}}}
```

## Check if a cluster exists

> Exists checks whether a cluster with the given identifier exists.

```json
{"openapi":"3.0.0","info":{"title":"Harness NextGen GitOps API Reference","version":"1.0"},"paths":{"/api/v1/clusters/exists":{"get":{"summary":"Check if a cluster exists","description":"Exists checks whether a cluster with the given identifier exists.","operationId":"ClusterService_Exists","responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"type":"boolean"}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gatewayruntimeError"}}}}},"parameters":[{"name":"accountIdentifier","description":"Account Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orgIdentifier","description":"Organization Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"projectIdentifier","description":"Project Identifier for the Entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"agentIdentifier","description":"Agent identifier for entity.","in":"query","required":false,"schema":{"type":"string"}},{"name":"server","in":"query","required":false,"schema":{"type":"string"}}],"tags":["Clusters"]}}},"components":{"schemas":{"gatewayruntimeError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/protobufAny"}}}},"protobufAny":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"}}}}
```
