We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.connections.getManagedApi
Explore with Pulumi AI
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);
import pulumi
import pulumi_azure as azure
example = azure.connections.get_managed_api(name="servicebus",
location="West Europe")
pulumi.export("id", example.id)
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
})
}
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),
};
});
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()));
}
}
variables:
example:
fn::invoke:
Function: azure:connections:getManagedApi
Arguments:
name: servicebus
location: West Europe
outputs:
id: ${example.id}
Using getManagedApi
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 getManagedApi(args: GetManagedApiArgs, opts?: InvokeOptions): Promise<GetManagedApiResult>
function getManagedApiOutput(args: GetManagedApiOutputArgs, opts?: InvokeOptions): Output<GetManagedApiResult>
def get_managed_api(location: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedApiResult
def get_managed_api_output(location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagedApiResult]
func GetManagedApi(ctx *Context, args *GetManagedApiArgs, opts ...InvokeOption) (*GetManagedApiResult, error)
func GetManagedApiOutput(ctx *Context, args *GetManagedApiOutputArgs, opts ...InvokeOption) GetManagedApiResultOutput
> Note: This function is named GetManagedApi
in the Go SDK.
public static class GetManagedApi
{
public static Task<GetManagedApiResult> InvokeAsync(GetManagedApiArgs args, InvokeOptions? opts = null)
public static Output<GetManagedApiResult> Invoke(GetManagedApiInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedApiResult> getManagedApi(GetManagedApiArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:connections/getManagedApi:getManagedApi
arguments:
# arguments dictionary
The following arguments are supported:
getManagedApi Result
The following output properties are available:
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.