AttachUserPolicy

command
v0.0.0-...-e8b88a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

README

AttachUserPolicyv2.go

This example attaches an Amazon DynamoDB full-access policy to an IAM role.

go run AttachUserPolicyv2.go -n ROLE-NAME

  • ROLE-NAME is the name of the role to which the policy is attached.

The unit test accepts a similar value in config.json.

Running the unit tests

Unit tests should delete any resources they create. However, they might result in charges to your AWS account.

To run a unit test, enter:

go test

You should see something like the following, where PATH is the path to the folder containing the Go files:

PASS
ok      PATH 6.593s

If you want to see any log messages, enter:

go test -v

You should see some additional log messages. The last two lines should be similar to the previous output shown.

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Documentation

Overview

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX - License - Identifier: Apache - 2.0 snippet-start:[iam.go-v2.AttachUserPolicy]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL