github.com/aavshr/aws-sdk-go@v1.41.3/models/apis/batch/2016-08-10/examples-1.json (about)

     1  {
     2    "version": "1.0",
     3    "examples": {
     4      "CancelJob": [
     5        {
     6          "input": {
     7            "jobId": "1d828f65-7a4d-42e8-996d-3b900ed59dc4",
     8            "reason": "Cancelling job."
     9          },
    10          "output": {
    11          },
    12          "comments": {
    13            "input": {
    14            },
    15            "output": {
    16            }
    17          },
    18          "description": "This example cancels a job with the specified job ID.",
    19          "id": "to-cancel-a-job-1481152314733",
    20          "title": "To cancel a job"
    21        }
    22      ],
    23      "CreateComputeEnvironment": [
    24        {
    25          "input": {
    26            "type": "MANAGED",
    27            "computeEnvironmentName": "C4OnDemand",
    28            "computeResources": {
    29              "type": "EC2",
    30              "desiredvCpus": 48,
    31              "ec2KeyPair": "id_rsa",
    32              "instanceRole": "ecsInstanceRole",
    33              "instanceTypes": [
    34                "c4.large",
    35                "c4.xlarge",
    36                "c4.2xlarge",
    37                "c4.4xlarge",
    38                "c4.8xlarge"
    39              ],
    40              "maxvCpus": 128,
    41              "minvCpus": 0,
    42              "securityGroupIds": [
    43                "sg-cf5093b2"
    44              ],
    45              "subnets": [
    46                "subnet-220c0e0a",
    47                "subnet-1a95556d",
    48                "subnet-978f6dce"
    49              ],
    50              "tags": {
    51                "Name": "Batch Instance - C4OnDemand"
    52              }
    53            },
    54            "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole",
    55            "state": "ENABLED"
    56          },
    57          "output": {
    58            "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand",
    59            "computeEnvironmentName": "C4OnDemand"
    60          },
    61          "comments": {
    62            "input": {
    63            },
    64            "output": {
    65            }
    66          },
    67          "description": "This example creates a managed compute environment with specific C4 instance types that are launched on demand. The compute environment is called C4OnDemand.",
    68          "id": "to-create-a-managed-ec2-compute-environment-1481152600017",
    69          "title": "To create a managed EC2 compute environment"
    70        },
    71        {
    72          "input": {
    73            "type": "MANAGED",
    74            "computeEnvironmentName": "M4Spot",
    75            "computeResources": {
    76              "type": "SPOT",
    77              "bidPercentage": 20,
    78              "desiredvCpus": 4,
    79              "ec2KeyPair": "id_rsa",
    80              "instanceRole": "ecsInstanceRole",
    81              "instanceTypes": [
    82                "m4"
    83              ],
    84              "maxvCpus": 128,
    85              "minvCpus": 0,
    86              "securityGroupIds": [
    87                "sg-cf5093b2"
    88              ],
    89              "spotIamFleetRole": "arn:aws:iam::012345678910:role/aws-ec2-spot-fleet-role",
    90              "subnets": [
    91                "subnet-220c0e0a",
    92                "subnet-1a95556d",
    93                "subnet-978f6dce"
    94              ],
    95              "tags": {
    96                "Name": "Batch Instance - M4Spot"
    97              }
    98            },
    99            "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole",
   100            "state": "ENABLED"
   101          },
   102          "output": {
   103            "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/M4Spot",
   104            "computeEnvironmentName": "M4Spot"
   105          },
   106          "comments": {
   107            "input": {
   108            },
   109            "output": {
   110            }
   111          },
   112          "description": "This example creates a managed compute environment with the M4 instance type that is launched when the Spot bid price is at or below 20% of the On-Demand price for the instance type. The compute environment is called M4Spot.",
   113          "id": "to-create-a-managed-ec2-spot-compute-environment-1481152844190",
   114          "title": "To create a managed EC2 Spot compute environment"
   115        }
   116      ],
   117      "CreateJobQueue": [
   118        {
   119          "input": {
   120            "computeEnvironmentOrder": [
   121              {
   122                "computeEnvironment": "M4Spot",
   123                "order": 1
   124              }
   125            ],
   126            "jobQueueName": "LowPriority",
   127            "priority": 1,
   128            "state": "ENABLED"
   129          },
   130          "output": {
   131            "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/LowPriority",
   132            "jobQueueName": "LowPriority"
   133          },
   134          "comments": {
   135            "input": {
   136            },
   137            "output": {
   138            }
   139          },
   140          "description": "This example creates a job queue called LowPriority that uses the M4Spot compute environment.",
   141          "id": "to-create-a-job-queue-with-a-single-compute-environment-1481152967946",
   142          "title": "To create a job queue with a single compute environment"
   143        },
   144        {
   145          "input": {
   146            "computeEnvironmentOrder": [
   147              {
   148                "computeEnvironment": "C4OnDemand",
   149                "order": 1
   150              },
   151              {
   152                "computeEnvironment": "M4Spot",
   153                "order": 2
   154              }
   155            ],
   156            "jobQueueName": "HighPriority",
   157            "priority": 10,
   158            "state": "ENABLED"
   159          },
   160          "output": {
   161            "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority",
   162            "jobQueueName": "HighPriority"
   163          },
   164          "comments": {
   165            "input": {
   166            },
   167            "output": {
   168            }
   169          },
   170          "description": "This example creates a job queue called HighPriority that uses the C4OnDemand compute environment with an order of 1 and the M4Spot compute environment with an order of 2.",
   171          "id": "to-create-a-job-queue-with-multiple-compute-environments-1481153027051",
   172          "title": "To create a job queue with multiple compute environments"
   173        }
   174      ],
   175      "DeleteComputeEnvironment": [
   176        {
   177          "input": {
   178            "computeEnvironment": "P2OnDemand"
   179          },
   180          "output": {
   181          },
   182          "comments": {
   183            "input": {
   184            },
   185            "output": {
   186            }
   187          },
   188          "description": "This example deletes the P2OnDemand compute environment.",
   189          "id": "to-delete-a-compute-environment-1481153105644",
   190          "title": "To delete a compute environment"
   191        }
   192      ],
   193      "DeleteJobQueue": [
   194        {
   195          "input": {
   196            "jobQueue": "GPGPU"
   197          },
   198          "output": {
   199          },
   200          "comments": {
   201            "input": {
   202            },
   203            "output": {
   204            }
   205          },
   206          "description": "This example deletes the GPGPU job queue.",
   207          "id": "to-delete-a-job-queue-1481153508134",
   208          "title": "To delete a job queue"
   209        }
   210      ],
   211      "DeregisterJobDefinition": [
   212        {
   213          "input": {
   214            "jobDefinition": "sleep10"
   215          },
   216          "output": {
   217          },
   218          "comments": {
   219            "input": {
   220            },
   221            "output": {
   222            }
   223          },
   224          "description": "This example deregisters a job definition called sleep10.",
   225          "id": "to-deregister-a-job-definition-1481153579565",
   226          "title": "To deregister a job definition"
   227        }
   228      ],
   229      "DescribeComputeEnvironments": [
   230        {
   231          "input": {
   232            "computeEnvironments": [
   233              "P2OnDemand"
   234            ]
   235          },
   236          "output": {
   237            "computeEnvironments": [
   238              {
   239                "type": "MANAGED",
   240                "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P2OnDemand",
   241                "computeEnvironmentName": "P2OnDemand",
   242                "computeResources": {
   243                  "type": "EC2",
   244                  "desiredvCpus": 48,
   245                  "ec2KeyPair": "id_rsa",
   246                  "instanceRole": "ecsInstanceRole",
   247                  "instanceTypes": [
   248                    "p2"
   249                  ],
   250                  "maxvCpus": 128,
   251                  "minvCpus": 0,
   252                  "securityGroupIds": [
   253                    "sg-cf5093b2"
   254                  ],
   255                  "subnets": [
   256                    "subnet-220c0e0a",
   257                    "subnet-1a95556d",
   258                    "subnet-978f6dce"
   259                  ],
   260                  "tags": {
   261                    "Name": "Batch Instance - P2OnDemand"
   262                  }
   263                },
   264                "ecsClusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/P2OnDemand_Batch_2c06f29d-d1fe-3a49-879d-42394c86effc",
   265                "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole",
   266                "state": "ENABLED",
   267                "status": "VALID",
   268                "statusReason": "ComputeEnvironment Healthy"
   269              }
   270            ]
   271          },
   272          "comments": {
   273            "input": {
   274            },
   275            "output": {
   276            }
   277          },
   278          "description": "This example describes the P2OnDemand compute environment.",
   279          "id": "to-describe-a-compute-environment-1481153713334",
   280          "title": "To describe a compute environment"
   281        }
   282      ],
   283      "DescribeJobDefinitions": [
   284        {
   285          "input": {
   286            "status": "ACTIVE"
   287          },
   288          "output": {
   289            "jobDefinitions": [
   290              {
   291                "type": "container",
   292                "containerProperties": {
   293                  "command": [
   294                    "sleep",
   295                    "60"
   296                  ],
   297                  "environment": [
   298  
   299                  ],
   300                  "image": "busybox",
   301                  "memory": 128,
   302                  "mountPoints": [
   303  
   304                  ],
   305                  "ulimits": [
   306  
   307                  ],
   308                  "vcpus": 1,
   309                  "volumes": [
   310  
   311                  ]
   312                },
   313                "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep60:1",
   314                "jobDefinitionName": "sleep60",
   315                "revision": 1,
   316                "status": "ACTIVE"
   317              }
   318            ]
   319          },
   320          "comments": {
   321            "input": {
   322            },
   323            "output": {
   324            }
   325          },
   326          "description": "This example describes all of your active job definitions.",
   327          "id": "to-describe-active-job-definitions-1481153895831",
   328          "title": "To describe active job definitions"
   329        }
   330      ],
   331      "DescribeJobQueues": [
   332        {
   333          "input": {
   334            "jobQueues": [
   335              "HighPriority"
   336            ]
   337          },
   338          "output": {
   339            "jobQueues": [
   340              {
   341                "computeEnvironmentOrder": [
   342                  {
   343                    "computeEnvironment": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand",
   344                    "order": 1
   345                  }
   346                ],
   347                "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority",
   348                "jobQueueName": "HighPriority",
   349                "priority": 1,
   350                "state": "ENABLED",
   351                "status": "VALID",
   352                "statusReason": "JobQueue Healthy"
   353              }
   354            ]
   355          },
   356          "comments": {
   357            "input": {
   358            },
   359            "output": {
   360            }
   361          },
   362          "description": "This example describes the HighPriority job queue.",
   363          "id": "to-describe-a-job-queue-1481153995804",
   364          "title": "To describe a job queue"
   365        }
   366      ],
   367      "DescribeJobs": [
   368        {
   369          "input": {
   370            "jobs": [
   371              "24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9"
   372            ]
   373          },
   374          "output": {
   375            "jobs": [
   376              {
   377                "container": {
   378                  "command": [
   379                    "sleep",
   380                    "60"
   381                  ],
   382                  "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/5406d7cd-58bd-4b8f-9936-48d7c6b1526c",
   383                  "environment": [
   384  
   385                  ],
   386                  "exitCode": 0,
   387                  "image": "busybox",
   388                  "memory": 128,
   389                  "mountPoints": [
   390  
   391                  ],
   392                  "ulimits": [
   393  
   394                  ],
   395                  "vcpus": 1,
   396                  "volumes": [
   397  
   398                  ]
   399                },
   400                "createdAt": 1480460782010,
   401                "dependsOn": [
   402  
   403                ],
   404                "jobDefinition": "sleep60",
   405                "jobId": "24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9",
   406                "jobName": "example",
   407                "jobQueue": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority",
   408                "parameters": {
   409                },
   410                "startedAt": 1480460816500,
   411                "status": "SUCCEEDED",
   412                "stoppedAt": 1480460880699
   413              }
   414            ]
   415          },
   416          "comments": {
   417            "input": {
   418            },
   419            "output": {
   420            }
   421          },
   422          "description": "This example describes a job with the specified job ID.",
   423          "id": "to-describe-a-specific-job-1481154090490",
   424          "title": "To describe a specific job"
   425        }
   426      ],
   427      "ListJobs": [
   428        {
   429          "input": {
   430            "jobQueue": "HighPriority"
   431          },
   432          "output": {
   433            "jobSummaryList": [
   434              {
   435                "jobId": "e66ff5fd-a1ff-4640-b1a2-0b0a142f49bb",
   436                "jobName": "example"
   437              }
   438            ]
   439          },
   440          "comments": {
   441            "input": {
   442            },
   443            "output": {
   444            }
   445          },
   446          "description": "This example lists the running jobs in the HighPriority job queue.",
   447          "id": "to-list-running-jobs-1481154202164",
   448          "title": "To list running jobs"
   449        },
   450        {
   451          "input": {
   452            "jobQueue": "HighPriority",
   453            "jobStatus": "SUBMITTED"
   454          },
   455          "output": {
   456            "jobSummaryList": [
   457              {
   458                "jobId": "68f0c163-fbd4-44e6-9fd1-25b14a434786",
   459                "jobName": "example"
   460              }
   461            ]
   462          },
   463          "comments": {
   464            "input": {
   465            },
   466            "output": {
   467            }
   468          },
   469          "description": "This example lists jobs in the HighPriority job queue that are in the SUBMITTED job status.",
   470          "id": "to-list-submitted-jobs-1481154251623",
   471          "title": "To list submitted jobs"
   472        }
   473      ],
   474      "ListTagsForResource": [
   475        {
   476          "input": {
   477            "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1"
   478          },
   479          "output": {
   480            "tags": {
   481              "Department": "Engineering",
   482              "Stage": "Alpha",
   483              "User": "JaneDoe"
   484            }
   485          },
   486          "comments": {
   487            "input": {
   488            },
   489            "output": {
   490            }
   491          },
   492          "description": "This demonstrates calling the ListTagsForResource action.",
   493          "id": "listtagsforresource-example-1591293003710",
   494          "title": "ListTagsForResource Example"
   495        }
   496      ],
   497      "RegisterJobDefinition": [
   498        {
   499          "input": {
   500            "type": "container",
   501            "containerProperties": {
   502              "command": [
   503                "sleep",
   504                "10"
   505              ],
   506              "image": "busybox",
   507              "memory": 128,
   508              "vcpus": 1
   509            },
   510            "jobDefinitionName": "sleep10"
   511          },
   512          "output": {
   513            "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep10:1",
   514            "jobDefinitionName": "sleep10",
   515            "revision": 1
   516          },
   517          "comments": {
   518            "input": {
   519            },
   520            "output": {
   521            }
   522          },
   523          "description": "This example registers a job definition for a simple container job.",
   524          "id": "to-register-a-job-definition-1481154325325",
   525          "title": "To register a job definition"
   526        },
   527        {
   528          "input": {
   529            "type": "container",
   530            "containerProperties": {
   531              "command": [
   532                "sleep",
   533                "30"
   534              ],
   535              "image": "busybox",
   536              "memory": 128,
   537              "vcpus": 1
   538            },
   539            "jobDefinitionName": "sleep30",
   540            "tags": {
   541              "Department": "Engineering",
   542              "User": "JaneDoe"
   543            }
   544          },
   545          "output": {
   546            "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep30:1",
   547            "jobDefinitionName": "sleep30",
   548            "revision": 1
   549          },
   550          "comments": {
   551            "input": {
   552            },
   553            "output": {
   554            }
   555          },
   556          "description": "This demonstrates calling the RegisterJobDefinition action, including tags.",
   557          "id": "registerjobdefinition-with-tags-1591290509028",
   558          "title": "RegisterJobDefinition with tags"
   559        }
   560      ],
   561      "SubmitJob": [
   562        {
   563          "input": {
   564            "jobDefinition": "sleep60",
   565            "jobName": "example",
   566            "jobQueue": "HighPriority"
   567          },
   568          "output": {
   569            "jobId": "876da822-4198-45f2-a252-6cea32512ea8",
   570            "jobName": "example"
   571          },
   572          "comments": {
   573            "input": {
   574            },
   575            "output": {
   576            }
   577          },
   578          "description": "This example submits a simple container job called example to the HighPriority job queue.",
   579          "id": "to-submit-a-job-to-a-queue-1481154481673",
   580          "title": "To submit a job to a queue"
   581        }
   582      ],
   583      "TagResource": [
   584        {
   585          "input": {
   586            "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1",
   587            "tags": {
   588              "Stage": "Alpha"
   589            }
   590          },
   591          "output": {
   592          },
   593          "comments": {
   594            "input": {
   595            },
   596            "output": {
   597            }
   598          },
   599          "description": "This demonstrates calling the TagResource action.",
   600          "id": "tagresource-example-1591291959952",
   601          "title": "TagResource Example"
   602        }
   603      ],
   604      "TerminateJob": [
   605        {
   606          "input": {
   607            "jobId": "61e743ed-35e4-48da-b2de-5c8333821c84",
   608            "reason": "Terminating job."
   609          },
   610          "output": {
   611          },
   612          "comments": {
   613            "input": {
   614            },
   615            "output": {
   616            }
   617          },
   618          "description": "This example terminates a job with the specified job ID.",
   619          "id": "to-terminate-a-job-1481154558276",
   620          "title": "To terminate a job"
   621        }
   622      ],
   623      "UntagResource": [
   624        {
   625          "input": {
   626            "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1",
   627            "tagKeys": [
   628              "Stage"
   629            ]
   630          },
   631          "output": {
   632          },
   633          "comments": {
   634            "input": {
   635            },
   636            "output": {
   637            }
   638          },
   639          "description": "This demonstrates calling the UntagResource action.",
   640          "id": "untagresource-example-1591292811042",
   641          "title": "UntagResource Example"
   642        }
   643      ],
   644      "UpdateComputeEnvironment": [
   645        {
   646          "input": {
   647            "computeEnvironment": "P2OnDemand",
   648            "state": "DISABLED"
   649          },
   650          "output": {
   651            "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P2OnDemand",
   652            "computeEnvironmentName": "P2OnDemand"
   653          },
   654          "comments": {
   655            "input": {
   656            },
   657            "output": {
   658            }
   659          },
   660          "description": "This example disables the P2OnDemand compute environment so it can be deleted.",
   661          "id": "to-update-a-compute-environment-1481154702731",
   662          "title": "To update a compute environment"
   663        }
   664      ],
   665      "UpdateJobQueue": [
   666        {
   667          "input": {
   668            "jobQueue": "GPGPU",
   669            "state": "DISABLED"
   670          },
   671          "output": {
   672            "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/GPGPU",
   673            "jobQueueName": "GPGPU"
   674          },
   675          "comments": {
   676            "input": {
   677            },
   678            "output": {
   679            }
   680          },
   681          "description": "This example disables a job queue so that it can be deleted.",
   682          "id": "to-update-a-job-queue-1481154806981",
   683          "title": "To update a job queue"
   684        }
   685      ]
   686    }
   687  }