lookup_policy
¶
lookup_policy(
directory_arn: Arn,
object_reference: ObjectReference,
*,
config_overrides: Optional[CloudDirectoryClientConfig] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[NumberResults] = None,
) -> LookupPolicyResponse
Lists all policies from the root of the Directory to the object specified. If there are no policies present, an empty list is returned. If policies are present, and if some objects don't have the policies attached, it returns the ObjectIdentifier for such objects. If policies are present, it returns ObjectIdentifier, policyId, and policyType. Paths that don't lead to the root from the target object are ignored. For more information, see Policies.
Parameters:
-
directory_arn(Arn) – -
object_reference(ObjectReference) –Reference that identifies the object whose policies will be looked up.
-
next_token(Optional[NextToken], default:None) –The token to request the next page of results.
-
max_results(Optional[NumberResults], default:None) –The maximum number of items to be retrieved in a single call. This is an approximate number.
Raises:
-
AccessDeniedException–Access denied or directory not found. Either you don't have permissions for this directory or the directory does not exist. Try calling ListDirectories and check your permissions.
-
DirectoryNotEnabledException–Operations are only permitted on enabled directories.
-
InternalServiceException–Indicates a problem that must be resolved by Amazon Web Services. This might be a transient error in which case you can retry your request until it succeeds. Otherwise, go to the AWS Service Health Dashboard site to see if there are any operational issues with the service.
-
InvalidArnException–Indicates that the provided ARN value is not valid.
-
InvalidNextTokenException–Indicates that the
NextTokenvalue is not valid. -
LimitExceededException–Indicates that limits are exceeded. See Limits for more information.
-
ResourceNotFoundException–The specified resource could not be found.
-
RetryableConflictException–Occurs when a conflict with a previous successful write is detected. For example, if a write operation occurs on an object and then an attempt is made to read the object using “SERIALIZABLE” consistency, this exception may result. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.
-
ValidationException–Indicates that your request is malformed in some manner. See the exception message.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_clouddirectory/_services/cloud_directory.py
4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 | |