1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. eci
  5. getImageCaches
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.eci.getImageCaches

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.eci.get_image_caches(ids=["imc-bp1ef0dyp7ldhb1d****"])
    pulumi.export("imageCache", example.caches[0].id)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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.applyValue(getImageCachesResult -> getImageCachesResult.caches()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:eci:getImageCaches
          Arguments:
            ids:
              - imc-bp1ef0dyp7ldhb1d****
    outputs:
      imageCache: ${example.caches[0].id}
    

    Using getImageCaches

    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 getImageCaches(args: GetImageCachesArgs, opts?: InvokeOptions): Promise<GetImageCachesResult>
    function getImageCachesOutput(args: GetImageCachesOutputArgs, opts?: InvokeOptions): Output<GetImageCachesResult>
    def get_image_caches(ids: Optional[Sequence[str]] = None,
                         image: Optional[str] = None,
                         image_cache_name: Optional[str] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         snapshot_id: Optional[str] = None,
                         status: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetImageCachesResult
    def get_image_caches_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         image: Optional[pulumi.Input[str]] = None,
                         image_cache_name: Optional[pulumi.Input[str]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         snapshot_id: Optional[pulumi.Input[str]] = None,
                         status: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetImageCachesResult]
    func GetImageCaches(ctx *Context, args *GetImageCachesArgs, opts ...InvokeOption) (*GetImageCachesResult, error)
    func GetImageCachesOutput(ctx *Context, args *GetImageCachesOutputArgs, opts ...InvokeOption) GetImageCachesResultOutput

    > Note: This function is named GetImageCaches in the Go SDK.

    public static class GetImageCaches 
    {
        public static Task<GetImageCachesResult> InvokeAsync(GetImageCachesArgs args, InvokeOptions? opts = null)
        public static Output<GetImageCachesResult> Invoke(GetImageCachesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetImageCachesResult> getImageCaches(GetImageCachesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:eci/getImageCaches:getImageCaches
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list ids of ECI Image Cache.
    Image string
    Find the mirror cache containing it according to the image name.
    ImageCacheName string
    The name of ECI Image Cache.
    NameRegex string
    A regex string to filter results by the image cache name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SnapshotId string
    The id of snapshot.
    Status string
    The status of ECI Image Cache.
    Ids []string
    A list ids of ECI Image Cache.
    Image string
    Find the mirror cache containing it according to the image name.
    ImageCacheName string
    The name of ECI Image Cache.
    NameRegex string
    A regex string to filter results by the image cache name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SnapshotId string
    The id of snapshot.
    Status string
    The status of ECI Image Cache.
    ids List<String>
    A list ids of ECI Image Cache.
    image String
    Find the mirror cache containing it according to the image name.
    imageCacheName String
    The name of ECI Image Cache.
    nameRegex String
    A regex string to filter results by the image cache name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    snapshotId String
    The id of snapshot.
    status String
    The status of ECI Image Cache.
    ids string[]
    A list ids of ECI Image Cache.
    image string
    Find the mirror cache containing it according to the image name.
    imageCacheName string
    The name of ECI Image Cache.
    nameRegex string
    A regex string to filter results by the image cache name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    snapshotId string
    The id of snapshot.
    status string
    The status of ECI Image Cache.
    ids Sequence[str]
    A list ids of ECI Image Cache.
    image str
    Find the mirror cache containing it according to the image name.
    image_cache_name str
    The name of ECI Image Cache.
    name_regex str
    A regex string to filter results by the image cache name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    snapshot_id str
    The id of snapshot.
    status str
    The status of ECI Image Cache.
    ids List<String>
    A list ids of ECI Image Cache.
    image String
    Find the mirror cache containing it according to the image name.
    imageCacheName String
    The name of ECI Image Cache.
    nameRegex String
    A regex string to filter results by the image cache name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    snapshotId String
    The id of snapshot.
    status String
    The status of ECI Image Cache.

    getImageCaches Result

    The following output properties are available:

    Caches List<Pulumi.AliCloud.Eci.Outputs.GetImageCachesCach>
    A list of caches. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list ids of ECI Image Cache.
    Names List<string>
    A list of ECI Image Cache names.
    Image string
    ImageCacheName string
    The name of the ECI Image Cache.
    NameRegex string
    OutputFile string
    SnapshotId string
    The id of snapshot.
    Status string
    The status of ECI Image Cache.
    Caches []GetImageCachesCach
    A list of caches. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list ids of ECI Image Cache.
    Names []string
    A list of ECI Image Cache names.
    Image string
    ImageCacheName string
    The name of the ECI Image Cache.
    NameRegex string
    OutputFile string
    SnapshotId string
    The id of snapshot.
    Status string
    The status of ECI Image Cache.
    caches List<GetImageCachesCach>
    A list of caches. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list ids of ECI Image Cache.
    names List<String>
    A list of ECI Image Cache names.
    image String
    imageCacheName String
    The name of the ECI Image Cache.
    nameRegex String
    outputFile String
    snapshotId String
    The id of snapshot.
    status String
    The status of ECI Image Cache.
    caches GetImageCachesCach[]
    A list of caches. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list ids of ECI Image Cache.
    names string[]
    A list of ECI Image Cache names.
    image string
    imageCacheName string
    The name of the ECI Image Cache.
    nameRegex string
    outputFile string
    snapshotId string
    The id of snapshot.
    status string
    The status of ECI Image Cache.
    caches Sequence[GetImageCachesCach]
    A list of caches. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list ids of ECI Image Cache.
    names Sequence[str]
    A list of ECI Image Cache names.
    image str
    image_cache_name str
    The name of the ECI Image Cache.
    name_regex str
    output_file str
    snapshot_id str
    The id of snapshot.
    status str
    The status of ECI Image Cache.
    caches List<Property Map>
    A list of caches. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list ids of ECI Image Cache.
    names List<String>
    A list of ECI Image Cache names.
    image String
    imageCacheName String
    The name of the ECI Image Cache.
    nameRegex String
    outputFile String
    snapshotId String
    The id of snapshot.
    status String
    The status of ECI Image Cache.

    Supporting Types

    GetImageCachesCach

    ContainerGroupId string
    The id of container group.
    Events List<Pulumi.AliCloud.Eci.Inputs.GetImageCachesCachEvent>
    Image cache pulls image event information.
    ExpireDateTime string
    The time of expired.
    Id string
    The ID of the ECI Image Cache.
    ImageCacheId string
    The id of the ECI Image Cache.
    ImageCacheName string
    The name of ECI Image Cache.
    Images List<string>
    The list of cached images.
    Progress string
    The progress of ECI Image Cache.
    SnapshotId string
    The id of snapshot.
    Status string
    The status of ECI Image Cache.
    ContainerGroupId string
    The id of container group.
    Events []GetImageCachesCachEvent
    Image cache pulls image event information.
    ExpireDateTime string
    The time of expired.
    Id string
    The ID of the ECI Image Cache.
    ImageCacheId string
    The id of the ECI Image Cache.
    ImageCacheName string
    The name of ECI Image Cache.
    Images []string
    The list of cached images.
    Progress string
    The progress of ECI Image Cache.
    SnapshotId string
    The id of snapshot.
    Status string
    The status of ECI Image Cache.
    containerGroupId String
    The id of container group.
    events List<GetImageCachesCachEvent>
    Image cache pulls image event information.
    expireDateTime String
    The time of expired.
    id String
    The ID of the ECI Image Cache.
    imageCacheId String
    The id of the ECI Image Cache.
    imageCacheName String
    The name of ECI Image Cache.
    images List<String>
    The list of cached images.
    progress String
    The progress of ECI Image Cache.
    snapshotId String
    The id of snapshot.
    status String
    The status of ECI Image Cache.
    containerGroupId string
    The id of container group.
    events GetImageCachesCachEvent[]
    Image cache pulls image event information.
    expireDateTime string
    The time of expired.
    id string
    The ID of the ECI Image Cache.
    imageCacheId string
    The id of the ECI Image Cache.
    imageCacheName string
    The name of ECI Image Cache.
    images string[]
    The list of cached images.
    progress string
    The progress of ECI Image Cache.
    snapshotId string
    The id of snapshot.
    status string
    The status of ECI Image Cache.
    container_group_id str
    The id of container group.
    events Sequence[GetImageCachesCachEvent]
    Image cache pulls image event information.
    expire_date_time str
    The time of expired.
    id str
    The ID of the ECI Image Cache.
    image_cache_id str
    The id of the ECI Image Cache.
    image_cache_name str
    The name of ECI Image Cache.
    images Sequence[str]
    The list of cached images.
    progress str
    The progress of ECI Image Cache.
    snapshot_id str
    The id of snapshot.
    status str
    The status of ECI Image Cache.
    containerGroupId String
    The id of container group.
    events List<Property Map>
    Image cache pulls image event information.
    expireDateTime String
    The time of expired.
    id String
    The ID of the ECI Image Cache.
    imageCacheId String
    The id of the ECI Image Cache.
    imageCacheName String
    The name of ECI Image Cache.
    images List<String>
    The list of cached images.
    progress String
    The progress of ECI Image Cache.
    snapshotId String
    The id of snapshot.
    status String
    The status of ECI Image Cache.

    GetImageCachesCachEvent

    Count int
    Number of events.
    FirstTimestamp string
    Start time.
    LastTimestamp string
    End time.
    Message string
    Name string
    The name of event.
    Type string
    The type of event.
    Count int
    Number of events.
    FirstTimestamp string
    Start time.
    LastTimestamp string
    End time.
    Message string
    Name string
    The name of event.
    Type string
    The type of event.
    count Integer
    Number of events.
    firstTimestamp String
    Start time.
    lastTimestamp String
    End time.
    message String
    name String
    The name of event.
    type String
    The type of event.
    count number
    Number of events.
    firstTimestamp string
    Start time.
    lastTimestamp string
    End time.
    message string
    name string
    The name of event.
    type string
    The type of event.
    count int
    Number of events.
    first_timestamp str
    Start time.
    last_timestamp str
    End time.
    message str
    name str
    The name of event.
    type str
    The type of event.
    count Number
    Number of events.
    firstTimestamp String
    Start time.
    lastTimestamp String
    End time.
    message String
    name String
    The name of event.
    type String
    The type of event.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi