1. Packages
  2. Ibm Provider
  3. API Docs
  4. getTgGateways
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getTgGateways

Explore with Pulumi AI

ibm logo
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

    Imports the information of an existing IBM Cloud infrastructure transit gateway as a read only data source. For more information, about transit gateways, see managing transit gateways.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dsTggateways = ibm.getTgGateways({});
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_tggateways = ibm.get_tg_gateways()
    
    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.GetTgGateways(ctx, &ibm.GetTgGatewaysArgs{}, 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 dsTggateways = Ibm.GetTgGateways.Invoke();
    
    });
    
    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.GetTgGatewaysArgs;
    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 dsTggateways = IbmFunctions.getTgGateways();
    
        }
    }
    
    variables:
      dsTggateways:
        fn::invoke:
          function: ibm:getTgGateways
          arguments: {}
    

    Using getTgGateways

    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 getTgGateways(args: GetTgGatewaysArgs, opts?: InvokeOptions): Promise<GetTgGatewaysResult>
    function getTgGatewaysOutput(args: GetTgGatewaysOutputArgs, opts?: InvokeOptions): Output<GetTgGatewaysResult>
    def get_tg_gateways(id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetTgGatewaysResult
    def get_tg_gateways_output(id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetTgGatewaysResult]
    func GetTgGateways(ctx *Context, args *GetTgGatewaysArgs, opts ...InvokeOption) (*GetTgGatewaysResult, error)
    func GetTgGatewaysOutput(ctx *Context, args *GetTgGatewaysOutputArgs, opts ...InvokeOption) GetTgGatewaysResultOutput

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

    public static class GetTgGateways 
    {
        public static Task<GetTgGatewaysResult> InvokeAsync(GetTgGatewaysArgs args, InvokeOptions? opts = null)
        public static Output<GetTgGatewaysResult> Invoke(GetTgGatewaysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTgGatewaysResult> getTgGateways(GetTgGatewaysArgs args, InvokeOptions options)
    public static Output<GetTgGatewaysResult> getTgGateways(GetTgGatewaysArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getTgGateways:getTgGateways
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The unique identifier of this gateway.
    Id string
    (String) The unique identifier of this gateway.
    id String
    (String) The unique identifier of this gateway.
    id string
    (String) The unique identifier of this gateway.
    id str
    (String) The unique identifier of this gateway.
    id String
    (String) The unique identifier of this gateway.

    getTgGateways Result

    The following output properties are available:

    Id string
    (String) The unique identifier of this gateway.
    TransitGateways List<GetTgGatewaysTransitGateway>
    (String) List of all transit gateways.
    Id string
    (String) The unique identifier of this gateway.
    TransitGateways []GetTgGatewaysTransitGateway
    (String) List of all transit gateways.
    id String
    (String) The unique identifier of this gateway.
    transitGateways List<GetTgGatewaysTransitGateway>
    (String) List of all transit gateways.
    id string
    (String) The unique identifier of this gateway.
    transitGateways GetTgGatewaysTransitGateway[]
    (String) List of all transit gateways.
    id str
    (String) The unique identifier of this gateway.
    transit_gateways Sequence[GetTgGatewaysTransitGateway]
    (String) List of all transit gateways.
    id String
    (String) The unique identifier of this gateway.
    transitGateways List<Property Map>
    (String) List of all transit gateways.

    Supporting Types

    GetTgGatewaysTransitGateway

    CreatedAt string
    (String) The date and time resource is created.
    Crn string
    (String) The CRN of the gateway.
    Global bool
    (String) The gateways with global routing true to connect to the networks outside the associated region.
    Id string
    (String) The unique identifier of this gateway.
    Location string
    (String) The gateway location.
    Name string
    (String) The user defined name for the transit gateway connection.
    ResourceGroup string
    (String) The resource group identifier.
    Status string
    (String) The gateway status.
    UpdatedAt string
    (String) The date and time resource is last updated.
    CreatedAt string
    (String) The date and time resource is created.
    Crn string
    (String) The CRN of the gateway.
    Global bool
    (String) The gateways with global routing true to connect to the networks outside the associated region.
    Id string
    (String) The unique identifier of this gateway.
    Location string
    (String) The gateway location.
    Name string
    (String) The user defined name for the transit gateway connection.
    ResourceGroup string
    (String) The resource group identifier.
    Status string
    (String) The gateway status.
    UpdatedAt string
    (String) The date and time resource is last updated.
    createdAt String
    (String) The date and time resource is created.
    crn String
    (String) The CRN of the gateway.
    global Boolean
    (String) The gateways with global routing true to connect to the networks outside the associated region.
    id String
    (String) The unique identifier of this gateway.
    location String
    (String) The gateway location.
    name String
    (String) The user defined name for the transit gateway connection.
    resourceGroup String
    (String) The resource group identifier.
    status String
    (String) The gateway status.
    updatedAt String
    (String) The date and time resource is last updated.
    createdAt string
    (String) The date and time resource is created.
    crn string
    (String) The CRN of the gateway.
    global boolean
    (String) The gateways with global routing true to connect to the networks outside the associated region.
    id string
    (String) The unique identifier of this gateway.
    location string
    (String) The gateway location.
    name string
    (String) The user defined name for the transit gateway connection.
    resourceGroup string
    (String) The resource group identifier.
    status string
    (String) The gateway status.
    updatedAt string
    (String) The date and time resource is last updated.
    created_at str
    (String) The date and time resource is created.
    crn str
    (String) The CRN of the gateway.
    global_ bool
    (String) The gateways with global routing true to connect to the networks outside the associated region.
    id str
    (String) The unique identifier of this gateway.
    location str
    (String) The gateway location.
    name str
    (String) The user defined name for the transit gateway connection.
    resource_group str
    (String) The resource group identifier.
    status str
    (String) The gateway status.
    updated_at str
    (String) The date and time resource is last updated.
    createdAt String
    (String) The date and time resource is created.
    crn String
    (String) The CRN of the gateway.
    global Boolean
    (String) The gateways with global routing true to connect to the networks outside the associated region.
    id String
    (String) The unique identifier of this gateway.
    location String
    (String) The gateway location.
    name String
    (String) The user defined name for the transit gateway connection.
    resourceGroup String
    (String) The resource group identifier.
    status String
    (String) The gateway status.
    updatedAt String
    (String) The date and time resource is last updated.

    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.77.1 published on Monday, Apr 14, 2025 by ibm-cloud