UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

146 lines (145 loc) 5.51 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages an AWS ECR (Elastic Container Registry) Pull Time Update Exclusion. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.iam.Role("example", { * name: "example-role", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Principal: { * Service: "ec2.amazonaws.com", * }, * }], * }), * }); * const exampleRolePolicy = new aws.iam.RolePolicy("example", { * name: "example-role-policy", * role: example.id, * policy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Effect: "Allow", * Action: [ * "ecr:GetAuthorizationToken", * "ecr:BatchCheckLayerAvailability", * "ecr:GetDownloadUrlForLayer", * "ecr:BatchGetImage", * ], * Resource: "*", * }], * }), * }); * const examplePullTimeUpdateExclusion = new aws.ecr.PullTimeUpdateExclusion("example", {principalArn: example.arn}); * ``` * * ### With IAM User * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.iam.User("example", {name: "example-user"}); * const exampleUserPolicy = new aws.iam.UserPolicy("example", { * name: "example-user-policy", * user: example.name, * policy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Effect: "Allow", * Action: [ * "ecr:GetAuthorizationToken", * "ecr:BatchCheckLayerAvailability", * "ecr:GetDownloadUrlForLayer", * "ecr:BatchGetImage", * ], * Resource: "*", * }], * }), * }); * const examplePullTimeUpdateExclusion = new aws.ecr.PullTimeUpdateExclusion("example", {principalArn: example.arn}); * ``` * * ## Import * * Using `pulumi import`, import ECR (Elastic Container Registry) Pull Time Update Exclusion using the `principal_arn`. For example: * * ```sh * $ pulumi import aws:ecr/pullTimeUpdateExclusion:PullTimeUpdateExclusion example arn:aws:iam::123456789012:role/example-role * ``` */ export declare class PullTimeUpdateExclusion extends pulumi.CustomResource { /** * Get an existing PullTimeUpdateExclusion resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PullTimeUpdateExclusionState, opts?: pulumi.CustomResourceOptions): PullTimeUpdateExclusion; /** * Returns true if the given object is an instance of PullTimeUpdateExclusion. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is PullTimeUpdateExclusion; /** * ARN of the IAM principal to exclude from having image pull times recorded. * * The following arguments are optional: */ readonly principalArn: pulumi.Output<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * Create a PullTimeUpdateExclusion resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PullTimeUpdateExclusionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PullTimeUpdateExclusion resources. */ export interface PullTimeUpdateExclusionState { /** * ARN of the IAM principal to exclude from having image pull times recorded. * * The following arguments are optional: */ principalArn?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; } /** * The set of arguments for constructing a PullTimeUpdateExclusion resource. */ export interface PullTimeUpdateExclusionArgs { /** * ARN of the IAM principal to exclude from having image pull times recorded. * * The following arguments are optional: */ principalArn: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; }