azure-native.sql.getDatabase

Explore with Pulumi AI

Gets a database. API Version: 2020-11-01-preview.

Using getDatabase

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDatabase(args: GetDatabaseArgs, opts?: InvokeOptions): Promise<GetDatabaseResult>
function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: InvokeOptions): Output<GetDatabaseResult>
def get_database(database_name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 server_name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
def get_database_output(database_name: Optional[pulumi.Input[str]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 server_name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseResult]
func LookupDatabase(ctx *Context, args *LookupDatabaseArgs, opts ...InvokeOption) (*LookupDatabaseResult, error)
func LookupDatabaseOutput(ctx *Context, args *LookupDatabaseOutputArgs, opts ...InvokeOption) LookupDatabaseResultOutput

> Note: This function is named LookupDatabase in the Go SDK.

public static class GetDatabase 
{
    public static Task<GetDatabaseResult> InvokeAsync(GetDatabaseArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseResult> Invoke(GetDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure-native:sql:getDatabase
  arguments:
    # arguments dictionary

The following arguments are supported:

DatabaseName string

The name of the database.

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.

ServerName string

The name of the server.

DatabaseName string

The name of the database.

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.

ServerName string

The name of the server.

databaseName String

The name of the database.

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.

serverName String

The name of the server.

databaseName string

The name of the database.

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.

serverName string

The name of the server.

database_name str

The name of the database.

resource_group_name str

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

server_name str

The name of the server.

databaseName String

The name of the database.

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.

serverName String

The name of the server.

getDatabase Result

The following output properties are available:

CreationDate string

The creation date of the database (ISO8601 format).

CurrentBackupStorageRedundancy string

The storage account type used to store backups for this database.

CurrentServiceObjectiveName string

The current service level objective name of the database.

CurrentSku Pulumi.AzureNative.Sql.Outputs.SkuResponse

The name and tier of the SKU.

DatabaseId string

The ID of the database.

DefaultSecondaryLocation string

The default secondary region for this database.

EarliestRestoreDate string

This records the earliest start date and time that restore is available for this database (ISO8601 format).

FailoverGroupId string

Failover Group resource identifier that this database belongs to.

Id string

Resource ID.

Kind string

Kind of database. This is metadata used for the Azure portal experience.

Location string

Resource location.

ManagedBy string

Resource that manages the database.

MaxLogSizeBytes double

The max log size for this database.

Name string

Resource name.

PausedDate string

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

RequestedServiceObjectiveName string

The requested service level objective name of the database.

ResumedDate string

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

Status string

The status of the database.

Type string

Resource type.

AutoPauseDelay int

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

CatalogCollation string

Collation of the metadata catalog.

Collation string

The collation of the database.

ElasticPoolId string

The resource identifier of the elastic pool containing this database.

HighAvailabilityReplicaCount int

The number of secondary replicas associated with the database that are used to provide high availability.

LicenseType string

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

MaintenanceConfigurationId string

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

MaxSizeBytes double

The max size of the database expressed in bytes.

MinCapacity double

Minimal capacity that database will always have allocated, if not paused

ReadScale string

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

RequestedBackupStorageRedundancy string

The storage account type to be used to store backups for this database.

SecondaryType string

The secondary type of the database if it is a secondary. Valid values are Geo and Named.

Sku Pulumi.AzureNative.Sql.Outputs.SkuResponse

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
Tags Dictionary<string, string>

Resource tags.

ZoneRedundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

CreationDate string

The creation date of the database (ISO8601 format).

CurrentBackupStorageRedundancy string

The storage account type used to store backups for this database.

CurrentServiceObjectiveName string

The current service level objective name of the database.

CurrentSku SkuResponse

The name and tier of the SKU.

DatabaseId string

The ID of the database.

DefaultSecondaryLocation string

The default secondary region for this database.

EarliestRestoreDate string

This records the earliest start date and time that restore is available for this database (ISO8601 format).

FailoverGroupId string

Failover Group resource identifier that this database belongs to.

Id string

Resource ID.

Kind string

Kind of database. This is metadata used for the Azure portal experience.

Location string

Resource location.

ManagedBy string

Resource that manages the database.

MaxLogSizeBytes float64

The max log size for this database.

Name string

Resource name.

PausedDate string

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

RequestedServiceObjectiveName string

The requested service level objective name of the database.

ResumedDate string

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

Status string

The status of the database.

Type string

Resource type.

AutoPauseDelay int

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

CatalogCollation string

Collation of the metadata catalog.

Collation string

The collation of the database.

ElasticPoolId string

The resource identifier of the elastic pool containing this database.

HighAvailabilityReplicaCount int

The number of secondary replicas associated with the database that are used to provide high availability.

LicenseType string

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

MaintenanceConfigurationId string

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

MaxSizeBytes float64

The max size of the database expressed in bytes.

MinCapacity float64

Minimal capacity that database will always have allocated, if not paused

ReadScale string

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

RequestedBackupStorageRedundancy string

The storage account type to be used to store backups for this database.

SecondaryType string

The secondary type of the database if it is a secondary. Valid values are Geo and Named.

Sku SkuResponse

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
Tags map[string]string

Resource tags.

ZoneRedundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

creationDate String

The creation date of the database (ISO8601 format).

currentBackupStorageRedundancy String

The storage account type used to store backups for this database.

currentServiceObjectiveName String

The current service level objective name of the database.

currentSku SkuResponse

The name and tier of the SKU.

databaseId String

The ID of the database.

defaultSecondaryLocation String

The default secondary region for this database.

earliestRestoreDate String

This records the earliest start date and time that restore is available for this database (ISO8601 format).

failoverGroupId String

Failover Group resource identifier that this database belongs to.

id String

Resource ID.

kind String

Kind of database. This is metadata used for the Azure portal experience.

location String

Resource location.

managedBy String

Resource that manages the database.

maxLogSizeBytes Double

The max log size for this database.

name String

Resource name.

pausedDate String

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

requestedServiceObjectiveName String

The requested service level objective name of the database.

resumedDate String

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

status String

The status of the database.

type String

Resource type.

autoPauseDelay Integer

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

catalogCollation String

Collation of the metadata catalog.

collation String

The collation of the database.

elasticPoolId String

The resource identifier of the elastic pool containing this database.

highAvailabilityReplicaCount Integer

The number of secondary replicas associated with the database that are used to provide high availability.

licenseType String

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

maintenanceConfigurationId String

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

maxSizeBytes Double

The max size of the database expressed in bytes.

minCapacity Double

Minimal capacity that database will always have allocated, if not paused

readScale String

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

requestedBackupStorageRedundancy String

The storage account type to be used to store backups for this database.

secondaryType String

The secondary type of the database if it is a secondary. Valid values are Geo and Named.

sku SkuResponse

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
tags Map<String,String>

Resource tags.

zoneRedundant Boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

creationDate string

The creation date of the database (ISO8601 format).

currentBackupStorageRedundancy string

The storage account type used to store backups for this database.

currentServiceObjectiveName string

The current service level objective name of the database.

currentSku SkuResponse

The name and tier of the SKU.

databaseId string

The ID of the database.

defaultSecondaryLocation string

The default secondary region for this database.

earliestRestoreDate string

This records the earliest start date and time that restore is available for this database (ISO8601 format).

failoverGroupId string

Failover Group resource identifier that this database belongs to.

id string

Resource ID.

kind string

Kind of database. This is metadata used for the Azure portal experience.

location string

Resource location.

managedBy string

Resource that manages the database.

maxLogSizeBytes number

The max log size for this database.

name string

Resource name.

pausedDate string

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

requestedServiceObjectiveName string

The requested service level objective name of the database.

resumedDate string

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

status string

The status of the database.

type string

Resource type.

autoPauseDelay number

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

catalogCollation string

Collation of the metadata catalog.

collation string

The collation of the database.

elasticPoolId string

The resource identifier of the elastic pool containing this database.

highAvailabilityReplicaCount number

The number of secondary replicas associated with the database that are used to provide high availability.

licenseType string

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

maintenanceConfigurationId string

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

maxSizeBytes number

The max size of the database expressed in bytes.

minCapacity number

Minimal capacity that database will always have allocated, if not paused

readScale string

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

requestedBackupStorageRedundancy string

The storage account type to be used to store backups for this database.

secondaryType string

The secondary type of the database if it is a secondary. Valid values are Geo and Named.

sku SkuResponse

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
tags {[key: string]: string}

Resource tags.

zoneRedundant boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

creation_date str

The creation date of the database (ISO8601 format).

current_backup_storage_redundancy str

The storage account type used to store backups for this database.

current_service_objective_name str

The current service level objective name of the database.

current_sku SkuResponse

The name and tier of the SKU.

database_id str

The ID of the database.

default_secondary_location str

The default secondary region for this database.

earliest_restore_date str

This records the earliest start date and time that restore is available for this database (ISO8601 format).

failover_group_id str

Failover Group resource identifier that this database belongs to.

id str

Resource ID.

kind str

Kind of database. This is metadata used for the Azure portal experience.

location str

Resource location.

managed_by str

Resource that manages the database.

max_log_size_bytes float

The max log size for this database.

name str

Resource name.

paused_date str

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

requested_service_objective_name str

The requested service level objective name of the database.

resumed_date str

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

status str

The status of the database.

type str

Resource type.

auto_pause_delay int

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

catalog_collation str

Collation of the metadata catalog.

collation str

The collation of the database.

elastic_pool_id str

The resource identifier of the elastic pool containing this database.

high_availability_replica_count int

The number of secondary replicas associated with the database that are used to provide high availability.

license_type str

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

maintenance_configuration_id str

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

max_size_bytes float

The max size of the database expressed in bytes.

min_capacity float

Minimal capacity that database will always have allocated, if not paused

read_scale str

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

requested_backup_storage_redundancy str

The storage account type to be used to store backups for this database.

secondary_type str

The secondary type of the database if it is a secondary. Valid values are Geo and Named.

sku SkuResponse

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
tags Mapping[str, str]

Resource tags.

zone_redundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

creationDate String

The creation date of the database (ISO8601 format).

currentBackupStorageRedundancy String

The storage account type used to store backups for this database.

currentServiceObjectiveName String

The current service level objective name of the database.

currentSku Property Map

The name and tier of the SKU.

databaseId String

The ID of the database.

defaultSecondaryLocation String

The default secondary region for this database.

earliestRestoreDate String

This records the earliest start date and time that restore is available for this database (ISO8601 format).

failoverGroupId String

Failover Group resource identifier that this database belongs to.

id String

Resource ID.

kind String

Kind of database. This is metadata used for the Azure portal experience.

location String

Resource location.

managedBy String

Resource that manages the database.

maxLogSizeBytes Number

The max log size for this database.

name String

Resource name.

pausedDate String

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

requestedServiceObjectiveName String

The requested service level objective name of the database.

resumedDate String

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

status String

The status of the database.

type String

Resource type.

autoPauseDelay Number

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

catalogCollation String

Collation of the metadata catalog.

collation String

The collation of the database.

elasticPoolId String

The resource identifier of the elastic pool containing this database.

highAvailabilityReplicaCount Number

The number of secondary replicas associated with the database that are used to provide high availability.

licenseType String

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

maintenanceConfigurationId String

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

maxSizeBytes Number

The max size of the database expressed in bytes.

minCapacity Number

Minimal capacity that database will always have allocated, if not paused

readScale String

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

requestedBackupStorageRedundancy String

The storage account type to be used to store backups for this database.

secondaryType String

The secondary type of the database if it is a secondary. Valid values are Geo and Named.

sku Property Map

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
tags Map<String>

Resource tags.

zoneRedundant Boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Supporting Types

SkuResponse

Name string

The name of the SKU, typically, a letter + Number code, e.g. P3.

Capacity int

Capacity of the particular SKU.

Family string

If the service has different generations of hardware, for the same SKU, then that can be captured here.

Size string

Size of the particular SKU

Tier string

The tier or edition of the particular SKU, e.g. Basic, Premium.

Name string

The name of the SKU, typically, a letter + Number code, e.g. P3.

Capacity int

Capacity of the particular SKU.

Family string

If the service has different generations of hardware, for the same SKU, then that can be captured here.

Size string

Size of the particular SKU

Tier string

The tier or edition of the particular SKU, e.g. Basic, Premium.

name String

The name of the SKU, typically, a letter + Number code, e.g. P3.

capacity Integer

Capacity of the particular SKU.

family String

If the service has different generations of hardware, for the same SKU, then that can be captured here.

size String

Size of the particular SKU

tier String

The tier or edition of the particular SKU, e.g. Basic, Premium.

name string

The name of the SKU, typically, a letter + Number code, e.g. P3.

capacity number

Capacity of the particular SKU.

family string

If the service has different generations of hardware, for the same SKU, then that can be captured here.

size string

Size of the particular SKU

tier string

The tier or edition of the particular SKU, e.g. Basic, Premium.

name str

The name of the SKU, typically, a letter + Number code, e.g. P3.

capacity int

Capacity of the particular SKU.

family str

If the service has different generations of hardware, for the same SKU, then that can be captured here.

size str

Size of the particular SKU

tier str

The tier or edition of the particular SKU, e.g. Basic, Premium.

name String

The name of the SKU, typically, a letter + Number code, e.g. P3.

capacity Number

Capacity of the particular SKU.

family String

If the service has different generations of hardware, for the same SKU, then that can be captured here.

size String

Size of the particular SKU

tier String

The tier or edition of the particular SKU, e.g. Basic, Premium.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0