AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.ecr.getPullThroughCacheRule
Explore with Pulumi AI
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",
});
import pulumi
import pulumi_aws as aws
ecr_public = aws.ecr.get_pull_through_cache_rule(ecr_repository_prefix="ecr-public")
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
})
}
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",
});
});
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());
}
}
variables:
ecrPublic:
fn::invoke:
Function: aws:ecr:getPullThroughCacheRule
Arguments:
ecrRepositoryPrefix: ecr-public
Using getPullThroughCacheRule
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 getPullThroughCacheRule(args: GetPullThroughCacheRuleArgs, opts?: InvokeOptions): Promise<GetPullThroughCacheRuleResult>
function getPullThroughCacheRuleOutput(args: GetPullThroughCacheRuleOutputArgs, opts?: InvokeOptions): Output<GetPullThroughCacheRuleResult>
def get_pull_through_cache_rule(ecr_repository_prefix: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPullThroughCacheRuleResult
def get_pull_through_cache_rule_output(ecr_repository_prefix: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPullThroughCacheRuleResult]
func LookupPullThroughCacheRule(ctx *Context, args *LookupPullThroughCacheRuleArgs, opts ...InvokeOption) (*LookupPullThroughCacheRuleResult, error)
func LookupPullThroughCacheRuleOutput(ctx *Context, args *LookupPullThroughCacheRuleOutputArgs, opts ...InvokeOption) LookupPullThroughCacheRuleResultOutput
> Note: This function is named LookupPullThroughCacheRule
in the Go SDK.
public static class GetPullThroughCacheRule
{
public static Task<GetPullThroughCacheRuleResult> InvokeAsync(GetPullThroughCacheRuleArgs args, InvokeOptions? opts = null)
public static Output<GetPullThroughCacheRuleResult> Invoke(GetPullThroughCacheRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPullThroughCacheRuleResult> getPullThroughCacheRule(GetPullThroughCacheRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ecr/getPullThroughCacheRule:getPullThroughCacheRule
arguments:
# arguments dictionary
The following arguments are supported:
- Ecr
Repository stringPrefix - The repository name prefix to use when caching images from the source registry.
- Ecr
Repository stringPrefix - The repository name prefix to use when caching images from the source registry.
- ecr
Repository StringPrefix - The repository name prefix to use when caching images from the source registry.
- ecr
Repository stringPrefix - The repository name prefix to use when caching images from the source registry.
- ecr_
repository_ strprefix - The repository name prefix to use when caching images from the source registry.
- ecr
Repository StringPrefix - The repository name prefix to use when caching images from the source registry.
getPullThroughCacheRule Result
The following output properties are available:
- Credential
Arn string - ARN of the Secret which will be used to authenticate against the registry.
- Ecr
Repository stringPrefix - Id string
- The provider-assigned unique ID for this managed resource.
- Registry
Id string - The registry ID where the repository was created.
- Upstream
Registry stringUrl - The registry URL of the upstream public registry to use as the source.
- Credential
Arn string - ARN of the Secret which will be used to authenticate against the registry.
- Ecr
Repository stringPrefix - Id string
- The provider-assigned unique ID for this managed resource.
- Registry
Id string - The registry ID where the repository was created.
- Upstream
Registry stringUrl - The registry URL of the upstream public registry to use as the source.
- credential
Arn String - ARN of the Secret which will be used to authenticate against the registry.
- ecr
Repository StringPrefix - id String
- The provider-assigned unique ID for this managed resource.
- registry
Id String - The registry ID where the repository was created.
- upstream
Registry StringUrl - The registry URL of the upstream public registry to use as the source.
- credential
Arn string - ARN of the Secret which will be used to authenticate against the registry.
- ecr
Repository stringPrefix - id string
- The provider-assigned unique ID for this managed resource.
- registry
Id string - The registry ID where the repository was created.
- upstream
Registry stringUrl - The registry URL of the upstream public registry to use as the source.
- credential_
arn str - ARN of the Secret which will be used to authenticate against the registry.
- ecr_
repository_ strprefix - id str
- The provider-assigned unique ID for this managed resource.
- registry_
id str - The registry ID where the repository was created.
- upstream_
registry_ strurl - The registry URL of the upstream public registry to use as the source.
- credential
Arn String - ARN of the Secret which will be used to authenticate against the registry.
- ecr
Repository StringPrefix - id String
- The provider-assigned unique ID for this managed resource.
- registry
Id String - The registry ID where the repository was created.
- upstream
Registry StringUrl - The registry URL of the upstream public registry to use as the source.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.