@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
93 lines • 3.31 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.AccountSetting = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage AWS ECR Basic Scan Type
*
* ## Example Usage
*
* ### Configuring Basic Scanning
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const basicScanTypeVersion = new aws.ecr.AccountSetting("basic_scan_type_version", {
* name: "BASIC_SCAN_TYPE_VERSION",
* value: "AWS_NATIVE",
* });
* ```
*
* ### Configuring Registry Policy Scope
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const registryPolicyScope = new aws.ecr.AccountSetting("registry_policy_scope", {
* name: "REGISTRY_POLICY_SCOPE",
* value: "V2",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import EMR Security Configurations using the account setting name. For example:
*
* ```sh
* $ pulumi import aws:ecr/accountSetting:AccountSetting foo BASIC_SCAN_TYPE_VERSION
* ```
*/
class AccountSetting extends pulumi.CustomResource {
/**
* Get an existing AccountSetting 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 AccountSetting(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AccountSetting. 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'] === AccountSetting.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["value"] = state?.value;
}
else {
const args = argsOrState;
if (args?.value === undefined && !opts.urn) {
throw new Error("Missing required property 'value'");
}
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["value"] = args?.value;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AccountSetting.__pulumiType, name, resourceInputs, opts);
}
}
exports.AccountSetting = AccountSetting;
/** @internal */
AccountSetting.__pulumiType = 'aws:ecr/accountSetting:AccountSetting';
//# sourceMappingURL=accountSetting.js.map
;