GetAuthorizationToken

The ECR Authorization Token data source allows the authorization token, proxy endpoint, token expiration date, user name and password to be retrieved for an ECR repository.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var token = Output.Create(Aws.Ecr.GetAuthorizationToken.InvokeAsync());
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecr"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ecr.GetAuthorizationToken(ctx, nil, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

token = aws.ecr.get_authorization_token()
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const token = pulumi.output(aws.ecr.getAuthorizationToken({ async: true }));

Using GetAuthorizationToken

function getAuthorizationToken(args: GetAuthorizationTokenArgs, opts?: InvokeOptions): Promise<GetAuthorizationTokenResult>
function  get_authorization_token(registry_id=None, opts=None)
func GetAuthorizationToken(ctx *Context, args *GetAuthorizationTokenArgs, opts ...InvokeOption) (*GetAuthorizationTokenResult, error)
public static class GetAuthorizationToken {
    public static Task<GetAuthorizationTokenResult> InvokeAsync(GetAuthorizationTokenArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

RegistryId string

AWS account ID of the ECR Repository. If not specified the default account is assumed.

RegistryId string

AWS account ID of the ECR Repository. If not specified the default account is assumed.

registryId string

AWS account ID of the ECR Repository. If not specified the default account is assumed.

registry_id str

AWS account ID of the ECR Repository. If not specified the default account is assumed.

GetAuthorizationToken Result

The following output properties are available:

AuthorizationToken string

Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of user_name:password.

ExpiresAt string

The time in UTC RFC3339 format when the authorization token expires.

Id string

The provider-assigned unique ID for this managed resource.

Password string

Password decoded from the authorization token.

ProxyEndpoint string

The registry URL to use in the docker login command.

UserName string

User name decoded from the authorization token.

RegistryId string
AuthorizationToken string

Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of user_name:password.

ExpiresAt string

The time in UTC RFC3339 format when the authorization token expires.

Id string

The provider-assigned unique ID for this managed resource.

Password string

Password decoded from the authorization token.

ProxyEndpoint string

The registry URL to use in the docker login command.

UserName string

User name decoded from the authorization token.

RegistryId string
authorizationToken string

Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of user_name:password.

expiresAt string

The time in UTC RFC3339 format when the authorization token expires.

id string

The provider-assigned unique ID for this managed resource.

password string

Password decoded from the authorization token.

proxyEndpoint string

The registry URL to use in the docker login command.

userName string

User name decoded from the authorization token.

registryId string
authorization_token str

Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of user_name:password.

expires_at str

The time in UTC RFC3339 format when the authorization token expires.

id str

The provider-assigned unique ID for this managed resource.

password str

Password decoded from the authorization token.

proxy_endpoint str

The registry URL to use in the docker login command.

user_name str

User name decoded from the authorization token.

registry_id str

Package Details

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