1. Packages
  2. Packages
  3. Scaleway
  4. API Docs
  5. edgeservices
  6. getCacheStage
Viewing docs for Scaleway v1.48.0
published on Wednesday, Apr 29, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.48.0
published on Wednesday, Apr 29, 2026 by pulumiverse

    Gets information about an Edge Services cache stage.

    A cache stage defines the caching behavior for an Edge Services pipeline, including TTL and whether cookies are included in cache keys.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Retrieve an Edge Services cache stage by its ID
    const byId = scaleway.edgeservices.getCacheStage({
        cacheStageId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Retrieve an Edge Services cache stage by its ID
    by_id = scaleway.edgeservices.get_cache_stage(cache_stage_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/edgeservices"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Retrieve an Edge Services cache stage by its ID
    		_, err := edgeservices.LookupCacheStage(ctx, &edgeservices.LookupCacheStageArgs{
    			CacheStageId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Retrieve an Edge Services cache stage by its ID
        var byId = Scaleway.Edgeservices.GetCacheStage.Invoke(new()
        {
            CacheStageId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.edgeservices.EdgeservicesFunctions;
    import com.pulumi.scaleway.edgeservices.inputs.GetCacheStageArgs;
    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) {
            // Retrieve an Edge Services cache stage by its ID
            final var byId = EdgeservicesFunctions.getCacheStage(GetCacheStageArgs.builder()
                .cacheStageId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      # Retrieve an Edge Services cache stage by its ID
      byId:
        fn::invoke:
          function: scaleway:edgeservices:getCacheStage
          arguments:
            cacheStageId: 11111111-1111-1111-1111-111111111111
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Retrieve an Edge Services cache stage by pipeline ID
    const byPipeline = scaleway.edgeservices.getCacheStage({
        pipelineId: main.id,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Retrieve an Edge Services cache stage by pipeline ID
    by_pipeline = scaleway.edgeservices.get_cache_stage(pipeline_id=main["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/edgeservices"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Retrieve an Edge Services cache stage by pipeline ID
    		_, err := edgeservices.LookupCacheStage(ctx, &edgeservices.LookupCacheStageArgs{
    			PipelineId: pulumi.StringRef(main.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Retrieve an Edge Services cache stage by pipeline ID
        var byPipeline = Scaleway.Edgeservices.GetCacheStage.Invoke(new()
        {
            PipelineId = main.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.edgeservices.EdgeservicesFunctions;
    import com.pulumi.scaleway.edgeservices.inputs.GetCacheStageArgs;
    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) {
            // Retrieve an Edge Services cache stage by pipeline ID
            final var byPipeline = EdgeservicesFunctions.getCacheStage(GetCacheStageArgs.builder()
                .pipelineId(main.id())
                .build());
    
        }
    }
    
    variables:
      # Retrieve an Edge Services cache stage by pipeline ID
      byPipeline:
        fn::invoke:
          function: scaleway:edgeservices:getCacheStage
          arguments:
            pipelineId: ${main.id}
    

    Using getCacheStage

    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 getCacheStage(args: GetCacheStageArgs, opts?: InvokeOptions): Promise<GetCacheStageResult>
    function getCacheStageOutput(args: GetCacheStageOutputArgs, opts?: InvokeOptions): Output<GetCacheStageResult>
    def get_cache_stage(cache_stage_id: Optional[str] = None,
                        pipeline_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetCacheStageResult
    def get_cache_stage_output(cache_stage_id: Optional[pulumi.Input[str]] = None,
                        pipeline_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetCacheStageResult]
    func LookupCacheStage(ctx *Context, args *LookupCacheStageArgs, opts ...InvokeOption) (*LookupCacheStageResult, error)
    func LookupCacheStageOutput(ctx *Context, args *LookupCacheStageOutputArgs, opts ...InvokeOption) LookupCacheStageResultOutput

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

    public static class GetCacheStage 
    {
        public static Task<GetCacheStageResult> InvokeAsync(GetCacheStageArgs args, InvokeOptions? opts = null)
        public static Output<GetCacheStageResult> Invoke(GetCacheStageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCacheStageResult> getCacheStage(GetCacheStageArgs args, InvokeOptions options)
    public static Output<GetCacheStageResult> getCacheStage(GetCacheStageArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:edgeservices/getCacheStage:getCacheStage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CacheStageId string

    The ID of the cache stage. Conflicts with all filter arguments below.

    The following filter arguments are supported (cannot be used with cacheStageId):

    PipelineId string
    The ID of the pipeline.
    CacheStageId string

    The ID of the cache stage. Conflicts with all filter arguments below.

    The following filter arguments are supported (cannot be used with cacheStageId):

    PipelineId string
    The ID of the pipeline.
    cacheStageId String

    The ID of the cache stage. Conflicts with all filter arguments below.

    The following filter arguments are supported (cannot be used with cacheStageId):

    pipelineId String
    The ID of the pipeline.
    cacheStageId string

    The ID of the cache stage. Conflicts with all filter arguments below.

    The following filter arguments are supported (cannot be used with cacheStageId):

    pipelineId string
    The ID of the pipeline.
    cache_stage_id str

    The ID of the cache stage. Conflicts with all filter arguments below.

    The following filter arguments are supported (cannot be used with cacheStageId):

    pipeline_id str
    The ID of the pipeline.
    cacheStageId String

    The ID of the cache stage. Conflicts with all filter arguments below.

    The following filter arguments are supported (cannot be used with cacheStageId):

    pipelineId String
    The ID of the pipeline.

    getCacheStage Result

    The following output properties are available:

    BackendStageId string
    CreatedAt string
    FallbackTtl int
    Id string
    The provider-assigned unique ID for this managed resource.
    IncludeCookies bool
    ProjectId string
    PurgeRequests []GetCacheStagePurgeRequest
    RefreshCache string
    RouteStageId string
    UpdatedAt string
    WafStageId string
    CacheStageId string
    PipelineId string
    backendStageId String
    createdAt String
    fallbackTtl Integer
    id String
    The provider-assigned unique ID for this managed resource.
    includeCookies Boolean
    projectId String
    purgeRequests List<GetCacheStagePurgeRequest>
    refreshCache String
    routeStageId String
    updatedAt String
    wafStageId String
    cacheStageId String
    pipelineId String
    backendStageId string
    createdAt string
    fallbackTtl number
    id string
    The provider-assigned unique ID for this managed resource.
    includeCookies boolean
    projectId string
    purgeRequests GetCacheStagePurgeRequest[]
    refreshCache string
    routeStageId string
    updatedAt string
    wafStageId string
    cacheStageId string
    pipelineId string
    backendStageId String
    createdAt String
    fallbackTtl Number
    id String
    The provider-assigned unique ID for this managed resource.
    includeCookies Boolean
    projectId String
    purgeRequests List<Property Map>
    refreshCache String
    routeStageId String
    updatedAt String
    wafStageId String
    cacheStageId String
    pipelineId String

    Supporting Types

    GetCacheStagePurgeRequest

    All bool
    Defines whether to purge all content
    Assets List<string>
    The list of asserts to purge
    PipelineId string
    The ID of the pipeline.
    All bool
    Defines whether to purge all content
    Assets []string
    The list of asserts to purge
    PipelineId string
    The ID of the pipeline.
    all Boolean
    Defines whether to purge all content
    assets List<String>
    The list of asserts to purge
    pipelineId String
    The ID of the pipeline.
    all boolean
    Defines whether to purge all content
    assets string[]
    The list of asserts to purge
    pipelineId string
    The ID of the pipeline.
    all bool
    Defines whether to purge all content
    assets Sequence[str]
    The list of asserts to purge
    pipeline_id str
    The ID of the pipeline.
    all Boolean
    Defines whether to purge all content
    assets List<String>
    The list of asserts to purge
    pipelineId String
    The ID of the pipeline.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.48.0
    published on Wednesday, Apr 29, 2026 by pulumiverse
      Try Pulumi Cloud free. Your team will thank you.