@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
152 lines (151 loc) • 5.04 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* > **DEPRECATION NOTICE:** This data source has been deprecated.
*
* Provides information about Linode Database Backups that match a set of filters.
* For more information, see the Linode APIv4 docs for [MySQL](https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instance-backups) and [PostgreSQL](https://techdocs.akamai.com/linode-api/reference/get-databases-postgre-sql-instance-backups).
*
* ## Example Usage
*
* Get information about all backups for a MySQL database:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const all_backups = linode.getDatabaseBackups({
* databaseId: 12345,
* databaseType: "mysql",
* });
* ```
*
* Get information about all automatic PostgreSQL Database Backups:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const auto_backups = linode.getDatabaseBackups({
* databaseId: 12345,
* databaseType: "postgresql",
* filters: [{
* name: "type",
* values: ["auto"],
* }],
* });
* ```
*/
export declare function getDatabaseBackups(args: GetDatabaseBackupsArgs, opts?: pulumi.InvokeOptions): Promise<GetDatabaseBackupsResult>;
/**
* A collection of arguments for invoking getDatabaseBackups.
*/
export interface GetDatabaseBackupsArgs {
backups?: inputs.GetDatabaseBackupsBackup[];
/**
* The ID of the database to retrieve backups for.
*/
databaseId: number;
/**
* The type of the database to retrieve backups for. (`mysql`, `postgresql`)
*/
databaseType: string;
filters?: inputs.GetDatabaseBackupsFilter[];
/**
* If true, only the latest backup will be returned.
*
* * `filter` - (Optional) A set of filters used to select database backups that meet certain requirements.
*/
latest?: boolean;
/**
* The order in which results should be returned. (`asc`, `desc`; default `asc`)
*/
order?: string;
/**
* The attribute to order the results by. (`created`)
*/
orderBy?: string;
}
/**
* A collection of values returned by getDatabaseBackups.
*/
export interface GetDatabaseBackupsResult {
readonly backups?: outputs.GetDatabaseBackupsBackup[];
readonly databaseId: number;
readonly databaseType: string;
readonly filters?: outputs.GetDatabaseBackupsFilter[];
/**
* The ID of the database backup object.
*/
readonly id: number;
readonly latest?: boolean;
readonly order?: string;
readonly orderBy?: string;
}
/**
* > **DEPRECATION NOTICE:** This data source has been deprecated.
*
* Provides information about Linode Database Backups that match a set of filters.
* For more information, see the Linode APIv4 docs for [MySQL](https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instance-backups) and [PostgreSQL](https://techdocs.akamai.com/linode-api/reference/get-databases-postgre-sql-instance-backups).
*
* ## Example Usage
*
* Get information about all backups for a MySQL database:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const all_backups = linode.getDatabaseBackups({
* databaseId: 12345,
* databaseType: "mysql",
* });
* ```
*
* Get information about all automatic PostgreSQL Database Backups:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const auto_backups = linode.getDatabaseBackups({
* databaseId: 12345,
* databaseType: "postgresql",
* filters: [{
* name: "type",
* values: ["auto"],
* }],
* });
* ```
*/
export declare function getDatabaseBackupsOutput(args: GetDatabaseBackupsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDatabaseBackupsResult>;
/**
* A collection of arguments for invoking getDatabaseBackups.
*/
export interface GetDatabaseBackupsOutputArgs {
backups?: pulumi.Input<pulumi.Input<inputs.GetDatabaseBackupsBackupArgs>[]>;
/**
* The ID of the database to retrieve backups for.
*/
databaseId: pulumi.Input<number>;
/**
* The type of the database to retrieve backups for. (`mysql`, `postgresql`)
*/
databaseType: pulumi.Input<string>;
filters?: pulumi.Input<pulumi.Input<inputs.GetDatabaseBackupsFilterArgs>[]>;
/**
* If true, only the latest backup will be returned.
*
* * `filter` - (Optional) A set of filters used to select database backups that meet certain requirements.
*/
latest?: pulumi.Input<boolean>;
/**
* The order in which results should be returned. (`asc`, `desc`; default `asc`)
*/
order?: pulumi.Input<string>;
/**
* The attribute to order the results by. (`created`)
*/
orderBy?: pulumi.Input<string>;
}