Linode

Pulumi Official
Package maintained by Pulumi
v3.9.0 published on Friday, Jun 17, 2022 by Pulumi

getDatabaseMysql

Provides information about a Linode MySQL Database.

Attributes

The linode.DatabaseMysql data source exports the following attributes:

  • allow_list - A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format.

  • ca_cert - The base64-encoded SSL CA certificate for the Managed Database instance.

  • cluster_size - The number of Linode Instance nodes deployed to the Managed Database.

  • created - When this Managed Database was created.

  • encrypted - Whether the Managed Databases is encrypted.

  • engine - The Managed Database engine. (e.g. mysql)

  • engine_id - The Managed Database engine in engine/version format. (e.g. mysql/8.0.26)

  • host_primary - The primary host for the Managed Database.

  • host_secondary - The secondary/private network host for the Managed Database.

  • label - A unique, user-defined string referring to the Managed Database.

  • region - The region that hosts this Linode Managed Database.

  • root_password - The randomly-generated root password for the Managed Database instance.

  • root_username - The root username for the Managed Database instance.

  • replication_type - The replication method used for the Managed Database. (none, asynch, semi_synch)

  • ssl_connection - Whether to require SSL credentials to establish a connection to the Managed Database.

  • status - The operating status of the Managed Database.

  • type - The Linode Instance type used for the nodes of the Managed Database instance.

  • updated - When this Managed Database was last updated.

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.

  • version - The Managed Database engine version. (e.g. v8.0.26)

updates

The following arguments are exported by the updates specification block:

  • day_of_week - The day to perform maintenance. (monday, tuesday, …)

  • duration - The maximum maintenance window time in hours. (1..3)

  • frequency - Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)

  • hour_of_day - The hour to begin maintenance based in UTC time. (0..23)

  • week_of_month - The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var my_db = Output.Create(Linode.GetDatabaseMysql.InvokeAsync(new Linode.GetDatabaseMysqlArgs
        {
            DatabaseId = 12345,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.LookupDatabaseMysql(ctx, &GetDatabaseMysqlArgs{
			DatabaseId: 12345,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var my-db = Output.of(LinodeFunctions.getDatabaseMysql(GetDatabaseMysqlArgs.builder()
            .databaseId(12345)
            .build()));

        }
}
import pulumi
import pulumi_linode as linode

my_db = linode.get_database_mysql(database_id=12345)
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const my_db = pulumi.output(linode.getDatabaseMysql({
    databaseId: 12345,
}));
variables:
  my-db:
    Fn::Invoke:
      Function: linode:getDatabaseMysql
      Arguments:
        databaseId: 12345

Using getDatabaseMysql

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 getDatabaseMysql(args: GetDatabaseMysqlArgs, opts?: InvokeOptions): Promise<GetDatabaseMysqlResult>
function getDatabaseMysqlOutput(args: GetDatabaseMysqlOutputArgs, opts?: InvokeOptions): Output<GetDatabaseMysqlResult>
def get_database_mysql(database_id: Optional[int] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDatabaseMysqlResult
def get_database_mysql_output(database_id: Optional[pulumi.Input[int]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseMysqlResult]
func LookupDatabaseMysql(ctx *Context, args *LookupDatabaseMysqlArgs, opts ...InvokeOption) (*LookupDatabaseMysqlResult, error)
func LookupDatabaseMysqlOutput(ctx *Context, args *LookupDatabaseMysqlOutputArgs, opts ...InvokeOption) LookupDatabaseMysqlResultOutput

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

public static class GetDatabaseMysql 
{
    public static Task<GetDatabaseMysqlResult> InvokeAsync(GetDatabaseMysqlArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseMysqlResult> Invoke(GetDatabaseMysqlInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseMysqlResult> getDatabaseMysql(GetDatabaseMysqlArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: linode:index/getDatabaseMysql:getDatabaseMysql
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DatabaseId int

The ID of the MySQL database.

DatabaseId int

The ID of the MySQL database.

databaseId Integer

The ID of the MySQL database.

databaseId number

The ID of the MySQL database.

database_id int

The ID of the MySQL database.

databaseId Number

The ID of the MySQL database.

getDatabaseMysql Result

The following output properties are available:

AllowLists List<string>
CaCert string
ClusterSize int
Created string
DatabaseId int
Encrypted bool
Engine string
EngineId string
HostPrimary string
HostSecondary string
Id string

The provider-assigned unique ID for this managed resource.

Label string
Region string
ReplicationType string
RootPassword string
RootUsername string
SslConnection bool
Status string
Type string
Updated string
Updates List<GetDatabaseMysqlUpdate>
Version string
AllowLists []string
CaCert string
ClusterSize int
Created string
DatabaseId int
Encrypted bool
Engine string
EngineId string
HostPrimary string
HostSecondary string
Id string

The provider-assigned unique ID for this managed resource.

Label string
Region string
ReplicationType string
RootPassword string
RootUsername string
SslConnection bool
Status string
Type string
Updated string
Updates []GetDatabaseMysqlUpdate
Version string
allowLists List<String>
caCert String
clusterSize Integer
created String
databaseId Integer
encrypted Boolean
engine String
engineId String
hostPrimary String
hostSecondary String
id String

The provider-assigned unique ID for this managed resource.

label String
region String
replicationType String
rootPassword String
rootUsername String
sslConnection Boolean
status String
type String
updated String
updates List<GetDatabaseMysqlUpdate>
version String
allowLists string[]
caCert string
clusterSize number
created string
databaseId number
encrypted boolean
engine string
engineId string
hostPrimary string
hostSecondary string
id string

The provider-assigned unique ID for this managed resource.

label string
region string
replicationType string
rootPassword string
rootUsername string
sslConnection boolean
status string
type string
updated string
updates GetDatabaseMysqlUpdate[]
version string
allow_lists Sequence[str]
ca_cert str
cluster_size int
created str
database_id int
encrypted bool
engine str
engine_id str
host_primary str
host_secondary str
id str

The provider-assigned unique ID for this managed resource.

label str
region str
replication_type str
root_password str
root_username str
ssl_connection bool
status str
type str
updated str
updates Sequence[GetDatabaseMysqlUpdate]
version str
allowLists List<String>
caCert String
clusterSize Number
created String
databaseId Number
encrypted Boolean
engine String
engineId String
hostPrimary String
hostSecondary String
id String

The provider-assigned unique ID for this managed resource.

label String
region String
replicationType String
rootPassword String
rootUsername String
sslConnection Boolean
status String
type String
updated String
updates List<Property Map>
version String

Supporting Types

GetDatabaseMysqlUpdate

dayOfWeek String
duration Integer
frequency String
hourOfDay Integer
weekOfMonth Integer
dayOfWeek string
duration number
frequency string
hourOfDay number
weekOfMonth number
dayOfWeek String
duration Number
frequency String
hourOfDay Number
weekOfMonth Number

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes

This Pulumi package is based on the linode Terraform Provider.