Note:

You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . verifiedpermissions ]

batch-is-authorized

Description

Makes a series of decisions about multiple authorization requests for one principal or resource. Each request contains the equivalent content of an IsAuthorized request: principal, action, resource, and context. Either the principal or the resource parameter must be identical across all requests. For example, Verified Permissions won't evaluate a pair of requests where bob views photo1 and alice views photo2 . Authorization of bob to view photo1 and photo2 , or bob and alice to view photo1 , are valid batches.

The request is evaluated against all policies in the specified policy store that match the entities that you declare. The result of the decisions is a series of Allow or Deny responses, along with the IDs of the policies that produced each decision.

The entities of a BatchIsAuthorized API request can contain up to 100 principals and up to 100 resources. The requests of a BatchIsAuthorized API request can contain up to 30 requests.

Note

The BatchIsAuthorized operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission verifiedpermissions:IsAuthorized in their IAM policies.

See also: AWS API Documentation

Synopsis

  batch-is-authorized
--policy-store-id <value>
[--entities <value>]
--requests <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]

Options

--policy-store-id (string)

Specifies the ID of the policy store. Policies in this policy store will be used to make the authorization decisions for the input.

--entities (tagged union structure)

Specifies the list of resources and principals and their associated attributes that Verified Permissions can examine when evaluating the policies.

Note

You can include only principal and resource entities in this parameter; you can't include actions. You must specify actions in the schema.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: entityList.

entityList -> (list)

An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

(structure)

Contains information about an entity that can be referenced in a Cedar policy.

This data type is used as one of the fields in the EntitiesDefinition structure.

{ "identifier": { "entityType": "Photo", "entityId": "VacationPhoto94.jpg" }, "attributes": {}, "parents": [ { "entityType": "Album", "entityId": "alice_folder" } ] }

identifier -> (structure)

The identifier of the entity.

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

attributes -> (map)

A list of attributes for the entity.

key -> (string)

value -> (tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

(tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

value -> (tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

( ... recursive ... )

parents -> (list)

The parents in the hierarchy that contains the entity.

(structure)

Contains the identifier of an entity, including its ID and type.

This data type is used as a request parameter for IsAuthorized operation, and as a response parameter for the CreatePolicy , GetPolicy , and UpdatePolicy operations.

Example: {"entityId":"*string* ","entityType":"*string* "}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

JSON Syntax:

{
  "entityList": [
    {
      "identifier": {
        "entityType": "string",
        "entityId": "string"
      },
      "attributes": {"string": {
            "boolean": true|false,
            "entityIdentifier": {
              "entityType": "string",
              "entityId": "string"
            },
            "long": long,
            "string": "string",
            "set": [
              {
                "boolean": true|false,
                "entityIdentifier": {
                  "entityType": "string",
                  "entityId": "string"
                },
                "long": long,
                "string": "string",
                "set": [
                  { ... recursive ... }
                  ...
                ],
                "record": {"string": { ... recursive ... }
                  ...}
              }
              ...
            ],
            "record": {"string": {
                  "boolean": true|false,
                  "entityIdentifier": {
                    "entityType": "string",
                    "entityId": "string"
                  },
                  "long": long,
                  "string": "string",
                  "set": [
                    { ... recursive ... }
                    ...
                  ],
                  "record": {"string": { ... recursive ... }
                    ...}
                }
              ...}
          }
        ...},
      "parents": [
        {
          "entityType": "string",
          "entityId": "string"
        }
        ...
      ]
    }
    ...
  ]
}

--requests (list)

An array of up to 30 requests that you want Verified Permissions to evaluate.

(structure)

An authorization request that you include in a BatchIsAuthorized API request.

principal -> (structure)

Specifies the principal for which the authorization decision is to be made.

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

action -> (structure)

Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto .

actionType -> (string)

The type of an action.

actionId -> (string)

The ID of an action.

resource -> (structure)

Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo .

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

context -> (tagged union structure)

Specifies additional context that can be used to make more granular authorization decisions.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: contextMap.

contextMap -> (map)

An list of attributes that are needed to successfully evaluate an authorization request. Each attribute in this array must include a map of a data type and its value.

Example: "contextMap":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}

key -> (string)

value -> (tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

(tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

value -> (tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

( ... recursive ... )

JSON Syntax:

[
  {
    "principal": {
      "entityType": "string",
      "entityId": "string"
    },
    "action": {
      "actionType": "string",
      "actionId": "string"
    },
    "resource": {
      "entityType": "string",
      "entityId": "string"
    },
    "context": {
      "contextMap": {"string": {
            "boolean": true|false,
            "entityIdentifier": {
              "entityType": "string",
              "entityId": "string"
            },
            "long": long,
            "string": "string",
            "set": [
              {
                "boolean": true|false,
                "entityIdentifier": {
                  "entityType": "string",
                  "entityId": "string"
                },
                "long": long,
                "string": "string",
                "set": [
                  { ... recursive ... }
                  ...
                ],
                "record": {"string": { ... recursive ... }
                  ...}
              }
              ...
            ],
            "record": {"string": {
                  "boolean": true|false,
                  "entityIdentifier": {
                    "entityType": "string",
                    "entityId": "string"
                  },
                  "long": long,
                  "string": "string",
                  "set": [
                    { ... recursive ... }
                    ...
                  ],
                  "record": {"string": { ... recursive ... }
                    ...}
                }
              ...}
          }
        ...}
    }
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI 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.

--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. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command's default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination.

--output (string)

The formatting style for command output.

  • json
  • text
  • table

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

Output

results -> (list)

A series of Allow or Deny decisions for each request, and the policies that produced them.

(structure)

The decision, based on policy evaluation, from an individual authorization request in a BatchIsAuthorized API request.

request -> (structure)

The authorization request that initiated the decision.

principal -> (structure)

Specifies the principal for which the authorization decision is to be made.

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

action -> (structure)

Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto .

actionType -> (string)

The type of an action.

actionId -> (string)

The ID of an action.

resource -> (structure)

Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo .

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

context -> (tagged union structure)

Specifies additional context that can be used to make more granular authorization decisions.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: contextMap.

contextMap -> (map)

An list of attributes that are needed to successfully evaluate an authorization request. Each attribute in this array must include a map of a data type and its value.

Example: "contextMap":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}

key -> (string)

value -> (tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

(tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

value -> (tagged union structure)

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: boolean, entityIdentifier, long, string, set, record.

boolean -> (boolean)

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier -> (structure)

An attribute value of type EntityIdentifier .

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

entityType -> (string)

The type of an entity.

Example: "entityType":"*typeName* "

entityId -> (string)

The identifier of an entity.

"entityId":"*identifier* "

long -> (long)

An attribute value of Long type.

Example: {"long": 0}

string -> (string)

An attribute value of String type.

Example: {"string": "abc"}

set -> (list)

An attribute value of Set type.

Example: {"set": [ {} ] }

( ... recursive ... )

record -> (map)

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

key -> (string)

( ... recursive ... )

decision -> (string)

An authorization decision that indicates if the authorization request should be allowed or denied.

determiningPolicies -> (list)

The list of determining policies used to make the authorization decision. For example, if there are two matching policies, where one is a forbid and the other is a permit, then the forbid policy will be the determining policy. In the case of multiple matching permit policies then there would be multiple determining policies. In the case that no policies match, and hence the response is DENY, there would be no determining policies.

(structure)

Contains information about one of the policies that determined an authorization decision.

This data type is used as an element in a response parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

Example: "determiningPolicies":[{"policyId":"SPEXAMPLEabcdefg111111"}]

policyId -> (string)

The Id of a policy that determined to an authorization decision.

Example: "policyId":"SPEXAMPLEabcdefg111111"

errors -> (list)

Errors that occurred while making an authorization decision. For example, a policy might reference an entity or attribute that doesn't exist in the request.

(structure)

Contains a description of an evaluation error.

This data type is a response parameter of the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

errorDescription -> (string)

The error description.