Gateway Args
Spring Cloud Gateway 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
Gateways_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var gateway = new AzureNative.AppPlatform.Gateway("gateway", new()
{
GatewayName = "default",
Properties = new AzureNative.AppPlatform.Inputs.GatewayPropertiesArgs
{
Apms = new[]
{
new AzureNative.AppPlatform.Inputs.ApmReferenceArgs
{
ResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apms/myappinsights",
},
},
Public = true,
ResourceRequests = new AzureNative.AppPlatform.Inputs.GatewayResourceRequestsArgs
{
Cpu = "1",
Memory = "1G",
},
ResponseCacheProperties = new AzureNative.AppPlatform.Inputs.GatewayLocalResponseCachePerRoutePropertiesArgs
{
ResponseCacheType = "LocalCachePerRoute",
Size = "5MB",
TimeToLive = "300s",
},
},
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.NewGateway(ctx, "gateway", &appplatform.GatewayArgs{
GatewayName: pulumi.String("default"),
Properties: &appplatform.GatewayPropertiesArgs{
Apms: appplatform.ApmReferenceArray{
&appplatform.ApmReferenceArgs{
ResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apms/myappinsights"),
},
},
Public: pulumi.Bool(true),
ResourceRequests: &appplatform.GatewayResourceRequestsArgs{
Cpu: pulumi.String("1"),
Memory: pulumi.String("1G"),
},
ResponseCacheProperties: appplatform.GatewayLocalResponseCachePerRouteProperties{
ResponseCacheType: "LocalCachePerRoute",
Size: "5MB",
TimeToLive: "300s",
},
},
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.Gateway;
import com.pulumi.azurenative.appplatform.GatewayArgs;
import com.pulumi.azurenative.appplatform.inputs.GatewayPropertiesArgs;
import com.pulumi.azurenative.appplatform.inputs.GatewayResourceRequestsArgs;
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 gateway = new Gateway("gateway", GatewayArgs.builder()
.gatewayName("default")
.properties(GatewayPropertiesArgs.builder()
.apms(ApmReferenceArgs.builder()
.resourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apms/myappinsights")
.build())
.public_(true)
.resourceRequests(GatewayResourceRequestsArgs.builder()
.cpu("1")
.memory("1G")
.build())
.responseCacheProperties(GatewayLocalResponseCachePerInstancePropertiesArgs.builder()
.responseCacheType("LocalCachePerRoute")
.size("5MB")
.timeToLive("300s")
.build())
.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:Gateway default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}
Constructors
Properties
The name of Spring Cloud Gateway.
Spring Cloud Gateway 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.