UNPKG

@pulumi/aws

Version:

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

99 lines 4.23 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.AccountSettingDefault = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an ECS default account setting for a specific ECS Resource name within a specific region. More information can be found on the [ECS Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html). * * > **NOTE:** The AWS API does not delete this resource. When you run `destroy`, the provider will attempt to disable the setting. * * > **NOTE:** Your AWS account may not support disabling `containerInstanceLongArnFormat`, `serviceLongArnFormat`, and `taskLongArnFormat`. If your account does not support disabling these, "destroying" this resource will not disable the setting nor cause a provider error. However, the AWS Provider will log an AWS error: `InvalidParameterException: You can no longer disable Long Arn settings`. * * ## Example Usage * * ### Enable the long task ARN format * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.ecs.AccountSettingDefault("test", { * name: "taskLongArnFormat", * value: "enabled", * }); * ``` * * ### Set the default log driver mode to non-blocking * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.ecs.AccountSettingDefault("test", { * name: "defaultLogDriverMode", * value: "non-blocking", * }); * ``` * * ## Import * * Using `pulumi import`, import ECS Account Setting defaults using the `name`. For example: * * ```sh * $ pulumi import aws:ecs/accountSettingDefault:AccountSettingDefault example taskLongArnFormat * ``` */ class AccountSettingDefault extends pulumi.CustomResource { /** * Get an existing AccountSettingDefault 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 AccountSettingDefault(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AccountSettingDefault. 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'] === AccountSettingDefault.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["name"] = state?.name; resourceInputs["principalArn"] = state?.principalArn; 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; resourceInputs["principalArn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AccountSettingDefault.__pulumiType, name, resourceInputs, opts); } } exports.AccountSettingDefault = AccountSettingDefault; /** @internal */ AccountSettingDefault.__pulumiType = 'aws:ecs/accountSettingDefault:AccountSettingDefault'; //# sourceMappingURL=accountSettingDefault.js.map