AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the DeleteAccountSetting operation. Disables an account setting for a specified user, role, or the root user for an account.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ECS.AmazonECSRequest
      Amazon.ECS.Model.DeleteAccountSettingRequest

Namespace: Amazon.ECS.Model
Assembly: AWSSDK.ECS.dll
Version: 3.x.y.z

Syntax

C#
public class DeleteAccountSettingRequest : AmazonECSRequest
         IAmazonWebServiceRequest

The DeleteAccountSettingRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Name Amazon.ECS.SettingName

Gets and sets the property Name.

The resource name to disable the account setting for. 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. If awsvpcTrunking is specified, the ENI limit for your Amazon ECS container instances is affected.

Public Property PrincipalArn System.String

Gets and sets the property PrincipalArn.

The Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.

In order to use this parameter, you must be the root user, or the principal.

Examples

This example deletes the account setting for your user for the specified resource type.

To delete your account setting


var client = new AmazonECSClient();
var response = client.DeleteAccountSetting(new DeleteAccountSettingRequest 
{
    Name = "serviceLongArnFormat"
});

Setting setting = response.Setting;

            

This example deletes the account setting for a specific IAM user or IAM role for the specified resource type. Only the root user can view or modify the account settings for another user.

To delete the account settings for a specific IAM user or IAM role


var client = new AmazonECSClient();
var response = client.DeleteAccountSetting(new DeleteAccountSettingRequest 
{
    Name = "containerInstanceLongArnFormat",
    PrincipalArn = "arn:aws:iam::<aws_account_id>:user/principalName"
});

Setting setting = response.Setting;

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5