delete_resource_policy
async
¶
delete_resource_policy(
resource_arn: ResourcePolicyResourceArn,
*,
config_overrides: Optional[AsyncContextClientConfig] = None,
expected_revision_id: Optional[RevisionId] = None,
) -> DeleteResourcePolicyResponse
Removes the resource-based policy from an agent context.
Parameters:
-
resource_arn(ResourcePolicyResourceArn) –ARN of the agent context.
-
expected_revision_id(Optional[RevisionId], default:None) –The revision that you last read. The delete succeeds only if it matches the stored revision.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.
-
InternalServerException–The request failed because of an internal error. Retry the request.
-
ThrottlingException–The request was denied because it exceeded a request rate quota. Wait, then retry the request.
-
ValidationException–The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.
-
ConflictException–The request conflicts with the current state of the resource. Check the resource's current state before you retry the request.
-
ResourceNotFoundException–The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Remove the resource-based policy from an agent context The following example removes the resource-based policy from an agent context, only if the stored policy is still at the given revision.
>>> await client.delete_resource_policy(resource_arn='arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53', expected_revision_id='9a4f2c6e-1d8b-4b3a-a7e5-0c2d6f8b1e49')
Source code in docs_src/capo_context/_services/async_context.py
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 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 | |