code: func (p *ecrProvider) getFromECR(parsed *parsedURL) (credentialprovider.DockerConfig, error) {
  	cfg := credentialprovider.DockerConfig{}
  	getter, err := p.getterFactory.GetTokenGetterForRegion(parsed.region)
  	if err != nil {
  		return cfg, err
  	}
  	params := &ecr.GetAuthorizationTokenInput{RegistryIds: []*string{aws.String(parsed.registryID)}}
  	output, err := getter.GetAuthorizationToken(params)
  	if err != nil {
  		return cfg, err
  	}
  	if output == nil {
  		return cfg, errors.New("authorization token is nil")
  	}
  	if len(output.AuthorizationData) == 0 {
  		return cfg, errors.New("authorization data from response is empty")
  	}
  	data := output.AuthorizationData[0]
  	if data.AuthorizationToken == nil {
  		return cfg, errors.New("authorization token in response is nil")
  	}
  	entry, err := makeCacheEntry(data, parsed.registry)
  	if err != nil {
  		return cfg, err
  	}
  	if err := p.cache.Add(entry); err != nil {
  		return cfg, err
  	}
  	cfg[entry.registry] = entry.credentials
  	return cfg, nil
  }
docs: // getFromECR gets credentials from ECR since they are not in the cache