list_policy_attachments
¶
list_policy_attachments(
directory_arn: Arn,
policy_reference: ObjectReference,
*,
config_overrides: Optional[CloudDirectoryClientConfig] = 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/cloud_directory.py
3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 | |