alicloud.fc.V3ProvisionConfig
Explore with Pulumi AI
Provides a FCV3 Provision Config resource.
Function Reservation Configuration.
For information about FCV3 Provision Config and how to use it, see What is Provision Config.
NOTE: Available since v1.230.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
import * as time from "@pulumi/time";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultProject = new alicloud.log.Project("default", {
projectName: `${name}-${_default.result}`,
description: name,
});
const defaultStore = new alicloud.log.Store("default", {
projectName: defaultProject.name,
logstoreName: `${name}-${_default.result}`,
shardCount: 3,
autoSplit: true,
maxSplitShardCount: 60,
appendMeta: true,
});
const wait10Minutes = new time.index.Sleep("wait_10_minutes", {createDuration: "10m"}, {
dependsOn: [defaultStore],
});
const _function = new alicloud.fc.V3Function("function", {
memorySize: 512,
cpu: 0.5,
handler: "index.handler",
functionName: `${name}-${_default.result}`,
runtime: "python3.10",
diskSize: 512,
code: {
zipFile: "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
},
logConfig: {
enableInstanceMetrics: true,
enableRequestMetrics: true,
project: defaultProject.projectName,
logstore: defaultStore.logstoreName,
logBeginRule: "None",
},
}, {
dependsOn: [wait10Minutes],
});
const defaultV3ProvisionConfig = new alicloud.fc.V3ProvisionConfig("default", {
target: 1,
targetTrackingPolicies: [
{
name: "t1",
startTime: "2030-10-10T10:10:10Z",
endTime: "2035-10-10T10:10:10Z",
minCapacity: 0,
maxCapacity: 1,
metricTarget: 1,
metricType: "ProvisionedConcurrencyUtilization",
},
{
metricTarget: 1,
metricType: "ProvisionedConcurrencyUtilization",
name: "t2",
startTime: "2030-10-10T10:10:10Z",
endTime: "2035-10-10T10:10:10Z",
minCapacity: 0,
maxCapacity: 1,
},
{
metricType: "ProvisionedConcurrencyUtilization",
timeZone: "Asia/Shanghai",
name: "t3",
startTime: "2030-10-10T10:10:10",
endTime: "2035-10-10T10:10:10",
minCapacity: 0,
maxCapacity: 1,
metricTarget: 1,
},
],
scheduledActions: [
{
target: 0,
name: "s1",
startTime: "2030-10-10T10:10:10Z",
endTime: "2035-10-10T10:10:10Z",
scheduleExpression: "cron(0 0 4 * * *)",
},
{
name: "s2",
startTime: "2030-10-10T10:10:10Z",
endTime: "2035-10-10T10:10:10Z",
scheduleExpression: "cron(0 0 6 * * *)",
target: 1,
},
{
startTime: "2030-10-10T10:10:10",
endTime: "2035-10-10T10:10:10",
scheduleExpression: "cron(0 0 7 * * *)",
target: 0,
timeZone: "Asia/Shanghai",
name: "s3",
},
],
qualifier: "LATEST",
alwaysAllocateGpu: true,
functionName: _function.functionName,
alwaysAllocateCpu: true,
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
import pulumi_time as time
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = random.index.Integer("default",
min=10000,
max=99999)
default_project = alicloud.log.Project("default",
project_name=f"{name}-{default['result']}",
description=name)
default_store = alicloud.log.Store("default",
project_name=default_project.name,
logstore_name=f"{name}-{default['result']}",
shard_count=3,
auto_split=True,
max_split_shard_count=60,
append_meta=True)
wait10_minutes = time.index.Sleep("wait_10_minutes", create_duration=10m,
opts = pulumi.ResourceOptions(depends_on=[default_store]))
function = alicloud.fc.V3Function("function",
memory_size=512,
cpu=0.5,
handler="index.handler",
function_name=f"{name}-{default['result']}",
runtime="python3.10",
disk_size=512,
code={
"zip_file": "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
},
log_config={
"enable_instance_metrics": True,
"enable_request_metrics": True,
"project": default_project.project_name,
"logstore": default_store.logstore_name,
"log_begin_rule": "None",
},
opts = pulumi.ResourceOptions(depends_on=[wait10_minutes]))
default_v3_provision_config = alicloud.fc.V3ProvisionConfig("default",
target=1,
target_tracking_policies=[
{
"name": "t1",
"start_time": "2030-10-10T10:10:10Z",
"end_time": "2035-10-10T10:10:10Z",
"min_capacity": 0,
"max_capacity": 1,
"metric_target": 1,
"metric_type": "ProvisionedConcurrencyUtilization",
},
{
"metric_target": 1,
"metric_type": "ProvisionedConcurrencyUtilization",
"name": "t2",
"start_time": "2030-10-10T10:10:10Z",
"end_time": "2035-10-10T10:10:10Z",
"min_capacity": 0,
"max_capacity": 1,
},
{
"metric_type": "ProvisionedConcurrencyUtilization",
"time_zone": "Asia/Shanghai",
"name": "t3",
"start_time": "2030-10-10T10:10:10",
"end_time": "2035-10-10T10:10:10",
"min_capacity": 0,
"max_capacity": 1,
"metric_target": 1,
},
],
scheduled_actions=[
{
"target": 0,
"name": "s1",
"start_time": "2030-10-10T10:10:10Z",
"end_time": "2035-10-10T10:10:10Z",
"schedule_expression": "cron(0 0 4 * * *)",
},
{
"name": "s2",
"start_time": "2030-10-10T10:10:10Z",
"end_time": "2035-10-10T10:10:10Z",
"schedule_expression": "cron(0 0 6 * * *)",
"target": 1,
},
{
"start_time": "2030-10-10T10:10:10",
"end_time": "2035-10-10T10:10:10",
"schedule_expression": "cron(0 0 7 * * *)",
"target": 0,
"time_zone": "Asia/Shanghai",
"name": "s3",
},
],
qualifier="LATEST",
always_allocate_gpu=True,
function_name=function.function_name,
always_allocate_cpu=True)
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi-time/sdk/go/time"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultProject, err := log.NewProject(ctx, "default", &log.ProjectArgs{
ProjectName: pulumi.Sprintf("%v-%v", name, _default.Result),
Description: pulumi.String(name),
})
if err != nil {
return err
}
defaultStore, err := log.NewStore(ctx, "default", &log.StoreArgs{
ProjectName: defaultProject.Name,
LogstoreName: pulumi.Sprintf("%v-%v", name, _default.Result),
ShardCount: pulumi.Int(3),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
AppendMeta: pulumi.Bool(true),
})
if err != nil {
return err
}
wait10Minutes, err := time.NewSleep(ctx, "wait_10_minutes", &time.SleepArgs{
CreateDuration: "10m",
}, pulumi.DependsOn([]pulumi.Resource{
defaultStore,
}))
if err != nil {
return err
}
function, err := fc.NewV3Function(ctx, "function", &fc.V3FunctionArgs{
MemorySize: pulumi.Int(512),
Cpu: pulumi.Float64(0.5),
Handler: pulumi.String("index.handler"),
FunctionName: pulumi.Sprintf("%v-%v", name, _default.Result),
Runtime: pulumi.String("python3.10"),
DiskSize: pulumi.Int(512),
Code: &fc.V3FunctionCodeArgs{
ZipFile: pulumi.String("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA="),
},
LogConfig: &fc.V3FunctionLogConfigArgs{
EnableInstanceMetrics: pulumi.Bool(true),
EnableRequestMetrics: pulumi.Bool(true),
Project: defaultProject.ProjectName,
Logstore: defaultStore.LogstoreName,
LogBeginRule: pulumi.String("None"),
},
}, pulumi.DependsOn([]pulumi.Resource{
wait10Minutes,
}))
if err != nil {
return err
}
_, err = fc.NewV3ProvisionConfig(ctx, "default", &fc.V3ProvisionConfigArgs{
Target: pulumi.Int(1),
TargetTrackingPolicies: fc.V3ProvisionConfigTargetTrackingPolicyArray{
&fc.V3ProvisionConfigTargetTrackingPolicyArgs{
Name: pulumi.String("t1"),
StartTime: pulumi.String("2030-10-10T10:10:10Z"),
EndTime: pulumi.String("2035-10-10T10:10:10Z"),
MinCapacity: pulumi.Int(0),
MaxCapacity: pulumi.Int(1),
MetricTarget: pulumi.Float64(1),
MetricType: pulumi.String("ProvisionedConcurrencyUtilization"),
},
&fc.V3ProvisionConfigTargetTrackingPolicyArgs{
MetricTarget: pulumi.Float64(1),
MetricType: pulumi.String("ProvisionedConcurrencyUtilization"),
Name: pulumi.String("t2"),
StartTime: pulumi.String("2030-10-10T10:10:10Z"),
EndTime: pulumi.String("2035-10-10T10:10:10Z"),
MinCapacity: pulumi.Int(0),
MaxCapacity: pulumi.Int(1),
},
&fc.V3ProvisionConfigTargetTrackingPolicyArgs{
MetricType: pulumi.String("ProvisionedConcurrencyUtilization"),
TimeZone: pulumi.String("Asia/Shanghai"),
Name: pulumi.String("t3"),
StartTime: pulumi.String("2030-10-10T10:10:10"),
EndTime: pulumi.String("2035-10-10T10:10:10"),
MinCapacity: pulumi.Int(0),
MaxCapacity: pulumi.Int(1),
MetricTarget: pulumi.Float64(1),
},
},
ScheduledActions: fc.V3ProvisionConfigScheduledActionArray{
&fc.V3ProvisionConfigScheduledActionArgs{
Target: pulumi.Int(0),
Name: pulumi.String("s1"),
StartTime: pulumi.String("2030-10-10T10:10:10Z"),
EndTime: pulumi.String("2035-10-10T10:10:10Z"),
ScheduleExpression: pulumi.String("cron(0 0 4 * * *)"),
},
&fc.V3ProvisionConfigScheduledActionArgs{
Name: pulumi.String("s2"),
StartTime: pulumi.String("2030-10-10T10:10:10Z"),
EndTime: pulumi.String("2035-10-10T10:10:10Z"),
ScheduleExpression: pulumi.String("cron(0 0 6 * * *)"),
Target: pulumi.Int(1),
},
&fc.V3ProvisionConfigScheduledActionArgs{
StartTime: pulumi.String("2030-10-10T10:10:10"),
EndTime: pulumi.String("2035-10-10T10:10:10"),
ScheduleExpression: pulumi.String("cron(0 0 7 * * *)"),
Target: pulumi.Int(0),
TimeZone: pulumi.String("Asia/Shanghai"),
Name: pulumi.String("s3"),
},
},
Qualifier: pulumi.String("LATEST"),
AlwaysAllocateGpu: pulumi.Bool(true),
FunctionName: function.FunctionName,
AlwaysAllocateCpu: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
using Time = Pulumi.Time;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultProject = new AliCloud.Log.Project("default", new()
{
ProjectName = $"{name}-{@default.Result}",
Description = name,
});
var defaultStore = new AliCloud.Log.Store("default", new()
{
ProjectName = defaultProject.Name,
LogstoreName = $"{name}-{@default.Result}",
ShardCount = 3,
AutoSplit = true,
MaxSplitShardCount = 60,
AppendMeta = true,
});
var wait10Minutes = new Time.Index.Sleep("wait_10_minutes", new()
{
CreateDuration = "10m",
}, new CustomResourceOptions
{
DependsOn =
{
defaultStore,
},
});
var function = new AliCloud.FC.V3Function("function", new()
{
MemorySize = 512,
Cpu = 0.5,
Handler = "index.handler",
FunctionName = $"{name}-{@default.Result}",
Runtime = "python3.10",
DiskSize = 512,
Code = new AliCloud.FC.Inputs.V3FunctionCodeArgs
{
ZipFile = "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
},
LogConfig = new AliCloud.FC.Inputs.V3FunctionLogConfigArgs
{
EnableInstanceMetrics = true,
EnableRequestMetrics = true,
Project = defaultProject.ProjectName,
Logstore = defaultStore.LogstoreName,
LogBeginRule = "None",
},
}, new CustomResourceOptions
{
DependsOn =
{
wait10Minutes,
},
});
var defaultV3ProvisionConfig = new AliCloud.FC.V3ProvisionConfig("default", new()
{
Target = 1,
TargetTrackingPolicies = new[]
{
new AliCloud.FC.Inputs.V3ProvisionConfigTargetTrackingPolicyArgs
{
Name = "t1",
StartTime = "2030-10-10T10:10:10Z",
EndTime = "2035-10-10T10:10:10Z",
MinCapacity = 0,
MaxCapacity = 1,
MetricTarget = 1,
MetricType = "ProvisionedConcurrencyUtilization",
},
new AliCloud.FC.Inputs.V3ProvisionConfigTargetTrackingPolicyArgs
{
MetricTarget = 1,
MetricType = "ProvisionedConcurrencyUtilization",
Name = "t2",
StartTime = "2030-10-10T10:10:10Z",
EndTime = "2035-10-10T10:10:10Z",
MinCapacity = 0,
MaxCapacity = 1,
},
new AliCloud.FC.Inputs.V3ProvisionConfigTargetTrackingPolicyArgs
{
MetricType = "ProvisionedConcurrencyUtilization",
TimeZone = "Asia/Shanghai",
Name = "t3",
StartTime = "2030-10-10T10:10:10",
EndTime = "2035-10-10T10:10:10",
MinCapacity = 0,
MaxCapacity = 1,
MetricTarget = 1,
},
},
ScheduledActions = new[]
{
new AliCloud.FC.Inputs.V3ProvisionConfigScheduledActionArgs
{
Target = 0,
Name = "s1",
StartTime = "2030-10-10T10:10:10Z",
EndTime = "2035-10-10T10:10:10Z",
ScheduleExpression = "cron(0 0 4 * * *)",
},
new AliCloud.FC.Inputs.V3ProvisionConfigScheduledActionArgs
{
Name = "s2",
StartTime = "2030-10-10T10:10:10Z",
EndTime = "2035-10-10T10:10:10Z",
ScheduleExpression = "cron(0 0 6 * * *)",
Target = 1,
},
new AliCloud.FC.Inputs.V3ProvisionConfigScheduledActionArgs
{
StartTime = "2030-10-10T10:10:10",
EndTime = "2035-10-10T10:10:10",
ScheduleExpression = "cron(0 0 7 * * *)",
Target = 0,
TimeZone = "Asia/Shanghai",
Name = "s3",
},
},
Qualifier = "LATEST",
AlwaysAllocateGpu = true,
FunctionName = function.FunctionName,
AlwaysAllocateCpu = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.time.sleep;
import com.pulumi.time.SleepArgs;
import com.pulumi.alicloud.fc.V3Function;
import com.pulumi.alicloud.fc.V3FunctionArgs;
import com.pulumi.alicloud.fc.inputs.V3FunctionCodeArgs;
import com.pulumi.alicloud.fc.inputs.V3FunctionLogConfigArgs;
import com.pulumi.alicloud.fc.V3ProvisionConfig;
import com.pulumi.alicloud.fc.V3ProvisionConfigArgs;
import com.pulumi.alicloud.fc.inputs.V3ProvisionConfigTargetTrackingPolicyArgs;
import com.pulumi.alicloud.fc.inputs.V3ProvisionConfigScheduledActionArgs;
import com.pulumi.resources.CustomResourceOptions;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultProject = new Project("defaultProject", ProjectArgs.builder()
.projectName(String.format("%s-%s", name,default_.result()))
.description(name)
.build());
var defaultStore = new Store("defaultStore", StoreArgs.builder()
.projectName(defaultProject.name())
.logstoreName(String.format("%s-%s", name,default_.result()))
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var wait10Minutes = new Sleep("wait10Minutes", SleepArgs.builder()
.createDuration("10m")
.build(), CustomResourceOptions.builder()
.dependsOn(defaultStore)
.build());
var function = new V3Function("function", V3FunctionArgs.builder()
.memorySize("512")
.cpu(0.5)
.handler("index.handler")
.functionName(String.format("%s-%s", name,default_.result()))
.runtime("python3.10")
.diskSize("512")
.code(V3FunctionCodeArgs.builder()
.zipFile("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=")
.build())
.logConfig(V3FunctionLogConfigArgs.builder()
.enableInstanceMetrics(true)
.enableRequestMetrics(true)
.project(defaultProject.projectName())
.logstore(defaultStore.logstoreName())
.logBeginRule("None")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(wait10Minutes)
.build());
var defaultV3ProvisionConfig = new V3ProvisionConfig("defaultV3ProvisionConfig", V3ProvisionConfigArgs.builder()
.target("1")
.targetTrackingPolicies(
V3ProvisionConfigTargetTrackingPolicyArgs.builder()
.name("t1")
.startTime("2030-10-10T10:10:10Z")
.endTime("2035-10-10T10:10:10Z")
.minCapacity("0")
.maxCapacity("1")
.metricTarget("1")
.metricType("ProvisionedConcurrencyUtilization")
.build(),
V3ProvisionConfigTargetTrackingPolicyArgs.builder()
.metricTarget("1")
.metricType("ProvisionedConcurrencyUtilization")
.name("t2")
.startTime("2030-10-10T10:10:10Z")
.endTime("2035-10-10T10:10:10Z")
.minCapacity("0")
.maxCapacity("1")
.build(),
V3ProvisionConfigTargetTrackingPolicyArgs.builder()
.metricType("ProvisionedConcurrencyUtilization")
.timeZone("Asia/Shanghai")
.name("t3")
.startTime("2030-10-10T10:10:10")
.endTime("2035-10-10T10:10:10")
.minCapacity("0")
.maxCapacity("1")
.metricTarget("1")
.build())
.scheduledActions(
V3ProvisionConfigScheduledActionArgs.builder()
.target("0")
.name("s1")
.startTime("2030-10-10T10:10:10Z")
.endTime("2035-10-10T10:10:10Z")
.scheduleExpression("cron(0 0 4 * * *)")
.build(),
V3ProvisionConfigScheduledActionArgs.builder()
.name("s2")
.startTime("2030-10-10T10:10:10Z")
.endTime("2035-10-10T10:10:10Z")
.scheduleExpression("cron(0 0 6 * * *)")
.target("1")
.build(),
V3ProvisionConfigScheduledActionArgs.builder()
.startTime("2030-10-10T10:10:10")
.endTime("2035-10-10T10:10:10")
.scheduleExpression("cron(0 0 7 * * *)")
.target("0")
.timeZone("Asia/Shanghai")
.name("s3")
.build())
.qualifier("LATEST")
.alwaysAllocateGpu("true")
.functionName(function.functionName())
.alwaysAllocateCpu("true")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: random:integer
properties:
min: 10000
max: 99999
defaultProject:
type: alicloud:log:Project
name: default
properties:
projectName: ${name}-${default.result}
description: ${name}
defaultStore:
type: alicloud:log:Store
name: default
properties:
projectName: ${defaultProject.name}
logstoreName: ${name}-${default.result}
shardCount: 3
autoSplit: true
maxSplitShardCount: 60
appendMeta: true
wait10Minutes:
type: time:sleep
name: wait_10_minutes
properties:
createDuration: 10m
options:
dependson:
- ${defaultStore}
function:
type: alicloud:fc:V3Function
properties:
memorySize: '512'
cpu: 0.5
handler: index.handler
functionName: ${name}-${default.result}
runtime: python3.10
diskSize: '512'
code:
zipFile: UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=
logConfig:
enableInstanceMetrics: true
enableRequestMetrics: true
project: ${defaultProject.projectName}
logstore: ${defaultStore.logstoreName}
logBeginRule: None
options:
dependson:
- ${wait10Minutes}
defaultV3ProvisionConfig:
type: alicloud:fc:V3ProvisionConfig
name: default
properties:
target: '1'
targetTrackingPolicies:
- name: t1
startTime: 2030-10-10T10:10:10Z
endTime: 2035-10-10T10:10:10Z
minCapacity: '0'
maxCapacity: '1'
metricTarget: '1'
metricType: ProvisionedConcurrencyUtilization
- metricTarget: '1'
metricType: ProvisionedConcurrencyUtilization
name: t2
startTime: 2030-10-10T10:10:10Z
endTime: 2035-10-10T10:10:10Z
minCapacity: '0'
maxCapacity: '1'
- metricType: ProvisionedConcurrencyUtilization
timeZone: Asia/Shanghai
name: t3
startTime: 2030-10-10T10:10:10
endTime: 2035-10-10T10:10:10
minCapacity: '0'
maxCapacity: '1'
metricTarget: '1'
scheduledActions:
- target: '0'
name: s1
startTime: 2030-10-10T10:10:10Z
endTime: 2035-10-10T10:10:10Z
scheduleExpression: cron(0 0 4 * * *)
- name: s2
startTime: 2030-10-10T10:10:10Z
endTime: 2035-10-10T10:10:10Z
scheduleExpression: cron(0 0 6 * * *)
target: '1'
- startTime: 2030-10-10T10:10:10
endTime: 2035-10-10T10:10:10
scheduleExpression: cron(0 0 7 * * *)
target: '0'
timeZone: Asia/Shanghai
name: s3
qualifier: LATEST
alwaysAllocateGpu: 'true'
functionName: ${function.functionName}
alwaysAllocateCpu: 'true'
Create V3ProvisionConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new V3ProvisionConfig(name: string, args: V3ProvisionConfigArgs, opts?: CustomResourceOptions);
@overload
def V3ProvisionConfig(resource_name: str,
args: V3ProvisionConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def V3ProvisionConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_name: Optional[str] = None,
always_allocate_cpu: Optional[bool] = None,
always_allocate_gpu: Optional[bool] = None,
qualifier: Optional[str] = None,
scheduled_actions: Optional[Sequence[V3ProvisionConfigScheduledActionArgs]] = None,
target: Optional[int] = None,
target_tracking_policies: Optional[Sequence[V3ProvisionConfigTargetTrackingPolicyArgs]] = None)
func NewV3ProvisionConfig(ctx *Context, name string, args V3ProvisionConfigArgs, opts ...ResourceOption) (*V3ProvisionConfig, error)
public V3ProvisionConfig(string name, V3ProvisionConfigArgs args, CustomResourceOptions? opts = null)
public V3ProvisionConfig(String name, V3ProvisionConfigArgs args)
public V3ProvisionConfig(String name, V3ProvisionConfigArgs args, CustomResourceOptions options)
type: alicloud:fc:V3ProvisionConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args V3ProvisionConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args V3ProvisionConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args V3ProvisionConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args V3ProvisionConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args V3ProvisionConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var v3provisionConfigResource = new AliCloud.FC.V3ProvisionConfig("v3provisionConfigResource", new()
{
FunctionName = "string",
AlwaysAllocateCpu = false,
AlwaysAllocateGpu = false,
Qualifier = "string",
ScheduledActions = new[]
{
new AliCloud.FC.Inputs.V3ProvisionConfigScheduledActionArgs
{
EndTime = "string",
Name = "string",
ScheduleExpression = "string",
StartTime = "string",
Target = 0,
TimeZone = "string",
},
},
Target = 0,
TargetTrackingPolicies = new[]
{
new AliCloud.FC.Inputs.V3ProvisionConfigTargetTrackingPolicyArgs
{
EndTime = "string",
MaxCapacity = 0,
MetricTarget = 0,
MetricType = "string",
MinCapacity = 0,
Name = "string",
StartTime = "string",
TimeZone = "string",
},
},
});
example, err := fc.NewV3ProvisionConfig(ctx, "v3provisionConfigResource", &fc.V3ProvisionConfigArgs{
FunctionName: pulumi.String("string"),
AlwaysAllocateCpu: pulumi.Bool(false),
AlwaysAllocateGpu: pulumi.Bool(false),
Qualifier: pulumi.String("string"),
ScheduledActions: fc.V3ProvisionConfigScheduledActionArray{
&fc.V3ProvisionConfigScheduledActionArgs{
EndTime: pulumi.String("string"),
Name: pulumi.String("string"),
ScheduleExpression: pulumi.String("string"),
StartTime: pulumi.String("string"),
Target: pulumi.Int(0),
TimeZone: pulumi.String("string"),
},
},
Target: pulumi.Int(0),
TargetTrackingPolicies: fc.V3ProvisionConfigTargetTrackingPolicyArray{
&fc.V3ProvisionConfigTargetTrackingPolicyArgs{
EndTime: pulumi.String("string"),
MaxCapacity: pulumi.Int(0),
MetricTarget: pulumi.Float64(0),
MetricType: pulumi.String("string"),
MinCapacity: pulumi.Int(0),
Name: pulumi.String("string"),
StartTime: pulumi.String("string"),
TimeZone: pulumi.String("string"),
},
},
})
var v3provisionConfigResource = new V3ProvisionConfig("v3provisionConfigResource", V3ProvisionConfigArgs.builder()
.functionName("string")
.alwaysAllocateCpu(false)
.alwaysAllocateGpu(false)
.qualifier("string")
.scheduledActions(V3ProvisionConfigScheduledActionArgs.builder()
.endTime("string")
.name("string")
.scheduleExpression("string")
.startTime("string")
.target(0)
.timeZone("string")
.build())
.target(0)
.targetTrackingPolicies(V3ProvisionConfigTargetTrackingPolicyArgs.builder()
.endTime("string")
.maxCapacity(0)
.metricTarget(0)
.metricType("string")
.minCapacity(0)
.name("string")
.startTime("string")
.timeZone("string")
.build())
.build());
v3provision_config_resource = alicloud.fc.V3ProvisionConfig("v3provisionConfigResource",
function_name="string",
always_allocate_cpu=False,
always_allocate_gpu=False,
qualifier="string",
scheduled_actions=[{
"end_time": "string",
"name": "string",
"schedule_expression": "string",
"start_time": "string",
"target": 0,
"time_zone": "string",
}],
target=0,
target_tracking_policies=[{
"end_time": "string",
"max_capacity": 0,
"metric_target": 0,
"metric_type": "string",
"min_capacity": 0,
"name": "string",
"start_time": "string",
"time_zone": "string",
}])
const v3provisionConfigResource = new alicloud.fc.V3ProvisionConfig("v3provisionConfigResource", {
functionName: "string",
alwaysAllocateCpu: false,
alwaysAllocateGpu: false,
qualifier: "string",
scheduledActions: [{
endTime: "string",
name: "string",
scheduleExpression: "string",
startTime: "string",
target: 0,
timeZone: "string",
}],
target: 0,
targetTrackingPolicies: [{
endTime: "string",
maxCapacity: 0,
metricTarget: 0,
metricType: "string",
minCapacity: 0,
name: "string",
startTime: "string",
timeZone: "string",
}],
});
type: alicloud:fc:V3ProvisionConfig
properties:
alwaysAllocateCpu: false
alwaysAllocateGpu: false
functionName: string
qualifier: string
scheduledActions:
- endTime: string
name: string
scheduleExpression: string
startTime: string
target: 0
timeZone: string
target: 0
targetTrackingPolicies:
- endTime: string
maxCapacity: 0
metricTarget: 0
metricType: string
minCapacity: 0
name: string
startTime: string
timeZone: string
V3ProvisionConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The V3ProvisionConfig resource accepts the following input properties:
- Function
Name string - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- Always
Allocate boolCpu - Whether the CPU is always allocated. The default value is true.
- Always
Allocate boolGpu - Whether to always assign GPU to function instance
- Qualifier string
- The function alias or LATEST.
- Scheduled
Actions List<Pulumi.Ali Cloud. FC. Inputs. V3Provision Config Scheduled Action> - Timing policy configuration See
scheduled_actions
below. - Target int
- Number of reserved target resources. The value range is [0,10000].
- Target
Tracking List<Pulumi.Policies Ali Cloud. FC. Inputs. V3Provision Config Target Tracking Policy> - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- Function
Name string - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- Always
Allocate boolCpu - Whether the CPU is always allocated. The default value is true.
- Always
Allocate boolGpu - Whether to always assign GPU to function instance
- Qualifier string
- The function alias or LATEST.
- Scheduled
Actions []V3ProvisionConfig Scheduled Action Args - Timing policy configuration See
scheduled_actions
below. - Target int
- Number of reserved target resources. The value range is [0,10000].
- Target
Tracking []V3ProvisionPolicies Config Target Tracking Policy Args - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- function
Name String - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- always
Allocate BooleanCpu - Whether the CPU is always allocated. The default value is true.
- always
Allocate BooleanGpu - Whether to always assign GPU to function instance
- qualifier String
- The function alias or LATEST.
- scheduled
Actions List<V3ProvisionConfig Scheduled Action> - Timing policy configuration See
scheduled_actions
below. - target Integer
- Number of reserved target resources. The value range is [0,10000].
- target
Tracking List<V3ProvisionPolicies Config Target Tracking Policy> - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- function
Name string - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- always
Allocate booleanCpu - Whether the CPU is always allocated. The default value is true.
- always
Allocate booleanGpu - Whether to always assign GPU to function instance
- qualifier string
- The function alias or LATEST.
- scheduled
Actions V3ProvisionConfig Scheduled Action[] - Timing policy configuration See
scheduled_actions
below. - target number
- Number of reserved target resources. The value range is [0,10000].
- target
Tracking V3ProvisionPolicies Config Target Tracking Policy[] - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- function_
name str - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- always_
allocate_ boolcpu - Whether the CPU is always allocated. The default value is true.
- always_
allocate_ boolgpu - Whether to always assign GPU to function instance
- qualifier str
- The function alias or LATEST.
- scheduled_
actions Sequence[V3ProvisionConfig Scheduled Action Args] - Timing policy configuration See
scheduled_actions
below. - target int
- Number of reserved target resources. The value range is [0,10000].
- target_
tracking_ Sequence[V3Provisionpolicies Config Target Tracking Policy Args] - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- function
Name String - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- always
Allocate BooleanCpu - Whether the CPU is always allocated. The default value is true.
- always
Allocate BooleanGpu - Whether to always assign GPU to function instance
- qualifier String
- The function alias or LATEST.
- scheduled
Actions List<Property Map> - Timing policy configuration See
scheduled_actions
below. - target Number
- Number of reserved target resources. The value range is [0,10000].
- target
Tracking List<Property Map>Policies - Metric tracking scaling policy configuration See
target_tracking_policies
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the V3ProvisionConfig resource produces the following output properties:
- Current int
- (Available since v1.234.0) Number of actual resources
- Current
Error string - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- Function
Arn string - (Available since v1.234.0) Resource Description of the function
- Id string
- The provider-assigned unique ID for this managed resource.
- Current int
- (Available since v1.234.0) Number of actual resources
- Current
Error string - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- Function
Arn string - (Available since v1.234.0) Resource Description of the function
- Id string
- The provider-assigned unique ID for this managed resource.
- current Integer
- (Available since v1.234.0) Number of actual resources
- current
Error String - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function
Arn String - (Available since v1.234.0) Resource Description of the function
- id String
- The provider-assigned unique ID for this managed resource.
- current number
- (Available since v1.234.0) Number of actual resources
- current
Error string - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function
Arn string - (Available since v1.234.0) Resource Description of the function
- id string
- The provider-assigned unique ID for this managed resource.
- current int
- (Available since v1.234.0) Number of actual resources
- current_
error str - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function_
arn str - (Available since v1.234.0) Resource Description of the function
- id str
- The provider-assigned unique ID for this managed resource.
- current Number
- (Available since v1.234.0) Number of actual resources
- current
Error String - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function
Arn String - (Available since v1.234.0) Resource Description of the function
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing V3ProvisionConfig Resource
Get an existing V3ProvisionConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: V3ProvisionConfigState, opts?: CustomResourceOptions): V3ProvisionConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
always_allocate_cpu: Optional[bool] = None,
always_allocate_gpu: Optional[bool] = None,
current: Optional[int] = None,
current_error: Optional[str] = None,
function_arn: Optional[str] = None,
function_name: Optional[str] = None,
qualifier: Optional[str] = None,
scheduled_actions: Optional[Sequence[V3ProvisionConfigScheduledActionArgs]] = None,
target: Optional[int] = None,
target_tracking_policies: Optional[Sequence[V3ProvisionConfigTargetTrackingPolicyArgs]] = None) -> V3ProvisionConfig
func GetV3ProvisionConfig(ctx *Context, name string, id IDInput, state *V3ProvisionConfigState, opts ...ResourceOption) (*V3ProvisionConfig, error)
public static V3ProvisionConfig Get(string name, Input<string> id, V3ProvisionConfigState? state, CustomResourceOptions? opts = null)
public static V3ProvisionConfig get(String name, Output<String> id, V3ProvisionConfigState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Always
Allocate boolCpu - Whether the CPU is always allocated. The default value is true.
- Always
Allocate boolGpu - Whether to always assign GPU to function instance
- Current int
- (Available since v1.234.0) Number of actual resources
- Current
Error string - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- Function
Arn string - (Available since v1.234.0) Resource Description of the function
- Function
Name string - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- Qualifier string
- The function alias or LATEST.
- Scheduled
Actions List<Pulumi.Ali Cloud. FC. Inputs. V3Provision Config Scheduled Action> - Timing policy configuration See
scheduled_actions
below. - Target int
- Number of reserved target resources. The value range is [0,10000].
- Target
Tracking List<Pulumi.Policies Ali Cloud. FC. Inputs. V3Provision Config Target Tracking Policy> - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- Always
Allocate boolCpu - Whether the CPU is always allocated. The default value is true.
- Always
Allocate boolGpu - Whether to always assign GPU to function instance
- Current int
- (Available since v1.234.0) Number of actual resources
- Current
Error string - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- Function
Arn string - (Available since v1.234.0) Resource Description of the function
- Function
Name string - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- Qualifier string
- The function alias or LATEST.
- Scheduled
Actions []V3ProvisionConfig Scheduled Action Args - Timing policy configuration See
scheduled_actions
below. - Target int
- Number of reserved target resources. The value range is [0,10000].
- Target
Tracking []V3ProvisionPolicies Config Target Tracking Policy Args - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- always
Allocate BooleanCpu - Whether the CPU is always allocated. The default value is true.
- always
Allocate BooleanGpu - Whether to always assign GPU to function instance
- current Integer
- (Available since v1.234.0) Number of actual resources
- current
Error String - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function
Arn String - (Available since v1.234.0) Resource Description of the function
- function
Name String - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- qualifier String
- The function alias or LATEST.
- scheduled
Actions List<V3ProvisionConfig Scheduled Action> - Timing policy configuration See
scheduled_actions
below. - target Integer
- Number of reserved target resources. The value range is [0,10000].
- target
Tracking List<V3ProvisionPolicies Config Target Tracking Policy> - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- always
Allocate booleanCpu - Whether the CPU is always allocated. The default value is true.
- always
Allocate booleanGpu - Whether to always assign GPU to function instance
- current number
- (Available since v1.234.0) Number of actual resources
- current
Error string - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function
Arn string - (Available since v1.234.0) Resource Description of the function
- function
Name string - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- qualifier string
- The function alias or LATEST.
- scheduled
Actions V3ProvisionConfig Scheduled Action[] - Timing policy configuration See
scheduled_actions
below. - target number
- Number of reserved target resources. The value range is [0,10000].
- target
Tracking V3ProvisionPolicies Config Target Tracking Policy[] - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- always_
allocate_ boolcpu - Whether the CPU is always allocated. The default value is true.
- always_
allocate_ boolgpu - Whether to always assign GPU to function instance
- current int
- (Available since v1.234.0) Number of actual resources
- current_
error str - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function_
arn str - (Available since v1.234.0) Resource Description of the function
- function_
name str - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- qualifier str
- The function alias or LATEST.
- scheduled_
actions Sequence[V3ProvisionConfig Scheduled Action Args] - Timing policy configuration See
scheduled_actions
below. - target int
- Number of reserved target resources. The value range is [0,10000].
- target_
tracking_ Sequence[V3Provisionpolicies Config Target Tracking Policy Args] - Metric tracking scaling policy configuration See
target_tracking_policies
below.
- always
Allocate BooleanCpu - Whether the CPU is always allocated. The default value is true.
- always
Allocate BooleanGpu - Whether to always assign GPU to function instance
- current Number
- (Available since v1.234.0) Number of actual resources
- current
Error String - (Available since v1.234.0) Error message when a Reserved Instance creation fails
- function
Arn String - (Available since v1.234.0) Resource Description of the function
- function
Name String - The name of the function. If this parameter is not specified, the provisioned configurations of all functions are listed.
- qualifier String
- The function alias or LATEST.
- scheduled
Actions List<Property Map> - Timing policy configuration See
scheduled_actions
below. - target Number
- Number of reserved target resources. The value range is [0,10000].
- target
Tracking List<Property Map>Policies - Metric tracking scaling policy configuration See
target_tracking_policies
below.
Supporting Types
V3ProvisionConfigScheduledAction, V3ProvisionConfigScheduledActionArgs
- end_
time str - Policy expiration time
- name str
- Policy Name
- schedule_
expression str - Timing Configuration
- start_
time str - Policy effective time
- target int
- Number of reserved target resources
- time_
zone str - Time zone.
V3ProvisionConfigTargetTrackingPolicy, V3ProvisionConfigTargetTrackingPolicyArgs
- End
Time string - Policy expiration time
- Max
Capacity int - Maximum value of expansion
- Metric
Target double - Tracking value of the indicator
- Metric
Type string - Provisionedconcurrency utilization: Concurrency utilization of reserved mode instances. CPU utilization: CPU utilization. GPUMemUtilization:GPU utilization
- Min
Capacity int - Minimum Shrinkage
- Name string
- Policy Name
- Start
Time string - Policy Effective Time
- Time
Zone string - Time zone.
- End
Time string - Policy expiration time
- Max
Capacity int - Maximum value of expansion
- Metric
Target float64 - Tracking value of the indicator
- Metric
Type string - Provisionedconcurrency utilization: Concurrency utilization of reserved mode instances. CPU utilization: CPU utilization. GPUMemUtilization:GPU utilization
- Min
Capacity int - Minimum Shrinkage
- Name string
- Policy Name
- Start
Time string - Policy Effective Time
- Time
Zone string - Time zone.
- end
Time String - Policy expiration time
- max
Capacity Integer - Maximum value of expansion
- metric
Target Double - Tracking value of the indicator
- metric
Type String - Provisionedconcurrency utilization: Concurrency utilization of reserved mode instances. CPU utilization: CPU utilization. GPUMemUtilization:GPU utilization
- min
Capacity Integer - Minimum Shrinkage
- name String
- Policy Name
- start
Time String - Policy Effective Time
- time
Zone String - Time zone.
- end
Time string - Policy expiration time
- max
Capacity number - Maximum value of expansion
- metric
Target number - Tracking value of the indicator
- metric
Type string - Provisionedconcurrency utilization: Concurrency utilization of reserved mode instances. CPU utilization: CPU utilization. GPUMemUtilization:GPU utilization
- min
Capacity number - Minimum Shrinkage
- name string
- Policy Name
- start
Time string - Policy Effective Time
- time
Zone string - Time zone.
- end_
time str - Policy expiration time
- max_
capacity int - Maximum value of expansion
- metric_
target float - Tracking value of the indicator
- metric_
type str - Provisionedconcurrency utilization: Concurrency utilization of reserved mode instances. CPU utilization: CPU utilization. GPUMemUtilization:GPU utilization
- min_
capacity int - Minimum Shrinkage
- name str
- Policy Name
- start_
time str - Policy Effective Time
- time_
zone str - Time zone.
- end
Time String - Policy expiration time
- max
Capacity Number - Maximum value of expansion
- metric
Target Number - Tracking value of the indicator
- metric
Type String - Provisionedconcurrency utilization: Concurrency utilization of reserved mode instances. CPU utilization: CPU utilization. GPUMemUtilization:GPU utilization
- min
Capacity Number - Minimum Shrinkage
- name String
- Policy Name
- start
Time String - Policy Effective Time
- time
Zone String - Time zone.
Import
FCV3 Provision Config can be imported using the id, e.g.
$ pulumi import alicloud:fc/v3ProvisionConfig:V3ProvisionConfig example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.