get Managed Api
Uses this data source to access information about an existing Managed API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.connections.getManagedApi({
name: "servicebus",
location: "West Europe",
});
export const id = example.then(example => example.id);
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.connections.get_managed_api(name="servicebus",
location="West Europe")
pulumi.export("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.Connections.GetManagedApi.Invoke(new()
{
Name = "servicebus",
Location = "West Europe",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getManagedApiResult => getManagedApiResult.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/connections"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := connections.GetManagedApi(ctx, &connections.GetManagedApiArgs{
Name: "servicebus",
Location: "West Europe",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
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.connections.ConnectionsFunctions;
import com.pulumi.azure.connections.inputs.GetManagedApiArgs;
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 = ConnectionsFunctions.getManagedApi(GetManagedApiArgs.builder()
.name("servicebus")
.location("West Europe")
.build());
ctx.export("id", example.applyValue(getManagedApiResult -> getManagedApiResult.id()));
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:connections:getManagedApi
arguments:
name: servicebus
location: West Europe
outputs:
id: ${example.id}
Content copied to clipboard
Return
A collection of values returned by getManagedApi.
Parameters
argument
A collection of arguments for invoking getManagedApi.
Return
A collection of values returned by getManagedApi.
Parameters
location
The Azure location for this Managed API.
name
Specifies the name of the Managed API.
See also
suspend fun getManagedApi(argument: suspend GetManagedApiPlainArgsBuilder.() -> Unit): GetManagedApiResult
Return
A collection of values returned by getManagedApi.
Parameters
argument
Builder for com.pulumi.azure.connections.kotlin.inputs.GetManagedApiPlainArgs.