import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ECRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECRClient"; import type { GetRepositoryPolicyRequest, GetRepositoryPolicyResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link GetRepositoryPolicyCommand}. */ export interface GetRepositoryPolicyCommandInput extends GetRepositoryPolicyRequest { } /** * @public * * The output of {@link GetRepositoryPolicyCommand}. */ export interface GetRepositoryPolicyCommandOutput extends GetRepositoryPolicyResponse, __MetadataBearer { } declare const GetRepositoryPolicyCommand_base: { new (input: GetRepositoryPolicyCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: GetRepositoryPolicyCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Retrieves the repository policy for the specified repository.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ECRClient, GetRepositoryPolicyCommand } from "@aws-sdk/client-ecr"; // ES Modules import * // const { ECRClient, GetRepositoryPolicyCommand } = require("@aws-sdk/client-ecr"); // CommonJS import * // import type { ECRClientConfig } from "@aws-sdk/client-ecr"; * const config = {}; // type is ECRClientConfig * const client = new ECRClient(config); * const input = { // GetRepositoryPolicyRequest * registryId: "STRING_VALUE", * repositoryName: "STRING_VALUE", // required * }; * const command = new GetRepositoryPolicyCommand(input); * const response = await client.send(command); * // { // GetRepositoryPolicyResponse * // registryId: "STRING_VALUE", * // repositoryName: "STRING_VALUE", * // policyText: "STRING_VALUE", * // }; * * ``` * * @param GetRepositoryPolicyCommandInput - {@link GetRepositoryPolicyCommandInput} * @returns {@link GetRepositoryPolicyCommandOutput} * @see {@link GetRepositoryPolicyCommandInput} for command's `input` shape. * @see {@link GetRepositoryPolicyCommandOutput} for command's `response` shape. * @see {@link ECRClientResolvedConfig | config} for ECRClient's `config` shape. * * @throws {@link InvalidParameterException} (client fault) *

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

* * @throws {@link RepositoryNotFoundException} (client fault) *

The specified repository could not be found. Check the spelling of the specified * repository and ensure that you are performing operations on the correct registry.

* * @throws {@link RepositoryPolicyNotFoundException} (client fault) *

The specified repository and registry combination does not have an associated * repository policy.

* * @throws {@link ServerException} (server fault) *

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

* * @throws {@link ECRServiceException} *

Base exception class for all service exceptions from ECR service.

* * * @example To get the current policy for a repository * ```javascript * // This example obtains the repository policy for the repository named ubuntu. * const input = { * repositoryName: "ubuntu" * }; * const command = new GetRepositoryPolicyCommand(input); * const response = await client.send(command); * /* response is * { * policyText: `{ * "Version" : "2008-10-17", * "Statement" : [ { * "Sid" : "new statement", * "Effect" : "Allow", * "Principal" : { * "AWS" : "arn:aws:iam::012345678901:role/CodeDeployDemo" * }, * "Action" : [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability" ] * } ] * }`, * registryId: "012345678901", * repositoryName: "ubuntu" * } * *\/ * ``` * * @public */ export declare class GetRepositoryPolicyCommand extends GetRepositoryPolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetRepositoryPolicyRequest; output: GetRepositoryPolicyResponse; }; sdk: { input: GetRepositoryPolicyCommandInput; output: GetRepositoryPolicyCommandOutput; }; }; }