UNPKG

@pulumi/aws

Version:

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

116 lines 4.3 kB
"use strict"; // *** 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.RegistryScanningConfiguration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Elastic Container Registry Scanning Configuration. Can't be completely deleted, instead reverts to the default `BASIC` scanning configuration without rules. * * ## Example Usage * * ### Basic example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const configuration = new aws.ecr.RegistryScanningConfiguration("configuration", { * scanType: "ENHANCED", * rules: [{ * scanFrequency: "CONTINUOUS_SCAN", * repositoryFilters: [{ * filter: "example", * filterType: "WILDCARD", * }], * }], * }); * ``` * * ### Multiple rules * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.ecr.RegistryScanningConfiguration("test", { * scanType: "ENHANCED", * rules: [ * { * scanFrequency: "SCAN_ON_PUSH", * repositoryFilters: [{ * filter: "*", * filterType: "WILDCARD", * }], * }, * { * scanFrequency: "CONTINUOUS_SCAN", * repositoryFilters: [{ * filter: "example", * filterType: "WILDCARD", * }], * }, * ], * }); * ``` * * ## Import * * Using `pulumi import`, import ECR Scanning Configurations using the `registry_id`. For example: * * ```sh * $ pulumi import aws:ecr/registryScanningConfiguration:RegistryScanningConfiguration example 123456789012 * ``` */ class RegistryScanningConfiguration extends pulumi.CustomResource { /** * Get an existing RegistryScanningConfiguration 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, id, state, opts) { return new RegistryScanningConfiguration(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of RegistryScanningConfiguration. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === RegistryScanningConfiguration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["region"] = state?.region; resourceInputs["registryId"] = state?.registryId; resourceInputs["rules"] = state?.rules; resourceInputs["scanType"] = state?.scanType; } else { const args = argsOrState; if (args?.scanType === undefined && !opts.urn) { throw new Error("Missing required property 'scanType'"); } resourceInputs["region"] = args?.region; resourceInputs["rules"] = args?.rules; resourceInputs["scanType"] = args?.scanType; resourceInputs["registryId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(RegistryScanningConfiguration.__pulumiType, name, resourceInputs, opts); } } exports.RegistryScanningConfiguration = RegistryScanningConfiguration; /** @internal */ RegistryScanningConfiguration.__pulumiType = 'aws:ecr/registryScanningConfiguration:RegistryScanningConfiguration'; //# sourceMappingURL=registryScanningConfiguration.js.map