detach_object
¶
detach_object(
directory_arn: Arn,
parent_reference: ObjectReference,
link_name: LinkName,
*,
config_overrides: Optional[CloudDirectoryClientConfig] = None,
) -> DetachObjectResponse
Detaches a given object from the parent object. The object that is to be detached from the parent is specified by the link name.
Parameters:
-
directory_arn(Arn) – -
parent_reference(ObjectReference) –The parent reference from which the object with the specified link name is detached.
-
link_name(LinkName) –The link name associated with the object that needs to be detached.
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.
-
LimitExceededException–Indicates that limits are exceeded. See Limits for more information.
-
NotNodeException–Occurs when any invalid operations are performed on an object that is not a node, such as calling
ListObjectChildrenfor a leaf node object. -
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.
Examples:
To detach an object from its parent object
>>> client.detach_object(directory_arn='arn:aws:clouddirectory:us-west-2:45132example:directory/AYb8AOV81kHNgdj8mAO3dNY', parent_reference={'Selector': '$AQGG_ADlfNZBzYHY_JgDt3TWcU7IARvOTeaR09zme1sVsw'}, link_name='link2')
Source code in docs_src/capo_clouddirectory/_services/cloud_directory.py
1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 | |