paws.compute (version 0.1.0)

ecs_put_account_setting: Modifies the ARN and resource ID format of a resource type for a specified IAM user, IAM role, or the root user for an account

Description

Modifies the ARN and resource ID format of a resource type for a specified IAM user, IAM role, or the root user for an account. If the account setting for the root user is changed, it sets the default setting for all of the IAM users and roles for which no individual account setting has been set. The opt-in and opt-out account setting can be set for each Amazon ECS resource separately. The ARN and resource ID format of a resource will be defined by the opt-in status of the IAM user or role that created the resource. Enabling this setting is required to use new Amazon ECS features such as resource tagging. For more information, see Amazon Resource Names (ARNs) and IDs in the Amazon Elastic Container Service Developer Guide.

Usage

ecs_put_account_setting(name, value, principalArn)

Arguments

name

[required] The resource name for which to enable the new format. If serviceLongArnFormat is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If containerInstanceLongArnFormat is specified, the ARN and resource ID for your Amazon ECS container instances is affected.

value

[required] The account setting value for the specified principal ARN. Accepted values are enabled and disabled.

principalArn

The ARN of the principal, which can be an IAM user, IAM role, or the root user. If you specify the root user, it modifies the ARN and resource ID format for all IAM users, IAM roles, and the root user of the account unless an IAM user or role explicitly overrides these settings for themselves. If this field is omitted, the settings are changed only for the authenticated user.

Request syntax

svc$put_account_setting(
  name = "serviceLongArnFormat"|"taskLongArnFormat"|"containerInstanceLongArnFormat",
  value = "string",
  principalArn = "string"
)

Examples

Run this code
# NOT RUN {
# This example modifies your account settings to opt in to the new ARN and
# resource ID format for Amazon ECS services. If you<U+00E2><U+20AC><U+2122>re using this command
# as the root user, then changes apply to the entire AWS account, unless
# an IAM user or role explicitly overrides these settings for themselves.
# }
# NOT RUN {
svc$put_account_setting(
  name = "serviceLongArnFormat",
  value = "enabled"
)
# }
# NOT RUN {
# This example modifies the account setting for a specific IAM user or IAM
# role to opt in to the new ARN and resource ID format for Amazon ECS
# container instances. If you<U+00E2><U+20AC><U+2122>re using this command as the root user, then
# changes apply to the entire AWS account, unless an IAM user or role
# explicitly overrides these settings for themselves.
# }
# NOT RUN {
svc$put_account_setting(
  name = "containerInstanceLongArnFormat",
  value = "enabled",
  principalArn = "arn:aws:iam::<aws_account_id>:user/principalName"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace