alicloud.fc.V3FunctionVersion
Explore with Pulumi AI
Provides a FCV3 Function Version resource.
Version of the function.
For information about FCV3 Function Version and how to use it, see What is Function Version.
NOTE: Available since v1.228.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new random.index.Uuid("default", {});
const _function = new alicloud.fc.V3Function("function", {
memorySize: 512,
cpu: 0.5,
handler: "index.Handler",
code: {
zipFile: "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
},
functionName: `${name}-${_default.result}`,
runtime: "python3.9",
diskSize: 512,
logConfig: {
logBeginRule: "None",
},
});
const defaultV3FunctionVersion = new alicloud.fc.V3FunctionVersion("default", {
functionName: _function.functionName,
description: "version1",
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = random.index.Uuid("default")
function = alicloud.fc.V3Function("function",
memory_size=512,
cpu=0.5,
handler="index.Handler",
code={
"zip_file": "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
},
function_name=f"{name}-{default['result']}",
runtime="python3.9",
disk_size=512,
log_config={
"log_begin_rule": "None",
})
default_v3_function_version = alicloud.fc.V3FunctionVersion("default",
function_name=function.function_name,
description="version1")
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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.NewUuid(ctx, "default", nil)
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"),
Code: &fc.V3FunctionCodeArgs{
ZipFile: pulumi.String("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA="),
},
FunctionName: pulumi.Sprintf("%v-%v", name, _default.Result),
Runtime: pulumi.String("python3.9"),
DiskSize: pulumi.Int(512),
LogConfig: &fc.V3FunctionLogConfigArgs{
LogBeginRule: pulumi.String("None"),
},
})
if err != nil {
return err
}
_, err = fc.NewV3FunctionVersion(ctx, "default", &fc.V3FunctionVersionArgs{
FunctionName: function.FunctionName,
Description: pulumi.String("version1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new Random.Index.Uuid("default");
var function = new AliCloud.FC.V3Function("function", new()
{
MemorySize = 512,
Cpu = 0.5,
Handler = "index.Handler",
Code = new AliCloud.FC.Inputs.V3FunctionCodeArgs
{
ZipFile = "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
},
FunctionName = $"{name}-{@default.Result}",
Runtime = "python3.9",
DiskSize = 512,
LogConfig = new AliCloud.FC.Inputs.V3FunctionLogConfigArgs
{
LogBeginRule = "None",
},
});
var defaultV3FunctionVersion = new AliCloud.FC.V3FunctionVersion("default", new()
{
FunctionName = function.FunctionName,
Description = "version1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.uuid;
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.V3FunctionVersion;
import com.pulumi.alicloud.fc.V3FunctionVersionArgs;
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 Uuid("default");
var function = new V3Function("function", V3FunctionArgs.builder()
.memorySize("512")
.cpu(0.5)
.handler("index.Handler")
.code(V3FunctionCodeArgs.builder()
.zipFile("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=")
.build())
.functionName(String.format("%s-%s", name,default_.result()))
.runtime("python3.9")
.diskSize("512")
.logConfig(V3FunctionLogConfigArgs.builder()
.logBeginRule("None")
.build())
.build());
var defaultV3FunctionVersion = new V3FunctionVersion("defaultV3FunctionVersion", V3FunctionVersionArgs.builder()
.functionName(function.functionName())
.description("version1")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: random:uuid
function:
type: alicloud:fc:V3Function
properties:
memorySize: '512'
cpu: 0.5
handler: index.Handler
code:
zipFile: UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=
functionName: ${name}-${default.result}
runtime: python3.9
diskSize: '512'
logConfig:
logBeginRule: None
defaultV3FunctionVersion:
type: alicloud:fc:V3FunctionVersion
name: default
properties:
functionName: ${function.functionName}
description: version1
Create V3FunctionVersion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new V3FunctionVersion(name: string, args: V3FunctionVersionArgs, opts?: CustomResourceOptions);
@overload
def V3FunctionVersion(resource_name: str,
args: V3FunctionVersionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def V3FunctionVersion(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_name: Optional[str] = None,
description: Optional[str] = None)
func NewV3FunctionVersion(ctx *Context, name string, args V3FunctionVersionArgs, opts ...ResourceOption) (*V3FunctionVersion, error)
public V3FunctionVersion(string name, V3FunctionVersionArgs args, CustomResourceOptions? opts = null)
public V3FunctionVersion(String name, V3FunctionVersionArgs args)
public V3FunctionVersion(String name, V3FunctionVersionArgs args, CustomResourceOptions options)
type: alicloud:fc:V3FunctionVersion
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 V3FunctionVersionArgs
- 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 V3FunctionVersionArgs
- 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 V3FunctionVersionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args V3FunctionVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args V3FunctionVersionArgs
- 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 v3functionVersionResource = new AliCloud.FC.V3FunctionVersion("v3functionVersionResource", new()
{
FunctionName = "string",
Description = "string",
});
example, err := fc.NewV3FunctionVersion(ctx, "v3functionVersionResource", &fc.V3FunctionVersionArgs{
FunctionName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var v3functionVersionResource = new V3FunctionVersion("v3functionVersionResource", V3FunctionVersionArgs.builder()
.functionName("string")
.description("string")
.build());
v3function_version_resource = alicloud.fc.V3FunctionVersion("v3functionVersionResource",
function_name="string",
description="string")
const v3functionVersionResource = new alicloud.fc.V3FunctionVersion("v3functionVersionResource", {
functionName: "string",
description: "string",
});
type: alicloud:fc:V3FunctionVersion
properties:
description: string
functionName: string
V3FunctionVersion Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The V3FunctionVersion resource accepts the following input properties:
- Function
Name string - Function Name
- Description string
- Description of the function version
- Function
Name string - Function Name
- Description string
- Description of the function version
- function
Name String - Function Name
- description String
- Description of the function version
- function
Name string - Function Name
- description string
- Description of the function version
- function_
name str - Function Name
- description str
- Description of the function version
- function
Name String - Function Name
- description String
- Description of the function version
Outputs
All input properties are implicitly available as output properties. Additionally, the V3FunctionVersion resource produces the following output properties:
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - The creation time of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - The creation time of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing V3FunctionVersion Resource
Get an existing V3FunctionVersion 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?: V3FunctionVersionState, opts?: CustomResourceOptions): V3FunctionVersion
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
function_name: Optional[str] = None) -> V3FunctionVersion
func GetV3FunctionVersion(ctx *Context, name string, id IDInput, state *V3FunctionVersionState, opts ...ResourceOption) (*V3FunctionVersion, error)
public static V3FunctionVersion Get(string name, Input<string> id, V3FunctionVersionState? state, CustomResourceOptions? opts = null)
public static V3FunctionVersion get(String name, Output<String> id, V3FunctionVersionState 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.
- Create
Time string - The creation time of the resource
- Description string
- Description of the function version
- Function
Name string - Function Name
- Create
Time string - The creation time of the resource
- Description string
- Description of the function version
- Function
Name string - Function Name
- create
Time String - The creation time of the resource
- description String
- Description of the function version
- function
Name String - Function Name
- create
Time string - The creation time of the resource
- description string
- Description of the function version
- function
Name string - Function Name
- create_
time str - The creation time of the resource
- description str
- Description of the function version
- function_
name str - Function Name
- create
Time String - The creation time of the resource
- description String
- Description of the function version
- function
Name String - Function Name
Import
FCV3 Function Version can be imported using the id, e.g.
$ pulumi import alicloud:fc/v3FunctionVersion:V3FunctionVersion example <function_name>:<version_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.