Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Azure Classic

v4.28.0 published on Monday, Nov 22, 2021 by Pulumi

getRegistryToken

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

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.ContainerService.GetRegistryToken.InvokeAsync(new Azure.ContainerService.GetRegistryTokenArgs
        {
            Name = "exampletoken",
            ResourceGroupName = "example-resource-group",
            ContainerRegistryName = "example-registry",
        }));
        this.ScopeMapId = example.Apply(example => example.ScopeMapId);
    }

    [Output("scopeMapId")]
    public Output<string> ScopeMapId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/containerservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := containerservice.LookupRegistryToken(ctx, &containerservice.LookupRegistryTokenArgs{
			Name:                  "exampletoken",
			ResourceGroupName:     "example-resource-group",
			ContainerRegistryName: "example-registry",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("scopeMapId", example.ScopeMapId)
		return nil
	})
}
import pulumi
import pulumi_azure as azure

example = azure.containerservice.get_registry_token(name="exampletoken",
    resource_group_name="example-resource-group",
    container_registry_name="example-registry")
pulumi.export("scopeMapId", example.scope_map_id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.containerservice.getRegistryToken({
    name: "exampletoken",
    resourceGroupName: "example-resource-group",
    containerRegistryName: "example-registry",
});
export const scopeMapId = example.then(example => example.scopeMapId);

Using getRegistryToken

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 getRegistryToken(args: GetRegistryTokenArgs, opts?: InvokeOptions): Promise<GetRegistryTokenResult>
function getRegistryTokenOutput(args: GetRegistryTokenOutputArgs, opts?: InvokeOptions): Output<GetRegistryTokenResult>
def get_registry_token(container_registry_name: Optional[str] = None,
                       name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetRegistryTokenResult
def get_registry_token_output(container_registry_name: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       resource_group_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetRegistryTokenResult]
func LookupRegistryToken(ctx *Context, args *LookupRegistryTokenArgs, opts ...InvokeOption) (*LookupRegistryTokenResult, error)
func LookupRegistryTokenOutput(ctx *Context, args *LookupRegistryTokenOutputArgs, opts ...InvokeOption) LookupRegistryTokenResultOutput

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

public static class GetRegistryToken 
{
    public static Task<GetRegistryTokenResult> InvokeAsync(GetRegistryTokenArgs args, InvokeOptions? opts = null)
    public static Output<GetRegistryTokenResult> Invoke(GetRegistryTokenInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ContainerRegistryName string
The Name of the Container Registry where the token exists.
Name string
The name of the Container Registry token.
ResourceGroupName string
The Name of the Resource Group where this Container Registry token exists.
ContainerRegistryName string
The Name of the Container Registry where the token exists.
Name string
The name of the Container Registry token.
ResourceGroupName string
The Name of the Resource Group where this Container Registry token exists.
containerRegistryName string
The Name of the Container Registry where the token exists.
name string
The name of the Container Registry token.
resourceGroupName string
The Name of the Resource Group where this Container Registry token exists.
container_registry_name str
The Name of the Container Registry where the token exists.
name str
The name of the Container Registry token.
resource_group_name str
The Name of the Resource Group where this Container Registry token exists.

getRegistryToken Result

The following output properties are available:

ContainerRegistryName string
Enabled bool
Whether this Token is enabled.
Id string
The provider-assigned unique ID for this managed resource.
Name string
ResourceGroupName string
ScopeMapId string
The Scope Map ID used by the token.
ContainerRegistryName string
Enabled bool
Whether this Token is enabled.
Id string
The provider-assigned unique ID for this managed resource.
Name string
ResourceGroupName string
ScopeMapId string
The Scope Map ID used by the token.
containerRegistryName string
enabled boolean
Whether this Token is enabled.
id string
The provider-assigned unique ID for this managed resource.
name string
resourceGroupName string
scopeMapId string
The Scope Map ID used by the token.
container_registry_name str
enabled bool
Whether this Token is enabled.
id str
The provider-assigned unique ID for this managed resource.
name str
resource_group_name str
scope_map_id str
The Scope Map ID used by the token.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.