ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud
ibm.getApiGateway
Explore with Pulumi AI
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:
- Service
Instance stringCrn - The CRN of the API Gateway service instance.
- Id string
- Service
Instance stringCrn - The CRN of the API Gateway service instance.
- Id string
- service
Instance StringCrn - The CRN of the API Gateway service instance.
- id String
- service
Instance stringCrn - The CRN of the API Gateway service instance.
- id string
- service_
instance_ strcrn - The CRN of the API Gateway service instance.
- id str
- service
Instance StringCrn - The CRN of the API Gateway service instance.
- id String
getApiGateway Result
The following output properties are available:
- Endpoints
List<Get
Api Gateway Endpoint> - (List) A list of API Gateway endpoints that are associated with the service instance.
- Id string
- Service
Instance stringCrn
- Endpoints
[]Get
Api Gateway Endpoint Type - (List) A list of API Gateway endpoints that are associated with the service instance.
- Id string
- Service
Instance stringCrn
- endpoints
List<Get
Api Gateway Endpoint> - (List) A list of API Gateway endpoints that are associated with the service instance.
- id String
- service
Instance StringCrn
- endpoints
Get
Api Gateway Endpoint[] - (List) A list of API Gateway endpoints that are associated with the service instance.
- id string
- service
Instance stringCrn
- endpoints
Sequence[Get
Api Gateway Endpoint] - (List) A list of API Gateway endpoints that are associated with the service instance.
- id str
- service_
instance_ strcrn
- endpoints List<Property Map>
- (List) A list of API Gateway endpoints that are associated with the service instance.
- id String
- service
Instance StringCrn
Supporting Types
GetApiGatewayEndpoint
- Alias
Url string - (String) The alias URL of an endpoint.
- Base
Path string - (String) The base path of the endpoint.
- Endpoint
Id 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.
- Managed
Url string - (String) The managed URL of an endpoint.
- Name string
- (String) The name of the subscription.
- Open
Api stringDoc - (String) The Open API document of the endpoint.
- Routes List<string>
- (Strings) Invokable routes for an endpoint.
- bool
- (String) The shared status of the endpoint.
- Subscriptions
List<Get
Api Gateway Endpoint Subscription> - (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
- Alias
Url string - (String) The alias URL of an endpoint.
- Base
Path string - (String) The base path of the endpoint.
- Endpoint
Id 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.
- Managed
Url string - (String) The managed URL of an endpoint.
- Name string
- (String) The name of the subscription.
- Open
Api stringDoc - (String) The Open API document of the endpoint.
- Routes []string
- (Strings) Invokable routes for an endpoint.
- bool
- (String) The shared status of the endpoint.
- Subscriptions
[]Get
Api Gateway Endpoint Subscription Type - (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
- alias
Url String - (String) The alias URL of an endpoint.
- base
Path String - (String) The base path of the endpoint.
- endpoint
Id 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.
- managed
Url String - (String) The managed URL of an endpoint.
- name String
- (String) The name of the subscription.
- open
Api StringDoc - (String) The Open API document of the endpoint.
- routes List<String>
- (Strings) Invokable routes for an endpoint.
- Boolean
- (String) The shared status of the endpoint.
- subscriptions
List<Get
Api Gateway Endpoint Subscription> - (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
- alias
Url string - (String) The alias URL of an endpoint.
- base
Path string - (String) The base path of the endpoint.
- endpoint
Id 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.
- managed
Url string - (String) The managed URL of an endpoint.
- name string
- (String) The name of the subscription.
- open
Api stringDoc - (String) The Open API document of the endpoint.
- routes string[]
- (Strings) Invokable routes for an endpoint.
- boolean
- (String) The shared status of the endpoint.
- subscriptions
Get
Api Gateway Endpoint Subscription[] - (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_ strdoc - (String) The Open API document of the endpoint.
- routes Sequence[str]
- (Strings) Invokable routes for an endpoint.
- bool
- (String) The shared status of the endpoint.
- subscriptions
Sequence[Get
Api Gateway Endpoint Subscription] - (List of endpoint subscriptions) A list of subscriptions that you created for your endpoint.
- alias
Url String - (String) The alias URL of an endpoint.
- base
Path String - (String) The base path of the endpoint.
- endpoint
Id 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.
- managed
Url String - (String) The managed URL of an endpoint.
- name String
- (String) The name of the subscription.
- open
Api StringDoc - (String) The Open API document of the endpoint.
- routes List<String>
- (Strings) Invokable routes for an endpoint.
- 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
- Client
Id string - (String) The client ID of a subscription.
- Name string
- (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 string
- (String) The type of subscription. Supported values are
bluemix
andexternal
.
- Client
Id string - (String) The client ID of a subscription.
- Name string
- (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 string
- (String) The type of subscription. Supported values are
bluemix
andexternal
.
- client
Id String - (String) The client ID of a subscription.
- name String
- (String) The name of the subscription.
- secret
Provided 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
andexternal
.
- client
Id string - (String) The client ID of a subscription.
- name string
- (String) The name of the subscription.
- secret
Provided 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
andexternal
.
- 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
andexternal
.
- client
Id String - (String) The client ID of a subscription.
- name String
- (String) The name of the subscription.
- secret
Provided 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
andexternal
.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.