1. Packages
  2. Azure Classic
  3. API Docs
  4. connections
  5. getManagedApi

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.connections.getManagedApi

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    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/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
    	})
    }
    
    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:

    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
    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.72.0 published on Monday, Apr 15, 2024 by Pulumi