list_policy_attachments
async
¶
list_policy_attachments(
directory_arn: Arn,
policy_reference: ObjectReference,
*,
config_overrides: Optional[AsyncCloudDirectoryClientConfig] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[NumberResults] = None,
consistency_level: Optional[ConsistencyLevel] = None,
) -> ListPolicyAttachmentsResponse
Returns all of the ObjectIdentifiers to which a given policy is attached.
Parameters:
-
directory_arn(Arn) – -
policy_reference(ObjectReference) –The reference that identifies the policy object.
-
next_token(Optional[NextToken], default:None) –The pagination token.
-
max_results(Optional[NumberResults], default:None) –The maximum number of items to be retrieved in a single call. This is an approximate number.
-
consistency_level(Optional[ConsistencyLevel], default:None) –Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.
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.
-
NotPolicyException–Indicates that the requested operation can only operate on policy objects.
-
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/async_cloud_directory.py
3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 | |