volcengine.vefaas.Release
Explore with Pulumi AI
Provides a resource to manage vefaas release
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.vefaas.Release("foo", {
functionId: "9p5emxxxx",
revisionNumber: 0,
targetTrafficWeight: 30,
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.vefaas.Release("foo",
function_id="9p5emxxxx",
revision_number=0,
target_traffic_weight=30)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vefaas"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vefaas.NewRelease(ctx, "foo", &vefaas.ReleaseArgs{
FunctionId: pulumi.String("9p5emxxxx"),
RevisionNumber: pulumi.Int(0),
TargetTrafficWeight: pulumi.Int(30),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Vefaas.Release("foo", new()
{
FunctionId = "9p5emxxxx",
RevisionNumber = 0,
TargetTrafficWeight = 30,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vefaas.Release;
import com.pulumi.volcengine.vefaas.ReleaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new Release("foo", ReleaseArgs.builder()
.functionId("9p5emxxxx")
.revisionNumber(0)
.targetTrafficWeight(30)
.build());
}
}
resources:
foo:
type: volcengine:vefaas:Release
properties:
functionId: 9p5emxxxx
revisionNumber: 0
targetTrafficWeight: 30
Create Release Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Release(name: string, args: ReleaseArgs, opts?: CustomResourceOptions);
@overload
def Release(resource_name: str,
args: ReleaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Release(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_id: Optional[str] = None,
revision_number: Optional[int] = None,
description: Optional[str] = None,
max_instance: Optional[int] = None,
rolling_step: Optional[str] = None,
target_traffic_weight: Optional[int] = None)
func NewRelease(ctx *Context, name string, args ReleaseArgs, opts ...ResourceOption) (*Release, error)
public Release(string name, ReleaseArgs args, CustomResourceOptions? opts = null)
public Release(String name, ReleaseArgs args)
public Release(String name, ReleaseArgs args, CustomResourceOptions options)
type: volcengine:vefaas:Release
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 ReleaseArgs
- 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 ReleaseArgs
- 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 ReleaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReleaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ReleaseArgs
- 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 releaseResource = new Volcengine.Vefaas.Release("releaseResource", new()
{
FunctionId = "string",
RevisionNumber = 0,
Description = "string",
MaxInstance = 0,
RollingStep = "string",
TargetTrafficWeight = 0,
});
example, err := vefaas.NewRelease(ctx, "releaseResource", &vefaas.ReleaseArgs{
FunctionId: pulumi.String("string"),
RevisionNumber: pulumi.Int(0),
Description: pulumi.String("string"),
MaxInstance: pulumi.Int(0),
RollingStep: pulumi.String("string"),
TargetTrafficWeight: pulumi.Int(0),
})
var releaseResource = new Release("releaseResource", ReleaseArgs.builder()
.functionId("string")
.revisionNumber(0)
.description("string")
.maxInstance(0)
.rollingStep("string")
.targetTrafficWeight(0)
.build());
release_resource = volcengine.vefaas.Release("releaseResource",
function_id="string",
revision_number=0,
description="string",
max_instance=0,
rolling_step="string",
target_traffic_weight=0)
const releaseResource = new volcengine.vefaas.Release("releaseResource", {
functionId: "string",
revisionNumber: 0,
description: "string",
maxInstance: 0,
rollingStep: "string",
targetTrafficWeight: 0,
});
type: volcengine:vefaas:Release
properties:
description: string
functionId: string
maxInstance: 0
revisionNumber: 0
rollingStep: string
targetTrafficWeight: 0
Release 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 Release resource accepts the following input properties:
- Function
Id string - The ID of Function.
- Revision
Number int - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Description string
- The description of released this time.
- Max
Instance int - Upper limit of the number of function instances.
- Rolling
Step string - Percentage of grayscale step size.
- Target
Traffic intWeight - Target percentage of published traffic.
- Function
Id string - The ID of Function.
- Revision
Number int - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Description string
- The description of released this time.
- Max
Instance int - Upper limit of the number of function instances.
- Rolling
Step string - Percentage of grayscale step size.
- Target
Traffic intWeight - Target percentage of published traffic.
- function
Id String - The ID of Function.
- revision
Number Integer - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- description String
- The description of released this time.
- max
Instance Integer - Upper limit of the number of function instances.
- rolling
Step String - Percentage of grayscale step size.
- target
Traffic IntegerWeight - Target percentage of published traffic.
- function
Id string - The ID of Function.
- revision
Number number - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- description string
- The description of released this time.
- max
Instance number - Upper limit of the number of function instances.
- rolling
Step string - Percentage of grayscale step size.
- target
Traffic numberWeight - Target percentage of published traffic.
- function_
id str - The ID of Function.
- revision_
number int - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- description str
- The description of released this time.
- max_
instance int - Upper limit of the number of function instances.
- rolling_
step str - Percentage of grayscale step size.
- target_
traffic_ intweight - Target percentage of published traffic.
- function
Id String - The ID of Function.
- revision
Number Number - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- description String
- The description of released this time.
- max
Instance Number - Upper limit of the number of function instances.
- rolling
Step String - Percentage of grayscale step size.
- target
Traffic NumberWeight - Target percentage of published traffic.
Outputs
All input properties are implicitly available as output properties. Additionally, the Release resource produces the following output properties:
- Current
Traffic intWeight - The current percentage of current published traffic.
- Error
Code string - Error code when the release fails.
- Failed
Instance stringLogs - Download link for the failed instance log.
- Id string
- The provider-assigned unique ID for this managed resource.
- New
Revision intNumber - The version number of the newly released version.
- Old
Revision intNumber - The version number of the old version.
- Release
Record stringId - The ID of Release record.
- Stable
Revision intNumber - The current version number that is stably running online.
- Start
Time string - The current release start time.
- Status string
- The status of function release.
- Status
Message string - Detailed information of the function release status.
- Current
Traffic intWeight - The current percentage of current published traffic.
- Error
Code string - Error code when the release fails.
- Failed
Instance stringLogs - Download link for the failed instance log.
- Id string
- The provider-assigned unique ID for this managed resource.
- New
Revision intNumber - The version number of the newly released version.
- Old
Revision intNumber - The version number of the old version.
- Release
Record stringId - The ID of Release record.
- Stable
Revision intNumber - The current version number that is stably running online.
- Start
Time string - The current release start time.
- Status string
- The status of function release.
- Status
Message string - Detailed information of the function release status.
- current
Traffic IntegerWeight - The current percentage of current published traffic.
- error
Code String - Error code when the release fails.
- failed
Instance StringLogs - Download link for the failed instance log.
- id String
- The provider-assigned unique ID for this managed resource.
- new
Revision IntegerNumber - The version number of the newly released version.
- old
Revision IntegerNumber - The version number of the old version.
- release
Record StringId - The ID of Release record.
- stable
Revision IntegerNumber - The current version number that is stably running online.
- start
Time String - The current release start time.
- status String
- The status of function release.
- status
Message String - Detailed information of the function release status.
- current
Traffic numberWeight - The current percentage of current published traffic.
- error
Code string - Error code when the release fails.
- failed
Instance stringLogs - Download link for the failed instance log.
- id string
- The provider-assigned unique ID for this managed resource.
- new
Revision numberNumber - The version number of the newly released version.
- old
Revision numberNumber - The version number of the old version.
- release
Record stringId - The ID of Release record.
- stable
Revision numberNumber - The current version number that is stably running online.
- start
Time string - The current release start time.
- status string
- The status of function release.
- status
Message string - Detailed information of the function release status.
- current_
traffic_ intweight - The current percentage of current published traffic.
- error_
code str - Error code when the release fails.
- failed_
instance_ strlogs - Download link for the failed instance log.
- id str
- The provider-assigned unique ID for this managed resource.
- new_
revision_ intnumber - The version number of the newly released version.
- old_
revision_ intnumber - The version number of the old version.
- release_
record_ strid - The ID of Release record.
- stable_
revision_ intnumber - The current version number that is stably running online.
- start_
time str - The current release start time.
- status str
- The status of function release.
- status_
message str - Detailed information of the function release status.
- current
Traffic NumberWeight - The current percentage of current published traffic.
- error
Code String - Error code when the release fails.
- failed
Instance StringLogs - Download link for the failed instance log.
- id String
- The provider-assigned unique ID for this managed resource.
- new
Revision NumberNumber - The version number of the newly released version.
- old
Revision NumberNumber - The version number of the old version.
- release
Record StringId - The ID of Release record.
- stable
Revision NumberNumber - The current version number that is stably running online.
- start
Time String - The current release start time.
- status String
- The status of function release.
- status
Message String - Detailed information of the function release status.
Look up Existing Release Resource
Get an existing Release 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?: ReleaseState, opts?: CustomResourceOptions): Release
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
current_traffic_weight: Optional[int] = None,
description: Optional[str] = None,
error_code: Optional[str] = None,
failed_instance_logs: Optional[str] = None,
function_id: Optional[str] = None,
max_instance: Optional[int] = None,
new_revision_number: Optional[int] = None,
old_revision_number: Optional[int] = None,
release_record_id: Optional[str] = None,
revision_number: Optional[int] = None,
rolling_step: Optional[str] = None,
stable_revision_number: Optional[int] = None,
start_time: Optional[str] = None,
status: Optional[str] = None,
status_message: Optional[str] = None,
target_traffic_weight: Optional[int] = None) -> Release
func GetRelease(ctx *Context, name string, id IDInput, state *ReleaseState, opts ...ResourceOption) (*Release, error)
public static Release Get(string name, Input<string> id, ReleaseState? state, CustomResourceOptions? opts = null)
public static Release get(String name, Output<String> id, ReleaseState state, CustomResourceOptions options)
resources: _: type: volcengine:vefaas:Release get: id: ${id}
- 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.
- Current
Traffic intWeight - The current percentage of current published traffic.
- Description string
- The description of released this time.
- Error
Code string - Error code when the release fails.
- Failed
Instance stringLogs - Download link for the failed instance log.
- Function
Id string - The ID of Function.
- Max
Instance int - Upper limit of the number of function instances.
- New
Revision intNumber - The version number of the newly released version.
- Old
Revision intNumber - The version number of the old version.
- Release
Record stringId - The ID of Release record.
- Revision
Number int - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Rolling
Step string - Percentage of grayscale step size.
- Stable
Revision intNumber - The current version number that is stably running online.
- Start
Time string - The current release start time.
- Status string
- The status of function release.
- Status
Message string - Detailed information of the function release status.
- Target
Traffic intWeight - Target percentage of published traffic.
- Current
Traffic intWeight - The current percentage of current published traffic.
- Description string
- The description of released this time.
- Error
Code string - Error code when the release fails.
- Failed
Instance stringLogs - Download link for the failed instance log.
- Function
Id string - The ID of Function.
- Max
Instance int - Upper limit of the number of function instances.
- New
Revision intNumber - The version number of the newly released version.
- Old
Revision intNumber - The version number of the old version.
- Release
Record stringId - The ID of Release record.
- Revision
Number int - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Rolling
Step string - Percentage of grayscale step size.
- Stable
Revision intNumber - The current version number that is stably running online.
- Start
Time string - The current release start time.
- Status string
- The status of function release.
- Status
Message string - Detailed information of the function release status.
- Target
Traffic intWeight - Target percentage of published traffic.
- current
Traffic IntegerWeight - The current percentage of current published traffic.
- description String
- The description of released this time.
- error
Code String - Error code when the release fails.
- failed
Instance StringLogs - Download link for the failed instance log.
- function
Id String - The ID of Function.
- max
Instance Integer - Upper limit of the number of function instances.
- new
Revision IntegerNumber - The version number of the newly released version.
- old
Revision IntegerNumber - The version number of the old version.
- release
Record StringId - The ID of Release record.
- revision
Number Integer - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- rolling
Step String - Percentage of grayscale step size.
- stable
Revision IntegerNumber - The current version number that is stably running online.
- start
Time String - The current release start time.
- status String
- The status of function release.
- status
Message String - Detailed information of the function release status.
- target
Traffic IntegerWeight - Target percentage of published traffic.
- current
Traffic numberWeight - The current percentage of current published traffic.
- description string
- The description of released this time.
- error
Code string - Error code when the release fails.
- failed
Instance stringLogs - Download link for the failed instance log.
- function
Id string - The ID of Function.
- max
Instance number - Upper limit of the number of function instances.
- new
Revision numberNumber - The version number of the newly released version.
- old
Revision numberNumber - The version number of the old version.
- release
Record stringId - The ID of Release record.
- revision
Number number - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- rolling
Step string - Percentage of grayscale step size.
- stable
Revision numberNumber - The current version number that is stably running online.
- start
Time string - The current release start time.
- status string
- The status of function release.
- status
Message string - Detailed information of the function release status.
- target
Traffic numberWeight - Target percentage of published traffic.
- current_
traffic_ intweight - The current percentage of current published traffic.
- description str
- The description of released this time.
- error_
code str - Error code when the release fails.
- failed_
instance_ strlogs - Download link for the failed instance log.
- function_
id str - The ID of Function.
- max_
instance int - Upper limit of the number of function instances.
- new_
revision_ intnumber - The version number of the newly released version.
- old_
revision_ intnumber - The version number of the old version.
- release_
record_ strid - The ID of Release record.
- revision_
number int - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- rolling_
step str - Percentage of grayscale step size.
- stable_
revision_ intnumber - The current version number that is stably running online.
- start_
time str - The current release start time.
- status str
- The status of function release.
- status_
message str - Detailed information of the function release status.
- target_
traffic_ intweight - Target percentage of published traffic.
- current
Traffic NumberWeight - The current percentage of current published traffic.
- description String
- The description of released this time.
- error
Code String - Error code when the release fails.
- failed
Instance StringLogs - Download link for the failed instance log.
- function
Id String - The ID of Function.
- max
Instance Number - Upper limit of the number of function instances.
- new
Revision NumberNumber - The version number of the newly released version.
- old
Revision NumberNumber - The version number of the old version.
- release
Record StringId - The ID of Release record.
- revision
Number Number - When the RevisionNumber to be released is 0, the Latest code (Latest) will be released and a new version will be created. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- rolling
Step String - Percentage of grayscale step size.
- stable
Revision NumberNumber - The current version number that is stably running online.
- start
Time String - The current release start time.
- status String
- The status of function release.
- status
Message String - Detailed information of the function release status.
- target
Traffic NumberWeight - Target percentage of published traffic.
Import
VefaasRelease can be imported using the id, e.g.
$ pulumi import volcengine:vefaas/release:Release default FunctionId:ReleaseRecordId
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.