OVHCloud v1.1.0 published on Thursday, Nov 21, 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 dictionary
The following arguments are supported:
- Network
Id string - ID of the network
- Service
Name string - The ID of the public cloud project.
- Network
Id string - ID of the network
- Service
Name string - The ID of the public cloud project.
- network
Id String - ID of the network
- service
Name String - The ID of the public cloud project.
- network
Id string - ID of the network
- service
Name 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.
- network
Id String - ID of the network
- service
Name 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.
- Network
Id string - ID of the network
- Service
Name string - ID of the public cloud project
- Subnets
List<Get
Network Private Subnets Subnet> - List of subnets
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Id string - ID of the network
- Service
Name string - ID of the public cloud project
- Subnets
[]Get
Network Private Subnets Subnet - List of subnets
- id String
- The provider-assigned unique ID for this managed resource.
- network
Id String - ID of the network
- service
Name String - ID of the public cloud project
- subnets
List<Get
Network Private Subnets Subnet> - List of subnets
- id string
- The provider-assigned unique ID for this managed resource.
- network
Id string - ID of the network
- service
Name string - ID of the public cloud project
- subnets
Get
Network 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.
- network
Id String - ID of the network
- service
Name String - ID of the public cloud project
- subnets List<Property Map>
- List of subnets
Supporting Types
GetNetworkPrivateSubnetsSubnet
- Cidr string
- CIDR of the subnet
- Dhcp
Enabled bool - Whether or not if DHCP is enabled for the subnet
- Gateway
Ip string - Gateway IP of the subnet
- Id string
- ID of the subnet
- Ip
Pools List<GetNetwork Private Subnets Subnet Ip Pool> - List of ip pools allocated in the subnet
- Cidr string
- CIDR of the subnet
- Dhcp
Enabled bool - Whether or not if DHCP is enabled for the subnet
- Gateway
Ip string - Gateway IP of the subnet
- Id string
- ID of the subnet
- Ip
Pools []GetNetwork Private Subnets Subnet Ip Pool - List of ip pools allocated in the subnet
- cidr String
- CIDR of the subnet
- dhcp
Enabled Boolean - Whether or not if DHCP is enabled for the subnet
- gateway
Ip String - Gateway IP of the subnet
- id String
- ID of the subnet
- ip
Pools List<GetNetwork Private Subnets Subnet Ip Pool> - List of ip pools allocated in the subnet
- cidr string
- CIDR of the subnet
- dhcp
Enabled boolean - Whether or not if DHCP is enabled for the subnet
- gateway
Ip string - Gateway IP of the subnet
- id string
- ID of the subnet
- ip
Pools 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
- dhcp
Enabled Boolean - Whether or not if DHCP is enabled for the subnet
- gateway
Ip String - Gateway IP of the subnet
- id String
- ID of the subnet
- ip
Pools 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
ovh
Terraform Provider.