404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.217.203.133: ~ $
**Example 1: To list the context keys referenced by one or more custom JSON policies provided as a parameter on the command line**

The following ``get-context-keys-for-custom-policy`` command parses each supplied policy and lists the context keys used by those policies. Use this command to identify which context key values you must supply to successfully use the policy simulator commands ``simulate-custom-policy`` and ``simulate-custom-policy``. You can also retrieve the list of context keys used by all policies associated by an IAM user or role by using the ``get-context-keys-for-custom-policy`` command. Parameter values that begin with ``file://`` instruct the command to read the file and use the contents as the value for the parameter instead of the file name itself.::

    aws iam get-context-keys-for-custom-policy \
        --policy-input-list '{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":"dynamodb:*","Resource":"arn:aws:dynamodb:us-west-2:123456789012:table/${aws:username}","Condition":{"DateGreaterThan":{"aws:CurrentTime":"2015-08-16T12:00:00Z"}}}}'

Output::

    {
        "ContextKeyNames": [
            "aws:username",
            "aws:CurrentTime"
        ]
    }

**Example 2: To list the context keys referenced by one or more custom JSON policies provided as a file input**

The following ``get-context-keys-for-custom-policy`` command is the same as the previous example, except that the policies are provided in a file instead of as a parameter. Because the command expects a JSON list of strings, and not a list of JSON structures, the file must be structured as follows, although you can collapse it into one one::

    [
        "Policy1",
        "Policy2"
    ]

So for example, a file that contains the policy from the previous example must look like the following. You must escape each embedded double-quote inside the policy string by preceding it with a backslash '\'. ::

    [ "{\"Version\": \"2012-10-17\", \"Statement\": {\"Effect\": \"Allow\", \"Action\": \"dynamodb:*\", \"Resource\": \"arn:aws:dynamodb:us-west-2:128716708097:table/${aws:username}\", \"Condition\": {\"DateGreaterThan\": {\"aws:CurrentTime\": \"2015-08-16T12:00:00Z\"}}}}" ]

This file can then be submitted to the following command::

    aws iam get-context-keys-for-custom-policy --policy-input-list file://policyfile.json

Output::

    {
        "ContextKeyNames": [
            "aws:username",
            "aws:CurrentTime"
        ]
    }

For more information, see `Using the IAM Policy Simulator (AWS CLI and AWS API)`_ in the *Using IAM* guide.

.. _`Using the IAM Policy Simulator (AWS CLI and AWS API)`: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html#policies-simulator-using-api

Filemanager

Name Type Size Permission Actions
wait Folder 0755
add-client-id-to-open-id-connect-provider.rst File 709 B 0644
add-role-to-instance-profile.rst File 650 B 0644
add-user-to-group.rst File 445 B 0644
attach-group-policy.rst File 509 B 0644
attach-role-policy.rst File 514 B 0644
attach-user-policy.rst File 521 B 0644
change-password.rst File 1.6 KB 0644
create-access-key.rst File 842 B 0644
create-account-alias.rst File 394 B 0644
create-group.rst File 594 B 0644
create-instance-profile.rst File 921 B 0644
create-login-profile.rst File 2.09 KB 0644
create-open-id-connect-provider.rst File 2.35 KB 0644
create-policy-version.rst File 733 B 0644
create-policy.rst File 1.27 KB 0644
create-role.rst File 981 B 0644
create-saml-provider.rst File 579 B 0644
create-service-linked-role.rst File 1.38 KB 0644
create-service-specific-credential.rst File 1.01 KB 0644
create-user.rst File 621 B 0644
create-virtual-mfa-device.rst File 784 B 0644
deactivate-mfa-device.rst File 543 B 0644
decode-authorization-message.rst File 2.64 KB 0644
delete-access-key.rst File 623 B 0644
delete-account-alias.rst File 403 B 0644
delete-account-password-policy.rst File 419 B 0644
delete-group-policy.rst File 506 B 0644
delete-group.rst File 340 B 0644
delete-instance-profile.rst File 403 B 0644
delete-login-profile.rst File 369 B 0644
delete-open-id-connect-provider.rst File 526 B 0644
delete-policy-version.rst File 471 B 0644
delete-policy.rst File 399 B 0644
delete-role-permissions-boundary.rst File 406 B 0755
delete-role-policy.rst File 409 B 0644
delete-role.rst File 696 B 0644
delete-saml-provider.rst File 446 B 0644
delete-server-certificate.rst File 665 B 0644
delete-service-linked-role.rst File 727 B 0644
delete-service-specific-credential.rst File 1.29 KB 0644
delete-signing-certificate.rst File 612 B 0644
delete-ssh-public-key.rst File 537 B 0644
delete-user-permissions-boundary.rst File 404 B 0755
delete-user-policy.rst File 525 B 0644
delete-user.rst File 390 B 0644
delete-virtual-mfa-device.rst File 446 B 0644
detach-group-policy.rst File 484 B 0644
detach-role-policy.rst File 511 B 0644
detach-user-policy.rst File 454 B 0644
enable-mfa-device.rst File 895 B 0644
generate-credential-report.rst File 513 B 0644
generate-organizations-access-report.rst File 1.89 KB 0755
generate-service-last-accessed-details.rst File 1.09 KB 0755
get-access-key-last-used.rst File 636 B 0644
get-account-authorization-details.rst File 12.06 KB 0644
get-account-password-policy.rst File 820 B 0644
get-account-summary.rst File 1.25 KB 0644
get-context-keys-for-custom-policy.rst File 2.7 KB 0755
get-context-keys-for-principal-policy.rst File 1.13 KB 0755
get-credential-report.rst File 491 B 0644
get-group-policy.rst File 877 B 0644
get-group.rst File 586 B 0644
get-instance-profile.rst File 1.11 KB 0644
get-login-profile.rst File 970 B 0644
get-open-id-connect-provider.rst File 808 B 0644
get-organizations-access-report.rst File 850 B 0755
get-policy-version.rst File 993 B 0644
get-policy.rst File 911 B 0644
get-role-policy.rst File 928 B 0644
get-role.rst File 1.01 KB 0644
get-saml-provider.rst File 632 B 0644
get-server-certificate.rst File 3.49 KB 0644
get-service-last-accessed-details-with-entities.rst File 1.53 KB 0755
get-service-last-accessed-details.rst File 886 B 0755
get-service-linked-role-deletion-status.rst File 788 B 0644
get-ssh-public-key.rst File 1.74 KB 0644
get-user-policy.rst File 873 B 0644
get-user.rst File 582 B 0644
list-access-keys.rst File 1003 B 0644
list-account-aliases.rst File 414 B 0644
list-attached-group-policies.rst File 778 B 0644
list-attached-role-policies.rst File 659 B 0644
list-attached-user-policies.rst File 751 B 0644
list-entities-for-policy.rst File 772 B 0644
list-group-policies.rst File 561 B 0644
list-groups-for-user.rst File 896 B 0644
list-groups.rst File 824 B 0644
list-instance-profiles-for-role.rst File 1.11 KB 0644
list-instance-profiles.rst File 2.28 KB 0644
list-mfa-devices.rst File 633 B 0644
list-open-id-connect-providers.rst File 618 B 0644
list-policies-granting-service-access.rst File 1.07 KB 0644
list-policies.rst File 1.27 KB 0644
list-policy-versions.rst File 802 B 0644
list-role-policies.rst File 597 B 0644
list-role-tags.rst File 646 B 0644
list-roles.rst File 1.46 KB 0644
list-saml-providers.rst File 580 B 0644
list-server-certificates.rst File 1.32 KB 0644
list-service-specific-credential.rst File 1.69 KB 0644
list-service-specific-credentials.rst File 1.13 KB 0755
list-signing-certificates.rst File 810 B 0644
list-ssh-public-keys.rst File 720 B 0644
list-user-policies.rst File 492 B 0644
list-user-tags.rst File 640 B 0644
list-users.rst File 755 B 0644
list-virtual-mfa-devices.rst File 628 B 0644
put-group-policy.rst File 548 B 0644
put-role-permissions-boundary.rst File 907 B 0755
put-role-policy.rst File 650 B 0644
put-user-permissions-boundary.rst File 888 B 0755
put-user-policy.rst File 592 B 0644
remove-client-id-from-open-id-connect-provider.rst File 727 B 0644
remove-role-from-instance-profile.rst File 491 B 0644
remove-user-from-group.rst File 474 B 0644
reset-service-specific-credential.rst File 1.89 KB 0644
resync-mfa-device.rst File 762 B 0644
set-default-policy-version.rst File 527 B 0644
set-security-token-service-preferences.rst File 355 B 0755
simulate-custom-policy.rst File 2.78 KB 0755
simulate-principal-policy.rst File 2.5 KB 0755
tag-role.rst File 422 B 0644
tag-user.rst File 428 B 0644
untag-role.rst File 414 B 0644
untag-user.rst File 412 B 0644
update-access-key.rst File 715 B 0644
update-account-password-policy.rst File 749 B 0644
update-assume-role-policy.rst File 710 B 0644
update-group.rst File 394 B 0644
update-login-profile.rst File 895 B 0644
update-open-id-connect-provider-thumbprint.rst File 698 B 0644
update-role-description.rst File 1.18 KB 0644
update-role.rst File 539 B 0644
update-saml-provider.rst File 676 B 0644
update-server-certificate.rst File 864 B 0644
update-service-specific-credential.rst File 1.05 KB 0644
update-signing-certificate.rst File 650 B 0644
update-ssh-public-key.rst File 557 B 0644
update-user.rst File 393 B 0644
upload-server-certificate.rst File 1.53 KB 0644
upload-signing-certificate.rst File 898 B 0644
upload-ssh-public-key.rst File 1.35 KB 0644