Azure Classic

v5.24.0 published on Wednesday, Nov 9, 2022 by Pulumi

getManagedApi

Uses this data source to access information about an existing Managed API.

Example Usage

using System.Collections.Generic;
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 main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/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
	})
}
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()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.connections.get_managed_api(name="servicebus",
    location="West Europe")
pulumi.export("id", example.id)
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);
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:

Location string

The Azure location for this Managed API.

Name string

Specifies the name of the Managed API.

Location string

The Azure location for this Managed API.

Name string

Specifies the name of the Managed API.

location String

The Azure location for this Managed API.

name String

Specifies the name of the Managed API.

location string

The Azure location for this Managed API.

name string

Specifies the name of the Managed API.

location str

The Azure location for this Managed API.

name str

Specifies the name of the Managed API.

location String

The Azure location for this Managed API.

name String

Specifies the name of the Managed API.

getManagedApi Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Location string
Name string
Tags Dictionary<string, string>
Id string

The provider-assigned unique ID for this managed resource.

Location string
Name string
Tags map[string]string
id String

The provider-assigned unique ID for this managed resource.

location String
name String
tags Map<String,String>
id string

The provider-assigned unique ID for this managed resource.

location string
name string
tags {[key: string]: string}
id str

The provider-assigned unique ID for this managed resource.

location str
name str
tags Mapping[str, str]
id String

The provider-assigned unique ID for this managed resource.

location String
name String
tags Map<String>

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.