Updated on 2023-10-19 GMT+08:00

alias get

alias get is used to obtain details about a specified alias of a service.

You can run alias get -h or alias get --help to view the documentation.

Parameter Parsing

Table 1 Parameter description

Parameter Name

Abbreviation

Required in YAML

Required in CLI

Description

region

-

No

Yes

Region

function-name

-

No

Yes

Function name

alias-name

-

Yes

Yes

Alias

This command also supports some global parameters, such as -a/--access, --debug. For details, see Global Parameters of Serverless Devs.

Examples

  • If you have a resource description file (YAML), run s alias get --alias-name aliasName to obtain the details about a specified alias.
  • If you use CLI (without a YAML resource description file), specify the region and name of the service. For example, s cli fgs alias get --region cn-north-4 --function-name fg-test --alias-name pre.

When using CLI, if the key is not default, add the access parameter. For example, s cli fgs alias get --region cn-north-4 --function-name fg-test --alias-name pre --access xxxx.

Execution result of the preceding command:
fg-test:
  aliasName:               pre
  versionId:               1
  description:             test publish version
  additionalVersionWeight:
  createdTime:             2021-11-08T06:51:36Z
  lastModifiedTime:        2021-11-08T06:54:02Z