There are more AWS SDK examples available in the AWS Doc SDK Examples
Use DeleteJobTagging with an AWS SDK
The following code examples show how to use DeleteJobTagging.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:
- Java
-
- SDK for Java 2.x
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. /** * Asynchronously deletes the tags associated with a specific batch job. * * @param jobId The ID of the batch job whose tags should be deleted. * @param accountId The ID of the account associated with the batch job. * @return A CompletableFuture that completes when the job tags have been successfully deleted, or an exception is thrown if the deletion fails. */ public CompletableFuture<Void> deleteBatchJobTagsAsync(String jobId, String accountId) { DeleteJobTaggingRequest jobTaggingRequest = DeleteJobTaggingRequest.builder() .accountId(accountId) .jobId(jobId) .build(); return asyncClient.deleteJobTagging(jobTaggingRequest) .thenAccept(response -> { System.out.println("You have successfully deleted " + jobId + " tagging."); }) .exceptionally(ex -> { System.err.println("Failed to delete job tags: " + ex.getMessage()); throw new RuntimeException(ex); }); }-
For API details, see DeleteJobTagging in AWS SDK for Java 2.x API Reference.
-
- Python
-
- SDK for Python (Boto3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. def delete_job_tags(self, job_id: str, account_id: str) -> None: """ Delete all tags from a batch job. Args: job_id (str): ID of the batch job account_id (str): AWS account ID """ try: self.s3control_client.delete_job_tagging( AccountId=account_id, JobId=job_id ) print(f"You have successfully deleted {job_id} tagging.") except ClientError as e: print(f"Error deleting job tags: {e}") raise-
For API details, see DeleteJobTagging in AWS SDK for Python (Boto3) API Reference.
-
- SAP ABAP
-
- SDK for SAP ABAP
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. TRY. lo_s3c->deletejobtagging( iv_accountid = iv_account_id iv_jobid = iv_job_id ). MESSAGE |Tags deleted from job { iv_job_id }| TYPE 'I'. CATCH /aws1/cx_s3cnotfoundexception INTO DATA(lo_ex_nf). MESSAGE lo_ex_nf->get_text( ) TYPE 'I'. RAISE EXCEPTION TYPE /aws1/cx_rt_generic EXPORTING previous = lo_ex_nf. CATCH /aws1/cx_s3cclientexc INTO DATA(lo_ex_cli). MESSAGE lo_ex_cli->get_text( ) TYPE 'I'. RAISE EXCEPTION TYPE /aws1/cx_rt_generic EXPORTING previous = lo_ex_cli. CATCH /aws1/cx_s3cserverexc INTO DATA(lo_ex_srv). MESSAGE lo_ex_srv->get_text( ) TYPE 'I'. RAISE EXCEPTION TYPE /aws1/cx_rt_generic EXPORTING previous = lo_ex_srv. ENDTRY.-
For API details, see DeleteJobTagging in AWS SDK for SAP ABAP API reference.
-