@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
83 lines • 4.06 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.DefaultAutoScalingConfigurationVersion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages the default App Runner auto scaling configuration.
* When creating or updating this resource the existing default auto scaling configuration will be set to non-default automatically.
* When creating or updating this resource the configuration is automatically assigned as the default to the new services you create in the future. The new default designation doesn't affect the associations that were previously set for existing services.
* Each account can have only one default auto scaling configuration per Region.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.apprunner.AutoScalingConfigurationVersion("example", {
* autoScalingConfigurationName: "example",
* maxConcurrency: 50,
* maxSize: 10,
* minSize: 2,
* });
* const exampleDefaultAutoScalingConfigurationVersion = new aws.apprunner.DefaultAutoScalingConfigurationVersion("example", {autoScalingConfigurationArn: example.arn});
* ```
*
* ## Import
*
* Using `pulumi import`, import App Runner default auto scaling configurations using the current Region. For example:
*
* ```sh
* $ pulumi import aws:apprunner/defaultAutoScalingConfigurationVersion:DefaultAutoScalingConfigurationVersion example us-west-2
* ```
*/
class DefaultAutoScalingConfigurationVersion extends pulumi.CustomResource {
/**
* Get an existing DefaultAutoScalingConfigurationVersion 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 DefaultAutoScalingConfigurationVersion(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DefaultAutoScalingConfigurationVersion. 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'] === DefaultAutoScalingConfigurationVersion.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["autoScalingConfigurationArn"] = state?.autoScalingConfigurationArn;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.autoScalingConfigurationArn === undefined && !opts.urn) {
throw new Error("Missing required property 'autoScalingConfigurationArn'");
}
resourceInputs["autoScalingConfigurationArn"] = args?.autoScalingConfigurationArn;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DefaultAutoScalingConfigurationVersion.__pulumiType, name, resourceInputs, opts);
}
}
exports.DefaultAutoScalingConfigurationVersion = DefaultAutoScalingConfigurationVersion;
/** @internal */
DefaultAutoScalingConfigurationVersion.__pulumiType = 'aws:apprunner/defaultAutoScalingConfigurationVersion:DefaultAutoScalingConfigurationVersion';
//# sourceMappingURL=defaultAutoScalingConfigurationVersion.js.map
;