Class: Aws::VerifiedPermissions::Types::ContextDefinition
- Inherits:
-
Struct
- Object
- Struct
- Aws::VerifiedPermissions::Types::ContextDefinition
- Includes:
- Structure, Structure::Union
- Defined in:
- lib/aws-sdk-verifiedpermissions/types.rb
Overview
ContextDefinition is a union - when making an API calls you must set exactly one of the members.
ContextDefinition is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of ContextDefinition corresponding to the set member.
Contains additional details about the context of the request. Verified Permissions evaluates this information in an authorization request as part of the ‘when` and `unless` clauses in a policy.
This data type is used as a request parameter for the [IsAuthorized], [BatchIsAuthorized], and
- IsAuthorizedWithToken][3
-
operations.
If you’re passing context as part of the request, exactly one instance of ‘context` must be passed. If you don’t want to pass context, omit the ‘context` parameter from your request rather than sending `context {}`.
Example: ‘“context”:“contextMap”:{“<KeyName1>”:{“boolean”:true,“<KeyName2>”:“long”:1234}}`
[1]: docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html [2]: docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_BatchIsAuthorized.html [3]: docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorizedWithToken.html
Direct Known Subclasses
Defined Under Namespace
Classes: CedarJson, ContextMap, Unknown
Constant Summary collapse
- SENSITIVE =
[:context_map, :cedar_json]
Instance Attribute Summary collapse
-
#cedar_json ⇒ String
A Cedar JSON string representation of the context needed to successfully evaluate an authorization request.
-
#context_map ⇒ Hash<String,Types::AttributeValue>
An list of attributes that are needed to successfully evaluate an authorization request.
-
#unknown ⇒ Object
Returns the value of attribute unknown.
Instance Attribute Details
#cedar_json ⇒ String
A Cedar JSON string representation of the context needed to successfully evaluate an authorization request.
Example: ‘true, ”<KeyName2>“: 1234” }`
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 |
# File 'lib/aws-sdk-verifiedpermissions/types.rb', line 1264 class ContextDefinition < Struct.new( :context_map, :cedar_json, :unknown) SENSITIVE = [:context_map, :cedar_json] include Aws::Structure include Aws::Structure::Union class ContextMap < ContextDefinition; end class CedarJson < ContextDefinition; end class Unknown < ContextDefinition; end end |
#context_map ⇒ Hash<String,Types::AttributeValue>
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}`
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 |
# File 'lib/aws-sdk-verifiedpermissions/types.rb', line 1264 class ContextDefinition < Struct.new( :context_map, :cedar_json, :unknown) SENSITIVE = [:context_map, :cedar_json] include Aws::Structure include Aws::Structure::Union class ContextMap < ContextDefinition; end class CedarJson < ContextDefinition; end class Unknown < ContextDefinition; end end |
#unknown ⇒ Object
Returns the value of attribute unknown
1264 1265 1266 |
# File 'lib/aws-sdk-verifiedpermissions/types.rb', line 1264 def unknown @unknown end |