delete_resource_policy
¶
delete_resource_policy(
resource_arn: PolicyResourceArn,
*,
config_overrides: Optional[LambdaClientConfig] = None,
revision_id: Optional[RevisionId] = None,
) -> None
Deletes a resource-based policy from a Lambda resource.
Parameters:
-
resource_arn(PolicyResourceArn) –The Amazon Resource Name (ARN) of the Lambda resource you want to delete the policy from. You can use a qualified or an unqualified ARN. The value must be a complete ARN, and the operation does not accept wildcard characters.
-
revision_id(Optional[RevisionId], default:None) –The revision ID that the existing policy must match for the deletion to proceed. If the revision ID doesn't match, the operation fails with a
PreconditionFailedExceptionerror. To retrieve the current revision ID, use the GetResourcePolicy operation.
Raises:
-
InvalidParameterValueException–One of the parameters in the request is not valid.
-
PreconditionFailedException–The RevisionId provided does not match the latest RevisionId for the Lambda function or alias.
-
For AddPermission and RemovePermission API operations: Call
GetPolicyto retrieve the latest RevisionId for your resource. -
For all other API operations: Call
GetFunctionorGetAliasto retrieve the latest RevisionId for your resource.
-
-
ResourceConflictException–The resource already exists, or another operation is in progress.
-
ResourceNotFoundException–The resource specified in the request does not exist.
-
ServiceException–The Lambda service encountered an internal error.
-
TooManyRequestsException–The request throughput limit was exceeded. For more information, see Lambda quotas.
-
UnknownServiceError–The service returned an error code this client does not model.