# UserAttributes

Represents a user defined outside of this stack.

Used as argument in: [User.fromUserAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.User.html#fromuserattributes)

- Source: [`aws-iam/lib/user.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-iam/lib/user.ts#L135)

## Example

TypeScript:

```ts
const user = iam.User.fromUserAttributes(this, 'MyImportedUserByAttributes', {
  userArn: 'arn:aws:iam::123456789012:user/johnsmith',
});
```

Python:

```python
user = iam.User.from_user_attributes(self, "MyImportedUserByAttributes",
    user_arn="arn:aws:iam::123456789012:user/johnsmith"
)
```

Java:

```java
IUser user = User.fromUserAttributes(this, "MyImportedUserByAttributes", UserAttributes.builder()
        .userArn("arn:aws:iam::123456789012:user/johnsmith")
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var user = User.FromUserAttributes(this, "MyImportedUserByAttributes", new UserAttributes {
    UserArn = "arn:aws:iam::123456789012:user/johnsmith"
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
user := iam.User_FromUserAttributes(this, jsii.String("MyImportedUserByAttributes"), &UserAttributes{
	UserArn: jsii.String("arn:aws:iam::123456789012:user/johnsmith"),
})
```

## Properties

- `userArn`: string (required) — The ARN of the user.

  Format: arn:<partition>:iam::<account-id>:user/<user-name-with-path>
