azure.sqldb
Module azure.sqldb
API
ballerinax/azure.sqldb Ballerina library
Overview
This is a generated connector from Azure SQL DB API 2017-03-01-preview OpenAPI specification.
Azure SQL Database is a fully managed platform as a service (PaaS) database engine that handles most of the database management functions such as upgrading, patching, backups, and monitoring without user involvement.
Prerequisites
- Create an Azure account
- Create an Azure SQL DB application
- Obtain tokens by using this
Clients
azure.sqldb: Client
This is a generated connector from Azure SQL DB API v1.0 OpenAPI specification. This Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the Azure SQL DB instance.
Create a Azure SQL DB application obtain tokens by using this
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://management.azure.com/" - URL of the target service
completeRestoreManagedDatabases
function completeRestoreManagedDatabases(string locationName, string operationId, string subscriptionId, string apiVersion, CompleteDatabaseRestoreDefinition payload) returns Response|error
Completes the restore operation on a managed database.
Parameters
- locationName string - The name of the region where the resource is located.
- operationId string - Management operation id that this request tries to complete.
- subscriptionId string - The subscription ID that identifies an Azure subscription.
- apiVersion string - The API version to use for the request.
- payload CompleteDatabaseRestoreDefinition - The definition for completing the restore of this managed database.
listManagedDatabasesByInstance
function listManagedDatabasesByInstance(string resourceGroupName, string managedInstanceName, string subscriptionId, string apiVersion) returns ManagedDatabaseListResult|error
Gets a list of managed databases.
Parameters
- resourceGroupName string - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName string - The name of the managed instance.
- subscriptionId string - The subscription ID that identifies an Azure subscription.
- apiVersion string - The API version to use for the request.
Return Type
- ManagedDatabaseListResult|error - Successfully retrieved the list of databases.
getManagedDatabases
function getManagedDatabases(string resourceGroupName, string managedInstanceName, string databaseName, string subscriptionId, string apiVersion) returns ManagedDatabase|error
Gets a managed database.
Parameters
- resourceGroupName string - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName string - The name of the managed instance.
- databaseName string - The name of the database.
- subscriptionId string - The subscription ID that identifies an Azure subscription.
- apiVersion string - The API version to use for the request.
Return Type
- ManagedDatabase|error - Successfully retrieved the specified managed database.
createOrUpdateManagedDatabases
function createOrUpdateManagedDatabases(string resourceGroupName, string managedInstanceName, string databaseName, string subscriptionId, string apiVersion, ManagedDatabase payload) returns ManagedDatabase|error?
Creates a new database or updates an existing database.
Parameters
- resourceGroupName string - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName string - The name of the managed instance.
- databaseName string - The name of the database.
- subscriptionId string - The subscription ID that identifies an Azure subscription.
- apiVersion string - The API version to use for the request.
- payload ManagedDatabase - The requested database resource state.
Return Type
- ManagedDatabase|error? - Successfully updated the database.
deleteManagedDatabases
function deleteManagedDatabases(string resourceGroupName, string managedInstanceName, string databaseName, string subscriptionId, string apiVersion) returns Response|error
Deletes a managed database.
Parameters
- resourceGroupName string - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName string - The name of the managed instance.
- databaseName string - The name of the database.
- subscriptionId string - The subscription ID that identifies an Azure subscription.
- apiVersion string - The API version to use for the request.
updateManagedDatabases
function updateManagedDatabases(string resourceGroupName, string managedInstanceName, string databaseName, string subscriptionId, string apiVersion, ManagedDatabaseUpdate payload) returns ManagedDatabase|error?
Updates an existing database.
Parameters
- resourceGroupName string - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName string - The name of the managed instance.
- databaseName string - The name of the database.
- subscriptionId string - The subscription ID that identifies an Azure subscription.
- apiVersion string - The API version to use for the request.
- payload ManagedDatabaseUpdate - The requested database resource state.
Return Type
- ManagedDatabase|error? - Successfully updated the database.
Records
azure.sqldb: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
azure.sqldb: CompleteDatabaseRestoreDefinition
Contains the information necessary to perform a complete database restore operation.
Fields
- lastBackupName string - The last backup name to apply
azure.sqldb: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
azure.sqldb: ManagedDatabaseListResult
A list of managed databases.
Fields
- nextLink string? - Link to retrieve next page of results.
- value ManagedDatabase[]? - Array of results.
azure.sqldb: ManagedDatabaseProperties
The managed database's properties.
Fields
- catalogCollation string? - Collation of the metadata catalog.
- collation string? - Collation of the managed database.
- createMode string? - Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore.
- creationDate string? - Creation date of the database.
- defaultSecondaryLocation string? - Geo paired region.
- earliestRestorePoint string? - Earliest restore point in time for point in time restore.
- failoverGroupId string? - Instance Failover Group resource identifier that this managed database belongs to.
- recoverableDatabaseId string? - The resource identifier of the recoverable database associated with create operation of this database.
- restorableDroppedDatabaseId string? - The restorable dropped database resource id to restore when creating this database.
- restorePointInTime string? - Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
- sourceDatabaseId string? - The resource identifier of the source database associated with create operation of this database.
- status string? - Status of the database.
- storageContainerSasToken string? - Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
- storageContainerUri string? - Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
azure.sqldb: ManagedDatabaseUpdate
An managed database update.
Fields
- properties ManagedDatabaseProperties? - The managed database's properties.
- tags record {}? - Resource tags.
azure.sqldb: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
azure.sqldb: Resource
ARM resource.
Fields
- id string? - Resource ID.
- name string? - Resource name.
- 'type string? - Resource type.
Import
import ballerinax/azure.sqldb;
Metadata
Released date: almost 2 years ago
Version: 1.4.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.2.1
GraalVM compatible: Yes
Pull count
Total: 9
Current verison: 4
Weekly downloads
Keywords
IT Operations/Databases
Cost/Paid
Vendor/Microsoft
Contributors
Dependencies