1. Packages
  2. Yandex
  3. API Docs
  4. FunctionScalingPolicy
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.FunctionScalingPolicy

Explore with Pulumi AI

yandex logo
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

    Allows management of Yandex Cloud Function Scaling Policies

    Example Usage

    using Pulumi;
    using Yandex = Pulumi.Yandex;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var myScalingPolicy = new Yandex.FunctionScalingPolicy("myScalingPolicy", new Yandex.FunctionScalingPolicyArgs
            {
                FunctionId = "are1samplefunction11",
                Policies = 
                {
                    new Yandex.Inputs.FunctionScalingPolicyPolicyArgs
                    {
                        Tag = "$latest",
                        ZoneInstancesLimit = 3,
                        ZoneRequestsLimit = 100,
                    },
                    new Yandex.Inputs.FunctionScalingPolicyPolicyArgs
                    {
                        Tag = "my_tag",
                        ZoneInstancesLimit = 4,
                        ZoneRequestsLimit = 150,
                    },
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := yandex.NewFunctionScalingPolicy(ctx, "myScalingPolicy", &yandex.FunctionScalingPolicyArgs{
    			FunctionId: pulumi.String("are1samplefunction11"),
    			Policies: FunctionScalingPolicyPolicyArray{
    				&FunctionScalingPolicyPolicyArgs{
    					Tag:                pulumi.String(fmt.Sprintf("%v%v", "$", "latest")),
    					ZoneInstancesLimit: pulumi.Int(3),
    					ZoneRequestsLimit:  pulumi.Int(100),
    				},
    				&FunctionScalingPolicyPolicyArgs{
    					Tag:                pulumi.String("my_tag"),
    					ZoneInstancesLimit: pulumi.Int(4),
    					ZoneRequestsLimit:  pulumi.Int(150),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_yandex as yandex
    
    my_scaling_policy = yandex.FunctionScalingPolicy("myScalingPolicy",
        function_id="are1samplefunction11",
        policies=[
            yandex.FunctionScalingPolicyPolicyArgs(
                tag="$latest",
                zone_instances_limit=3,
                zone_requests_limit=100,
            ),
            yandex.FunctionScalingPolicyPolicyArgs(
                tag="my_tag",
                zone_instances_limit=4,
                zone_requests_limit=150,
            ),
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as yandex from "@pulumi/yandex";
    
    const myScalingPolicy = new yandex.FunctionScalingPolicy("my_scaling_policy", {
        functionId: "are1samplefunction11",
        policies: [
            {
                tag: "$latest",
                zoneInstancesLimit: 3,
                zoneRequestsLimit: 100,
            },
            {
                tag: "my_tag",
                zoneInstancesLimit: 4,
                zoneRequestsLimit: 150,
            },
        ],
    });
    

    Coming soon!

    Create FunctionScalingPolicy Resource

    new FunctionScalingPolicy(name: string, args: FunctionScalingPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def FunctionScalingPolicy(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              function_id: Optional[str] = None,
                              policies: Optional[Sequence[FunctionScalingPolicyPolicyArgs]] = None)
    @overload
    def FunctionScalingPolicy(resource_name: str,
                              args: FunctionScalingPolicyArgs,
                              opts: Optional[ResourceOptions] = None)
    func NewFunctionScalingPolicy(ctx *Context, name string, args FunctionScalingPolicyArgs, opts ...ResourceOption) (*FunctionScalingPolicy, error)
    public FunctionScalingPolicy(string name, FunctionScalingPolicyArgs args, CustomResourceOptions? opts = null)
    public FunctionScalingPolicy(String name, FunctionScalingPolicyArgs args)
    public FunctionScalingPolicy(String name, FunctionScalingPolicyArgs args, CustomResourceOptions options)
    
    type: yandex:FunctionScalingPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args FunctionScalingPolicyArgs
    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 FunctionScalingPolicyArgs
    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 FunctionScalingPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionScalingPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionScalingPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    FunctionId string
    Yandex Cloud Function id used to define function
    Policies List<FunctionScalingPolicyPolicy>
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    FunctionId string
    Yandex Cloud Function id used to define function
    Policies []FunctionScalingPolicyPolicyArgs
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    functionId String
    Yandex Cloud Function id used to define function
    policies List<FunctionScalingPolicyPolicy>
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    functionId string
    Yandex Cloud Function id used to define function
    policies FunctionScalingPolicyPolicy[]
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    function_id str
    Yandex Cloud Function id used to define function
    policies Sequence[FunctionScalingPolicyPolicyArgs]
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    functionId String
    Yandex Cloud Function id used to define function
    policies List<Property Map>
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FunctionScalingPolicy 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 FunctionScalingPolicy Resource

    Get an existing FunctionScalingPolicy 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?: FunctionScalingPolicyState, opts?: CustomResourceOptions): FunctionScalingPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            function_id: Optional[str] = None,
            policies: Optional[Sequence[FunctionScalingPolicyPolicyArgs]] = None) -> FunctionScalingPolicy
    func GetFunctionScalingPolicy(ctx *Context, name string, id IDInput, state *FunctionScalingPolicyState, opts ...ResourceOption) (*FunctionScalingPolicy, error)
    public static FunctionScalingPolicy Get(string name, Input<string> id, FunctionScalingPolicyState? state, CustomResourceOptions? opts = null)
    public static FunctionScalingPolicy get(String name, Output<String> id, FunctionScalingPolicyState 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:
    FunctionId string
    Yandex Cloud Function id used to define function
    Policies List<FunctionScalingPolicyPolicy>
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    FunctionId string
    Yandex Cloud Function id used to define function
    Policies []FunctionScalingPolicyPolicyArgs
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    functionId String
    Yandex Cloud Function id used to define function
    policies List<FunctionScalingPolicyPolicy>
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    functionId string
    Yandex Cloud Function id used to define function
    policies FunctionScalingPolicyPolicy[]
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    function_id str
    Yandex Cloud Function id used to define function
    policies Sequence[FunctionScalingPolicyPolicyArgs]
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag
    functionId String
    Yandex Cloud Function id used to define function
    policies List<Property Map>
    list definition for Yandex Cloud Function scaling policies

    • policy.# - number of Yandex Cloud Function scaling policies
    • policy.{num}.tag - Yandex.Cloud Function version tag for Yandex Cloud Function scaling policy
    • policy.{num}.zone_instances_limit - max number of instances in one zone for Yandex.Cloud Function with tag
    • policy.{num}.zone_requests_limit - max number of requests in one zone for Yandex.Cloud Function with tag

    Supporting Types

    FunctionScalingPolicyPolicy, FunctionScalingPolicyPolicyArgs

    Package Details

    Repository
    Yandex pulumi/pulumi-yandex
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the yandex Terraform Provider.
    yandex logo
    Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi