delete_resource_policy
¶
delete_resource_policy(
resource_arn: ResourcePolicyResourceArn,
*,
config_overrides: Optional[ContextClientConfig] = 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.
>>> 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/context.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 | |