Contents

googleapis/swift-google-cloud-sql-v1

Cloud SQL Admin API

Overview

The following types provide methods to make RPCs. They are a good starting point to learn about this library.

  • SqlAvailableDatabaseVersionsServiceClient: Service that exposes Cloud SQL database versions information. (enabled by the SqlAvailableDatabaseVersionsService trait)
  • SqlBackupRunsServiceClient: Service for managing database backups. (enabled by the SqlBackupRunsService trait)
  • SqlBackupsServiceClient: Client for the SqlBackupsService. (enabled by the SqlBackupsService trait)
  • BlueGreenDeploymentsServiceClient: Service for managing blue-green deployments. (enabled by the BlueGreenDeploymentsService trait)
  • SqlConnectServiceClient: Cloud SQL connect service. (enabled by the SqlConnectService trait)
  • SqlDatabasesServiceClient: Service to manage databases. (enabled by the SqlDatabasesService trait)
  • SqlEventsServiceClient: Service that exposes Cloud SQL event information. (enabled by the SqlEventsService trait)
  • SqlFeatureEligibilityServiceClient: Service to verify the eligibility of an instance for a given operation. (enabled by the SqlFeatureEligibilityService trait)
  • SqlFlagsServiceClient: Service to manage database flags for Cloud SQL instances. (enabled by the SqlFlagsService trait)
  • SqlIamPoliciesServiceClient: Service for providing IAM Meta APIs for Cloud SQL. (enabled by the SqlIamPoliciesService trait)
  • SqlInstanceNamesServiceClient: Cloud SQL instance names service. (enabled by the SqlInstanceNamesService trait)
  • SqlInstancesServiceClient: Client for the SqlInstancesService. (enabled by the SqlInstancesService trait)
  • SqlOperationsServiceClient: Service to fetch operations for database instances. (enabled by the SqlOperationsService trait)
  • SqlRegionsServiceClient: Service that exposes Cloud SQL region information. (enabled by the SqlRegionsService trait)
  • SqlSslCertsServiceClient: Service to manage SSL certs for Cloud SQL instances. (enabled by the SqlSslCertsService trait)
  • SqlTiersServiceClient: Service for providing machine types (tiers) for Cloud SQL instances. (enabled by the SqlTiersService trait)
  • SqlUsersServiceClient: Cloud SQL users service. (enabled by the SqlUsersService trait)
  • SqlWorkloadCapturesServiceClient: Cloud SQL Workload Captures service. (enabled by the SqlWorkloadCapturesService trait)

Quickstart

The following example demonstrates using SqlInstancesServiceClient:

import Foundation
import GoogleCloudSqlV1

func sample() async throws {
  let client = try GoogleCloudSqlV1.SqlInstancesServiceClient()
  let response = try await client.addServerCa(
    request: SqlInstancesAddServerCaRequest()
  /* set fields using .with { $0... } */
)
  print("Success: \(response)")
}

Requirements

For the minimum supported Swift version and platform requirements, see the Requirements section in the google-cloud-swift repository.

Installation

Add swift-google-cloud-sql-v1 as a package dependency:

swift package add-dependency https://github.com/googleapis/swift-google-cloud-sql-v1.git --from 0.6.0

Then add GoogleCloudSqlV1 to your target's dependencies:

swift package add-target-dependency GoogleCloudSqlV1 <target-name> --package swift-google-cloud-sql-v1

Package Traits

This package uses Swift package traits to conditionally compile individual service clients and their associated types. Enabling a trait enables the corresponding client and all the request, response, and model types needed to use that client.

No traits are enabled by default. Specify the traits you need in Package.swift:

.package(url: "https://github.com/googleapis/swift-google-cloud-sql-v1.git", from: "0.6.0", traits: ["<TraitName>"])

| Trait | Default | Enabled Client | |---|:---:|---| | BlueGreenDeploymentsService | No | BlueGreenDeploymentsServiceClient | | SqlAvailableDatabaseVersionsService | No | SqlAvailableDatabaseVersionsServiceClient | | SqlBackupRunsService | No | SqlBackupRunsServiceClient | | SqlBackupsService | No | SqlBackupsServiceClient | | SqlConnectService | No | SqlConnectServiceClient | | SqlDatabasesService | No | SqlDatabasesServiceClient | | SqlEventsService | No | SqlEventsServiceClient | | SqlFeatureEligibilityService | No | SqlFeatureEligibilityServiceClient | | SqlFlagsService | No | SqlFlagsServiceClient | | SqlIamPoliciesService | No | SqlIamPoliciesServiceClient | | SqlInstanceNamesService | No | SqlInstanceNamesServiceClient | | SqlInstancesService | No | SqlInstancesServiceClient | | SqlOperationsService | No | SqlOperationsServiceClient | | SqlRegionsService | No | SqlRegionsServiceClient | | SqlSslCertsService | No | SqlSslCertsServiceClient | | SqlTiersService | No | SqlTiersServiceClient | | SqlUsersService | No | SqlUsersServiceClient | | SqlWorkloadCapturesService | No | SqlWorkloadCapturesServiceClient |

Troubleshooting

For questions, bug reports, or feature requests, please open an issue in the google-cloud-swift repository.

Contributing

Contributions to this library are always welcome and highly encouraged.

All development, issues, and pull requests are managed in the google-cloud-swift monorepo. See CONTRIBUTING.md for details on getting started.

License

Apache 2.0 - See LICENSE for more information.

Package Metadata

Repository: googleapis/swift-google-cloud-sql-v1

Default branch: main

README: README.md