1. Packages
  2. Alicloud Provider
  3. API Docs
  4. fc
  5. V3ConcurrencyConfig
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.fc.V3ConcurrencyConfig

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a FCV3 Concurrency Config resource.

    Function concurrency configuration.

    For information about FCV3 Concurrency Config and how to use it, see What is Concurrency Config.

    NOTE: Available since v1.228.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    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,
        runtime: "python3.9",
        diskSize: 512,
        logConfig: {
            logBeginRule: "None",
        },
    });
    const _default = new alicloud.fc.V3ConcurrencyConfig("default", {
        functionName: _function.functionName,
        reservedConcurrency: 100,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    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=name,
        runtime="python3.9",
        disk_size=512,
        log_config={
            "log_begin_rule": "None",
        })
    default = alicloud.fc.V3ConcurrencyConfig("default",
        function_name=function.function_name,
        reserved_concurrency=100)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
    	"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
    		}
    		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.String(name),
    			Runtime:      pulumi.String("python3.9"),
    			DiskSize:     pulumi.Int(512),
    			LogConfig: &fc.V3FunctionLogConfigArgs{
    				LogBeginRule: pulumi.String("None"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = fc.NewV3ConcurrencyConfig(ctx, "default", &fc.V3ConcurrencyConfigArgs{
    			FunctionName:        function.FunctionName,
    			ReservedConcurrency: pulumi.Int(100),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        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,
            Runtime = "python3.9",
            DiskSize = 512,
            LogConfig = new AliCloud.FC.Inputs.V3FunctionLogConfigArgs
            {
                LogBeginRule = "None",
            },
        });
    
        var @default = new AliCloud.FC.V3ConcurrencyConfig("default", new()
        {
            FunctionName = function.FunctionName,
            ReservedConcurrency = 100,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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.V3ConcurrencyConfig;
    import com.pulumi.alicloud.fc.V3ConcurrencyConfigArgs;
    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 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(name)
                .runtime("python3.9")
                .diskSize("512")
                .logConfig(V3FunctionLogConfigArgs.builder()
                    .logBeginRule("None")
                    .build())
                .build());
    
            var default_ = new V3ConcurrencyConfig("default", V3ConcurrencyConfigArgs.builder()
                .functionName(function.functionName())
                .reservedConcurrency("100")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      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}
          runtime: python3.9
          diskSize: '512'
          logConfig:
            logBeginRule: None
      default:
        type: alicloud:fc:V3ConcurrencyConfig
        properties:
          functionName: ${function.functionName}
          reservedConcurrency: '100'
    

    Create V3ConcurrencyConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new V3ConcurrencyConfig(name: string, args: V3ConcurrencyConfigArgs, opts?: CustomResourceOptions);
    @overload
    def V3ConcurrencyConfig(resource_name: str,
                            args: V3ConcurrencyConfigArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def V3ConcurrencyConfig(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            function_name: Optional[str] = None,
                            reserved_concurrency: Optional[int] = None)
    func NewV3ConcurrencyConfig(ctx *Context, name string, args V3ConcurrencyConfigArgs, opts ...ResourceOption) (*V3ConcurrencyConfig, error)
    public V3ConcurrencyConfig(string name, V3ConcurrencyConfigArgs args, CustomResourceOptions? opts = null)
    public V3ConcurrencyConfig(String name, V3ConcurrencyConfigArgs args)
    public V3ConcurrencyConfig(String name, V3ConcurrencyConfigArgs args, CustomResourceOptions options)
    
    type: alicloud:fc:V3ConcurrencyConfig
    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 V3ConcurrencyConfigArgs
    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 V3ConcurrencyConfigArgs
    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 V3ConcurrencyConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args V3ConcurrencyConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args V3ConcurrencyConfigArgs
    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 v3concurrencyConfigResource = new AliCloud.FC.V3ConcurrencyConfig("v3concurrencyConfigResource", new()
    {
        FunctionName = "string",
        ReservedConcurrency = 0,
    });
    
    example, err := fc.NewV3ConcurrencyConfig(ctx, "v3concurrencyConfigResource", &fc.V3ConcurrencyConfigArgs{
    	FunctionName:        pulumi.String("string"),
    	ReservedConcurrency: pulumi.Int(0),
    })
    
    var v3concurrencyConfigResource = new V3ConcurrencyConfig("v3concurrencyConfigResource", V3ConcurrencyConfigArgs.builder()
        .functionName("string")
        .reservedConcurrency(0)
        .build());
    
    v3concurrency_config_resource = alicloud.fc.V3ConcurrencyConfig("v3concurrencyConfigResource",
        function_name="string",
        reserved_concurrency=0)
    
    const v3concurrencyConfigResource = new alicloud.fc.V3ConcurrencyConfig("v3concurrencyConfigResource", {
        functionName: "string",
        reservedConcurrency: 0,
    });
    
    type: alicloud:fc:V3ConcurrencyConfig
    properties:
        functionName: string
        reservedConcurrency: 0
    

    V3ConcurrencyConfig 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 V3ConcurrencyConfig resource accepts the following input properties:

    FunctionName string
    Function Name
    ReservedConcurrency int
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    FunctionName string
    Function Name
    ReservedConcurrency int
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    functionName String
    Function Name
    reservedConcurrency Integer
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    functionName string
    Function Name
    reservedConcurrency number
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    function_name str
    Function Name
    reserved_concurrency int
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    functionName String
    Function Name
    reservedConcurrency Number
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the V3ConcurrencyConfig resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing V3ConcurrencyConfig Resource

    Get an existing V3ConcurrencyConfig 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?: V3ConcurrencyConfigState, opts?: CustomResourceOptions): V3ConcurrencyConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            function_name: Optional[str] = None,
            reserved_concurrency: Optional[int] = None) -> V3ConcurrencyConfig
    func GetV3ConcurrencyConfig(ctx *Context, name string, id IDInput, state *V3ConcurrencyConfigState, opts ...ResourceOption) (*V3ConcurrencyConfig, error)
    public static V3ConcurrencyConfig Get(string name, Input<string> id, V3ConcurrencyConfigState? state, CustomResourceOptions? opts = null)
    public static V3ConcurrencyConfig get(String name, Output<String> id, V3ConcurrencyConfigState 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.
    The following state arguments are supported:
    FunctionName string
    Function Name
    ReservedConcurrency int
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    FunctionName string
    Function Name
    ReservedConcurrency int
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    functionName String
    Function Name
    reservedConcurrency Integer
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    functionName string
    Function Name
    reservedConcurrency number
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    function_name str
    Function Name
    reserved_concurrency int
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.
    functionName String
    Function Name
    reservedConcurrency Number
    Reserved Concurrency. Functions reserve a part of account concurrency. Other functions cannot use this part of concurrency. Reserved concurrency includes the total concurrency of Reserved Instances and As-You-go instances.

    Import

    FCV3 Concurrency Config can be imported using the id, e.g.

    $ pulumi import alicloud:fc/v3ConcurrencyConfig:V3ConcurrencyConfig 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.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi