UNPKG

@upcloud/pulumi-upcloud

Version:

A Pulumi package for creating and managing UpCloud resources.

78 lines 3.2 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getManagedDatabasePostgresqlSessionsOutput = exports.getManagedDatabasePostgresqlSessions = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Current sessions of a PostgreSQL managed database * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@pulumi/upcloud"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * // Use data source to gather a list of the active sessions for a Managed PostgreSQL Database * // Create a Managed PostgreSQL resource * const exampleManagedDatabasePostgresql = new upcloud.ManagedDatabasePostgresql("example", { * name: "mysql-example1", * title: "mysql-example1", * plan: "1x1xCPU-2GB-25GB", * zone: "fi-hel1", * }); * // Read the active sessions of the newly created service * const example = upcloud.getManagedDatabasePostgresqlSessionsOutput({ * service: exampleManagedDatabasePostgresql.id, * }); * ``` */ function getManagedDatabasePostgresqlSessions(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("upcloud:index/getManagedDatabasePostgresqlSessions:getManagedDatabasePostgresqlSessions", { "limit": args.limit, "offset": args.offset, "order": args.order, "service": args.service, "sessions": args.sessions, }, opts); } exports.getManagedDatabasePostgresqlSessions = getManagedDatabasePostgresqlSessions; /** * Current sessions of a PostgreSQL managed database * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@pulumi/upcloud"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * // Use data source to gather a list of the active sessions for a Managed PostgreSQL Database * // Create a Managed PostgreSQL resource * const exampleManagedDatabasePostgresql = new upcloud.ManagedDatabasePostgresql("example", { * name: "mysql-example1", * title: "mysql-example1", * plan: "1x1xCPU-2GB-25GB", * zone: "fi-hel1", * }); * // Read the active sessions of the newly created service * const example = upcloud.getManagedDatabasePostgresqlSessionsOutput({ * service: exampleManagedDatabasePostgresql.id, * }); * ``` */ function getManagedDatabasePostgresqlSessionsOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("upcloud:index/getManagedDatabasePostgresqlSessions:getManagedDatabasePostgresqlSessions", { "limit": args.limit, "offset": args.offset, "order": args.order, "service": args.service, "sessions": args.sessions, }, opts); } exports.getManagedDatabasePostgresqlSessionsOutput = getManagedDatabasePostgresqlSessionsOutput; //# sourceMappingURL=getManagedDatabasePostgresqlSessions.js.map