delete_project_policy
async
¶
delete_project_policy(
project_arn: ProjectArn,
policy_name: ProjectPolicyName,
*,
config_overrides: Optional[AsyncRekognitionClientConfig] = None,
policy_revision_id: Optional[ProjectPolicyRevisionId] = None,
) -> DeleteProjectPolicyResponse
This operation applies only to Amazon Rekognition Custom Labels.
Deletes an existing project policy.
To get a list of project policies attached to a project, call ListProjectPolicies. To attach a project policy to a project, call PutProjectPolicy.
This operation requires permissions to perform the rekognition:DeleteProjectPolicy action.
Parameters:
-
project_arn(ProjectArn) –The Amazon Resource Name (ARN) of the project that the project policy you want to delete is attached to.
-
policy_name(ProjectPolicyName) –The name of the policy that you want to delete.
-
policy_revision_id(Optional[ProjectPolicyRevisionId], default:None) –The ID of the project policy revision that you want to delete.
Raises:
-
AccessDeniedException–You are not authorized to perform the action.
-
InternalServerError–Amazon Rekognition experienced a service issue. Try your call again.
-
InvalidParameterException–Input parameter violated a constraint. Validate your parameter before calling the API operation again.
-
InvalidPolicyRevisionIdException–The supplied revision id for the project policy is invalid.
-
ProvisionedThroughputExceededException–The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.
-
ResourceNotFoundException–The resource specified in the request cannot be found.
-
ThrottlingException–Amazon Rekognition is temporarily unable to process the request. Try your call again.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
DeleteProjectPolicy This operation deletes a revision of an existing project policy from an Amazon Rekognition Custom Labels project.
>>> await client.delete_project_policy(project_arn='arn:aws:rekognition:us-east-1:111122223333:project/SourceProject/1656557123456', policy_name='testPolicy1', policy_revision_id='3b274c25e9203a56a99e00e3ff205fbc')
Source code in docs_src/capo_rekognition/_services/async_rekognition.py
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 | |