GetRegistryPolicyCommand

Retrieves the permissions policy for a registry.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ECRClient, GetRegistryPolicyCommand } from "@aws-sdk/client-ecr"; // ES Modules import
// const { ECRClient, GetRegistryPolicyCommand } = require("@aws-sdk/client-ecr"); // CommonJS import
const client = new ECRClient(config);
const input = {};
const command = new GetRegistryPolicyCommand(input);
const response = await client.send(command);
// { // GetRegistryPolicyResponse
//   registryId: "STRING_VALUE",
//   policyText: "STRING_VALUE",
// };

GetRegistryPolicyCommand Input

See GetRegistryPolicyCommandInput for more details
GetRegistryPolicyCommandInput extends GetRegistryPolicyRequest 

GetRegistryPolicyCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
policyText
string | undefined

The JSON text of the permissions policy for a registry.

registryId
string | undefined

The registry ID associated with the request.

Throws

Name
Fault
Details
InvalidParameterException
client

The specified parameter is invalid. Review the available parameters for the API request.

RegistryPolicyNotFoundException
client

The registry doesn't have an associated registry policy.

ServerException
server

These errors are usually caused by a server-side issue.

ValidationException
client

There was an exception validating this request.

ECRServiceException
Base exception class for all service exceptions from ECR service.