Amazon.ECR.AmazonECRClient.GetAuthorizationToken C# (CSharp) Method

GetAuthorizationToken() public method

Retrieves a token that is valid for a specified registry for 12 hours. This command allows you to use the docker CLI to push and pull images with Amazon ECR. If you do not specify a registry, the default registry is assumed.

The authorizationToken returned for each registry specified is a base64 encoded string that can be decoded and used in a docker login command to authenticate to a registry. The AWS CLI offers an aws ecr get-login command that simplifies the login process.

/// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server-side issue. ///
public GetAuthorizationToken ( Amazon.ECR.Model.GetAuthorizationTokenRequest request ) : GetAuthorizationTokenResponse
request Amazon.ECR.Model.GetAuthorizationTokenRequest Container for the necessary parameters to execute the GetAuthorizationToken service method.
return Amazon.ECR.Model.GetAuthorizationTokenResponse
        public GetAuthorizationTokenResponse GetAuthorizationToken(GetAuthorizationTokenRequest request)
        {
            var marshaller = new GetAuthorizationTokenRequestMarshaller();
            var unmarshaller = GetAuthorizationTokenResponseUnmarshaller.Instance;

            return Invoke<GetAuthorizationTokenRequest,GetAuthorizationTokenResponse>(request, marshaller, unmarshaller);
        }
AmazonECRClient