We recommend using Azure Native.
azure.apimanagement.getGateway
Explore with Pulumi AI
Use this data source to access information about an existing API Management Gateway.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleService = Azure.ApiManagement.GetService.Invoke(new()
{
Name = "example-apim",
ResourceGroupName = "example-rg",
});
var exampleGateway = Azure.ApiManagement.GetGateway.Invoke(new()
{
Name = "example-api-gateway",
ApiManagementId = exampleService.Apply(getServiceResult => getServiceResult.Id),
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleService, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
Name: "example-apim",
ResourceGroupName: "example-rg",
}, nil)
if err != nil {
return err
}
_, err = apimanagement.LookupGateway(ctx, &apimanagement.LookupGatewayArgs{
Name: "example-api-gateway",
ApiManagementId: exampleService.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.apimanagement.ApimanagementFunctions;
import com.pulumi.azure.apimanagement.inputs.GetServiceArgs;
import com.pulumi.azure.apimanagement.inputs.GetGatewayArgs;
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 exampleService = ApimanagementFunctions.getService(GetServiceArgs.builder()
.name("example-apim")
.resourceGroupName("example-rg")
.build());
final var exampleGateway = ApimanagementFunctions.getGateway(GetGatewayArgs.builder()
.name("example-api-gateway")
.apiManagementId(exampleService.applyValue(getServiceResult -> getServiceResult.id()))
.build());
}
}
import pulumi
import pulumi_azure as azure
example_service = azure.apimanagement.get_service(name="example-apim",
resource_group_name="example-rg")
example_gateway = azure.apimanagement.get_gateway(name="example-api-gateway",
api_management_id=example_service.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleService = azure.apimanagement.getService({
name: "example-apim",
resourceGroupName: "example-rg",
});
const exampleGateway = exampleService.then(exampleService => azure.apimanagement.getGateway({
name: "example-api-gateway",
apiManagementId: exampleService.id,
}));
variables:
exampleService:
fn::invoke:
Function: azure:apimanagement:getService
Arguments:
name: example-apim
resourceGroupName: example-rg
exampleGateway:
fn::invoke:
Function: azure:apimanagement:getGateway
Arguments:
name: example-api-gateway
apiManagementId: ${exampleService.id}
Using getGateway
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 getGateway(args: GetGatewayArgs, opts?: InvokeOptions): Promise<GetGatewayResult>
function getGatewayOutput(args: GetGatewayOutputArgs, opts?: InvokeOptions): Output<GetGatewayResult>
def get_gateway(api_management_id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGatewayResult
def get_gateway_output(api_management_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGatewayResult]
func LookupGateway(ctx *Context, args *LookupGatewayArgs, opts ...InvokeOption) (*LookupGatewayResult, error)
func LookupGatewayOutput(ctx *Context, args *LookupGatewayOutputArgs, opts ...InvokeOption) LookupGatewayResultOutput
> Note: This function is named LookupGateway
in the Go SDK.
public static class GetGateway
{
public static Task<GetGatewayResult> InvokeAsync(GetGatewayArgs args, InvokeOptions? opts = null)
public static Output<GetGatewayResult> Invoke(GetGatewayInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGatewayResult> getGateway(GetGatewayArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:apimanagement/getGateway:getGateway
arguments:
# arguments dictionary
The following arguments are supported:
- Api
Management stringId The ID of the API Management Service in which the Gateway exists.
- Name string
The name of the API Management Gateway.
- Api
Management stringId The ID of the API Management Service in which the Gateway exists.
- Name string
The name of the API Management Gateway.
- api
Management StringId The ID of the API Management Service in which the Gateway exists.
- name String
The name of the API Management Gateway.
- api
Management stringId The ID of the API Management Service in which the Gateway exists.
- name string
The name of the API Management Gateway.
- api_
management_ strid The ID of the API Management Service in which the Gateway exists.
- name str
The name of the API Management Gateway.
- api
Management StringId The ID of the API Management Service in which the Gateway exists.
- name String
The name of the API Management Gateway.
getGateway Result
The following output properties are available:
- Api
Management stringId - Description string
The description of the API Management Gateway.
- Id string
The provider-assigned unique ID for this managed resource.
- Location
Datas List<GetGateway Location Data> A
location_data
block as documented below.- Name string
A canonical name for the geographic or physical location.
- Api
Management stringId - Description string
The description of the API Management Gateway.
- Id string
The provider-assigned unique ID for this managed resource.
- Location
Datas []GetGateway Location Data A
location_data
block as documented below.- Name string
A canonical name for the geographic or physical location.
- api
Management StringId - description String
The description of the API Management Gateway.
- id String
The provider-assigned unique ID for this managed resource.
- location
Datas List<GetGateway Location Data> A
location_data
block as documented below.- name String
A canonical name for the geographic or physical location.
- api
Management stringId - description string
The description of the API Management Gateway.
- id string
The provider-assigned unique ID for this managed resource.
- location
Datas GetGateway Location Data[] A
location_data
block as documented below.- name string
A canonical name for the geographic or physical location.
- api_
management_ strid - description str
The description of the API Management Gateway.
- id str
The provider-assigned unique ID for this managed resource.
- location_
datas Sequence[GetGateway Location Data] A
location_data
block as documented below.- name str
A canonical name for the geographic or physical location.
- api
Management StringId - description String
The description of the API Management Gateway.
- id String
The provider-assigned unique ID for this managed resource.
- location
Datas List<Property Map> A
location_data
block as documented below.- name String
A canonical name for the geographic or physical location.
Supporting Types
GetGatewayLocationData
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.