![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.apimanagement.kotlin.GatewayApiArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.apimanagement.kotlin
import com.pulumi.azure.apimanagement.GatewayApiArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a API Management Gateway API.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.apimanagement.getService({
* name: "example-api",
* resourceGroupName: "example-resources",
* });
* const exampleGetApi = Promise.all([example, example]).then(([example, example1]) => azure.apimanagement.getApi({
* name: "search-api",
* apiManagementName: example.name,
* resourceGroupName: example1.resourceGroupName,
* revision: "2",
* }));
* const exampleGetGateway = example.then(example => azure.apimanagement.getGateway({
* name: "example-gateway",
* apiManagementId: example.id,
* }));
* const exampleGatewayApi = new azure.apimanagement.GatewayApi("example", {
* gatewayId: exampleGetGateway.then(exampleGetGateway => exampleGetGateway.id),
* apiId: exampleGetApi.then(exampleGetApi => exampleGetApi.id),
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.apimanagement.get_service(name="example-api",
* resource_group_name="example-resources")
* example_get_api = azure.apimanagement.get_api(name="search-api",
* api_management_name=example.name,
* resource_group_name=example.resource_group_name,
* revision="2")
* example_get_gateway = azure.apimanagement.get_gateway(name="example-gateway",
* api_management_id=example.id)
* example_gateway_api = azure.apimanagement.GatewayApi("example",
* gateway_id=example_get_gateway.id,
* api_id=example_get_api.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.ApiManagement.GetService.Invoke(new()
* {
* Name = "example-api",
* ResourceGroupName = "example-resources",
* });
* var exampleGetApi = Azure.ApiManagement.GetApi.Invoke(new()
* {
* Name = "search-api",
* ApiManagementName = example.Apply(getServiceResult => getServiceResult.Name),
* ResourceGroupName = example.Apply(getServiceResult => getServiceResult.ResourceGroupName),
* Revision = "2",
* });
* var exampleGetGateway = Azure.ApiManagement.GetGateway.Invoke(new()
* {
* Name = "example-gateway",
* ApiManagementId = example.Apply(getServiceResult => getServiceResult.Id),
* });
* var exampleGatewayApi = new Azure.ApiManagement.GatewayApi("example", new()
* {
* GatewayId = exampleGetGateway.Apply(getGatewayResult => getGatewayResult.Id),
* ApiId = exampleGetApi.Apply(getApiResult => getApiResult.Id),
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
* Name: "example-api",
* ResourceGroupName: "example-resources",
* }, nil)
* if err != nil {
* return err
* }
* exampleGetApi, err := apimanagement.LookupApi(ctx, &apimanagement.LookupApiArgs{
* Name: "search-api",
* ApiManagementName: example.Name,
* ResourceGroupName: example.ResourceGroupName,
* Revision: "2",
* }, nil)
* if err != nil {
* return err
* }
* exampleGetGateway, err := apimanagement.LookupGateway(ctx, &apimanagement.LookupGatewayArgs{
* Name: "example-gateway",
* ApiManagementId: example.Id,
* }, nil)
* if err != nil {
* return err
* }
* _, err = apimanagement.NewGatewayApi(ctx, "example", &apimanagement.GatewayApiArgs{
* GatewayId: pulumi.String(exampleGetGateway.Id),
* ApiId: pulumi.String(exampleGetApi.Id),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.GetServiceArgs;
* import com.pulumi.azure.apimanagement.inputs.GetApiArgs;
* import com.pulumi.azure.apimanagement.inputs.GetGatewayArgs;
* import com.pulumi.azure.apimanagement.GatewayApi;
* import com.pulumi.azure.apimanagement.GatewayApiArgs;
* 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.getService(GetServiceArgs.builder()
* .name("example-api")
* .resourceGroupName("example-resources")
* .build());
* final var exampleGetApi = ApimanagementFunctions.getApi(GetApiArgs.builder()
* .name("search-api")
* .apiManagementName(example.applyValue(getServiceResult -> getServiceResult.name()))
* .resourceGroupName(example.applyValue(getServiceResult -> getServiceResult.resourceGroupName()))
* .revision("2")
* .build());
* final var exampleGetGateway = ApimanagementFunctions.getGateway(GetGatewayArgs.builder()
* .name("example-gateway")
* .apiManagementId(example.applyValue(getServiceResult -> getServiceResult.id()))
* .build());
* var exampleGatewayApi = new GatewayApi("exampleGatewayApi", GatewayApiArgs.builder()
* .gatewayId(exampleGetGateway.applyValue(getGatewayResult -> getGatewayResult.id()))
* .apiId(exampleGetApi.applyValue(getApiResult -> getApiResult.id()))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleGatewayApi:
* type: azure:apimanagement:GatewayApi
* name: example
* properties:
* gatewayId: ${exampleGetGateway.id}
* apiId: ${exampleGetApi.id}
* variables:
* example:
* fn::invoke:
* Function: azure:apimanagement:getService
* Arguments:
* name: example-api
* resourceGroupName: example-resources
* exampleGetApi:
* fn::invoke:
* Function: azure:apimanagement:getApi
* Arguments:
* name: search-api
* apiManagementName: ${example.name}
* resourceGroupName: ${example.resourceGroupName}
* revision: '2'
* exampleGetGateway:
* fn::invoke:
* Function: azure:apimanagement:getGateway
* Arguments:
* name: example-gateway
* apiManagementId: ${example.id}
* ```
*
* ## Import
* API Management Gateway APIs can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:apimanagement/gatewayApi:GatewayApi example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.ApiManagement/service/service1/gateways/gateway1/apis/api1
* ```
* @property apiId The Identifier of the API Management API within the API Management Service. Changing this forces a new API Management Gateway API to be created.
* @property gatewayId The Identifier for the API Management Gateway. Changing this forces a new API Management Gateway API to be created.
*/
public data class GatewayApiArgs(
public val apiId: Output? = null,
public val gatewayId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.apimanagement.GatewayApiArgs =
com.pulumi.azure.apimanagement.GatewayApiArgs.builder()
.apiId(apiId?.applyValue({ args0 -> args0 }))
.gatewayId(gatewayId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [GatewayApiArgs].
*/
@PulumiTagMarker
public class GatewayApiArgsBuilder internal constructor() {
private var apiId: Output? = null
private var gatewayId: Output? = null
/**
* @param value The Identifier of the API Management API within the API Management Service. Changing this forces a new API Management Gateway API to be created.
*/
@JvmName("ypfwuybechbthcfv")
public suspend fun apiId(`value`: Output) {
this.apiId = value
}
/**
* @param value The Identifier for the API Management Gateway. Changing this forces a new API Management Gateway API to be created.
*/
@JvmName("ikpujjtarjieahsn")
public suspend fun gatewayId(`value`: Output) {
this.gatewayId = value
}
/**
* @param value The Identifier of the API Management API within the API Management Service. Changing this forces a new API Management Gateway API to be created.
*/
@JvmName("ixrmuqogdqqtvmud")
public suspend fun apiId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiId = mapped
}
/**
* @param value The Identifier for the API Management Gateway. Changing this forces a new API Management Gateway API to be created.
*/
@JvmName("kabxpqjhvjmdrbcc")
public suspend fun gatewayId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gatewayId = mapped
}
internal fun build(): GatewayApiArgs = GatewayApiArgs(
apiId = apiId,
gatewayId = gatewayId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy