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 theSqlAvailableDatabaseVersionsServicetrait)SqlBackupRunsServiceClient: Service for managing database backups. (enabled by theSqlBackupRunsServicetrait)SqlBackupsServiceClient: Client for the SqlBackupsService. (enabled by theSqlBackupsServicetrait)BlueGreenDeploymentsServiceClient: Service for managing blue-green deployments. (enabled by theBlueGreenDeploymentsServicetrait)SqlConnectServiceClient: Cloud SQL connect service. (enabled by theSqlConnectServicetrait)SqlDatabasesServiceClient: Service to manage databases. (enabled by theSqlDatabasesServicetrait)SqlEventsServiceClient: Service that exposes Cloud SQL event information. (enabled by theSqlEventsServicetrait)SqlFeatureEligibilityServiceClient: Service to verify the eligibility of an instance for a given operation. (enabled by theSqlFeatureEligibilityServicetrait)SqlFlagsServiceClient: Service to manage database flags for Cloud SQL instances. (enabled by theSqlFlagsServicetrait)SqlIamPoliciesServiceClient: Service for providing IAM Meta APIs for Cloud SQL. (enabled by theSqlIamPoliciesServicetrait)SqlInstanceNamesServiceClient: Cloud SQL instance names service. (enabled by theSqlInstanceNamesServicetrait)SqlInstancesServiceClient: Client for the SqlInstancesService. (enabled by theSqlInstancesServicetrait)SqlOperationsServiceClient: Service to fetch operations for database instances. (enabled by theSqlOperationsServicetrait)SqlRegionsServiceClient: Service that exposes Cloud SQL region information. (enabled by theSqlRegionsServicetrait)SqlSslCertsServiceClient: Service to manage SSL certs for Cloud SQL instances. (enabled by theSqlSslCertsServicetrait)SqlTiersServiceClient: Service for providing machine types (tiers) for Cloud SQL instances. (enabled by theSqlTiersServicetrait)SqlUsersServiceClient: Cloud SQL users service. (enabled by theSqlUsersServicetrait)SqlWorkloadCapturesServiceClient: Cloud SQL Workload Captures service. (enabled by theSqlWorkloadCapturesServicetrait)
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.0Then add GoogleCloudSqlV1 to your target's dependencies:
swift package add-target-dependency GoogleCloudSqlV1 <target-name> --package swift-google-cloud-sql-v1Package 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