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

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.apimanagement.getGateway

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.apimanagement.getService({
        name: "example-apim",
        resourceGroupName: "example-rg",
    });
    const exampleGetGateway = example.then(example => azure.apimanagement.getGateway({
        name: "example-api-gateway",
        apiManagementId: example.id,
    }));
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.apimanagement.get_service(name="example-apim",
        resource_group_name="example-rg")
    example_get_gateway = azure.apimanagement.get_gateway(name="example-api-gateway",
        api_management_id=example.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 {
    		example, 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: example.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.ApiManagement.GetService.Invoke(new()
        {
            Name = "example-apim",
            ResourceGroupName = "example-rg",
        });
    
        var exampleGetGateway = Azure.ApiManagement.GetGateway.Invoke(new()
        {
            Name = "example-api-gateway",
            ApiManagementId = example.Apply(getServiceResult => getServiceResult.Id),
        });
    
    });
    
    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 example = ApimanagementFunctions.getService(GetServiceArgs.builder()
                .name("example-apim")
                .resourceGroupName("example-rg")
                .build());
    
            final var exampleGetGateway = ApimanagementFunctions.getGateway(GetGatewayArgs.builder()
                .name("example-api-gateway")
                .apiManagementId(example.applyValue(getServiceResult -> getServiceResult.id()))
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:apimanagement:getService
          Arguments:
            name: example-apim
            resourceGroupName: example-rg
      exampleGetGateway:
        fn::invoke:
          Function: azure:apimanagement:getGateway
          Arguments:
            name: example-api-gateway
            apiManagementId: ${example.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:

    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.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi