1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. apimanagement
  6. getGateway

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to access information about an existing API Management Gateway.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleService = Output.Create(Azure.ApiManagement.GetService.InvokeAsync(new Azure.ApiManagement.GetServiceArgs
            {
                Name = "example-apim",
                ResourceGroupName = "example-rg",
            }));
            var exampleGateway = exampleService.Apply(exampleService => Output.Create(Azure.ApiManagement.GetGateway.InvokeAsync(new Azure.ApiManagement.GetGatewayArgs
            {
                Name = "example-api-gateway",
                ApiManagementId = exampleService.Id,
            })));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/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
    	})
    }
    

    Example coming soon!

    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,
    }));
    
    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)
    

    Example coming soon!

    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)
    public static Output<GetGatewayResult> getGateway(GetGatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:apimanagement/getGateway:getGateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApiManagementId string
    The ID of the API Management Service in which the Gateway exists.
    Name string
    The name of the API Management Gateway.
    ApiManagementId string
    The ID of the API Management Service in which the Gateway exists.
    Name string
    The name of the API Management Gateway.
    apiManagementId String
    The ID of the API Management Service in which the Gateway exists.
    name String
    The name of the API Management Gateway.
    apiManagementId string
    The ID of the API Management Service in which the Gateway exists.
    name string
    The name of the API Management Gateway.
    api_management_id str
    The ID of the API Management Service in which the Gateway exists.
    name str
    The name of the API Management Gateway.
    apiManagementId String
    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:

    ApiManagementId string
    Description string
    The description of the API Management Gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    LocationDatas List<GetGatewayLocationData>
    A location_data block as documented below.
    Name string
    A canonical name for the geographic or physical location.
    ApiManagementId string
    Description string
    The description of the API Management Gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    LocationDatas []GetGatewayLocationData
    A location_data block as documented below.
    Name string
    A canonical name for the geographic or physical location.
    apiManagementId String
    description String
    The description of the API Management Gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    locationDatas List<GetGatewayLocationData>
    A location_data block as documented below.
    name String
    A canonical name for the geographic or physical location.
    apiManagementId string
    description string
    The description of the API Management Gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    locationDatas GetGatewayLocationData[]
    A location_data block as documented below.
    name string
    A canonical name for the geographic or physical location.
    api_management_id str
    description str
    The description of the API Management Gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    location_datas Sequence[GetGatewayLocationData]
    A location_data block as documented below.
    name str
    A canonical name for the geographic or physical location.
    apiManagementId String
    description String
    The description of the API Management Gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    locationDatas List<Property Map>
    A location_data block as documented below.
    name String
    A canonical name for the geographic or physical location.

    Supporting Types

    GetGatewayLocationData

    City string
    The city or locality where the resource is located.
    District string
    The district, state, or province where the resource is located.
    Name string
    The name of the API Management Gateway.
    Region string
    City string
    The city or locality where the resource is located.
    District string
    The district, state, or province where the resource is located.
    Name string
    The name of the API Management Gateway.
    Region string
    city String
    The city or locality where the resource is located.
    district String
    The district, state, or province where the resource is located.
    name String
    The name of the API Management Gateway.
    region String
    city string
    The city or locality where the resource is located.
    district string
    The district, state, or province where the resource is located.
    name string
    The name of the API Management Gateway.
    region string
    city str
    The city or locality where the resource is located.
    district str
    The district, state, or province where the resource is located.
    name str
    The name of the API Management Gateway.
    region str
    city String
    The city or locality where the resource is located.
    district String
    The district, state, or province where the resource is located.
    name String
    The name of the API Management Gateway.
    region String

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial