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:
- Registry
Id string AWS account ID of the ECR Repository. If not specified the default account is assumed.
- Registry
Id string AWS account ID of the ECR Repository. If not specified the default account is assumed.
- registry
Id 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:
- string
Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of
user_name:password.- Expires
At 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.
- Proxy
Endpoint string The registry URL to use in the docker login command.
- User
Name string User name decoded from the authorization token.
- Registry
Id string
- string
Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of
user_name:password.- Expires
At 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.
- Proxy
Endpoint string The registry URL to use in the docker login command.
- User
Name string User name decoded from the authorization token.
- Registry
Id string
- string
Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of
user_name:password.- expires
At 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.
- proxy
Endpoint string The registry URL to use in the docker login command.
- user
Name string User name decoded from the authorization token.
- registry
Id string
- 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
awsTerraform Provider.