AWS RoboMaker contoh menggunakan AWS CLI - AWS Command Line Interface

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

AWS RoboMaker contoh menggunakan AWS CLI

Contoh kode berikut menunjukkan cara melakukan tindakan dan menerapkan skenario umum dengan menggunakan AWS Command Line Interface with AWS RoboMaker.

Tindakan adalah kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.

Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.

Tindakan

Contoh kode berikut menunjukkan cara menggunakanbatch-describe-simulation-job.

AWS CLI

Untuk menggambarkan pekerjaan simulasi secara batch

batch-describe-simulation-jobContoh berikut mengambil rincian untuk tiga pekerjaan simulasi yang ditentukan.

Perintah:

aws robomaker batch-describe-simulation-job \ --job arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-66bbb3gpxm8x arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-p0cpdrrwng2n arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-g8h6tglmblgw

Output:

{ "jobs": [ { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-66bbb3gpxm8x", "status": "Completed", "lastUpdatedAt": 1548959178.0, "failureBehavior": "Continue", "clientRequestToken": "6020408e-b05c-4310-9f13-4ed71c5221ed", "outputLocation": { "s3Bucket": "awsrobomakerobjecttracker-111111111-bundlesbucket-2lk584kiq1oa", "s3Prefix": "output" }, "maxJobDurationInSeconds": 3600, "simulationTimeMillis": 0, "iamRole": "arn:aws:iam::111111111111:role/AWSRoboMakerObjectTracker-154895-SimulationJobRole-14D5ASA7PQE3A", "simulationApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/AWSRoboMakerObjectTracker-1548959046124_NPvyfcatq/1548959170096", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "object_tracker_simulation", "launchFile": "local_training.launch", "environmentVariables": { "MARKOV_PRESET_FILE": "object_tracker.py", "MODEL_S3_BUCKET": "awsrobomakerobjecttracker-111111111-bundlesbucket-2lk584kiq1oa", "MODEL_S3_PREFIX": "model-store", "ROS_AWS_REGION": "us-west-2" } } } ], "tags": {}, "vpcConfig": { "subnets": [ "subnet-716dd52a", "subnet-43c22325", "subnet-3f526976" ], "securityGroups": [ "sg-3fb40545" ], "vpcId": "vpc-99895eff", "assignPublicIp": true } }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-p0cpdrrwng2n", "status": "Completed", "lastUpdatedAt": 1548168817.0, "failureBehavior": "Continue", "clientRequestToken": "e4a23e75-f9a7-411d-835f-21881c82c58b", "outputLocation": { "s3Bucket": "awsrobomakercloudwatch-111111111111-bundlesbucket-14e5s9jvwtmv7", "s3Prefix": "output" }, "maxJobDurationInSeconds": 3600, "simulationTimeMillis": 0, "iamRole": "arn:aws:iam::111111111111:role/AWSRoboMakerCloudWatch-154766341-SimulationJobRole-G0OBWTQ8YBG6", "robotApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/AWSRoboMakerCloudWatch-1547663411642_NZbpqEJ3T/1547663517377", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "cloudwatch_robot", "launchFile": "await_commands.launch", "environmentVariables": { "LAUNCH_ID": "1548168752173", "ROS_AWS_REGION": "us-west-2" } } } ], "simulationApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/AWSRoboMakerCloudWatch-1547663411642_0LIt6D1h6/1547663521470", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "cloudwatch_simulation", "launchFile": "bookstore_turtlebot_navigation.launch", "environmentVariables": { "LAUNCH_ID": "1548168752173", "ROS_AWS_REGION": "us-west-2", "TURTLEBOT3_MODEL": "waffle_pi" } } } ], "tags": {}, "vpcConfig": { "subnets": [ "subnet-716dd52a", "subnet-43c22325", "subnet-3f526976" ], "securityGroups": [ "sg-3fb40545" ], "vpcId": "vpc-99895eff", "assignPublicIp": true } }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-g8h6tglmblgw", "status": "Canceled", "lastUpdatedAt": 1546543442.0, "failureBehavior": "Fail", "clientRequestToken": "d796bbb4-2a2c-1abc-f2a9-0d9e547d853f", "outputLocation": { "s3Bucket": "sample-bucket", "s3Prefix": "SimulationLog_115490482698" }, "maxJobDurationInSeconds": 28800, "simulationTimeMillis": 0, "iamRole": "arn:aws:iam::111111111111:role/RoboMakerSampleTheFirst", "robotApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/RoboMakerHelloWorldRobot/1546541208251", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "hello_world_robot", "launchFile": "rotate.launch" } } ], "simulationApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/RoboMakerHelloWorldSimulation/1546541198985", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "hello_world_simulation", "launchFile": "empty_world.launch" } } ], "tags": {} } ], "unprocessedJobs": [] }

Contoh kode berikut menunjukkan cara menggunakancancel-simulation-job.

AWS CLI

Untuk membatalkan pekerjaan simulasi

cancel-simulation-jobContoh berikut membatalkan pekerjaan simulasi yang ditentukan.

aws robomaker cancel-simulation-job \ --job arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-66bbb3gpxm8x

Contoh kode berikut menunjukkan cara menggunakancreate-deployment-job.

AWS CLI

Untuk membuat pekerjaan penerapan

Contoh ini menciptakan pekerjaan penerapan untuk armada MyFleet. Ini termasuk variabel lingkungan bernama "ENVIRONMENT”. Ini juga melampirkan tag bernama “Region”.

Perintah:

aws robomaker create-deployment-job --deployment-config concurrentDeploymentPercentage=20,failureThresholdPercentage=25 --fleet arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/Trek/1539894765711 --tags Region=West --deployment-application-configs application=arn:aws:robomaker:us-west-2:111111111111:robot-application/RoboMakerVoiceInteractionRobot/1546537110575,applicationVersion=1,launchConfig={environmentVariables={ENVIRONMENT=Beta},launchFile=await_commands.launch,packageName=voice_interaction_robot}

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/sim-0974h36s4v0t", "fleet": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1539894765711", "status": "Pending", "deploymentApplicationConfigs": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/RoboMakerVoiceInteractionRobot/1546537110575", "applicationVersion": "1", "launchConfig": { "packageName": "voice_interaction_robot", "launchFile": "await_commands.launch", "environmentVariables": { "ENVIRONMENT": "Beta" } } } ], "createdAt": 1550770236.0, "deploymentConfig": { "concurrentDeploymentPercentage": 20, "failureThresholdPercentage": 25 }, "tags": { "Region": "West" } }

Contoh kode berikut menunjukkan cara menggunakancreate-fleet.

AWS CLI

Untuk membuat armada

Contoh ini menciptakan armada. Ini melampirkan tag bernama Region.

Perintah:

aws robomaker create-fleet --name MyFleet --tags Region=East

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyOtherFleet/1550771394395", "name": "MyFleet", "createdAt": 1550771394.0, "tags": { "Region": "East" } }
  • Untuk API detailnya, lihat CreateFleetdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakancreate-robot-application-version.

AWS CLI

Untuk membuat versi aplikasi robot

Contoh ini membuat versi aplikasi robot.

Perintah:

aws robomaker create-robot-application-version --application arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551201873931

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551201873931", "name": "MyRobotApplication", "version": "1", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-robot-application.tar.gz", "etag": "f8cf5526f1c6e7b3a72c3ed3f79c5493-70", "architecture": "ARMHF" } ], "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "lastUpdatedAt": 1551201873.0, "revisionId": "9986bb8d-a695-4ab4-8810-9f4a74d1aa00" "tags": {} }

Contoh kode berikut menunjukkan cara menggunakancreate-robot-application.

AWS CLI

Untuk membuat aplikasi robot

Contoh ini membuat aplikasi robot.

Perintah:

aws robomaker create-robot-application --name MyRobotApplication --sources s3Bucket=my-bucket,s3Key=my-robot-application.tar.gz,architecture=X86_64 --robot-software-suite name=ROS,version=Kinetic

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551201873931", "name": "MyRobotApplication", "version": "$LATEST", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-robot-application.tar.gz", "architecture": "ARMHF" } ], "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "lastUpdatedAt": 1551201873.0, "revisionId": "1f3cb539-9239-4841-a656-d3efcffa07e1", "tags": {} }

Contoh kode berikut menunjukkan cara menggunakancreate-robot.

AWS CLI

Untuk membuat robot

Contoh ini menciptakan robot. Ia menggunakan ARMHF arsitektur. Ini juga melampirkan tag bernama Region.

Perintah:

aws robomaker create-robot --name MyRobot --architecture ARMHF --greengrass-group-id 0f728a3c-7dbf-4a3e-976d-d16a8360caba --tags Region=East

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1550772324398", "name": "MyRobot", "createdAt": 1550772325.0, "greengrassGroupId": "0f728a3c-7dbf-4a3e-976d-d16a8360caba", "architecture": "ARMHF", "tags": { "Region": "East" } }
  • Untuk API detailnya, lihat CreateRobotdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakancreate-simulation-application-version.

AWS CLI

Untuk membuat versi aplikasi simulasi

Contoh ini membuat versi aplikasi robot.

Perintah:

aws robomaker create-simulation-application-version --application arn:aws:robomaker:us-west-2:111111111111:robot-application/MySimulationApplication/1551203427605

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/MyRobotApplication/1551203427605", "name": "MyRobotApplication", "version": "1", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-simulation-application.tar.gz", "etag": "00d8a94ff113856688c4fce618ae0f45-94", "architecture": "X86_64" } ], "simulationSoftwareSuite": { "name": "Gazebo", "version": "7" }, "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "renderingEngine": { "name": "OGRE", "version": "1.x" }, "lastUpdatedAt": 1551203853.0, "revisionId": "ee753e53-519c-4d37-895d-65e79bcd1914", "tags": {} }

Contoh kode berikut menunjukkan cara menggunakancreate-simulation-application.

AWS CLI

Untuk membuat aplikasi simulasi

Contoh ini membuat aplikasi simulasi.

Perintah:

aws robomaker create-simulation-application --name MyRobotApplication --sources s3Bucket=my-bucket,s3Key=my-simulation-application.tar.gz,architecture=ARMHF --robot-software-suite name=ROS,version=Kinetic --simulation-software-suite name=Gazebo,version=7 --rendering-engine name=OGRE,version=1.x

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/MyRobotApplication/1551203301792", "name": "MyRobotApplication", "version": "$LATEST", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-simulation-application.tar.gz", "architecture": "X86_64" } ], "simulationSoftwareSuite": { "name": "Gazebo", "version": "7" }, "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "renderingEngine": { "name": "OGRE", "version": "1.x" }, "lastUpdatedAt": 1551203301.0, "revisionId": "ee753e53-519c-4d37-895d-65e79bcd1914", "tags": {} }

Contoh kode berikut menunjukkan cara menggunakancreate-simulation-job.

AWS CLI

Untuk membuat pekerjaan simulasi

Contoh ini menciptakan pekerjaan simulasi. Ini menggunakan aplikasi robot dan aplikasi simulasi.

Perintah:

aws robomaker create-simulation-job --max-job-duration-in-seconds 3600 --iam-role arn:aws:iam::111111111111:role/AWSRoboMakerCloudWatch-154766341-SimulationJobRole-G0OBWTQ8YBG6 --robot-applications application=arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821,launchConfig={packageName=hello_world_robot,launchFile=rotate.launch} --simulation-applications application=arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605,launchConfig={packageName=hello_world_simulation,launchFile=empty_world.launch} --tags Region=North

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-w7m68wpr05h8", "status": "Pending", "lastUpdatedAt": 1551213837.0, "failureBehavior": "Fail", "clientRequestToken": "b283ccce-e468-43ee-8642-be76a9d69f15", "maxJobDurationInSeconds": 3600, "simulationTimeMillis": 0, "iamRole": "arn:aws:iam::111111111111:role/MySimulationRole", "robotApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "hello_world_robot", "launchFile": "rotate.launch" } } ], "simulationApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "hello_world_simulation", "launchFile": "empty_world.launch" } } ], "tags": { "Region": "North" } }

Contoh kode berikut menunjukkan cara menggunakandelete-fleet.

AWS CLI

Untuk menghapus armada

Contoh ini menghapus armada.

Perintah:

aws robomaker delete-fleet --fleet arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1550771394395
  • Untuk API detailnya, lihat DeleteFleetdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakandelete-robot-application.

AWS CLI

Untuk menghapus aplikasi robot

Contoh ini menghapus aplikasi robot.

Perintah:

aws robomaker delete-robot-application --application arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821

Contoh kode berikut menunjukkan cara menggunakandelete-robot.

AWS CLI

Untuk menghapus robot

Contoh ini menghapus robot.

Perintah:

aws robomaker delete-robot --robot arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1540829698778
  • Untuk API detailnya, lihat DeleteRobotdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakandelete-simulation-application.

AWS CLI

Untuk menghapus aplikasi simulasi

Contoh ini menghapus aplikasi simulasi.

Perintah:

aws robomaker delete-simulation-application --application arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605

Contoh kode berikut menunjukkan cara menggunakanderegister-robot.

AWS CLI

Untuk membatalkan pendaftaran robot dari armada

Contoh ini membatalkan pendaftaran robot dari armada.

Perintah:

aws robomaker deregister-robot --fleet arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1550771358907 --robot arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1550772324398

Output:

{ "fleet": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1550771358907", "robot": "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1550772324398" }

Contoh kode berikut menunjukkan cara menggunakandescribe-deployment-job.

AWS CLI

Untuk menggambarkan pekerjaan penerapan

describe-deployment-jobContoh berikut mengambil rincian tentang pekerjaan penerapan yang ditentukan.

aws robomaker describe-deployment-job \ --job arn:aws:robomaker:us-west-2:111111111111:deployment-job/deployment-xl8qssl6pbcn

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/deployment-xl8qssl6pbcn", "fleet": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/Trek/1539894765711", "status": "InProgress", "deploymentConfig": { "concurrentDeploymentPercentage": 20, "failureThresholdPercentage": 25 }, "deploymentApplicationConfigs": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/RoboMakerHelloWorldRobot/1546541208251", "applicationVersion": "1", "launchConfig": { "packageName": "hello_world_robot", "launchFile": "rotate.launch" } } ], "createdAt": 1551218369.0, "robotDeploymentSummary": [ { "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1540834232469", "deploymentStartTime": 1551218376.0, "status": "Deploying", "progressDetail": {} } ], "tags": {} }

Contoh kode berikut menunjukkan cara menggunakandescribe-fleet.

AWS CLI

Untuk menggambarkan armada

describe-fleetContoh berikut mengambil rincian untuk armada yang ditentukan.

aws robomaker describe-fleet \ --fleet arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1550771358907

Output:

{ "name": "MyFleet", "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1539894765711", "robots": [ { "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1540834232469", "createdAt": 1540834232.0 }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/MyOtherRobot/1540829698778", "createdAt": 1540829698.0 } ], "createdAt": 1539894765.0, "lastDeploymentStatus": "Succeeded", "lastDeploymentJob": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/deployment-xl8qssl6pbcn", "lastDeploymentTime": 1551218369.0, "tags": {} }
  • Untuk API detailnya, lihat DescribeFleetdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakandescribe-robot-application.

AWS CLI

Untuk menggambarkan aplikasi robot

Contoh ini menjelaskan aplikasi robot.

Perintah:

aws robomaker describe-robot-application --application arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821", "name": "MyRobotApplication", "version": "$LATEST", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-robot-application.tar.gz", "architecture": "X86_64" } ], "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "revisionId": "e72efe0d-f44f-4333-b604-f6fa5c6bb50b", "lastUpdatedAt": 1551203485.0, "tags": {} }

Contoh kode berikut menunjukkan cara menggunakandescribe-robot.

AWS CLI

Untuk menggambarkan robot

Contoh ini menggambarkan robot.

Perintah:

aws robomaker describe-robot --robot arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1550772324398

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1550772324398", "name": "MyRobot", "status": "Available", "greengrassGroupId": "0f728a3c-7dbf-4a3e-976d-d16a8360caba", "createdAt": 1550772325.0, "architecture": "ARMHF", "tags": { "Region": "East" } }
  • Untuk API detailnya, lihat DescribeRobotdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakandescribe-simulation-application.

AWS CLI

Untuk menggambarkan aplikasi simulasi

Contoh ini menjelaskan aplikasi simulasi.

Perintah:

aws robomaker describe-simulation-application --application arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605", "name": "MySimulationApplication", "version": "$LATEST", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-simulation-application.tar.gz", "architecture": "X86_64" } ], "simulationSoftwareSuite": { "name": "Gazebo", "version": "7" }, "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "renderingEngine": { "name": "OGRE", "version": "1.x" }, "revisionId": "783674ab-b7b8-42d9-b01f-9373907987e5", "lastUpdatedAt": 1551203427.0, "tags": {} }

Contoh kode berikut menunjukkan cara menggunakandescribe-simulation-job.

AWS CLI

Untuk menggambarkan pekerjaan simulasi

Contoh ini menjelaskan pekerjaan simulasi.

Perintah:

aws robomaker describe-simulation-job --job arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-pql32v7pfjy6

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-pql32v7pfjy6", "status": "Running", "lastUpdatedAt": 1551219349.0, "failureBehavior": "Continue", "clientRequestToken": "a19ec4b5-e50d-3591-33da-c2e593c60615", "outputLocation": { "s3Bucket": "my-output-bucket", "s3Prefix": "output" }, "maxJobDurationInSeconds": 3600, "simulationTimeMillis": 0, "iamRole": "arn:aws:iam::111111111111:role/MySimulationRole", "robotApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551206341136", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "hello_world_robot", "launchFile": "rotate.launch" } } ], "simulationApplications": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551206347967", "applicationVersion": "$LATEST", "launchConfig": { "packageName": "hello_world_simulation", "launchFile": "empty_world.launch" } } ], "tags": {} }

Contoh kode berikut menunjukkan cara menggunakanlist-deployment-jobs.

AWS CLI

Untuk membuat daftar pekerjaan penerapan

list-deployment-jobsContoh berikut mengambil daftar pekerjaan penerapan.

aws robomaker list-deployment-jobs

Output:

{ "deploymentJobs": [ { "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/sim-6293szzm56rv", "fleet": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1539894765711", "status": "InProgress", "deploymentApplicationConfigs": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/HelloWorldRobot/1546537110575", "applicationVersion": "1", "launchConfig": { "packageName": "hello_world_robot", "launchFile": "rotate.launch", "environmentVariables": { "ENVIRONMENT": "Desert" } } } ], "deploymentConfig": { "concurrentDeploymentPercentage": 20, "failureThresholdPercentage": 25 }, "createdAt": 1550689373.0 }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/deployment-4w4g69p25zdb", "fleet": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1539894765711", "status": "Pending", "deploymentApplicationConfigs": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/AWSRoboMakerHelloWorld-1544562726923_YGHM_sh5M/1544562822877", "applicationVersion": "1", "launchConfig": { "packageName": "fail", "launchFile": "fail" } } ], "deploymentConfig": { "concurrentDeploymentPercentage": 20, "failureThresholdPercentage": 25 }, "failureReason": "", "failureCode": "", "createdAt": 1544719763.0 } ] }

Contoh kode berikut menunjukkan cara menggunakanlist-fleets.

AWS CLI

Untuk membuat daftar armada

Contoh ini mencantumkan armada. Maksimal 20 armada akan dikembalikan.

Perintah:

aws robomaker list-fleets --max-items 20

Output:

{ "fleetDetails": [ { "name": "Trek", "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1539894765711", "createdAt": 1539894765.0, "lastDeploymentStatus": "Failed", "lastDeploymentJob": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/deployment-4w4g69p25zdb", "lastDeploymentTime": 1544719763.0 } ] }
  • Untuk API detailnya, lihat ListFleetsdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakanlist-robot-applications.

AWS CLI

Untuk daftar aplikasi robot

Contoh ini mencantumkan aplikasi robot. Hasilnya terbatas pada 20 aplikasi robot.

Perintah:

aws robomaker list-robot-applications --max-results 20

Output:

{ "robotApplicationSummaries": [ { "name": "MyRobot", "arn": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobot/1546537110575", "version": "$LATEST", "lastUpdatedAt": 1546540372.0 }, { "name": "AnotherRobot", "arn": "arn:aws:robomaker:us-west-2:111111111111:robot-application/AnotherRobot/1546541208251", "version": "$LATEST", "lastUpdatedAt": 1546541208.0 }, { "name": "MySuperRobot", "arn": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MySuperRobot/1547663517377", "version": "$LATEST", "lastUpdatedAt": 1547663517.0 } ] }

Contoh kode berikut menunjukkan cara menggunakanlist-robots.

AWS CLI

Untuk membuat daftar robot

Contoh ini mencantumkan robot. Maksimal 20 robot akan dikembalikan.

Perintah:

aws robomaker list-robots --max-results 20

Output:

{ "robots": [ { "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/Robot100/1544035373264", "name": "Robot100", "status": "Available", "createdAt": 1544035373.0, "architecture": "X86_64" }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/Robot101/1542146976587", "name": "Robot101", "status": "Available", "createdAt": 1542146976.0, "architecture": "X86_64" }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/Robot102/1540834232469", "name": "Robot102", "fleetArn": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/Trek/1539894765711", "status": "Available", "createdAt": 1540834232.0, "architecture": "X86_64", "lastDeploymentJob": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/deployment-jb007b75gl5f", "lastDeploymentTime": 1550689533.0 }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1540829698778", "name": "MyRobot", "status": "Registered", "createdAt": 1540829698.0, "architecture": "X86_64" } ] }
  • Untuk API detailnya, lihat ListRobotsdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakanlist-simulation-applications.

AWS CLI

Untuk daftar aplikasi simulasi

Contoh ini mencantumkan aplikasi simulasi. Maksimal 20 aplikasi simulasi akan dikembalikan.

Perintah:

aws robomaker list-simulation-applications --max-results 20

Output:

{ "simulationApplicationSummaries": [ { "name": "AWSRoboMakerObjectTracker-1548959046124_NPvyfcatq", "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/AWSRoboMakerObjectTracker-1548959046124_NPvyfcatq/1548959170096", "version": "$LATEST", "lastUpdatedAt": 1548959170.0 }, { "name": "RoboMakerHelloWorldSimulation", "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/RoboMakerHelloWorldSimulation/1546541198985", "version": "$LATEST", "lastUpdatedAt": 1546541198.0 }, { "name": "RoboMakerObjectTrackerSimulation", "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/RoboMakerObjectTrackerSimulation/1545846795615", "version": "$LATEST", "lastUpdatedAt": 1545847405.0 }, { "name": "RoboMakerVoiceInteractionSimulation", "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/RoboMakerVoiceInteractionSimulation/1546537100507", "version": "$LATEST", "lastUpdatedAt": 1546540352.0 }, { "name": "AWSRoboMakerCloudWatch-1547663411642_0LIt6D1h6", "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/AWSRoboMakerCloudWatch-1547663411642_0LIt6D1h6/1547663521470", "version": "$LATEST", "lastUpdatedAt": 1547663521.0 }, { "name": "AWSRoboMakerDeepRacer-1545848257672_1YZCaieQ-", "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/AWSRoboMakerDeepRacer-1545848257672_1YZCaieQ-/1545848370525", "version": "$LATEST", "lastUpdatedAt": 1545848370.0 } ] }

Contoh kode berikut menunjukkan cara menggunakanlist-simulation-jobs.

AWS CLI

Untuk daftar pekerjaan simulasi

Contoh ini mencantumkan pekerjaan simulasi.

Perintah:

aws robomaker list-simulation-jobs

Output:

{ "simulationJobSummaries": [ { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-66bbb3gpxm8x", "lastUpdatedAt": 1548959178.0, "status": "Completed", "simulationApplicationNames": [ "AWSRoboMakerObjectTracker-1548959046124_NPvyfcatq" ], "robotApplicationNames": [ null ] }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-b27c4rkrtzcw", "lastUpdatedAt": 1543514088.0, "status": "Canceled", "simulationApplicationNames": [ "AWSRoboMakerPersonDetection-1543513948280_T8rHW2_lu" ], "robotApplicationNames": [ "AWSRoboMakerPersonDetection-1543513948280_EYaMT0mYb" ] }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-51vxjbzy4q8t", "lastUpdatedAt": 1543508858.0, "status": "Canceled", "simulationApplicationNames": [ "AWSRoboMakerCloudWatch-1543504747391_lFF9ZQyx6" ], "robotApplicationNames": [ "AWSRoboMakerCloudWatch-1543504747391_axbYa3S3K" ] }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-kgf1fqxflqbx", "lastUpdatedAt": 1543504862.0, "status": "Completed", "simulationApplicationNames": [ "AWSRoboMakerCloudWatch-1543504747391_lFF9ZQyx6" ], "robotApplicationNames": [ "AWSRoboMakerCloudWatch-1543504747391_axbYa3S3K" ] }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-vw8lvh061nqt", "lastUpdatedAt": 1543441430.0, "status": "Completed", "simulationApplicationNames": [ "AWSRoboMakerHelloWorld-1543437372341__yb_Jg96l" ], "robotApplicationNames": [ "AWSRoboMakerHelloWorld-1543437372341_lNbmKHvs9" ] }, { "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-txy5ypxmhz84", "lastUpdatedAt": 1543437488.0, "status": "Completed", "simulationApplicationNames": [ "AWSRoboMakerHelloWorld-1543437372341__yb_Jg96l" ], "robotApplicationNames": [ "AWSRoboMakerHelloWorld-1543437372341_lNbmKHvs9" ] } ] }

Contoh kode berikut menunjukkan cara menggunakanlist-tags-for-resource.

AWS CLI

Untuk membuat daftar tag untuk sumber daya

Contoh ini mencantumkan tag untuk AWS RoboMaker sumber daya.

Perintah:

aws robomaker list-tags-for-resource --resource-arn "arn:aws:robomaker:us-west-2:111111111111:robot/Robby_the_Robot/1544035373264"

Output:

{ "tags": { "Region": "North", "Stage": "Initial" } }

Contoh kode berikut menunjukkan cara menggunakanregister-robot.

AWS CLI

Untuk mendaftarkan robot

Contoh ini mendaftarkan robot ke armada.

Perintah:

aws robomaker register-robot --fleet arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1550771358907 --robot arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1550772324398

Output:

{ "fleet": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1550771358907", "robot": "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1550772324398" }
  • Untuk API detailnya, lihat RegisterRobotdi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakanrestart-simulation-job.

AWS CLI

Untuk memulai ulang simulasi

Contoh ini memulai ulang simulasi.

Perintah:

aws robomaker restart-simulation-job --job arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-t6rdgt70mftr

Contoh kode berikut menunjukkan cara menggunakansync-deployment-job.

AWS CLI

Untuk menyinkronkan pekerjaan penerapan

Contoh ini menyinkronkan pekerjaan penerapan.

Perintah:

aws robomaker sync-deployment-job --fleet arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/Trek/1539894765711

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:deployment-job/deployment-09ccxs3tlfms", "fleet": "arn:aws:robomaker:us-west-2:111111111111:deployment-fleet/MyFleet/1539894765711", "status": "Pending", "deploymentConfig": { "concurrentDeploymentPercentage": 20, "failureThresholdPercentage": 25 }, "deploymentApplicationConfigs": [ { "application": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1546541208251", "applicationVersion": "1", "launchConfig": { "packageName": "hello_world_simulation", "launchFile": "empty_world.launch" } } ], "createdAt": 1551286954.0 }

Contoh kode berikut menunjukkan cara menggunakantag-resource.

AWS CLI

Untuk menandai sumber daya

Contoh ini menandai sumber daya. Ini melampirkan dua tag: Region dan Stage.

Perintah:

aws robomaker tag-resource --resource-arn "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1544035373264" --tags Region=North,Stage=Initial
  • Untuk API detailnya, lihat TagResourcedi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakanuntag-resource.

AWS CLI

Untuk menghapus tag sumber daya

Contoh ini menghapus tag dari sumber daya. Ini menghapus tag Region.

Perintah:

aws robomaker untag-resource --resource-arn "arn:aws:robomaker:us-west-2:111111111111:robot/MyRobot/1544035373264" --tag-keys Region
  • Untuk API detailnya, lihat UntagResourcedi Referensi AWS CLI Perintah.

Contoh kode berikut menunjukkan cara menggunakanupdate-robot-application.

AWS CLI

Untuk memperbarui aplikasi robot

Contoh ini memperbarui aplikasi robot.

Perintah:

aws robomaker update-robot-application --application arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821 --sources s3Bucket=my-bucket,s3Key=my-robot-application.tar.gz,architecture=X86_64 --robot-software-suite name=ROS,version=Kinetic

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821", "name": "MyRobotApplication", "version": "$LATEST", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-robot-application.tar.gz", "architecture": "X86_64" } ], "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "lastUpdatedAt": 1551287993.0, "revisionId": "20b5e331-24fd-4504-8b8c-531afe5f4c94" }

Contoh kode berikut menunjukkan cara menggunakanupdate-simulation-application.

AWS CLI

Untuk memperbarui aplikasi simulasi

Contoh ini memperbarui aplikasi simulasi.

Perintah:

aws robomaker update-simulation-application --application arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605 --sources s3Bucket=my-bucket,s3Key=my-simulation-application.tar.gz,architecture=X86_64 --robot-software-suite name=ROS,version=Kinetic --simulation-software-suite name=Gazebo,version=7 --rendering-engine name=OGRE,version=1.x

Output:

{ "arn": "arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605", "name": "MySimulationApplication", "version": "$LATEST", "sources": [ { "s3Bucket": "my-bucket", "s3Key": "my-simulation-application.tar.gz", "architecture": "X86_64" } ], "simulationSoftwareSuite": { "name": "Gazebo", "version": "7" }, "robotSoftwareSuite": { "name": "ROS", "version": "Kinetic" }, "renderingEngine": { "name": "OGRE", "version": "1.x" }, "lastUpdatedAt": 1551289361.0, "revisionId": "4a22cb5d-93c5-4cef-9311-52bdd119b79e" }