@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
108 lines (107 loc) • 3.28 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to get information about a Cloud SQL instance backup run.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const backup = gcp.sql.getBackupRun({
* instance: main.name,
* mostRecent: true,
* });
* ```
*/
export declare function getBackupRun(args: GetBackupRunArgs, opts?: pulumi.InvokeOptions): Promise<GetBackupRunResult>;
/**
* A collection of arguments for invoking getBackupRun.
*/
export interface GetBackupRunArgs {
/**
* The identifier for this backup run. Unique only for a specific Cloud SQL instance.
* If left empty and multiple backups exist for the instance, `mostRecent` must be set to `true`.
*/
backupId?: number;
/**
* The name of the instance the backup is taken from.
*/
instance: string;
/**
* Toggles use of the most recent backup run if multiple backups exist for a
* Cloud SQL instance.
*/
mostRecent?: boolean;
/**
* The project to list instances for. If it
* is not provided, the provider project is used.
*/
project?: string;
}
/**
* A collection of values returned by getBackupRun.
*/
export interface GetBackupRunResult {
readonly backupId: number;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly instance: string;
/**
* Location of the backups.
*/
readonly location: string;
readonly mostRecent?: boolean;
readonly project: string;
/**
* The time the backup operation actually started in UTC timezone in RFC 3339 format, for
* example 2012-11-15T16:19:00.094Z.
*/
readonly startTime: string;
/**
* The status of this run. Refer to [API reference](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns#SqlBackupRunStatus) for possible status values.
*/
readonly status: string;
}
/**
* Use this data source to get information about a Cloud SQL instance backup run.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const backup = gcp.sql.getBackupRun({
* instance: main.name,
* mostRecent: true,
* });
* ```
*/
export declare function getBackupRunOutput(args: GetBackupRunOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetBackupRunResult>;
/**
* A collection of arguments for invoking getBackupRun.
*/
export interface GetBackupRunOutputArgs {
/**
* The identifier for this backup run. Unique only for a specific Cloud SQL instance.
* If left empty and multiple backups exist for the instance, `mostRecent` must be set to `true`.
*/
backupId?: pulumi.Input<number>;
/**
* The name of the instance the backup is taken from.
*/
instance: pulumi.Input<string>;
/**
* Toggles use of the most recent backup run if multiple backups exist for a
* Cloud SQL instance.
*/
mostRecent?: pulumi.Input<boolean>;
/**
* The project to list instances for. If it
* is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}