@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
82 lines • 3.27 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLifecyclePolicyDocumentOutput = exports.getLifecyclePolicyDocument = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Generates an ECR lifecycle policy document in JSON format. Can be used with resources such as the `aws.ecr.LifecyclePolicy` resource.
*
* > For more information about building AWS ECR lifecycle policy documents, see the [AWS ECR Lifecycle Policy Document Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.ecr.getLifecyclePolicyDocument({
* rules: [{
* priority: 1,
* description: "This is a test.",
* selection: {
* tagStatus: "tagged",
* tagPrefixLists: ["prod"],
* countType: "imageCountMoreThan",
* countNumber: 100,
* },
* }],
* });
* const exampleLifecyclePolicy = new aws.ecr.LifecyclePolicy("example", {
* repository: exampleAwsEcrRepository.name,
* policy: example.then(example => example.json),
* });
* ```
*/
function getLifecyclePolicyDocument(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ecr/getLifecyclePolicyDocument:getLifecyclePolicyDocument", {
"rules": args.rules,
}, opts);
}
exports.getLifecyclePolicyDocument = getLifecyclePolicyDocument;
/**
* Generates an ECR lifecycle policy document in JSON format. Can be used with resources such as the `aws.ecr.LifecyclePolicy` resource.
*
* > For more information about building AWS ECR lifecycle policy documents, see the [AWS ECR Lifecycle Policy Document Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.ecr.getLifecyclePolicyDocument({
* rules: [{
* priority: 1,
* description: "This is a test.",
* selection: {
* tagStatus: "tagged",
* tagPrefixLists: ["prod"],
* countType: "imageCountMoreThan",
* countNumber: 100,
* },
* }],
* });
* const exampleLifecyclePolicy = new aws.ecr.LifecyclePolicy("example", {
* repository: exampleAwsEcrRepository.name,
* policy: example.then(example => example.json),
* });
* ```
*/
function getLifecyclePolicyDocumentOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ecr/getLifecyclePolicyDocument:getLifecyclePolicyDocument", {
"rules": args.rules,
}, opts);
}
exports.getLifecyclePolicyDocumentOutput = getLifecyclePolicyDocumentOutput;
//# sourceMappingURL=getLifecyclePolicyDocument.js.map
;