get Image Caches
Provides a collection of ECI Image Cache to the specified filters.
NOTE: Available in 1.90.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.eci.getImageCaches({
ids: ["imc-bp1ef0dyp7ldhb1d****"],
});
export const imageCache = example.then(example => example.caches?.[0]?.id);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.eci.get_image_caches(ids=["imc-bp1ef0dyp7ldhb1d****"])
pulumi.export("imageCache", example.caches[0].id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Eci.GetImageCaches.Invoke(new()
{
Ids = new[]
{
"imc-bp1ef0dyp7ldhb1d****",
},
});
return new Dictionary<string, object?>
{
["imageCache"] = example.Apply(getImageCachesResult => getImageCachesResult.Caches[0]?.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eci"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := eci.GetImageCaches(ctx, &eci.GetImageCachesArgs{
Ids: []string{
"imc-bp1ef0dyp7ldhb1d****",
},
}, nil)
if err != nil {
return err
}
ctx.Export("imageCache", example.Caches[0].Id)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eci.EciFunctions;
import com.pulumi.alicloud.eci.inputs.GetImageCachesArgs;
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 example = EciFunctions.getImageCaches(GetImageCachesArgs.builder()
.ids("imc-bp1ef0dyp7ldhb1d****")
.build());
ctx.export("imageCache", example.caches()[0].id());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: alicloud:eci:getImageCaches
arguments:
ids:
- imc-bp1ef0dyp7ldhb1d****
outputs:
imageCache: ${example.caches[0].id}
Content copied to clipboard
Return
A collection of values returned by getImageCaches.
Parameters
argument
A collection of arguments for invoking getImageCaches.
suspend fun getImageCaches(ids: List<String>? = null, image: String? = null, imageCacheName: String? = null, nameRegex: String? = null, outputFile: String? = null, snapshotId: String? = null, status: String? = null): GetImageCachesResult
Return
A collection of values returned by getImageCaches.
Parameters
ids
A list ids of ECI Image Cache.
image
Find the mirror cache containing it according to the image name.
image Cache Name
The name of ECI Image Cache.
name Regex
A regex string to filter results by the image cache name.
output File
File name where to save data source results (after running pulumi preview
).
snapshot Id
The id of snapshot.
status
The status of ECI Image Cache.
See also
suspend fun getImageCaches(argument: suspend GetImageCachesPlainArgsBuilder.() -> Unit): GetImageCachesResult
Return
A collection of values returned by getImageCaches.
Parameters
argument
Builder for com.pulumi.alicloud.eci.kotlin.inputs.GetImageCachesPlainArgs.