Linode

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

getDatabaseMysqlBackups

NOTICE: This data source has been deprecated in favor of linode.getDatabaseBackups.

Provides information about Linode MySQL Database Backups that match a set of filters.

Attributes

Each backup will be stored in the backups attribute and will export the following attributes:

  • created - A time value given in a combined date and time format that represents when the database backup was created.

  • id - The ID of the database backup object.

  • label - The database backup’s label, for display purposes only.

  • type - The type of database backup, determined by how the backup was created.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var all_backups = Output.Create(Linode.GetDatabaseMysqlBackups.InvokeAsync(new Linode.GetDatabaseMysqlBackupsArgs
        {
            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.GetDatabaseMysqlBackups(ctx, &GetDatabaseMysqlBackupsArgs{
			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 all-backups = Output.of(LinodeFunctions.getDatabaseMysqlBackups(GetDatabaseMysqlBackupsArgs.builder()
            .databaseId(12345)
            .build()));

        }
}
import pulumi
import pulumi_linode as linode

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

const all_backups = pulumi.output(linode.getDatabaseMysqlBackups({
    databaseId: 12345,
}));
variables:
  all-backups:
    Fn::Invoke:
      Function: linode:getDatabaseMysqlBackups
      Arguments:
        databaseId: 12345

Using getDatabaseMysqlBackups

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 getDatabaseMysqlBackups(args: GetDatabaseMysqlBackupsArgs, opts?: InvokeOptions): Promise<GetDatabaseMysqlBackupsResult>
function getDatabaseMysqlBackupsOutput(args: GetDatabaseMysqlBackupsOutputArgs, opts?: InvokeOptions): Output<GetDatabaseMysqlBackupsResult>
def get_database_mysql_backups(database_id: Optional[int] = None,
                               filters: Optional[Sequence[GetDatabaseMysqlBackupsFilter]] = None,
                               latest: Optional[bool] = None,
                               order: Optional[str] = None,
                               order_by: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetDatabaseMysqlBackupsResult
def get_database_mysql_backups_output(database_id: Optional[pulumi.Input[int]] = None,
                               filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDatabaseMysqlBackupsFilterArgs]]]] = None,
                               latest: Optional[pulumi.Input[bool]] = None,
                               order: Optional[pulumi.Input[str]] = None,
                               order_by: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseMysqlBackupsResult]
func GetDatabaseMysqlBackups(ctx *Context, args *GetDatabaseMysqlBackupsArgs, opts ...InvokeOption) (*GetDatabaseMysqlBackupsResult, error)
func GetDatabaseMysqlBackupsOutput(ctx *Context, args *GetDatabaseMysqlBackupsOutputArgs, opts ...InvokeOption) GetDatabaseMysqlBackupsResultOutput

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

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

The following arguments are supported:

DatabaseId int

The ID of the database to retrieve backups for.

Filters List<GetDatabaseMysqlBackupsFilter>
Latest bool

If true, only the latest backup will be returned.

Order string

The order in which results should be returned. (asc, desc; default asc)

OrderBy string

The attribute to order the results by. (created)

DatabaseId int

The ID of the database to retrieve backups for.

Filters []GetDatabaseMysqlBackupsFilter
Latest bool

If true, only the latest backup will be returned.

Order string

The order in which results should be returned. (asc, desc; default asc)

OrderBy string

The attribute to order the results by. (created)

databaseId Integer

The ID of the database to retrieve backups for.

filters List<GetDatabaseMysqlBackupsFilter>
latest Boolean

If true, only the latest backup will be returned.

order String

The order in which results should be returned. (asc, desc; default asc)

orderBy String

The attribute to order the results by. (created)

databaseId number

The ID of the database to retrieve backups for.

filters GetDatabaseMysqlBackupsFilter[]
latest boolean

If true, only the latest backup will be returned.

order string

The order in which results should be returned. (asc, desc; default asc)

orderBy string

The attribute to order the results by. (created)

database_id int

The ID of the database to retrieve backups for.

filters Sequence[GetDatabaseMysqlBackupsFilter]
latest bool

If true, only the latest backup will be returned.

order str

The order in which results should be returned. (asc, desc; default asc)

order_by str

The attribute to order the results by. (created)

databaseId Number

The ID of the database to retrieve backups for.

filters List<Property Map>
latest Boolean

If true, only the latest backup will be returned.

order String

The order in which results should be returned. (asc, desc; default asc)

orderBy String

The attribute to order the results by. (created)

getDatabaseMysqlBackups Result

The following output properties are available:

Backups List<GetDatabaseMysqlBackupsBackup>
DatabaseId int
Id string

The provider-assigned unique ID for this managed resource.

Filters List<GetDatabaseMysqlBackupsFilter>
Latest bool
Order string
OrderBy string
Backups []GetDatabaseMysqlBackupsBackup
DatabaseId int
Id string

The provider-assigned unique ID for this managed resource.

Filters []GetDatabaseMysqlBackupsFilter
Latest bool
Order string
OrderBy string
backups List<GetDatabaseMysqlBackupsBackup>
databaseId Integer
id String

The provider-assigned unique ID for this managed resource.

filters List<GetDatabaseMysqlBackupsFilter>
latest Boolean
order String
orderBy String
backups GetDatabaseMysqlBackupsBackup[]
databaseId number
id string

The provider-assigned unique ID for this managed resource.

filters GetDatabaseMysqlBackupsFilter[]
latest boolean
order string
orderBy string
backups List<Property Map>
databaseId Number
id String

The provider-assigned unique ID for this managed resource.

filters List<Property Map>
latest Boolean
order String
orderBy String

Supporting Types

GetDatabaseMysqlBackupsBackup

Created string
Id int
Label string
Type string
Created string
Id int
Label string
Type string
created String
id Integer
label String
type String
created string
id number
label string
type string
created str
id int
label str
type str
created String
id Number
label String
type String

GetDatabaseMysqlBackupsFilter

Name string

The name of the field to filter by.

Values List<string>

A list of values for the filter to allow. These values should all be in string form.

MatchBy string

The method to match the field by. (exact, regex, substring; default exact)

Name string

The name of the field to filter by.

Values []string

A list of values for the filter to allow. These values should all be in string form.

MatchBy string

The method to match the field by. (exact, regex, substring; default exact)

name String

The name of the field to filter by.

values List<String>

A list of values for the filter to allow. These values should all be in string form.

matchBy String

The method to match the field by. (exact, regex, substring; default exact)

name string

The name of the field to filter by.

values string[]

A list of values for the filter to allow. These values should all be in string form.

matchBy string

The method to match the field by. (exact, regex, substring; default exact)

name str

The name of the field to filter by.

values Sequence[str]

A list of values for the filter to allow. These values should all be in string form.

match_by str

The method to match the field by. (exact, regex, substring; default exact)

name String

The name of the field to filter by.

values List<String>

A list of values for the filter to allow. These values should all be in string form.

matchBy String

The method to match the field by. (exact, regex, substring; default exact)

Package Details

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

This Pulumi package is based on the linode Terraform Provider.