1. Packages
  2. AWS
  3. API Docs
  4. iam
  5. UserPolicyAttachmentsExclusive
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.iam.UserPolicyAttachmentsExclusive

Explore with Pulumi AI

Import

Using pulumi import, import exclusive management of managed IAM policy assignments using the user_name. For example:

$ pulumi import aws:iam/userPolicyAttachmentsExclusive:UserPolicyAttachmentsExclusive example MyUser
Copy

Create UserPolicyAttachmentsExclusive Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new UserPolicyAttachmentsExclusive(name: string, args: UserPolicyAttachmentsExclusiveArgs, opts?: CustomResourceOptions);
@overload
def UserPolicyAttachmentsExclusive(resource_name: str,
                                   args: UserPolicyAttachmentsExclusiveArgs,
                                   opts: Optional[ResourceOptions] = None)

@overload
def UserPolicyAttachmentsExclusive(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   policy_arns: Optional[Sequence[str]] = None,
                                   user_name: Optional[str] = None)
func NewUserPolicyAttachmentsExclusive(ctx *Context, name string, args UserPolicyAttachmentsExclusiveArgs, opts ...ResourceOption) (*UserPolicyAttachmentsExclusive, error)
public UserPolicyAttachmentsExclusive(string name, UserPolicyAttachmentsExclusiveArgs args, CustomResourceOptions? opts = null)
public UserPolicyAttachmentsExclusive(String name, UserPolicyAttachmentsExclusiveArgs args)
public UserPolicyAttachmentsExclusive(String name, UserPolicyAttachmentsExclusiveArgs args, CustomResourceOptions options)
type: aws:iam:UserPolicyAttachmentsExclusive
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserPolicyAttachmentsExclusiveArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. UserPolicyAttachmentsExclusiveArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. UserPolicyAttachmentsExclusiveArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserPolicyAttachmentsExclusiveArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. UserPolicyAttachmentsExclusiveArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var userPolicyAttachmentsExclusiveResource = new Aws.Iam.UserPolicyAttachmentsExclusive("userPolicyAttachmentsExclusiveResource", new()
{
    PolicyArns = new[]
    {
        "string",
    },
    UserName = "string",
});
Copy
example, err := iam.NewUserPolicyAttachmentsExclusive(ctx, "userPolicyAttachmentsExclusiveResource", &iam.UserPolicyAttachmentsExclusiveArgs{
	PolicyArns: pulumi.StringArray{
		pulumi.String("string"),
	},
	UserName: pulumi.String("string"),
})
Copy
var userPolicyAttachmentsExclusiveResource = new UserPolicyAttachmentsExclusive("userPolicyAttachmentsExclusiveResource", UserPolicyAttachmentsExclusiveArgs.builder()
    .policyArns("string")
    .userName("string")
    .build());
Copy
user_policy_attachments_exclusive_resource = aws.iam.UserPolicyAttachmentsExclusive("userPolicyAttachmentsExclusiveResource",
    policy_arns=["string"],
    user_name="string")
Copy
const userPolicyAttachmentsExclusiveResource = new aws.iam.UserPolicyAttachmentsExclusive("userPolicyAttachmentsExclusiveResource", {
    policyArns: ["string"],
    userName: "string",
});
Copy
type: aws:iam:UserPolicyAttachmentsExclusive
properties:
    policyArns:
        - string
    userName: string
Copy

UserPolicyAttachmentsExclusive Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The UserPolicyAttachmentsExclusive resource accepts the following input properties:

PolicyArns This property is required. List<string>
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
UserName This property is required. string
IAM user name.
PolicyArns This property is required. []string
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
UserName This property is required. string
IAM user name.
policyArns This property is required. List<String>
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
userName This property is required. String
IAM user name.
policyArns This property is required. string[]
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
userName This property is required. string
IAM user name.
policy_arns This property is required. Sequence[str]
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
user_name This property is required. str
IAM user name.
policyArns This property is required. List<String>
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
userName This property is required. String
IAM user name.

Outputs

All input properties are implicitly available as output properties. Additionally, the UserPolicyAttachmentsExclusive resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing UserPolicyAttachmentsExclusive Resource

Get an existing UserPolicyAttachmentsExclusive resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserPolicyAttachmentsExclusiveState, opts?: CustomResourceOptions): UserPolicyAttachmentsExclusive
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        policy_arns: Optional[Sequence[str]] = None,
        user_name: Optional[str] = None) -> UserPolicyAttachmentsExclusive
func GetUserPolicyAttachmentsExclusive(ctx *Context, name string, id IDInput, state *UserPolicyAttachmentsExclusiveState, opts ...ResourceOption) (*UserPolicyAttachmentsExclusive, error)
public static UserPolicyAttachmentsExclusive Get(string name, Input<string> id, UserPolicyAttachmentsExclusiveState? state, CustomResourceOptions? opts = null)
public static UserPolicyAttachmentsExclusive get(String name, Output<String> id, UserPolicyAttachmentsExclusiveState state, CustomResourceOptions options)
resources:  _:    type: aws:iam:UserPolicyAttachmentsExclusive    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
PolicyArns List<string>
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
UserName string
IAM user name.
PolicyArns []string
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
UserName string
IAM user name.
policyArns List<String>
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
userName String
IAM user name.
policyArns string[]
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
userName string
IAM user name.
policy_arns Sequence[str]
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
user_name str
IAM user name.
policyArns List<String>
A list of managed IAM policy ARNs to be attached to the user. Policies attached to this user but not configured in this argument will be removed.
userName String
IAM user name.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.