getApi

suspend fun getApi(argument: GetApiPlainArgs): GetApiResult

Use this data source to access information about an existing API Management API.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.apimanagement.ApimanagementFunctions;
import com.pulumi.azure.apimanagement.inputs.GetApiArgs;
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 = ApimanagementFunctions.getApi(GetApiArgs.builder()
.name("search-api")
.apiManagementName("search-api-management")
.resourceGroupName("search-service")
.revision("2")
.build());
ctx.export("apiManagementApiId", example.applyValue(getApiResult -> getApiResult.id()));
}
}

Return

A collection of values returned by getApi.

Parameters

argument

A collection of arguments for invoking getApi.


suspend fun getApi(apiManagementName: String, name: String, resourceGroupName: String, revision: String): GetApiResult

Return

A collection of values returned by getApi.

See also

Parameters

apiManagementName

The name of the API Management Service in which the API Management API exists.

name

The name of the API Management API.

resourceGroupName

The Name of the Resource Group in which the API Management Service exists.

revision

The Revision of the API Management API.


suspend fun getApi(argument: suspend GetApiPlainArgsBuilder.() -> Unit): GetApiResult

Return

A collection of values returned by getApi.

See also

Parameters

argument

Builder for com.pulumi.azure.apimanagement.kotlin.inputs.GetApiPlainArgs.