get Pull Through Cache Rule
suspend fun getPullThroughCacheRule(argument: GetPullThroughCacheRulePlainArgs): GetPullThroughCacheRuleResult
The ECR Pull Through Cache Rule data source allows the upstream registry URL and registry ID to be retrieved for a Pull Through Cache Rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ecrPublic = aws.ecr.getPullThroughCacheRule({
ecrRepositoryPrefix: "ecr-public",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
ecr_public = aws.ecr.get_pull_through_cache_rule(ecr_repository_prefix="ecr-public")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var ecrPublic = Aws.Ecr.GetPullThroughCacheRule.Invoke(new()
{
EcrRepositoryPrefix = "ecr-public",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecr.LookupPullThroughCacheRule(ctx, &ecr.LookupPullThroughCacheRuleArgs{
EcrRepositoryPrefix: "ecr-public",
}, nil)
if err != nil {
return err
}
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.aws.ecr.EcrFunctions;
import com.pulumi.aws.ecr.inputs.GetPullThroughCacheRuleArgs;
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 ecrPublic = EcrFunctions.getPullThroughCacheRule(GetPullThroughCacheRuleArgs.builder()
.ecrRepositoryPrefix("ecr-public")
.build());
}
}
Content copied to clipboard
variables:
ecrPublic:
fn::invoke:
function: aws:ecr:getPullThroughCacheRule
arguments:
ecrRepositoryPrefix: ecr-public
Content copied to clipboard
Return
A collection of values returned by getPullThroughCacheRule.
Parameters
argument
A collection of arguments for invoking getPullThroughCacheRule.
Return
A collection of values returned by getPullThroughCacheRule.
Parameters
ecr Repository Prefix
The repository name prefix to use when caching images from the source registry.
See also
suspend fun getPullThroughCacheRule(argument: suspend GetPullThroughCacheRulePlainArgsBuilder.() -> Unit): GetPullThroughCacheRuleResult
Return
A collection of values returned by getPullThroughCacheRule.
Parameters
argument
Builder for com.pulumi.aws.ecr.kotlin.inputs.GetPullThroughCacheRulePlainArgs.