![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@googleapis/sqladmin
Advanced tools
@googleapis/sqladmin is an npm package that provides access to the Google Cloud SQL Admin API. This API allows you to manage Cloud SQL instances, including creating, configuring, and deleting instances, as well as managing databases, users, and other resources within those instances.
Create a Cloud SQL Instance
This feature allows you to create a new Cloud SQL instance with specified settings such as tier, disk size, disk type, and region.
const {google} = require('@googleapis/sqladmin');
const sqladmin = google.sqladmin('v1beta4');
async function createInstance(auth) {
const request = {
project: 'your-project-id',
resource: {
name: 'instance-name',
settings: {
tier: 'db-f1-micro',
dataDiskSizeGb: '10',
dataDiskType: 'PD_SSD',
region: 'us-central1'
}
},
auth: auth
};
try {
const response = await sqladmin.instances.insert(request);
console.log(response.data);
} catch (err) {
console.error(err);
}
}
List Cloud SQL Instances
This feature allows you to list all Cloud SQL instances within a specified project.
const {google} = require('@googleapis/sqladmin');
const sqladmin = google.sqladmin('v1beta4');
async function listInstances(auth) {
const request = {
project: 'your-project-id',
auth: auth
};
try {
const response = await sqladmin.instances.list(request);
console.log(response.data.items);
} catch (err) {
console.error(err);
}
}
Delete a Cloud SQL Instance
This feature allows you to delete a specified Cloud SQL instance.
const {google} = require('@googleapis/sqladmin');
const sqladmin = google.sqladmin('v1beta4');
async function deleteInstance(auth) {
const request = {
project: 'your-project-id',
instance: 'instance-name',
auth: auth
};
try {
const response = await sqladmin.instances.delete(request);
console.log(response.data);
} catch (err) {
console.error(err);
}
}
Create a Database in a Cloud SQL Instance
This feature allows you to create a new database within a specified Cloud SQL instance.
const {google} = require('@googleapis/sqladmin');
const sqladmin = google.sqladmin('v1beta4');
async function createDatabase(auth) {
const request = {
project: 'your-project-id',
instance: 'instance-name',
resource: {
name: 'database-name'
},
auth: auth
};
try {
const response = await sqladmin.databases.insert(request);
console.log(response.data);
} catch (err) {
console.error(err);
}
}
List Databases in a Cloud SQL Instance
This feature allows you to list all databases within a specified Cloud SQL instance.
const {google} = require('@googleapis/sqladmin');
const sqladmin = google.sqladmin('v1beta4');
async function listDatabases(auth) {
const request = {
project: 'your-project-id',
instance: 'instance-name',
auth: auth
};
try {
const response = await sqladmin.databases.list(request);
console.log(response.data.items);
} catch (err) {
console.error(err);
}
}
The aws-sdk package provides access to AWS services, including Amazon RDS, which is similar to Google Cloud SQL. It allows you to manage RDS instances, databases, and users. Compared to @googleapis/sqladmin, aws-sdk offers a broader range of services beyond just database management.
The azure-arm-sql package provides access to Azure SQL Database management. It allows you to create, configure, and manage SQL databases and servers on Microsoft Azure. This package is similar to @googleapis/sqladmin but is specific to the Azure cloud platform.
The node-postgres package is a collection of node.js modules for interfacing with PostgreSQL databases. While it does not provide cloud-specific management features like @googleapis/sqladmin, it is useful for managing PostgreSQL databases directly.
API for Cloud SQL database instance management
$ npm install @googleapis/sqladmin
All documentation and usage information can be found on GitHub. Information on classes can be found in Googleapis Documentation.
This library is licensed under Apache 2.0. Full license text is available in LICENSE.
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see CONTRIBUTING.
Crafted with ❤️ by the Google Node.js team
FAQs
sqladmin
The npm package @googleapis/sqladmin receives a total of 245,276 weekly downloads. As such, @googleapis/sqladmin popularity was classified as popular.
We found that @googleapis/sqladmin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.