OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud
ovh.CloudProject.getNetworkPrivateSubnets
Explore with Pulumi AI
List public cloud project subnets of a private network.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
export = async () => {
    const privateNetworkPrivateSubnets = await ovh.CloudProject.getNetworkPrivateSubnets({
        serviceName: "XXXXXX",
        networkId: "XXXXXX",
    });
    return {
        "private": privateNetworkPrivateSubnets,
    };
}
import pulumi
import pulumi_ovh as ovh
private_network_private_subnets = ovh.CloudProject.get_network_private_subnets(service_name="XXXXXX",
    network_id="XXXXXX")
pulumi.export("private", private_network_private_subnets)
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		privateNetworkPrivateSubnets, err := CloudProject.GetNetworkPrivateSubnets(ctx, &cloudproject.GetNetworkPrivateSubnetsArgs{
			ServiceName: "XXXXXX",
			NetworkId:   "XXXXXX",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("private", privateNetworkPrivateSubnets)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() => 
{
    var privateNetworkPrivateSubnets = Ovh.CloudProject.GetNetworkPrivateSubnets.Invoke(new()
    {
        ServiceName = "XXXXXX",
        NetworkId = "XXXXXX",
    });
    return new Dictionary<string, object?>
    {
        ["private"] = privateNetworkPrivateSubnets,
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetNetworkPrivateSubnetsArgs;
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 privateNetworkPrivateSubnets = CloudProjectFunctions.getNetworkPrivateSubnets(GetNetworkPrivateSubnetsArgs.builder()
            .serviceName("XXXXXX")
            .networkId("XXXXXX")
            .build());
        ctx.export("private", privateNetworkPrivateSubnets.applyValue(getNetworkPrivateSubnetsResult -> getNetworkPrivateSubnetsResult));
    }
}
variables:
  privateNetworkPrivateSubnets:
    fn::invoke:
      Function: ovh:CloudProject:getNetworkPrivateSubnets
      Arguments:
        serviceName: XXXXXX
        networkId: XXXXXX
outputs:
  private: ${privateNetworkPrivateSubnets}
Using getNetworkPrivateSubnets
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 getNetworkPrivateSubnets(args: GetNetworkPrivateSubnetsArgs, opts?: InvokeOptions): Promise<GetNetworkPrivateSubnetsResult>
function getNetworkPrivateSubnetsOutput(args: GetNetworkPrivateSubnetsOutputArgs, opts?: InvokeOptions): Output<GetNetworkPrivateSubnetsResult>def get_network_private_subnets(network_id: Optional[str] = None,
                                service_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetNetworkPrivateSubnetsResult
def get_network_private_subnets_output(network_id: Optional[pulumi.Input[str]] = None,
                                service_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetNetworkPrivateSubnetsResult]func GetNetworkPrivateSubnets(ctx *Context, args *GetNetworkPrivateSubnetsArgs, opts ...InvokeOption) (*GetNetworkPrivateSubnetsResult, error)
func GetNetworkPrivateSubnetsOutput(ctx *Context, args *GetNetworkPrivateSubnetsOutputArgs, opts ...InvokeOption) GetNetworkPrivateSubnetsResultOutput> Note: This function is named GetNetworkPrivateSubnets in the Go SDK.
public static class GetNetworkPrivateSubnets 
{
    public static Task<GetNetworkPrivateSubnetsResult> InvokeAsync(GetNetworkPrivateSubnetsArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkPrivateSubnetsResult> Invoke(GetNetworkPrivateSubnetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNetworkPrivateSubnetsResult> getNetworkPrivateSubnets(GetNetworkPrivateSubnetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: ovh:CloudProject/getNetworkPrivateSubnets:getNetworkPrivateSubnets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- NetworkId string
- ID of the network
- ServiceName string
- The ID of the public cloud project.
- NetworkId string
- ID of the network
- ServiceName string
- The ID of the public cloud project.
- networkId String
- ID of the network
- serviceName String
- The ID of the public cloud project.
- networkId string
- ID of the network
- serviceName string
- The ID of the public cloud project.
- network_id str
- ID of the network
- service_name str
- The ID of the public cloud project.
- networkId String
- ID of the network
- serviceName String
- The ID of the public cloud project.
getNetworkPrivateSubnets Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- NetworkId string
- ID of the network
- ServiceName string
- ID of the public cloud project
- Subnets
List<GetNetwork Private Subnets Subnet> 
- List of subnets
- Id string
- The provider-assigned unique ID for this managed resource.
- NetworkId string
- ID of the network
- ServiceName string
- ID of the public cloud project
- Subnets
[]GetNetwork Private Subnets Subnet 
- List of subnets
- id String
- The provider-assigned unique ID for this managed resource.
- networkId String
- ID of the network
- serviceName String
- ID of the public cloud project
- subnets
List<GetNetwork Private Subnets Subnet> 
- List of subnets
- id string
- The provider-assigned unique ID for this managed resource.
- networkId string
- ID of the network
- serviceName string
- ID of the public cloud project
- subnets
GetNetwork Private Subnets Subnet[] 
- List of subnets
- id str
- The provider-assigned unique ID for this managed resource.
- network_id str
- ID of the network
- service_name str
- ID of the public cloud project
- subnets
Sequence[cloudproject.Get Network Private Subnets Subnet] 
- List of subnets
- id String
- The provider-assigned unique ID for this managed resource.
- networkId String
- ID of the network
- serviceName String
- ID of the public cloud project
- subnets List<Property Map>
- List of subnets
Supporting Types
GetNetworkPrivateSubnetsSubnet    
- Cidr string
- CIDR of the subnet
- DhcpEnabled bool
- Whether or not if DHCP is enabled for the subnet
- GatewayIp string
- Gateway IP of the subnet
- Id string
- ID of the subnet
- IpPools List<GetNetwork Private Subnets Subnet Ip Pool> 
- List of ip pools allocated in the subnet
- Cidr string
- CIDR of the subnet
- DhcpEnabled bool
- Whether or not if DHCP is enabled for the subnet
- GatewayIp string
- Gateway IP of the subnet
- Id string
- ID of the subnet
- IpPools []GetNetwork Private Subnets Subnet Ip Pool 
- List of ip pools allocated in the subnet
- cidr String
- CIDR of the subnet
- dhcpEnabled Boolean
- Whether or not if DHCP is enabled for the subnet
- gatewayIp String
- Gateway IP of the subnet
- id String
- ID of the subnet
- ipPools List<GetNetwork Private Subnets Subnet Ip Pool> 
- List of ip pools allocated in the subnet
- cidr string
- CIDR of the subnet
- dhcpEnabled boolean
- Whether or not if DHCP is enabled for the subnet
- gatewayIp string
- Gateway IP of the subnet
- id string
- ID of the subnet
- ipPools GetNetwork Private Subnets Subnet Ip Pool[] 
- List of ip pools allocated in the subnet
- cidr str
- CIDR of the subnet
- dhcp_enabled bool
- Whether or not if DHCP is enabled for the subnet
- gateway_ip str
- Gateway IP of the subnet
- id str
- ID of the subnet
- ip_pools Sequence[cloudproject.Get Network Private Subnets Subnet Ip Pool] 
- List of ip pools allocated in the subnet
- cidr String
- CIDR of the subnet
- dhcpEnabled Boolean
- Whether or not if DHCP is enabled for the subnet
- gatewayIp String
- Gateway IP of the subnet
- id String
- ID of the subnet
- ipPools List<Property Map>
- List of ip pools allocated in the subnet
GetNetworkPrivateSubnetsSubnetIpPool      
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ovhTerraform Provider.