title: "getSubnetIds" title_tag: "huaweicloud.Vpc.getSubnetIds" meta_desc: "Documentation for the huaweicloud.Vpc.getSubnetIds function with examples, input properties, output properties, and supporting types." layout: api no_edit_this_page: true
Provides a list of subnet ids for a vpc.
This resource can be useful for getting back a list of subnet ids for a vpc.
Using getSubnetIds {#using}
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 getSubnetIds(args: GetSubnetIdsArgs, opts?: InvokeOptions): Promise<GetSubnetIdsResult>
function getSubnetIdsOutput(args: GetSubnetIdsOutputArgs, opts?: InvokeOptions): Output<GetSubnetIdsResult>
def get_subnet_ids(region: Optional[str] = None,
vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubnetIdsResult
def get_subnet_ids_output(region: Optional[pulumi.Input[str]] = None,
vpc_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubnetIdsResult]
func GetSubnetIds(ctx *Context, args *GetSubnetIdsArgs, opts ...InvokeOption) (*GetSubnetIdsResult, error)
func GetSubnetIdsOutput(ctx *Context, args *GetSubnetIdsOutputArgs, opts ...InvokeOption) GetSubnetIdsResultOutput
> Note: This function is named GetSubnetIds
in the Go SDK.
public static class GetSubnetIds
{
public static Task<GetSubnetIdsResult> InvokeAsync(GetSubnetIdsArgs args, InvokeOptions? opts = null)
public static Output<GetSubnetIdsResult> Invoke(GetSubnetIdsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubnetIdsResult> getSubnetIds(GetSubnetIdsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: huaweicloud:Vpc/getSubnetIds:getSubnetIds
Arguments:
# Arguments dictionary
The following arguments are supported:
getSubnetIds Result {#result}
The following output properties are available:
Package Details
- Repository
- https://github.com/huaweicloud/pulumi-huaweicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
huaweicloud
Terraform Provider.