alicloud.fc.V3Alias
Explore with Pulumi AI
Provides a FCV3 Alias resource.
Alias for functions.
For information about FCV3 Alias and how to use it, see What is Alias.
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 functionName = config.get("functionName") || "flask-3xdg";
const _default = new alicloud.fc.V3Alias("default", {
versionId: "1",
functionName: functionName,
description: "create alias",
aliasName: name,
additionalVersionWeight: {
"2": 0.5,
},
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
function_name = config.get("functionName")
if function_name is None:
function_name = "flask-3xdg"
default = alicloud.fc.V3Alias("default",
version_id="1",
function_name=function_name,
description="create alias",
alias_name=name,
additional_version_weight={
"2": 0.5,
})
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
}
functionName := "flask-3xdg"
if param := cfg.Get("functionName"); param != "" {
functionName = param
}
_, err := fc.NewV3Alias(ctx, "default", &fc.V3AliasArgs{
VersionId: pulumi.String("1"),
FunctionName: pulumi.String(functionName),
Description: pulumi.String("create alias"),
AliasName: pulumi.String(name),
AdditionalVersionWeight: pulumi.Float64Map{
"2": pulumi.Float64(0.5),
},
})
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 functionName = config.Get("functionName") ?? "flask-3xdg";
var @default = new AliCloud.FC.V3Alias("default", new()
{
VersionId = "1",
FunctionName = functionName,
Description = "create alias",
AliasName = name,
AdditionalVersionWeight =
{
{ "2", 0.5 },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fc.V3Alias;
import com.pulumi.alicloud.fc.V3AliasArgs;
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");
final var functionName = config.get("functionName").orElse("flask-3xdg");
var default_ = new V3Alias("default", V3AliasArgs.builder()
.versionId("1")
.functionName(functionName)
.description("create alias")
.aliasName(name)
.additionalVersionWeight(Map.of("2", "0.5"))
.build());
}
}
configuration:
name:
type: string
default: terraform-example
functionName:
type: string
default: flask-3xdg
resources:
default:
type: alicloud:fc:V3Alias
properties:
versionId: '1'
functionName: ${functionName}
description: create alias
aliasName: ${name}
additionalVersionWeight:
'2': '0.5'
Create V3Alias Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new V3Alias(name: string, args: V3AliasArgs, opts?: CustomResourceOptions);
@overload
def V3Alias(resource_name: str,
args: V3AliasArgs,
opts: Optional[ResourceOptions] = None)
@overload
def V3Alias(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_name: Optional[str] = None,
additional_version_weight: Optional[Mapping[str, float]] = None,
alias_name: Optional[str] = None,
description: Optional[str] = None,
version_id: Optional[str] = None)
func NewV3Alias(ctx *Context, name string, args V3AliasArgs, opts ...ResourceOption) (*V3Alias, error)
public V3Alias(string name, V3AliasArgs args, CustomResourceOptions? opts = null)
public V3Alias(String name, V3AliasArgs args)
public V3Alias(String name, V3AliasArgs args, CustomResourceOptions options)
type: alicloud:fc:V3Alias
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 V3AliasArgs
- 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 V3AliasArgs
- 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 V3AliasArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args V3AliasArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args V3AliasArgs
- 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 v3aliasResource = new AliCloud.FC.V3Alias("v3aliasResource", new()
{
FunctionName = "string",
AdditionalVersionWeight =
{
{ "string", 0 },
},
AliasName = "string",
Description = "string",
VersionId = "string",
});
example, err := fc.NewV3Alias(ctx, "v3aliasResource", &fc.V3AliasArgs{
FunctionName: pulumi.String("string"),
AdditionalVersionWeight: pulumi.Float64Map{
"string": pulumi.Float64(0),
},
AliasName: pulumi.String("string"),
Description: pulumi.String("string"),
VersionId: pulumi.String("string"),
})
var v3aliasResource = new V3Alias("v3aliasResource", V3AliasArgs.builder()
.functionName("string")
.additionalVersionWeight(Map.of("string", 0))
.aliasName("string")
.description("string")
.versionId("string")
.build());
v3alias_resource = alicloud.fc.V3Alias("v3aliasResource",
function_name="string",
additional_version_weight={
"string": 0,
},
alias_name="string",
description="string",
version_id="string")
const v3aliasResource = new alicloud.fc.V3Alias("v3aliasResource", {
functionName: "string",
additionalVersionWeight: {
string: 0,
},
aliasName: "string",
description: "string",
versionId: "string",
});
type: alicloud:fc:V3Alias
properties:
additionalVersionWeight:
string: 0
aliasName: string
description: string
functionName: string
versionId: string
V3Alias 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 V3Alias resource accepts the following input properties:
- Function
Name string - Function Name
- Additional
Version Dictionary<string, double>Weight - Grayscale version
- Alias
Name string - Function Alias
- Description string
- Description
- Version
Id string - The version that the alias points
- Function
Name string - Function Name
- Additional
Version map[string]float64Weight - Grayscale version
- Alias
Name string - Function Alias
- Description string
- Description
- Version
Id string - The version that the alias points
- function
Name String - Function Name
- additional
Version Map<String,Double>Weight - Grayscale version
- alias
Name String - Function Alias
- description String
- Description
- version
Id String - The version that the alias points
- function
Name string - Function Name
- additional
Version {[key: string]: number}Weight - Grayscale version
- alias
Name string - Function Alias
- description string
- Description
- version
Id string - The version that the alias points
- function_
name str - Function Name
- additional_
version_ Mapping[str, float]weight - Grayscale version
- alias_
name str - Function Alias
- description str
- Description
- version_
id str - The version that the alias points
- function
Name String - Function Name
- additional
Version Map<Number>Weight - Grayscale version
- alias
Name String - Function Alias
- description String
- Description
- version
Id String - The version that the alias points
Outputs
All input properties are implicitly available as output properties. Additionally, the V3Alias 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.
- Last
Modified stringTime - (Available since v1.234.0) Last modification time
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - (Available since v1.234.0) Last modification time
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - (Available since v1.234.0) Last modification time
- create
Time string - The creation time of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified stringTime - (Available since v1.234.0) Last modification time
- create_
time str - The creation time of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified_ strtime - (Available since v1.234.0) Last modification time
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - (Available since v1.234.0) Last modification time
Look up Existing V3Alias Resource
Get an existing V3Alias 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?: V3AliasState, opts?: CustomResourceOptions): V3Alias
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_version_weight: Optional[Mapping[str, float]] = None,
alias_name: Optional[str] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
function_name: Optional[str] = None,
last_modified_time: Optional[str] = None,
version_id: Optional[str] = None) -> V3Alias
func GetV3Alias(ctx *Context, name string, id IDInput, state *V3AliasState, opts ...ResourceOption) (*V3Alias, error)
public static V3Alias Get(string name, Input<string> id, V3AliasState? state, CustomResourceOptions? opts = null)
public static V3Alias get(String name, Output<String> id, V3AliasState 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.
- Additional
Version Dictionary<string, double>Weight - Grayscale version
- Alias
Name string - Function Alias
- Create
Time string - The creation time of the resource
- Description string
- Description
- Function
Name string - Function Name
- Last
Modified stringTime - (Available since v1.234.0) Last modification time
- Version
Id string - The version that the alias points
- Additional
Version map[string]float64Weight - Grayscale version
- Alias
Name string - Function Alias
- Create
Time string - The creation time of the resource
- Description string
- Description
- Function
Name string - Function Name
- Last
Modified stringTime - (Available since v1.234.0) Last modification time
- Version
Id string - The version that the alias points
- additional
Version Map<String,Double>Weight - Grayscale version
- alias
Name String - Function Alias
- create
Time String - The creation time of the resource
- description String
- Description
- function
Name String - Function Name
- last
Modified StringTime - (Available since v1.234.0) Last modification time
- version
Id String - The version that the alias points
- additional
Version {[key: string]: number}Weight - Grayscale version
- alias
Name string - Function Alias
- create
Time string - The creation time of the resource
- description string
- Description
- function
Name string - Function Name
- last
Modified stringTime - (Available since v1.234.0) Last modification time
- version
Id string - The version that the alias points
- additional_
version_ Mapping[str, float]weight - Grayscale version
- alias_
name str - Function Alias
- create_
time str - The creation time of the resource
- description str
- Description
- function_
name str - Function Name
- last_
modified_ strtime - (Available since v1.234.0) Last modification time
- version_
id str - The version that the alias points
- additional
Version Map<Number>Weight - Grayscale version
- alias
Name String - Function Alias
- create
Time String - The creation time of the resource
- description String
- Description
- function
Name String - Function Name
- last
Modified StringTime - (Available since v1.234.0) Last modification time
- version
Id String - The version that the alias points
Import
FCV3 Alias can be imported using the id, e.g.
$ pulumi import alicloud:fc/v3Alias:V3Alias example <function_name>:<alias_name>
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.