completeif(request.readyState ===4){// if the request was successfulif(request.status ===200){vardata;// Parse the JSON in the responsetry{data =JSON.parse(request.responseText); }catch(error){onError(request.s
*/ let url = 'https://example.com/'; if (headers['cloudfront-viewer-country']) { const countryCode = headers['cloudfront-viewer-country'][0].value; if (countryCode === 'TW') { url = 'https://tw.example.com/'; } else if (countryCode === 'US') { url = 'https://us....
KeyMetadata keyMetadata = response.KeyMetadata; if (keyMetadata is not null) { Console.WriteLine($"KMS Key: {keyMetadata.KeyId} was successfully created."); } else { Console.WriteLine("Could not create KMS Key."); } } } Untuk detail API, lihat CreateKeydi Referensi AWS SDK untuk ....
response = emr_client.add_job_flow_steps( JobFlowId=cluster_id, Steps=[job_flow_step] ) step_id = response["StepIds"][0]print(f"Added step{step_id}to cluster{cluster_id}.")exceptClientError:print(f"Couldn't add a step to cluster{cluster_id}.")raiseelse:returnstep_iddefusage_demo...
Status: {} ", status); if ("FAILED".equals(status)) { throw new RuntimeException("The Query Failed. Ending program"); } else if ("FINISHED".equals(status)) { return CompletableFuture.completedFuture(null); } else { // Sleep for 1 second and recheck status return CompletableF...
Request; Aws::Vector<Aws::MedicalImaging::Model::DatastoreSummary> allDataStoreSummaries; Aws::String nextToken;// Used for paginated results.do{if(!nextToken.empty()){listDatastoresRequest.SetNextToken(nextToken); } Aws::MedicalImaging::Model::ListDatastoresOutcome listDatastoresOutcome = medical...
) return else: raise print(f"\nGetting completed jobs for {vault.name}.") jobs = glacier.list_jobs(vault, "completed") if not jobs: print("\nNo completed jobs found. Give it some time and try again later.") return retrieval_job = None for job in jobs: if job.action =...
""" label = 0 if class_name == "normal": label = 0 elif class_name == "anomaly": label = 1 else: logger.error("Unexpected label value: %s for %s", label, image) raise Exception(f"Unexpected label value: {label} for {image}") manifest = { "source-...
) raise else: return am_controls def create_custom_framework(self, cpack_name, am_control_ids): """ Create a custom Audit Manager framework from a selected AWS Config conformance pack. :param cpack_name: The name of the conformance pack to create a fram...
destination = destination if destination[-1] == "/" else destination + "/" print(f"Exporting project {project} datasets to {destination}.") # Get each dataset and export to destination. dataset_types = get_dataset_types(lookoutvision_client, project) for dataset in ...