get Gateway
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,
}));
Content copied to clipboard
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)
Content copied to clipboard
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),
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/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
})
}
Content copied to clipboard
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.id())
.build());
}
}
Content copied to clipboard
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}
Content copied to clipboard
API Providers
This data source uses the following Azure API Providers:
Microsoft.ApiManagement
: 2022-08-01
Return
A collection of values returned by getGateway.
Parameters
argument
A collection of arguments for invoking getGateway.
Return
A collection of values returned by getGateway.
Parameters
api Management Id
The ID of the API Management Service in which the Gateway exists.
name
The name of the API Management Gateway.
See also
Return
A collection of values returned by getGateway.
Parameters
argument
Builder for com.pulumi.azure.apimanagement.kotlin.inputs.GetGatewayPlainArgs.