OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud
ovh.CloudProjectDatabase.getDatabasePostgreSQLConnectionPools
Explore with Pulumi AI
Use this data source to get the list of connection pools of a postgresql cluster associated with a public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const testPools = ovh.CloudProjectDatabase.getDatabasePostgreSQLConnectionPools({
serviceName: "XXX",
clusterId: "YYY",
});
export const connectionPoolIds = testPools.then(testPools => testPools.connectionPoolIds);
import pulumi
import pulumi_ovh as ovh
test_pools = ovh.CloudProjectDatabase.get_database_postgre_sql_connection_pools(service_name="XXX",
cluster_id="YYY")
pulumi.export("connectionPoolIds", test_pools.connection_pool_ids)
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProjectDatabase"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testPools, err := CloudProjectDatabase.GetDatabasePostgreSQLConnectionPools(ctx, &cloudprojectdatabase.GetDatabasePostgreSQLConnectionPoolsArgs{
ServiceName: "XXX",
ClusterId: "YYY",
}, nil)
if err != nil {
return err
}
ctx.Export("connectionPoolIds", testPools.ConnectionPoolIds)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var testPools = Ovh.CloudProjectDatabase.GetDatabasePostgreSQLConnectionPools.Invoke(new()
{
ServiceName = "XXX",
ClusterId = "YYY",
});
return new Dictionary<string, object?>
{
["connectionPoolIds"] = testPools.Apply(getDatabasePostgreSQLConnectionPoolsResult => getDatabasePostgreSQLConnectionPoolsResult.ConnectionPoolIds),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
import com.pulumi.ovh.CloudProjectDatabase.inputs.GetDatabasePostgreSQLConnectionPoolsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testPools = CloudProjectDatabaseFunctions.getDatabasePostgreSQLConnectionPools(GetDatabasePostgreSQLConnectionPoolsArgs.builder()
.serviceName("XXX")
.clusterId("YYY")
.build());
ctx.export("connectionPoolIds", testPools.applyValue(getDatabasePostgreSQLConnectionPoolsResult -> getDatabasePostgreSQLConnectionPoolsResult.connectionPoolIds()));
}
}
variables:
testPools:
fn::invoke:
Function: ovh:CloudProjectDatabase:getDatabasePostgreSQLConnectionPools
Arguments:
serviceName: XXX
clusterId: YYY
outputs:
connectionPoolIds: ${testPools.connectionPoolIds}
Using getDatabasePostgreSQLConnectionPools
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 getDatabasePostgreSQLConnectionPools(args: GetDatabasePostgreSQLConnectionPoolsArgs, opts?: InvokeOptions): Promise<GetDatabasePostgreSQLConnectionPoolsResult>
function getDatabasePostgreSQLConnectionPoolsOutput(args: GetDatabasePostgreSQLConnectionPoolsOutputArgs, opts?: InvokeOptions): Output<GetDatabasePostgreSQLConnectionPoolsResult>
def get_database_postgre_sql_connection_pools(cluster_id: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabasePostgreSQLConnectionPoolsResult
def get_database_postgre_sql_connection_pools_output(cluster_id: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabasePostgreSQLConnectionPoolsResult]
func GetDatabasePostgreSQLConnectionPools(ctx *Context, args *GetDatabasePostgreSQLConnectionPoolsArgs, opts ...InvokeOption) (*GetDatabasePostgreSQLConnectionPoolsResult, error)
func GetDatabasePostgreSQLConnectionPoolsOutput(ctx *Context, args *GetDatabasePostgreSQLConnectionPoolsOutputArgs, opts ...InvokeOption) GetDatabasePostgreSQLConnectionPoolsResultOutput
> Note: This function is named GetDatabasePostgreSQLConnectionPools
in the Go SDK.
public static class GetDatabasePostgreSQLConnectionPools
{
public static Task<GetDatabasePostgreSQLConnectionPoolsResult> InvokeAsync(GetDatabasePostgreSQLConnectionPoolsArgs args, InvokeOptions? opts = null)
public static Output<GetDatabasePostgreSQLConnectionPoolsResult> Invoke(GetDatabasePostgreSQLConnectionPoolsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabasePostgreSQLConnectionPoolsResult> getDatabasePostgreSQLConnectionPools(GetDatabasePostgreSQLConnectionPoolsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:CloudProjectDatabase/getDatabasePostgreSQLConnectionPools:getDatabasePostgreSQLConnectionPools
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Id string - Cluster ID.
- Service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- Cluster
Id string - Cluster ID.
- Service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster
Id String - Cluster ID.
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster
Id string - Cluster ID.
- service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster_
id str - Cluster ID.
- service_
name str - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster
Id String - Cluster ID.
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
getDatabasePostgreSQLConnectionPools Result
The following output properties are available:
- Cluster
Id string - See Argument Reference above.
- Connection
Pool List<string>Ids - The list of patterns ids of the opensearch cluster associated with the project.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - See Argument Reference above.
- Cluster
Id string - See Argument Reference above.
- Connection
Pool []stringIds - The list of patterns ids of the opensearch cluster associated with the project.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - See Argument Reference above.
- cluster
Id String - See Argument Reference above.
- connection
Pool List<String>Ids - The list of patterns ids of the opensearch cluster associated with the project.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - See Argument Reference above.
- cluster
Id string - See Argument Reference above.
- connection
Pool string[]Ids - The list of patterns ids of the opensearch cluster associated with the project.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Name string - See Argument Reference above.
- cluster_
id str - See Argument Reference above.
- connection_
pool_ Sequence[str]ids - The list of patterns ids of the opensearch cluster associated with the project.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
name str - See Argument Reference above.
- cluster
Id String - See Argument Reference above.
- connection
Pool List<String>Ids - The list of patterns ids of the opensearch cluster associated with the project.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - See Argument Reference above.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.