1. Packages
  2. AWS Classic
  3. API Docs
  4. ecrpublic
  5. getAuthorizationToken

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.13.0 published on Saturday, Dec 2, 2023 by Pulumi

aws.ecrpublic.getAuthorizationToken

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.13.0 published on Saturday, Dec 2, 2023 by Pulumi

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

    NOTE: This data source can only be used in the us-east-1 region.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var token = Aws.EcrPublic.GetAuthorizationToken.Invoke();
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecrpublic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecrpublic.GetAuthorizationToken(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecrpublic.EcrpublicFunctions;
    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 token = EcrpublicFunctions.getAuthorizationToken();
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    token = aws.ecrpublic.get_authorization_token()
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const token = aws.ecrpublic.getAuthorizationToken({});
    
    variables:
      token:
        fn::invoke:
          Function: aws:ecrpublic:getAuthorizationToken
          Arguments: {}
    

    Using getAuthorizationToken

    function getAuthorizationToken(opts?: InvokeOptions): Promise<GetAuthorizationTokenResult>
    def get_authorization_token(opts: Optional[InvokeOptions] = None) -> GetAuthorizationTokenResult
    func GetAuthorizationToken(ctx *Context, opts ...InvokeOption) (*GetAuthorizationTokenResult, error)

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

    public static class GetAuthorizationToken 
    {
        public static Task<GetAuthorizationTokenResult> InvokeAsync(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuthorizationTokenResult> getAuthorizationToken(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ecrpublic/getAuthorizationToken:getAuthorizationToken
      arguments:
        # arguments dictionary

    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

    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.

    UserName string

    User name decoded from the authorization token.

    AuthorizationToken string

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

    ExpiresAt string

    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.

    UserName string

    User name decoded from the authorization token.

    authorizationToken String

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

    expiresAt String

    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.

    userName String

    User name decoded from the authorization token.

    authorizationToken string

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

    expiresAt string

    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.

    userName string

    User name decoded from the authorization token.

    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

    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.

    user_name str

    User name decoded from the authorization token.

    authorizationToken String

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

    expiresAt String

    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.

    userName String

    User name decoded from the authorization token.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.13.0 published on Saturday, Dec 2, 2023 by Pulumi