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

ibm.getApiGateway

Explore with Pulumi AI

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

    Retrieve information about an existing API Gateway instance. For more information, about API Gateway, see getting started with API Gateway.

    Note

    Configuration of an API Gateway data source requires the region parameter to be set for the IBM provider in the provider.tf. If not specified, endpoint will default to us-south.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const apigateway = ibm.getApiGateway({
        serviceInstanceCrn: ibm_resource_instance.apigateway.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    apigateway = ibm.get_api_gateway(service_instance_crn=ibm_resource_instance["apigateway"]["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.GetApiGateway(ctx, &ibm.GetApiGatewayArgs{
    			ServiceInstanceCrn: ibm_resource_instance.Apigateway.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 apigateway = Ibm.GetApiGateway.Invoke(new()
        {
            ServiceInstanceCrn = ibm_resource_instance.Apigateway.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.GetApiGatewayArgs;
    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 apigateway = IbmFunctions.getApiGateway(GetApiGatewayArgs.builder()
                .serviceInstanceCrn(ibm_resource_instance.apigateway().id())
                .build());
    
        }
    }
    
    variables:
      apigateway:
        fn::invoke:
          function: ibm:getApiGateway
          arguments:
            serviceInstanceCrn: ${ibm_resource_instance.apigateway.id}
    

    Using getApiGateway

    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 getApiGateway(args: GetApiGatewayArgs, opts?: InvokeOptions): Promise<GetApiGatewayResult>
    function getApiGatewayOutput(args: GetApiGatewayOutputArgs, opts?: InvokeOptions): Output<GetApiGatewayResult>
    def get_api_gateway(id: Optional[str] = None,
                        service_instance_crn: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetApiGatewayResult
    def get_api_gateway_output(id: Optional[pulumi.Input[str]] = None,
                        service_instance_crn: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetApiGatewayResult]
    func GetApiGateway(ctx *Context, args *GetApiGatewayArgs, opts ...InvokeOption) (*GetApiGatewayResult, error)
    func GetApiGatewayOutput(ctx *Context, args *GetApiGatewayOutputArgs, opts ...InvokeOption) GetApiGatewayResultOutput

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

    public static class GetApiGateway 
    {
        public static Task<GetApiGatewayResult> InvokeAsync(GetApiGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetApiGatewayResult> Invoke(GetApiGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApiGatewayResult> getApiGateway(GetApiGatewayArgs args, InvokeOptions options)
    public static Output<GetApiGatewayResult> getApiGateway(GetApiGatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getApiGateway:getApiGateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceInstanceCrn string
    The CRN of the API Gateway service instance.
    Id string
    ServiceInstanceCrn string
    The CRN of the API Gateway service instance.
    Id string
    serviceInstanceCrn String
    The CRN of the API Gateway service instance.
    id String
    serviceInstanceCrn string
    The CRN of the API Gateway service instance.
    id string
    service_instance_crn str
    The CRN of the API Gateway service instance.
    id str
    serviceInstanceCrn String
    The CRN of the API Gateway service instance.
    id String

    getApiGateway Result

    The following output properties are available:

    Endpoints List<GetApiGatewayEndpoint>
    (List) A list of API Gateway endpoints that are associated with the service instance.
    Id string
    ServiceInstanceCrn string
    Endpoints []GetApiGatewayEndpointType
    (List) A list of API Gateway endpoints that are associated with the service instance.
    Id string
    ServiceInstanceCrn string
    endpoints List<GetApiGatewayEndpoint>
    (List) A list of API Gateway endpoints that are associated with the service instance.
    id String
    serviceInstanceCrn String
    endpoints GetApiGatewayEndpoint[]
    (List) A list of API Gateway endpoints that are associated with the service instance.
    id string
    serviceInstanceCrn string
    endpoints Sequence[GetApiGatewayEndpoint]
    (List) A list of API Gateway endpoints that are associated with the service instance.
    id str
    service_instance_crn str
    endpoints List<Property Map>
    (List) A list of API Gateway endpoints that are associated with the service instance.
    id String
    serviceInstanceCrn String

    Supporting Types

    GetApiGatewayEndpoint

    AliasUrl string
    (String) The alias URL of an endpoint.
    BasePath string
    (String) The base path of the endpoint.
    EndpointId string
    (String) The ID of the endpoint.
    Managed bool
    (Boolean) If set to true, the endpoint is online. If set to false, the endpoint is offline.
    ManagedUrl string
    (String) The managed URL of an endpoint.
    Name string
    (String) The name of the subscription.
    OpenApiDoc string
    (String) The Open API document of the endpoint.
    Routes List<string>
    (Strings) Invokable routes for an endpoint.
    Shared bool
    (String) The shared status of the endpoint.
    Subscriptions List<GetApiGatewayEndpointSubscription>
    (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
    AliasUrl string
    (String) The alias URL of an endpoint.
    BasePath string
    (String) The base path of the endpoint.
    EndpointId string
    (String) The ID of the endpoint.
    Managed bool
    (Boolean) If set to true, the endpoint is online. If set to false, the endpoint is offline.
    ManagedUrl string
    (String) The managed URL of an endpoint.
    Name string
    (String) The name of the subscription.
    OpenApiDoc string
    (String) The Open API document of the endpoint.
    Routes []string
    (Strings) Invokable routes for an endpoint.
    Shared bool
    (String) The shared status of the endpoint.
    Subscriptions []GetApiGatewayEndpointSubscriptionType
    (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
    aliasUrl String
    (String) The alias URL of an endpoint.
    basePath String
    (String) The base path of the endpoint.
    endpointId String
    (String) The ID of the endpoint.
    managed Boolean
    (Boolean) If set to true, the endpoint is online. If set to false, the endpoint is offline.
    managedUrl String
    (String) The managed URL of an endpoint.
    name String
    (String) The name of the subscription.
    openApiDoc String
    (String) The Open API document of the endpoint.
    routes List<String>
    (Strings) Invokable routes for an endpoint.
    shared Boolean
    (String) The shared status of the endpoint.
    subscriptions List<GetApiGatewayEndpointSubscription>
    (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
    aliasUrl string
    (String) The alias URL of an endpoint.
    basePath string
    (String) The base path of the endpoint.
    endpointId string
    (String) The ID of the endpoint.
    managed boolean
    (Boolean) If set to true, the endpoint is online. If set to false, the endpoint is offline.
    managedUrl string
    (String) The managed URL of an endpoint.
    name string
    (String) The name of the subscription.
    openApiDoc string
    (String) The Open API document of the endpoint.
    routes string[]
    (Strings) Invokable routes for an endpoint.
    shared boolean
    (String) The shared status of the endpoint.
    subscriptions GetApiGatewayEndpointSubscription[]
    (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
    alias_url str
    (String) The alias URL of an endpoint.
    base_path str
    (String) The base path of the endpoint.
    endpoint_id str
    (String) The ID of the endpoint.
    managed bool
    (Boolean) If set to true, the endpoint is online. If set to false, the endpoint is offline.
    managed_url str
    (String) The managed URL of an endpoint.
    name str
    (String) The name of the subscription.
    open_api_doc str
    (String) The Open API document of the endpoint.
    routes Sequence[str]
    (Strings) Invokable routes for an endpoint.
    shared bool
    (String) The shared status of the endpoint.
    subscriptions Sequence[GetApiGatewayEndpointSubscription]
    (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
    aliasUrl String
    (String) The alias URL of an endpoint.
    basePath String
    (String) The base path of the endpoint.
    endpointId String
    (String) The ID of the endpoint.
    managed Boolean
    (Boolean) If set to true, the endpoint is online. If set to false, the endpoint is offline.
    managedUrl String
    (String) The managed URL of an endpoint.
    name String
    (String) The name of the subscription.
    openApiDoc String
    (String) The Open API document of the endpoint.
    routes List<String>
    (Strings) Invokable routes for an endpoint.
    shared Boolean
    (String) The shared status of the endpoint.
    subscriptions List<Property Map>
    (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.

    GetApiGatewayEndpointSubscription

    ClientId string
    (String) The client ID of a subscription.
    Name string
    (String) The name of the subscription.
    SecretProvided bool
    (Boolean) If set to true, the client secret is provided. If set to false, the client secret is not provided.
    Type string
    (String) The type of subscription. Supported values are bluemix and external.
    ClientId string
    (String) The client ID of a subscription.
    Name string
    (String) The name of the subscription.
    SecretProvided bool
    (Boolean) If set to true, the client secret is provided. If set to false, the client secret is not provided.
    Type string
    (String) The type of subscription. Supported values are bluemix and external.
    clientId String
    (String) The client ID of a subscription.
    name String
    (String) The name of the subscription.
    secretProvided Boolean
    (Boolean) If set to true, the client secret is provided. If set to false, the client secret is not provided.
    type String
    (String) The type of subscription. Supported values are bluemix and external.
    clientId string
    (String) The client ID of a subscription.
    name string
    (String) The name of the subscription.
    secretProvided boolean
    (Boolean) If set to true, the client secret is provided. If set to false, the client secret is not provided.
    type string
    (String) The type of subscription. Supported values are bluemix and external.
    client_id str
    (String) The client ID of a subscription.
    name str
    (String) The name of the subscription.
    secret_provided bool
    (Boolean) If set to true, the client secret is provided. If set to false, the client secret is not provided.
    type str
    (String) The type of subscription. Supported values are bluemix and external.
    clientId String
    (String) The client ID of a subscription.
    name String
    (String) The name of the subscription.
    secretProvided Boolean
    (Boolean) If set to true, the client secret is provided. If set to false, the client secret is not provided.
    type String
    (String) The type of subscription. Supported values are bluemix and external.

    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