[ aws . accessanalyzer ]

create-access-preview

Description

Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  create-access-preview
--analyzer-arn <value>
[--client-token <value>]
--configurations <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--analyzer-arn (string)

The ARN of the account analyzer used to generate the access preview. You can only create an access preview for analyzers with an Account type and Active status.

--client-token (string)

A client token.

--configurations (map)

Access control configuration for your resource that is used to generate the access preview. The access preview includes findings for external access allowed to the resource with the proposed access control configuration. The configuration must contain exactly one element.

key -> (string)

value -> (structure)

Access control configuration structures for your resource. You specify the configuration as a type-value pair. You can specify only one type of access control configuration.

iamRole -> (structure)

The access control configuration is for an IAM role.

trustPolicy -> (string)

The proposed trust policy for the IAM role.

kmsKey -> (structure)

The access control configuration is for a KMS key.

grants -> (list)

A list of proposed grant configurations for the KMS key. If the proposed grant configuration is for an existing key, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the key.

(structure)

A proposed grant configuration for a KMS key. For more information, see CreateGrant .

constraints -> (structure)

Use this structure to propose allowing cryptographic operations in the grant only when the operation request includes the specified encryption context .

encryptionContextEquals -> (map)

A list of key-value pairs that must match the encryption context in the cryptographic operation request. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint.

key -> (string)

value -> (string)

encryptionContextSubset -> (map)

A list of key-value pairs that must be included in the encryption context of the cryptographic operation request. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs.

key -> (string)

value -> (string)

granteePrincipal -> (string)

The principal that is given permission to perform the operations that the grant permits.

issuingAccount -> (string)

The Amazon Web Services account under which the grant was issued. The account is used to propose KMS grants issued by accounts other than the owner of the key.

operations -> (list)

A list of operations that the grant permits.

(string)

retiringPrincipal -> (string)

The principal that is given permission to retire the grant by using RetireGrant operation.

keyPolicies -> (map)

Resource policy configuration for the KMS key. The only valid value for the name of the key policy is default . For more information, see Default key policy .

key -> (string)

value -> (string)

s3Bucket -> (structure)

The access control configuration is for an Amazon S3 Bucket.

accessPoints -> (map)

The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to 10 new access points per bucket.

key -> (string)

value -> (structure)

The configuration for an Amazon S3 access point or multi-region access point for the bucket. You can propose up to 10 access points or multi-region access points per bucket. If the proposed Amazon S3 access point configuration is for an existing bucket, the access preview uses the proposed access point configuration in place of the existing access points. To propose an access point without a policy, you can provide an empty string as the access point policy. For more information, see Creating access points . For more information about access point policy limits, see Access points restrictions and limitations .

accessPointPolicy -> (string)

The access point or multi-region access point policy.

networkOrigin -> (structure)

The proposed Internet and VpcConfiguration to apply to this Amazon S3 access point. VpcConfiguration does not apply to multi-region access points. If the access preview is for a new resource and neither is specified, the access preview uses Internet for the network origin. If the access preview is for an existing resource and neither is specified, the access preview uses the exiting network origin.

internetConfiguration -> (structure)

The configuration for the Amazon S3 access point or multi-region access point with an Internet origin.

vpcConfiguration -> (structure)

The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. VPC configuration does not apply to multi-region access points. For more information, see VpcConfiguration .

vpcId -> (string)

If this field is specified, this access point will only allow connections from the specified VPC ID.

publicAccessBlock -> (structure)

The proposed S3PublicAccessBlock configuration to apply to this Amazon S3 access point or multi-region access point.

ignorePublicAcls -> (boolean)

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

restrictPublicBuckets -> (boolean)

Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

bucketAclGrants -> (list)

The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the bucket.

(structure)

A proposed access control list grant configuration for an Amazon S3 bucket. For more information, see How to Specify an ACL .

grantee -> (structure)

The grantee to whom you’re assigning access rights.

id -> (string)

The value specified is the canonical user ID of an Amazon Web Services account.

uri -> (string)

Used for granting permissions to a predefined group.

permission -> (string)

The permissions being granted.

bucketPolicy -> (string)

The proposed bucket policy for the Amazon S3 bucket.

bucketPublicAccessBlock -> (structure)

The proposed block public access configuration for the Amazon S3 bucket.

ignorePublicAcls -> (boolean)

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

restrictPublicBuckets -> (boolean)

Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

secretsManagerSecret -> (structure)

The access control configuration is for a Secrets Manager secret.

kmsKeyId -> (string)

The proposed ARN, key ID, or alias of the KMS customer master key (CMK).

secretPolicy -> (string)

The proposed resource policy defining who can access or manage the secret.

sqsQueue -> (structure)

The access control configuration is for an Amazon SQS queue.

queuePolicy -> (string)

The proposed resource policy for the Amazon SQS queue.

JSON Syntax:

{"string": {
      "iamRole": {
        "trustPolicy": "string"
      },
      "kmsKey": {
        "grants": [
          {
            "constraints": {
              "encryptionContextEquals": {"string": "string"
                ...},
              "encryptionContextSubset": {"string": "string"
                ...}
            },
            "granteePrincipal": "string",
            "issuingAccount": "string",
            "operations": ["CreateGrant"|"Decrypt"|"DescribeKey"|"Encrypt"|"GenerateDataKey"|"GenerateDataKeyPair"|"GenerateDataKeyPairWithoutPlaintext"|"GenerateDataKeyWithoutPlaintext"|"GetPublicKey"|"ReEncryptFrom"|"ReEncryptTo"|"RetireGrant"|"Sign"|"Verify", ...],
            "retiringPrincipal": "string"
          }
          ...
        ],
        "keyPolicies": {"string": "string"
          ...}
      },
      "s3Bucket": {
        "accessPoints": {"string": {
              "accessPointPolicy": "string",
              "networkOrigin": {
                "internetConfiguration": {

                },
                "vpcConfiguration": {
                  "vpcId": "string"
                }
              },
              "publicAccessBlock": {
                "ignorePublicAcls": true|false,
                "restrictPublicBuckets": true|false
              }
            }
          ...},
        "bucketAclGrants": [
          {
            "grantee": {
              "id": "string",
              "uri": "string"
            },
            "permission": "READ"|"WRITE"|"READ_ACP"|"WRITE_ACP"|"FULL_CONTROL"
          }
          ...
        ],
        "bucketPolicy": "string",
        "bucketPublicAccessBlock": {
          "ignorePublicAcls": true|false,
          "restrictPublicBuckets": true|false
        }
      },
      "secretsManagerSecret": {
        "kmsKeyId": "string",
        "secretPolicy": "string"
      },
      "sqsQueue": {
        "queuePolicy": "string"
      }
    }
  ...}

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Output

id -> (string)

The unique ID for the access preview.