Ovh

v0.0.4 published on Saturday, Sep 17, 2022 by lbrlabs

getCloudProjectDatabaseIpRestrictions

Use the list of IP restrictions associated with a public cloud project.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var iprestrictions = Ovh.GetCloudProjectDatabaseIpRestrictions.Invoke(new()
    {
        ServiceName = "XXXXXX",
        Engine = "YYYY",
        ClusterId = "ZZZZ",
    });

    return new Dictionary<string, object?>
    {
        ["ips"] = iprestrictions.Apply(getCloudProjectDatabaseIpRestrictionsResult => getCloudProjectDatabaseIpRestrictionsResult.Ips),
    };
});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		iprestrictions, err := ovh.GetCloudProjectDatabaseIpRestrictions(ctx, &GetCloudProjectDatabaseIpRestrictionsArgs{
			ServiceName: "XXXXXX",
			Engine:      "YYYY",
			ClusterId:   "ZZZZ",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ips", iprestrictions.Ips)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetCloudProjectDatabaseIpRestrictionsArgs;
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 iprestrictions = OvhFunctions.getCloudProjectDatabaseIpRestrictions(GetCloudProjectDatabaseIpRestrictionsArgs.builder()
            .serviceName("XXXXXX")
            .engine("YYYY")
            .clusterId("ZZZZ")
            .build());

        ctx.export("ips", iprestrictions.applyValue(getCloudProjectDatabaseIpRestrictionsResult -> getCloudProjectDatabaseIpRestrictionsResult.ips()));
    }
}
import pulumi
import pulumi_ovh as ovh

iprestrictions = ovh.get_cloud_project_database_ip_restrictions(service_name="XXXXXX",
    engine="YYYY",
    cluster_id="ZZZZ")
pulumi.export("ips", iprestrictions.ips)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const iprestrictions = ovh.getCloudProjectDatabaseIpRestrictions({
    serviceName: "XXXXXX",
    engine: "YYYY",
    clusterId: "ZZZZ",
});
export const ips = iprestrictions.then(iprestrictions => iprestrictions.ips);
variables:
  iprestrictions:
    Fn::Invoke:
      Function: ovh:getCloudProjectDatabaseIpRestrictions
      Arguments:
        serviceName: XXXXXX
        engine: YYYY
        clusterId: ZZZZ
outputs:
  ips: ${iprestrictions.ips}

Using getCloudProjectDatabaseIpRestrictions

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 getCloudProjectDatabaseIpRestrictions(args: GetCloudProjectDatabaseIpRestrictionsArgs, opts?: InvokeOptions): Promise<GetCloudProjectDatabaseIpRestrictionsResult>
function getCloudProjectDatabaseIpRestrictionsOutput(args: GetCloudProjectDatabaseIpRestrictionsOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectDatabaseIpRestrictionsResult>
def get_cloud_project_database_ip_restrictions(cluster_id: Optional[str] = None,
                                               engine: Optional[str] = None,
                                               service_name: Optional[str] = None,
                                               opts: Optional[InvokeOptions] = None) -> GetCloudProjectDatabaseIpRestrictionsResult
def get_cloud_project_database_ip_restrictions_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                               engine: Optional[pulumi.Input[str]] = None,
                                               service_name: Optional[pulumi.Input[str]] = None,
                                               opts: Optional[InvokeOptions] = None) -> Output[GetCloudProjectDatabaseIpRestrictionsResult]
func GetCloudProjectDatabaseIpRestrictions(ctx *Context, args *GetCloudProjectDatabaseIpRestrictionsArgs, opts ...InvokeOption) (*GetCloudProjectDatabaseIpRestrictionsResult, error)
func GetCloudProjectDatabaseIpRestrictionsOutput(ctx *Context, args *GetCloudProjectDatabaseIpRestrictionsOutputArgs, opts ...InvokeOption) GetCloudProjectDatabaseIpRestrictionsResultOutput

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

public static class GetCloudProjectDatabaseIpRestrictions 
{
    public static Task<GetCloudProjectDatabaseIpRestrictionsResult> InvokeAsync(GetCloudProjectDatabaseIpRestrictionsArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudProjectDatabaseIpRestrictionsResult> Invoke(GetCloudProjectDatabaseIpRestrictionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudProjectDatabaseIpRestrictionsResult> getCloudProjectDatabaseIpRestrictions(GetCloudProjectDatabaseIpRestrictionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: ovh:index/getCloudProjectDatabaseIpRestrictions:getCloudProjectDatabaseIpRestrictions
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ClusterId string

Cluster ID

Engine string

The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit. public documentation.

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

ClusterId string

Cluster ID

Engine string

The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit. public documentation.

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

clusterId String

Cluster ID

engine String

The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit. public documentation.

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

clusterId string

Cluster ID

engine string

The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit. public documentation.

serviceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

cluster_id str

Cluster ID

engine str

The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit. public documentation.

service_name str

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

clusterId String

Cluster ID

engine String

The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit. public documentation.

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getCloudProjectDatabaseIpRestrictions Result

The following output properties are available:

ClusterId string
Engine string
Id string

The provider-assigned unique ID for this managed resource.

Ips List<string>

The list of IP restriction of the database associated with the project.

ServiceName string
ClusterId string
Engine string
Id string

The provider-assigned unique ID for this managed resource.

Ips []string

The list of IP restriction of the database associated with the project.

ServiceName string
clusterId String
engine String
id String

The provider-assigned unique ID for this managed resource.

ips List<String>

The list of IP restriction of the database associated with the project.

serviceName String
clusterId string
engine string
id string

The provider-assigned unique ID for this managed resource.

ips string[]

The list of IP restriction of the database associated with the project.

serviceName string
cluster_id str
engine str
id str

The provider-assigned unique ID for this managed resource.

ips Sequence[str]

The list of IP restriction of the database associated with the project.

service_name str
clusterId String
engine String
id String

The provider-assigned unique ID for this managed resource.

ips List<String>

The list of IP restriction of the database associated with the project.

serviceName String

Package Details

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

This Pulumi package is based on the ovh Terraform Provider.