

# DescribePremiumRepositories

Describes the premium repositories in a public registry, including their AWS Marketplace products, associated repositories, and state. Repositories in the `DRAFT`, `AVAILABLE`, and `HIDDEN` states are returned.

## Request Syntax
<a name="API_DescribePremiumRepositories_RequestSyntax"></a>

```
{
   "maxResults": {{number}},
   "nextToken": "{{string}}",
   "registryId": "{{string}}",
   "repositoryNames": [ "{{string}}" ]
}
```

## Request Parameters
<a name="API_DescribePremiumRepositories_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [maxResults](#API_DescribePremiumRepositories_RequestSyntax) **   <a name="ecrpublic-DescribePremiumRepositories-request-maxResults"></a>
The maximum number of results that `DescribePremiumRepositories` returns in paginated output. When you use this parameter, `DescribePremiumRepositories` returns only `maxResults` results in a single page along with a `nextToken` response element. To see the remaining results, send another `DescribePremiumRepositories` request with the returned `nextToken` value. You can specify a value between 1 and 1000. If you don't use this parameter, `DescribePremiumRepositories` returns up to 100 results and a `nextToken` value, if applicable.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 1000.  
Required: No

 ** [nextToken](#API_DescribePremiumRepositories_RequestSyntax) **   <a name="ecrpublic-DescribePremiumRepositories-request-nextToken"></a>
The `nextToken` value that's returned from a previous paginated `DescribePremiumRepositories` request where you used `maxResults` and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the `nextToken` value. If there are no more results to return, this value is `null`.  
This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
Type: String  
Required: No

 ** [registryId](#API_DescribePremiumRepositories_RequestSyntax) **   <a name="ecrpublic-DescribePremiumRepositories-request-registryId"></a>
The AWS account ID that's associated with the public registry that contains the premium repositories to describe. If you do not specify a registry, the default public registry is assumed. You can specify only your own account ID. Cross-account access through a repository policy isn't supported for this operation.  
Type: String  
Pattern: `[0-9]{12}`   
Required: No

 ** [repositoryNames](#API_DescribePremiumRepositories_RequestSyntax) **   <a name="ecrpublic-DescribePremiumRepositories-request-repositoryNames"></a>
The names of the premium repositories to describe. If this parameter isn't specified, all premium repositories in the registry are described. If you specify repository names, you can't use `maxResults` or `nextToken`.  
Type: Array of strings  
Array Members: Minimum number of 1 item. Maximum number of 100 items.  
Length Constraints: Minimum length of 2. Maximum length of 205.  
Pattern: `[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*(\/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*`   
Required: No

## Response Syntax
<a name="API_DescribePremiumRepositories_ResponseSyntax"></a>

```
{
   "nextToken": "string",
   "repositories": [ 
      { 
         "associatedRepositories": [ 
            { 
               "repositoryName": "string",
               "repositoryType": "string"
            }
         ],
         "createdAt": number,
         "marketplaceProducts": [ "string" ],
         "registryId": "string",
         "repositoryArn": "string",
         "repositoryName": "string",
         "repositoryUri": "string",
         "state": "string"
      }
   ]
}
```

## Response Elements
<a name="API_DescribePremiumRepositories_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_DescribePremiumRepositories_ResponseSyntax) **   <a name="ecrpublic-DescribePremiumRepositories-response-nextToken"></a>
The `nextToken` value to include in a future `DescribePremiumRepositories` request. When the results of a `DescribePremiumRepositories` request exceed `maxResults`, you can use this value to retrieve the next page of results. If there are no more results to return, this value is `null`.  
Type: String

 ** [repositories](#API_DescribePremiumRepositories_ResponseSyntax) **   <a name="ecrpublic-DescribePremiumRepositories-response-repositories"></a>
A list of premium repository objects that describe the premium repositories.  
Type: Array of [PremiumRepository](API_PremiumRepository.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 1000 items.

## Errors
<a name="API_DescribePremiumRepositories_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidParameterException **   
The specified parameter is invalid. Review the available parameters for the API request.    
 ** message **   
The error message associated with the exception.
HTTP Status Code: 400

 ** LimitExceededException **   
The operation didn't succeed because it would have exceeded a service limit for your account. For more information, see [Amazon ECR Public service quotas](https://docs.aws.amazon.com/AmazonECR/latest/public/public-service-quotas.html) in the Amazon Elastic Container Registry Public User Guide.    
 ** message **   
The error message associated with the exception.
HTTP Status Code: 400

 ** RepositoryNotFoundException **   
The specified repository can't be found. Check the spelling of the specified repository and ensure that you're performing operations on the correct registry.    
 ** message **   
The error message associated with the exception.
HTTP Status Code: 400

 ** ServerException **   
These errors are usually caused by a server-side issue. Retry the request. If it continues to fail, contact AWS Support.    
 ** message **   
The error message associated with the exception.
HTTP Status Code: 500

 ** UnsupportedCommandException **   
The action isn't supported in this Region. Check that the action is available in the AWS Region that you're using, and try again in a supported Region.    
 ** message **   
The error message associated with the exception.
HTTP Status Code: 400

## See Also
<a name="API_DescribePremiumRepositories_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/ecr-public-2020-10-30/DescribePremiumRepositories) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ecr-public-2020-10-30/DescribePremiumRepositories) 