Categorygithub.com/cockroachdb/cockroach-cloud-sdk-go/v3

# Packages

No description provided by the author

# README

Go API client for CockroachDB Cloud API

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 2024-09-16
  • Package version: 2.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://support.cockroachlabs.com

Installation

Install the package:

go get github.com/cockroachdb/cockroach-cloud-sdk-go/v3

Import the package:

import "github.com/cockroachdb/cockroach-cloud-sdk-go/v3/pkg/client"

Example Client Usage

// Create a default Configuration object.
clientConfig := client.NewConfiguration(apiKey)

// Create a new client.
client := client.NewClient(clientConfig)

// Create a new service.
service := client.NewService(client)

requiredPathParam = "a_cluster_id"
requiredRequest := &client.OperationRequest{...}
optionalParams := &client.OperationOptions{...}

// Execute the request
apiResponse, httpResponse, err := := service.Operation(
	context.Background(), 
	requiredPathParam, 
	requiredRequest, 
	optionalParams,
)
if err != nil {
	// Process error
}

if apiResponse != nil {
	respJSON, err := apiResponse.MarshalJSON()
	if err != nil {
		// Process error
	}
	fmt.Println(string(respJSON))
}

Documentation for API Endpoints

All URIs are relative to https://cockroachlabs.cloud

APIMethodHTTP requestDescription
APIKeysApiCreateApiKeyPost /api/v1/api-keysCreate a new API Key
APIKeysApiDeleteApiKeyDelete /api/v1/api-keys/{id}Delete an API Key
APIKeysApiGetApiKeyGet /api/v1/api-keys/{id}Get an API Key by ID
APIKeysApiListApiKeysGet /api/v1/api-keysList API Keys
APIKeysApiUpdateApiKeyPatch /api/v1/api-keys/{id}Update an API Key
AuditLogsApiListAuditLogsGet /api/v1/auditlogeventsList audit logs
BillingApiGetInvoiceGet /api/v1/invoices/{invoice_id}Get a specific invoice for an organization
BillingApiListInvoicesGet /api/v1/invoicesList invoices for a given organization
ClientCACertificatesApiDeleteClientCACertDelete /api/v1/clusters/{cluster_id}/client-ca-certDelete Client CA Cert for a cluster
ClientCACertificatesApiGetClientCACertGet /api/v1/clusters/{cluster_id}/client-ca-certGet Client CA Cert information for a cluster
ClientCACertificatesApiSetClientCACertPost /api/v1/clusters/{cluster_id}/client-ca-certSet Client CA Cert for a cluster
ClientCACertificatesApiUpdateClientCACertPatch /api/v1/clusters/{cluster_id}/client-ca-certUpdate Client CA Cert for a cluster
ClustersApiCreateClusterPost /api/v1/clustersCreate and initialize a new cluster
ClustersApiDeleteClusterDelete /api/v1/clusters/{cluster_id}Delete a cluster and all of its data
ClustersApiGetClusterGet /api/v1/clusters/{cluster_id}Get extended information about a cluster
ClustersApiGetConnectionStringGet /api/v1/clusters/{cluster_id}/connection-stringGet a formatted generic connection string for a cluster
ClustersApiListAvailableRegionsGet /api/v1/clusters/available-regionsList the regions available for new clusters and nodes
ClustersApiListClusterNodesGet /api/v1/clusters/{cluster_id}/nodesList nodes for a cluster
ClustersApiListClustersGet /api/v1/clustersList clusters owned by an organization
ClustersApiListMajorClusterVersionsGet /api/v1/cluster-versionsList available major cluster versions
ClustersApiUpdateClusterPatch /api/v1/clusters/{cluster_id}Scale, edit or upgrade a cluster
CustomerManagedEncryptionKeysApiEnableCMEKSpecPost /api/v1/clusters/{cluster_id}/cmekEnable CMEK for a cluster
CustomerManagedEncryptionKeysApiGetCMEKClusterInfoGet /api/v1/clusters/{cluster_id}/cmekGet CMEK-related information for a cluster
CustomerManagedEncryptionKeysApiUpdateCMEKSpecPut /api/v1/clusters/{cluster_id}/cmekEnable or update the CMEK spec for a cluster
CustomerManagedEncryptionKeysApiUpdateCMEKStatusPatch /api/v1/clusters/{cluster_id}/cmekUpdate the CMEK-related status for a cluster
DatabasesApiCreateDatabasePost /api/v1/clusters/{cluster_id}/databasesCreate a new database
DatabasesApiDeleteDatabaseDelete /api/v1/clusters/{cluster_id}/databases/{name}Delete a database
DatabasesApiEditDatabasePatch /api/v1/clusters/{cluster_id}/databases/{name}Update a database
DatabasesApiEditDatabase2Patch /api/v1/clusters/{cluster_id}/databasesUpdate a database
DatabasesApiListDatabasesGet /api/v1/clusters/{cluster_id}/databasesList databases for a cluster
EgressRulesApiAddEgressRulePost /api/v1/clusters/{cluster_id}/networking/egress-rulesAdd an egress rule
EgressRulesApiDeleteEgressRuleDelete /api/v1/clusters/{cluster_id}/networking/egress-rules/{rule_id}Delete an existing egress rule
EgressRulesApiEditEgressRulePatch /api/v1/clusters/{cluster_id}/networking/egress-rules/{rule_id}Edit an existing egress rule
EgressRulesApiGetEgressRuleGet /api/v1/clusters/{cluster_id}/networking/egress-rules/{rule_id}Get an existing egress rule
EgressRulesApiListEgressRulesGet /api/v1/clusters/{cluster_id}/networking/egress-rulesList all egress rules associated with a cluster
EgressRulesApiSetEgressTrafficPolicyPost /api/v1/clusters/{cluster_id}/networking/egress-rules/egress-traffic-policyOutbound traffic management
FoldersApiCreateFolderPost /api/v1/foldersCreate a folder
FoldersApiDeleteFolderDelete /api/v1/folders/{folder_id}Delete a folder
FoldersApiGetFolderGet /api/v1/folders/{folder_id}Get folder info for a folder
FoldersApiListFolderContentsGet /api/v1/folders/{folder_id}/contentsList contents of a folder
FoldersApiListFoldersGet /api/v1/foldersList folders owned by an organization
FoldersApiUpdateFolderPatch /api/v1/folders/{folder_id}Update a folder
IPAllowlistsApiAddAllowlistEntryPost /api/v1/clusters/{cluster_id}/networking/allowlistAdd a new CIDR address to the IP allowlist
IPAllowlistsApiAddAllowlistEntry2Put /api/v1/clusters/{cluster_id}/networking/allowlist/{cidr_ip}/{cidr_mask}Add a new CIDR address to the IP allowlist
IPAllowlistsApiDeleteAllowlistEntryDelete /api/v1/clusters/{cluster_id}/networking/allowlist/{cidr_ip}/{cidr_mask}Delete an IP allowlist entry
IPAllowlistsApiListAllowlistEntriesGet /api/v1/clusters/{cluster_id}/networking/allowlistGet the IP allowlist and propagation status for a cluster
IPAllowlistsApiUpdateAllowlistEntryPatch /api/v1/clusters/{cluster_id}/networking/allowlist/{cidr_ip}/{cidr_mask}Update an IP allowlist entry
JWTIssuersApiAddJWTIssuerPost /api/v1/jwt-issuersAdd a JWT Issuer
JWTIssuersApiDeleteJWTIssuerDelete /api/v1/jwt-issuers/{id}Delete a JWT Issuer
JWTIssuersApiGetJWTIssuerGet /api/v1/jwt-issuers/{id}Get a JWT Issuer
JWTIssuersApiListJWTIssuersGet /api/v1/jwt-issuersList all JWT Issuers
JWTIssuersApiUpdateJWTIssuerPatch /api/v1/jwt-issuers/{id}Update a JWT Issuer
LogExportApiDeleteLogExportDelete /api/v1/clusters/{cluster_id}/logexportDelete the Log Export configuration for a cluster
LogExportApiEnableLogExportPost /api/v1/clusters/{cluster_id}/logexportCreate or update the Log Export configuration for a cluster
LogExportApiGetLogExportInfoGet /api/v1/clusters/{cluster_id}/logexportGet the Log Export configuration for a cluster
MaintenanceWindowsApiDeleteMaintenanceWindowDelete /api/v1/clusters/{cluster_id}/maintenance-windowDelete the maintenance window for a cluster
MaintenanceWindowsApiGetMaintenanceWindowGet /api/v1/clusters/{cluster_id}/maintenance-windowGet the maintenance window for a cluster
MaintenanceWindowsApiSetMaintenanceWindowPut /api/v1/clusters/{cluster_id}/maintenance-windowSet the maintenance window for a cluster
MetricExportApiDeleteCloudWatchMetricExportDelete /api/v1/clusters/{cluster_id}/metricexport/cloudwatchDelete the CloudWatch Metric Export configuration for a cluster
MetricExportApiDeleteDatadogMetricExportDelete /api/v1/clusters/{cluster_id}/metricexport/datadogDelete the Datadog Metric Export configuration for a cluster
MetricExportApiDeletePrometheusMetricExportDelete /api/v1/clusters/{cluster_id}/metricexport/prometheusDisable Prometheus Metric Export for a cluster
MetricExportApiEnableCloudWatchMetricExportPost /api/v1/clusters/{cluster_id}/metricexport/cloudwatchCreate or update the CloudWatch Metric Export configuration for a cluster
MetricExportApiEnableDatadogMetricExportPost /api/v1/clusters/{cluster_id}/metricexport/datadogCreate or update the Datadog Metric Export configuration for a cluster
MetricExportApiEnablePrometheusMetricExportPost /api/v1/clusters/{cluster_id}/metricexport/prometheusEnable Prometheus Metric Export for a cluster
MetricExportApiGetCloudWatchMetricExportInfoGet /api/v1/clusters/{cluster_id}/metricexport/cloudwatchGet the CloudWatch Metric Export configuration for a cluster
MetricExportApiGetDatadogMetricExportInfoGet /api/v1/clusters/{cluster_id}/metricexport/datadogGet the Datadog Metric Export configuration for a cluster
MetricExportApiGetPrometheusMetricExportInfoGet /api/v1/clusters/{cluster_id}/metricexport/prometheusGet the Prometheus Metric Export configuration for a cluster
OpenIDConnectConfigurationApiCreateApiOidcConfigPost /api/v1/api_oidcCreate an API OIDC configuration (Deprecated)
OpenIDConnectConfigurationApiDeleteApiOidcConfigDelete /api/v1/api_oidc/{id}Delete an API OIDC configuration (Deprecated)
OpenIDConnectConfigurationApiGetApiOidcConfigGet /api/v1/api_oidc/{id}Get an API OIDC configuration (Deprecated)
OpenIDConnectConfigurationApiListApiOidcConfigGet /api/v1/api_oidcList all API OIDC configurations (Deprecated)
OpenIDConnectConfigurationApiUpdateApiOidcConfigPut /api/v1/api_oidc/{id}Update an API OIDC configuration (Deprecated)
OrganizationsApiGetOrganizationInfoGet /api/v1/organizationGet information about the caller's organization
PrivateEndpointServicesApiAddPrivateEndpointConnectionPost /api/v1/clusters/{cluster_id}/networking/private-endpoint-connectionsAdd a connection to a cluster's private endpoint service.
PrivateEndpointServicesApiAddPrivateEndpointTrustedOwnerPost /api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-ownersAdd a private endpoint trusted owner to a cluster
PrivateEndpointServicesApiCreatePrivateEndpointServicesPost /api/v1/clusters/{cluster_id}/networking/private-endpoint-servicesCreate all PrivateEndpointServices for a cluster
PrivateEndpointServicesApiDeletePrivateEndpointConnectionDelete /api/v1/clusters/{cluster_id}/networking/private-endpoint-connections/{endpoint_id}Delete a connection from a cluster's private endpoint service.
PrivateEndpointServicesApiGetPrivateEndpointTrustedOwnerGet /api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners/{owner_id}Get a private endpoint trusted owner entry for a cluster
PrivateEndpointServicesApiListAwsEndpointConnectionsGet /api/v1/clusters/{cluster_id}/networking/aws-endpoint-connectionsList all AwsEndpointConnections for a cluster
PrivateEndpointServicesApiListPrivateEndpointConnectionsGet /api/v1/clusters/{cluster_id}/networking/private-endpoint-connectionsList all connections to a cluster's private endpoint service.
PrivateEndpointServicesApiListPrivateEndpointServicesGet /api/v1/clusters/{cluster_id}/networking/private-endpoint-servicesList all PrivateEndpointServices for a cluster
PrivateEndpointServicesApiListPrivateEndpointTrustedOwnersGet /api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-ownersList all private endpoint trusted owners for a cluster
PrivateEndpointServicesApiRemovePrivateEndpointTrustedOwnerDelete /api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners/{owner_id}Remove a private endpoint trusted owner from a cluster
PrivateEndpointServicesApiSetAwsEndpointConnectionStatePatch /api/v1/clusters/{cluster_id}/networking/aws-endpoint-connections/{endpoint_id}Set the AWS Endpoint Connection state
RoleManagementApiAddUserToRolePost /api/v1/roles/{user_id}/{resource_type}/{resource_id}/{role_name}Add a role to a user or service account
RoleManagementApiGetAllRolesForUserGet /api/v1/roles/{user_id}Get all Role Grants for a user
RoleManagementApiGetPersonUsersByEmailGet /api/v1/users/persons-by-emailSearch person users by email address
RoleManagementApiListRoleGrantsGet /api/v1/rolesList all RoleGrants
RoleManagementApiRemoveUserFromRoleDelete /api/v1/roles/{user_id}/{resource_type}/{resource_id}/{role_name}Remove a role from a user or service account
RoleManagementApiSetRolesForUserPut /api/v1/roles/{user_id}Replace the roles for a user or service account with exactly those provided
SCIMApiCreateGroupPost /api/scim/v2/GroupsCreate a group
SCIMApiCreateUserPost /api/scim/v2/UsersCreate a user
SCIMApiDeleteGroupDelete /api/scim/v2/Groups/{id}Delete a group based on ID
SCIMApiDeleteUserDelete /api/scim/v2/Users/{id}Delete a user based on ID
SCIMApiGetGroupGet /api/scim/v2/Groups/{id}Get a group by ID
SCIMApiGetGroup2Put /api/scim/v2/Groups/{id}/.searchSearch a group by ID (Deprecated)
SCIMApiGetGroupsGet /api/scim/v2/GroupsList groups
SCIMApiGetGroups2Put /api/scim/v2/Groups/.searchSearch groups (Deprecated)
SCIMApiGetResourceTypeGet /api/scim/v2/ResourceTypes/{resourceId}Get a SCIM resource type by ID
SCIMApiGetResourceTypesGet /api/scim/v2/ResourceTypesList the SCIM resource types
SCIMApiGetSchemaGet /api/scim/v2/Schemas/{schemaId}Get a SCIM schema by ID
SCIMApiGetSchemasGet /api/scim/v2/SchemasList the SCIM schemas
SCIMApiGetServiceProviderConfigGet /api/scim/v2/ServiceProviderConfigReturn the SCIM Service Provider configuration
SCIMApiGetUserGet /api/scim/v2/Users/{id}Get a user by ID
SCIMApiGetUser2Put /api/scim/v2/Users/{id}/.searchSearch for a user by ID (Deprecated)
SCIMApiGetUsersGet /api/scim/v2/UsersList Users
SCIMApiGetUsers2Put /api/scim/v2/Users/.searchSearch User (Deprecated)
SCIMApiSearchGroupPost /api/scim/v2/Groups/{id}/.searchSearch a group by ID
SCIMApiSearchGroupsPost /api/scim/v2/Groups/.searchSearch groups
SCIMApiSearchUserPost /api/scim/v2/Users/{id}/.searchSearch for a user by ID
SCIMApiSearchUsersPost /api/scim/v2/Users/.searchSearch Users
SCIMApiUpdateGroupPut /api/scim/v2/Groups/{id}Update a group by supplying all values of the user object
SCIMApiUpdateUserPut /api/scim/v2/Users/{id}Update a user by supplying all values of the user object
SQLUsersApiCreateSQLUserPost /api/v1/clusters/{cluster_id}/sql-usersCreate a new SQL user
SQLUsersApiDeleteSQLUserDelete /api/v1/clusters/{cluster_id}/sql-users/{name}Delete a SQL user
SQLUsersApiListSQLUsersGet /api/v1/clusters/{cluster_id}/sql-usersList SQL users for a cluster
SQLUsersApiUpdateSQLUserPasswordPut /api/v1/clusters/{cluster_id}/sql-users/{name}/passwordUpdate a SQL user's password
ServiceAccountsApiCreateServiceAccountPost /api/v1/service-accountsCreate a service account
ServiceAccountsApiDeleteServiceAccountDelete /api/v1/service-accounts/{id}Delete a service account
ServiceAccountsApiGetServiceAccountGet /api/v1/service-accounts/{id}Get a service account by ID
ServiceAccountsApiListServiceAccountsGet /api/v1/service-accountsList service accounts for an organization
ServiceAccountsApiUpdateServiceAccountPatch /api/v1/service-accounts/{id}Update a service account
VersionDeferralApiGetClusterVersionDeferralGet /api/v1/clusters/{cluster_id}/version-deferralGet the version upgrade deferral policy for a cluster.
VersionDeferralApiSetClusterVersionDeferralPut /api/v1/clusters/{cluster_id}/version-deferralSet the version upgrade deferral policy for a cluster

Author

[email protected]