1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsSubnetReservedIps
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsSubnetReservedIps

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about a reserved IP in a subnet as a read only data source. For more information, about associated reserved IP subnet, see binding and unbinding a reserved IP address.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = ibm.getIsSubnetReservedIps({
        subnet: ibm_is_subnet.example.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_subnet_reserved_ips(subnet=ibm_is_subnet["example"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetIsSubnetReservedIps(ctx, &ibm.GetIsSubnetReservedIpsArgs{
    			Subnet: ibm_is_subnet.Example.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ibm.GetIsSubnetReservedIps.Invoke(new()
        {
            Subnet = ibm_is_subnet.Example.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsSubnetReservedIpsArgs;
    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 example = IbmFunctions.getIsSubnetReservedIps(GetIsSubnetReservedIpsArgs.builder()
                .subnet(ibm_is_subnet.example().id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsSubnetReservedIps
          arguments:
            subnet: ${ibm_is_subnet.example.id}
    

    Using getIsSubnetReservedIps

    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 getIsSubnetReservedIps(args: GetIsSubnetReservedIpsArgs, opts?: InvokeOptions): Promise<GetIsSubnetReservedIpsResult>
    function getIsSubnetReservedIpsOutput(args: GetIsSubnetReservedIpsOutputArgs, opts?: InvokeOptions): Output<GetIsSubnetReservedIpsResult>
    def get_is_subnet_reserved_ips(id: Optional[str] = None,
                                   subnet: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetIsSubnetReservedIpsResult
    def get_is_subnet_reserved_ips_output(id: Optional[pulumi.Input[str]] = None,
                                   subnet: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetIsSubnetReservedIpsResult]
    func GetIsSubnetReservedIps(ctx *Context, args *GetIsSubnetReservedIpsArgs, opts ...InvokeOption) (*GetIsSubnetReservedIpsResult, error)
    func GetIsSubnetReservedIpsOutput(ctx *Context, args *GetIsSubnetReservedIpsOutputArgs, opts ...InvokeOption) GetIsSubnetReservedIpsResultOutput

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

    public static class GetIsSubnetReservedIps 
    {
        public static Task<GetIsSubnetReservedIpsResult> InvokeAsync(GetIsSubnetReservedIpsArgs args, InvokeOptions? opts = null)
        public static Output<GetIsSubnetReservedIpsResult> Invoke(GetIsSubnetReservedIpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsSubnetReservedIpsResult> getIsSubnetReservedIps(GetIsSubnetReservedIpsArgs args, InvokeOptions options)
    public static Output<GetIsSubnetReservedIpsResult> getIsSubnetReservedIps(GetIsSubnetReservedIpsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsSubnetReservedIps:getIsSubnetReservedIps
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Subnet string
    The ID for the subnet.
    Id string
    (String) The unique identifier for this endpoint gateway.
    Subnet string
    The ID for the subnet.
    Id string
    (String) The unique identifier for this endpoint gateway.
    subnet String
    The ID for the subnet.
    id String
    (String) The unique identifier for this endpoint gateway.
    subnet string
    The ID for the subnet.
    id string
    (String) The unique identifier for this endpoint gateway.
    subnet str
    The ID for the subnet.
    id str
    (String) The unique identifier for this endpoint gateway.
    subnet String
    The ID for the subnet.
    id String
    (String) The unique identifier for this endpoint gateway.

    getIsSubnetReservedIps Result

    The following output properties are available:

    Id string
    (String) The unique identifier for this endpoint gateway.
    ReservedIps List<GetIsSubnetReservedIpsReservedIp>
    (List) The collection of all the reserved IPs in the subnet.
    Subnet string
    TotalCount double
    (String) The total number of resources across all pages.
    Id string
    (String) The unique identifier for this endpoint gateway.
    ReservedIps []GetIsSubnetReservedIpsReservedIp
    (List) The collection of all the reserved IPs in the subnet.
    Subnet string
    TotalCount float64
    (String) The total number of resources across all pages.
    id String
    (String) The unique identifier for this endpoint gateway.
    reservedIps List<GetIsSubnetReservedIpsReservedIp>
    (List) The collection of all the reserved IPs in the subnet.
    subnet String
    totalCount Double
    (String) The total number of resources across all pages.
    id string
    (String) The unique identifier for this endpoint gateway.
    reservedIps GetIsSubnetReservedIpsReservedIp[]
    (List) The collection of all the reserved IPs in the subnet.
    subnet string
    totalCount number
    (String) The total number of resources across all pages.
    id str
    (String) The unique identifier for this endpoint gateway.
    reserved_ips Sequence[GetIsSubnetReservedIpsReservedIp]
    (List) The collection of all the reserved IPs in the subnet.
    subnet str
    total_count float
    (String) The total number of resources across all pages.
    id String
    (String) The unique identifier for this endpoint gateway.
    reservedIps List<Property Map>
    (List) The collection of all the reserved IPs in the subnet.
    subnet String
    totalCount Number
    (String) The total number of resources across all pages.

    Supporting Types

    GetIsSubnetReservedIpsReservedIp

    Address string
    (String) The IP bound for the reserved IP.
    AutoDelete bool
    (String) If reserved IP shall be deleted automatically.
    CreatedAt string
    (String) The date and time that the reserved IP was created.
    Href string
    (String) The URL for this endpoint gateway.
    LifecycleState string
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    Owner string
    (String) The owner of a reserved IP, defining whether it is managed by the user or the provider.
    ReservedIp string
    (String) The unique identifier for this reserved IP.
    ResourceType string
    (String) The resource type.
    Target string
    (String) The ID of the target for the reserved IP.
    TargetCrn string
    (String) The crn of the target for the reserved IP.
    TargetReferences List<GetIsSubnetReservedIpsReservedIpTargetReference>
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    Address string
    (String) The IP bound for the reserved IP.
    AutoDelete bool
    (String) If reserved IP shall be deleted automatically.
    CreatedAt string
    (String) The date and time that the reserved IP was created.
    Href string
    (String) The URL for this endpoint gateway.
    LifecycleState string
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    Owner string
    (String) The owner of a reserved IP, defining whether it is managed by the user or the provider.
    ReservedIp string
    (String) The unique identifier for this reserved IP.
    ResourceType string
    (String) The resource type.
    Target string
    (String) The ID of the target for the reserved IP.
    TargetCrn string
    (String) The crn of the target for the reserved IP.
    TargetReferences []GetIsSubnetReservedIpsReservedIpTargetReference
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address String
    (String) The IP bound for the reserved IP.
    autoDelete Boolean
    (String) If reserved IP shall be deleted automatically.
    createdAt String
    (String) The date and time that the reserved IP was created.
    href String
    (String) The URL for this endpoint gateway.
    lifecycleState String
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner String
    (String) The owner of a reserved IP, defining whether it is managed by the user or the provider.
    reservedIp String
    (String) The unique identifier for this reserved IP.
    resourceType String
    (String) The resource type.
    target String
    (String) The ID of the target for the reserved IP.
    targetCrn String
    (String) The crn of the target for the reserved IP.
    targetReferences List<GetIsSubnetReservedIpsReservedIpTargetReference>
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address string
    (String) The IP bound for the reserved IP.
    autoDelete boolean
    (String) If reserved IP shall be deleted automatically.
    createdAt string
    (String) The date and time that the reserved IP was created.
    href string
    (String) The URL for this endpoint gateway.
    lifecycleState string
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner string
    (String) The owner of a reserved IP, defining whether it is managed by the user or the provider.
    reservedIp string
    (String) The unique identifier for this reserved IP.
    resourceType string
    (String) The resource type.
    target string
    (String) The ID of the target for the reserved IP.
    targetCrn string
    (String) The crn of the target for the reserved IP.
    targetReferences GetIsSubnetReservedIpsReservedIpTargetReference[]
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address str
    (String) The IP bound for the reserved IP.
    auto_delete bool
    (String) If reserved IP shall be deleted automatically.
    created_at str
    (String) The date and time that the reserved IP was created.
    href str
    (String) The URL for this endpoint gateway.
    lifecycle_state str
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name str
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner str
    (String) The owner of a reserved IP, defining whether it is managed by the user or the provider.
    reserved_ip str
    (String) The unique identifier for this reserved IP.
    resource_type str
    (String) The resource type.
    target str
    (String) The ID of the target for the reserved IP.
    target_crn str
    (String) The crn of the target for the reserved IP.
    target_references Sequence[GetIsSubnetReservedIpsReservedIpTargetReference]
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address String
    (String) The IP bound for the reserved IP.
    autoDelete Boolean
    (String) If reserved IP shall be deleted automatically.
    createdAt String
    (String) The date and time that the reserved IP was created.
    href String
    (String) The URL for this endpoint gateway.
    lifecycleState String
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner String
    (String) The owner of a reserved IP, defining whether it is managed by the user or the provider.
    reservedIp String
    (String) The unique identifier for this reserved IP.
    resourceType String
    (String) The resource type.
    target String
    (String) The ID of the target for the reserved IP.
    targetCrn String
    (String) The crn of the target for the reserved IP.
    targetReferences List<Property Map>
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.

    GetIsSubnetReservedIpsReservedIpTargetReference

    Crn string
    (String) The CRN for this endpoint gateway.
    Deleteds List<GetIsSubnetReservedIpsReservedIpTargetReferenceDeleted>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    Href string
    (String) The URL for this endpoint gateway.
    Id string
    (String) The unique identifier for this endpoint gateway.
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    ResourceType string
    (String) The resource type.
    Crn string
    (String) The CRN for this endpoint gateway.
    Deleteds []GetIsSubnetReservedIpsReservedIpTargetReferenceDeleted
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    Href string
    (String) The URL for this endpoint gateway.
    Id string
    (String) The unique identifier for this endpoint gateway.
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    ResourceType string
    (String) The resource type.
    crn String
    (String) The CRN for this endpoint gateway.
    deleteds List<GetIsSubnetReservedIpsReservedIpTargetReferenceDeleted>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href String
    (String) The URL for this endpoint gateway.
    id String
    (String) The unique identifier for this endpoint gateway.
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resourceType String
    (String) The resource type.
    crn string
    (String) The CRN for this endpoint gateway.
    deleteds GetIsSubnetReservedIpsReservedIpTargetReferenceDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href string
    (String) The URL for this endpoint gateway.
    id string
    (String) The unique identifier for this endpoint gateway.
    name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resourceType string
    (String) The resource type.
    crn str
    (String) The CRN for this endpoint gateway.
    deleteds Sequence[GetIsSubnetReservedIpsReservedIpTargetReferenceDeleted]
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href str
    (String) The URL for this endpoint gateway.
    id str
    (String) The unique identifier for this endpoint gateway.
    name str
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resource_type str
    (String) The resource type.
    crn String
    (String) The CRN for this endpoint gateway.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href String
    (String) The URL for this endpoint gateway.
    id String
    (String) The unique identifier for this endpoint gateway.
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resourceType String
    (String) The resource type.

    GetIsSubnetReservedIpsReservedIpTargetReferenceDeleted

    MoreInfo string
    (String) Link to documentation about deleted resources.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.
    moreInfo string
    (String) Link to documentation about deleted resources.
    more_info str
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud