1. Packages
  2. Azure Classic
  3. API Docs
  4. containerservice
  5. getRegistryCacheRule

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.containerservice.getRegistryCacheRule

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing Container Registry Cache Rule.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.containerservice.ContainerserviceFunctions;
import com.pulumi.azure.containerservice.inputs.GetRegistryArgs;
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 = ContainerserviceFunctions.getRegistry(GetRegistryArgs.builder()
            .name("testacr")
            .containerRegistryId("test")
            .build());

        ctx.export("cacheRuleSourceRepo", exampleAzurermContainerRegistryCacheRule.sourceRepo());
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:containerservice:getRegistry
      arguments:
        name: testacr
        containerRegistryId: test
outputs:
  cacheRuleSourceRepo: ${exampleAzurermContainerRegistryCacheRule.sourceRepo}
Copy

Using getRegistryCacheRule

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 getRegistryCacheRule(args: GetRegistryCacheRuleArgs, opts?: InvokeOptions): Promise<GetRegistryCacheRuleResult>
function getRegistryCacheRuleOutput(args: GetRegistryCacheRuleOutputArgs, opts?: InvokeOptions): Output<GetRegistryCacheRuleResult>
Copy
def get_registry_cache_rule(container_registry_id: Optional[str] = None,
                            name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetRegistryCacheRuleResult
def get_registry_cache_rule_output(container_registry_id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetRegistryCacheRuleResult]
Copy
func LookupRegistryCacheRule(ctx *Context, args *LookupRegistryCacheRuleArgs, opts ...InvokeOption) (*LookupRegistryCacheRuleResult, error)
func LookupRegistryCacheRuleOutput(ctx *Context, args *LookupRegistryCacheRuleOutputArgs, opts ...InvokeOption) LookupRegistryCacheRuleResultOutput
Copy

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

public static class GetRegistryCacheRule 
{
    public static Task<GetRegistryCacheRuleResult> InvokeAsync(GetRegistryCacheRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetRegistryCacheRuleResult> Invoke(GetRegistryCacheRuleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRegistryCacheRuleResult> getRegistryCacheRule(GetRegistryCacheRuleArgs args, InvokeOptions options)
public static Output<GetRegistryCacheRuleResult> getRegistryCacheRule(GetRegistryCacheRuleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:containerservice/getRegistryCacheRule:getRegistryCacheRule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ContainerRegistryId This property is required. string
The ID of the container registry where the cache rule should apply. Changing this forces a new resource to be created.
Name This property is required. string
Specifies the name of the Container Registry Cache Rule. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
ContainerRegistryId This property is required. string
The ID of the container registry where the cache rule should apply. Changing this forces a new resource to be created.
Name This property is required. string
Specifies the name of the Container Registry Cache Rule. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
containerRegistryId This property is required. String
The ID of the container registry where the cache rule should apply. Changing this forces a new resource to be created.
name This property is required. String
Specifies the name of the Container Registry Cache Rule. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
containerRegistryId This property is required. string
The ID of the container registry where the cache rule should apply. Changing this forces a new resource to be created.
name This property is required. string
Specifies the name of the Container Registry Cache Rule. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
container_registry_id This property is required. str
The ID of the container registry where the cache rule should apply. Changing this forces a new resource to be created.
name This property is required. str
Specifies the name of the Container Registry Cache Rule. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
containerRegistryId This property is required. String
The ID of the container registry where the cache rule should apply. Changing this forces a new resource to be created.
name This property is required. String
Specifies the name of the Container Registry Cache Rule. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.

getRegistryCacheRule Result

The following output properties are available:

ContainerRegistryId string
CredentialSetId string
The ARM resource ID of the credential store which is associated with the cache rule.
Id string
The provider-assigned unique ID for this managed resource.
Name string
SourceRepo string
The name of the source repository path.
TargetRepo string
The name of the new repository path to store artifacts.
ContainerRegistryId string
CredentialSetId string
The ARM resource ID of the credential store which is associated with the cache rule.
Id string
The provider-assigned unique ID for this managed resource.
Name string
SourceRepo string
The name of the source repository path.
TargetRepo string
The name of the new repository path to store artifacts.
containerRegistryId String
credentialSetId String
The ARM resource ID of the credential store which is associated with the cache rule.
id String
The provider-assigned unique ID for this managed resource.
name String
sourceRepo String
The name of the source repository path.
targetRepo String
The name of the new repository path to store artifacts.
containerRegistryId string
credentialSetId string
The ARM resource ID of the credential store which is associated with the cache rule.
id string
The provider-assigned unique ID for this managed resource.
name string
sourceRepo string
The name of the source repository path.
targetRepo string
The name of the new repository path to store artifacts.
container_registry_id str
credential_set_id str
The ARM resource ID of the credential store which is associated with the cache rule.
id str
The provider-assigned unique ID for this managed resource.
name str
source_repo str
The name of the source repository path.
target_repo str
The name of the new repository path to store artifacts.
containerRegistryId String
credentialSetId String
The ARM resource ID of the credential store which is associated with the cache rule.
id String
The provider-assigned unique ID for this managed resource.
name String
sourceRepo String
The name of the source repository path.
targetRepo String
The name of the new repository path to store artifacts.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi