published on Monday, Aug 24, 2026 by Pulumi
published on Monday, Aug 24, 2026 by Pulumi
This data source provides the ESA Routine Code Versions of the current Alibaba Cloud user.
For information about ESA Routine Code Versions and how to use it, see ListRoutineCodeVersions.
NOTE: Available since v1.287.0.
NOTE: The underlying
ListRoutineCodeVersionsAPI caps pagination at 2 pages of up to 20 items each, so at most the 40 most recent code versions are returned.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.esa.getRoutineCodeVersions({
routineName: "terraform-example",
});
export const codeVersions = _default.then(_default => _default.versions);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.esa.get_routine_code_versions(routine_name="terraform-example")
pulumi.export("codeVersions", default.versions)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := esa.GetRoutineCodeVersions(ctx, &esa.GetRoutineCodeVersionsArgs{
RoutineName: "terraform-example",
}, nil)
if err != nil {
return err
}
ctx.Export("codeVersions", _default.Versions)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Esa.GetRoutineCodeVersions.Invoke(new()
{
RoutineName = "terraform-example",
});
return new Dictionary<string, object?>
{
["codeVersions"] = @default.Apply(@default => @default.Apply(getRoutineCodeVersionsResult => getRoutineCodeVersionsResult.Versions)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.inputs.GetRoutineCodeVersionsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 default = EsaFunctions.getRoutineCodeVersions(GetRoutineCodeVersionsArgs.builder()
.routineName("terraform-example")
.build());
ctx.export("codeVersions", default_.versions());
}
}
variables:
default:
fn::invoke:
function: alicloud:esa:getRoutineCodeVersions
arguments:
routineName: terraform-example
outputs:
codeVersions: ${default.versions}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_esa_getroutinecodeversions" "default" {
routine_name = "terraform-example"
}
output "codeVersions" {
value = data.alicloud_esa_getroutinecodeversions.default.versions
}
Using getRoutineCodeVersions
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRoutineCodeVersions(args: GetRoutineCodeVersionsArgs, opts?: InvokeOptions): Promise<GetRoutineCodeVersionsResult>
function getRoutineCodeVersionsOutput(args: GetRoutineCodeVersionsOutputArgs, opts?: InvokeOutputOptions): Output<GetRoutineCodeVersionsResult>def get_routine_code_versions(ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
routine_name: Optional[str] = None,
search_key_word: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRoutineCodeVersionsResult
def get_routine_code_versions_output(ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
output_file: pulumi.Input[Optional[str]] = None,
routine_name: pulumi.Input[Optional[str]] = None,
search_key_word: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetRoutineCodeVersionsResult]func GetRoutineCodeVersions(ctx *Context, args *GetRoutineCodeVersionsArgs, opts ...InvokeOption) (*GetRoutineCodeVersionsResult, error)
func GetRoutineCodeVersionsOutput(ctx *Context, args *GetRoutineCodeVersionsOutputArgs, opts ...InvokeOption) GetRoutineCodeVersionsResultOutput> Note: This function is named GetRoutineCodeVersions in the Go SDK.
public static class GetRoutineCodeVersions
{
public static Task<GetRoutineCodeVersionsResult> InvokeAsync(GetRoutineCodeVersionsArgs args, InvokeOptions? opts = null)
public static Output<GetRoutineCodeVersionsResult> Invoke(GetRoutineCodeVersionsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetRoutineCodeVersionsResult> Invoke(GetRoutineCodeVersionsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetRoutineCodeVersionsResult> getRoutineCodeVersions(GetRoutineCodeVersionsArgs args, InvokeOptions options)
public static Output<GetRoutineCodeVersionsResult> getRoutineCodeVersions(GetRoutineCodeVersionsArgs args, InvokeOptions options)
public static Output<GetRoutineCodeVersionsResult> getRoutineCodeVersions(GetRoutineCodeVersionsArgs args, InvokeOutputOptions options)
fn::invoke:
function: alicloud:esa/getRoutineCodeVersions:getRoutineCodeVersions
arguments:
# arguments dictionarydata "alicloud_esa_get_routine_code_versions" "name" {
# arguments
}The following arguments are supported:
- Routine
Name string - The name of the routine to query code versions for.
- Ids List<string>
- A list of code version IDs (code version numbers) used to filter the result.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Search
Key stringWord - A keyword used to fuzzy-match code versions.
- Routine
Name string - The name of the routine to query code versions for.
- Ids []string
- A list of code version IDs (code version numbers) used to filter the result.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Search
Key stringWord - A keyword used to fuzzy-match code versions.
- routine_
name string - The name of the routine to query code versions for.
- ids list(string)
- A list of code version IDs (code version numbers) used to filter the result.
- output_
file string - File name where to save data source results (after running
pulumi preview). - search_
key_ stringword - A keyword used to fuzzy-match code versions.
- routine
Name String - The name of the routine to query code versions for.
- ids List<String>
- A list of code version IDs (code version numbers) used to filter the result.
- output
File String - File name where to save data source results (after running
pulumi preview). - search
Key StringWord - A keyword used to fuzzy-match code versions.
- routine
Name string - The name of the routine to query code versions for.
- ids string[]
- A list of code version IDs (code version numbers) used to filter the result.
- output
File string - File name where to save data source results (after running
pulumi preview). - search
Key stringWord - A keyword used to fuzzy-match code versions.
- routine_
name str - The name of the routine to query code versions for.
- ids Sequence[str]
- A list of code version IDs (code version numbers) used to filter the result.
- output_
file str - File name where to save data source results (after running
pulumi preview). - search_
key_ strword - A keyword used to fuzzy-match code versions.
- routine
Name String - The name of the routine to query code versions for.
- ids List<String>
- A list of code version IDs (code version numbers) used to filter the result.
- output
File String - File name where to save data source results (after running
pulumi preview). - search
Key StringWord - A keyword used to fuzzy-match code versions.
getRoutineCodeVersions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Routine
Name string - Versions
List<Pulumi.
Ali Cloud. Esa. Outputs. Get Routine Code Versions Version> - A list of Routine Code Versions. Each element contains the following attributes:
- Output
File string - Search
Key stringWord
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Routine
Name string - Versions
[]Get
Routine Code Versions Version - A list of Routine Code Versions. Each element contains the following attributes:
- Output
File string - Search
Key stringWord
- id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- routine_
name string - versions list(object)
- A list of Routine Code Versions. Each element contains the following attributes:
- output_
file string - search_
key_ stringword
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- routine
Name String - versions
List<Get
Routine Code Versions Version> - A list of Routine Code Versions. Each element contains the following attributes:
- output
File String - search
Key StringWord
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- routine
Name string - versions
Get
Routine Code Versions Version[] - A list of Routine Code Versions. Each element contains the following attributes:
- output
File string - search
Key stringWord
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- routine_
name str - versions
Sequence[Get
Routine Code Versions Version] - A list of Routine Code Versions. Each element contains the following attributes:
- output_
file str - search_
key_ strword
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- routine
Name String - versions List<Property Map>
- A list of Routine Code Versions. Each element contains the following attributes:
- output
File String - search
Key StringWord
Supporting Types
GetRoutineCodeVersionsVersion
- Build
Id int - The build ID of the code version.
- Code
Description string - The description of the code version.
- Code
Version string - The code version number.
- Create
Time string - The time when the code version was created, in RFC 3339 (UTC) format.
- Deploy
Env string - The environment bundled with the code version. Valid values:
staging,production. - Has
Env boolVars - Whether the code version bundles environment variables.
- Id string
- The ID of the code version. Same as
codeVersion. - Status string
- The status of the code version.
- Build
Id int - The build ID of the code version.
- Code
Description string - The description of the code version.
- Code
Version string - The code version number.
- Create
Time string - The time when the code version was created, in RFC 3339 (UTC) format.
- Deploy
Env string - The environment bundled with the code version. Valid values:
staging,production. - Has
Env boolVars - Whether the code version bundles environment variables.
- Id string
- The ID of the code version. Same as
codeVersion. - Status string
- The status of the code version.
- build_
id number - The build ID of the code version.
- code_
description string - The description of the code version.
- code_
version string - The code version number.
- create_
time string - The time when the code version was created, in RFC 3339 (UTC) format.
- deploy_
env string - The environment bundled with the code version. Valid values:
staging,production. - has_
env_ boolvars - Whether the code version bundles environment variables.
- id string
- The ID of the code version. Same as
codeVersion. - status string
- The status of the code version.
- build
Id Integer - The build ID of the code version.
- code
Description String - The description of the code version.
- code
Version String - The code version number.
- create
Time String - The time when the code version was created, in RFC 3339 (UTC) format.
- deploy
Env String - The environment bundled with the code version. Valid values:
staging,production. - has
Env BooleanVars - Whether the code version bundles environment variables.
- id String
- The ID of the code version. Same as
codeVersion. - status String
- The status of the code version.
- build
Id number - The build ID of the code version.
- code
Description string - The description of the code version.
- code
Version string - The code version number.
- create
Time string - The time when the code version was created, in RFC 3339 (UTC) format.
- deploy
Env string - The environment bundled with the code version. Valid values:
staging,production. - has
Env booleanVars - Whether the code version bundles environment variables.
- id string
- The ID of the code version. Same as
codeVersion. - status string
- The status of the code version.
- build_
id int - The build ID of the code version.
- code_
description str - The description of the code version.
- code_
version str - The code version number.
- create_
time str - The time when the code version was created, in RFC 3339 (UTC) format.
- deploy_
env str - The environment bundled with the code version. Valid values:
staging,production. - has_
env_ boolvars - Whether the code version bundles environment variables.
- id str
- The ID of the code version. Same as
codeVersion. - status str
- The status of the code version.
- build
Id Number - The build ID of the code version.
- code
Description String - The description of the code version.
- code
Version String - The code version number.
- create
Time String - The time when the code version was created, in RFC 3339 (UTC) format.
- deploy
Env String - The environment bundled with the code version. Valid values:
staging,production. - has
Env BooleanVars - Whether the code version bundles environment variables.
- id String
- The ID of the code version. Same as
codeVersion. - status String
- The status of the code version.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Monday, Aug 24, 2026 by Pulumi