GetApi
Use this data source to access information about an existing API Management API.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.ApiManagement.GetApi.InvokeAsync(new Azure.ApiManagement.GetApiArgs
{
Name = "search-api",
ApiManagementName = "search-api-management",
ResourceGroupName = "search-service",
Revision = "2",
}));
this.ApiManagementApiId = example.Apply(example => example.Id);
}
[Output("apiManagementApiId")]
public Output<string> ApiManagementApiId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/apimanagement"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := apimanagement.LookupApi(ctx, &apimanagement.LookupApiArgs{
Name: "search-api",
ApiManagementName: "search-api-management",
ResourceGroupName: "search-service",
Revision: "2",
}, nil)
if err != nil {
return err
}
ctx.Export("apiManagementApiId", example.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.apimanagement.get_api(name="search-api",
api_management_name="search-api-management",
resource_group_name="search-service",
revision="2")
pulumi.export("apiManagementApiId", example.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.apimanagement.getApi({
name: "search-api",
apiManagementName: "search-api-management",
resourceGroupName: "search-service",
revision: "2",
});
export const apiManagementApiId = example.then(example => example.id);Using GetApi
function getApi(args: GetApiArgs, opts?: InvokeOptions): Promise<GetApiResult>function get_api(api_management_name=None, name=None, resource_group_name=None, revision=None, opts=None)func LookupApi(ctx *Context, args *LookupApiArgs, opts ...InvokeOption) (*LookupApiResult, error)Note: This function is named
LookupApiin the Go SDK.
public static class GetApi {
public static Task<GetApiResult> InvokeAsync(GetApiArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Api
Management stringName The name of the API Management Service in which the API Management API exists.
- Name string
The name of the API Management API.
- Resource
Group stringName The Name of the Resource Group in which the API Management Service exists.
- Revision string
The Revision of the API Management API.
- Api
Management stringName The name of the API Management Service in which the API Management API exists.
- Name string
The name of the API Management API.
- Resource
Group stringName The Name of the Resource Group in which the API Management Service exists.
- Revision string
The Revision of the API Management API.
- api
Management stringName The name of the API Management Service in which the API Management API exists.
- name string
The name of the API Management API.
- resource
Group stringName The Name of the Resource Group in which the API Management Service exists.
- revision string
The Revision of the API Management API.
- api_
management_ strname The name of the API Management Service in which the API Management API exists.
- name str
The name of the API Management API.
- resource_
group_ strname The Name of the Resource Group in which the API Management Service exists.
- revision str
The Revision of the API Management API.
GetApi Result
The following output properties are available:
- Api
Management stringName - Description string
A description of the API Management API, which may include HTML formatting tags.
- Display
Name string The display name of the API.
- Id string
The provider-assigned unique ID for this managed resource.
- Is
Current bool Is this the current API Revision?
- Is
Online bool Is this API Revision online/accessible via the Gateway?
- Name string
- Path string
The Path for this API Management API.
- Protocols List<string>
A list of protocols the operations in this API can be invoked.
- Resource
Group stringName - Revision string
- Service
Url string Absolute URL of the backend service implementing this API.
- Soap
Pass boolThrough Should this API expose a SOAP frontend, rather than a HTTP frontend?
- Subscription
Key List<GetParameter Names Api Subscription Key Parameter Name> A
subscription_key_parameter_namesblock as documented below.- Subscription
Required bool Should this API require a subscription key?
- Version string
The Version number of this API, if this API is versioned.
- Version
Set stringId The ID of the Version Set which this API is associated with.
- Api
Management stringName - Description string
A description of the API Management API, which may include HTML formatting tags.
- Display
Name string The display name of the API.
- Id string
The provider-assigned unique ID for this managed resource.
- Is
Current bool Is this the current API Revision?
- Is
Online bool Is this API Revision online/accessible via the Gateway?
- Name string
- Path string
The Path for this API Management API.
- Protocols []string
A list of protocols the operations in this API can be invoked.
- Resource
Group stringName - Revision string
- Service
Url string Absolute URL of the backend service implementing this API.
- Soap
Pass boolThrough Should this API expose a SOAP frontend, rather than a HTTP frontend?
- Subscription
Key []GetParameter Names Api Subscription Key Parameter Name A
subscription_key_parameter_namesblock as documented below.- Subscription
Required bool Should this API require a subscription key?
- Version string
The Version number of this API, if this API is versioned.
- Version
Set stringId The ID of the Version Set which this API is associated with.
- api
Management stringName - description string
A description of the API Management API, which may include HTML formatting tags.
- display
Name string The display name of the API.
- id string
The provider-assigned unique ID for this managed resource.
- is
Current boolean Is this the current API Revision?
- is
Online boolean Is this API Revision online/accessible via the Gateway?
- name string
- path string
The Path for this API Management API.
- protocols string[]
A list of protocols the operations in this API can be invoked.
- resource
Group stringName - revision string
- service
Url string Absolute URL of the backend service implementing this API.
- soap
Pass booleanThrough Should this API expose a SOAP frontend, rather than a HTTP frontend?
- subscription
Key GetParameter Names Api Subscription Key Parameter Name[] A
subscription_key_parameter_namesblock as documented below.- subscription
Required boolean Should this API require a subscription key?
- version string
The Version number of this API, if this API is versioned.
- version
Set stringId The ID of the Version Set which this API is associated with.
- api_
management_ strname - description str
A description of the API Management API, which may include HTML formatting tags.
- display_
name str The display name of the API.
- id str
The provider-assigned unique ID for this managed resource.
- is_
current bool Is this the current API Revision?
- is_
online bool Is this API Revision online/accessible via the Gateway?
- name str
- path str
The Path for this API Management API.
- protocols List[str]
A list of protocols the operations in this API can be invoked.
- resource_
group_ strname - revision str
- service_
url str Absolute URL of the backend service implementing this API.
- soap_
pass_ boolthrough Should this API expose a SOAP frontend, rather than a HTTP frontend?
- subscription_
key_ List[Getparameter_ names Api Subscription Key Parameter Name] A
subscription_key_parameter_namesblock as documented below.- subscription_
required bool Should this API require a subscription key?
- version str
The Version number of this API, if this API is versioned.
- version_
set_ strid The ID of the Version Set which this API is associated with.
Supporting Types
GetApiSubscriptionKeyParameterName
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.