Api Portal Args
API portal resource Uses Azure REST API version 2024-01-01-preview. In version 2.x of the Azure Native provider, it used API version 2023-05-01-preview. Other available API versions: 2023-05-01-preview, 2023-07-01-preview, 2023-09-01-preview, 2023-11-01-preview, 2023-12-01, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native appplatform [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
ApiPortals_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var apiPortal = new AzureNative.AppPlatform.ApiPortal("apiPortal", new()
{
ApiPortalName = "default",
Properties = new AzureNative.AppPlatform.Inputs.ApiPortalPropertiesArgs
{
ApiTryOutEnabledState = AzureNative.AppPlatform.ApiPortalApiTryOutEnabledState.Enabled,
GatewayIds = new[]
{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default",
},
Public = true,
},
ResourceGroupName = "myResourceGroup",
ServiceName = "myservice",
Sku = new AzureNative.AppPlatform.Inputs.SkuArgs
{
Capacity = 2,
Name = "E0",
Tier = "Enterprise",
},
});
});
package main
import (
appplatform "github.com/pulumi/pulumi-azure-native-sdk/appplatform/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appplatform.NewApiPortal(ctx, "apiPortal", &appplatform.ApiPortalArgs{
ApiPortalName: pulumi.String("default"),
Properties: &appplatform.ApiPortalPropertiesArgs{
ApiTryOutEnabledState: pulumi.String(appplatform.ApiPortalApiTryOutEnabledStateEnabled),
GatewayIds: pulumi.StringArray{
pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default"),
},
Public: pulumi.Bool(true),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
ServiceName: pulumi.String("myservice"),
Sku: &appplatform.SkuArgs{
Capacity: pulumi.Int(2),
Name: pulumi.String("E0"),
Tier: pulumi.String("Enterprise"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.appplatform.ApiPortal;
import com.pulumi.azurenative.appplatform.ApiPortalArgs;
import com.pulumi.azurenative.appplatform.inputs.ApiPortalPropertiesArgs;
import com.pulumi.azurenative.appplatform.inputs.SkuArgs;
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) {
var apiPortal = new ApiPortal("apiPortal", ApiPortalArgs.builder()
.apiPortalName("default")
.properties(ApiPortalPropertiesArgs.builder()
.apiTryOutEnabledState("Enabled")
.gatewayIds("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default")
.public_(true)
.build())
.resourceGroupName("myResourceGroup")
.serviceName("myservice")
.sku(SkuArgs.builder()
.capacity(2)
.name("E0")
.tier("Enterprise")
.build())
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:appplatform:ApiPortal default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}
Constructors
Properties
The name of API portal.
API portal properties payload
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
The name of the Service resource.