1
resposta

Estrutura comandos AWS CLI

Nao consegui perceber qual o comando/acao para ao no meio de um comanda da aws cli conseguir ter um help da estrutura/ inputs. Isso ocorreu no video na hora de listar as imagens indexadas no rekognition.

1 resposta

Olá Isabela, tudo bem?

O comando help pode ser utilizado sem diferentes "níveis", por exemplo, o comando abaixo exibe um help detalhado para a operação DescribeInstances do Amazon EC2. O help inclui descrições de seus parâmetros de entrada, filtros disponíveis e o que está incluído como saída. Ele também inclui exemplos mostrando como digitar variações comuns do comando.

aws ec2 describe-instances help

Saída:

DESCRIBE-INSTANCES()                                      DESCRIBE-INSTANCES()



NAME
       describe-instances -

DESCRIPTION
       Describes the specified instances or all instances.

       If  you  specify instance IDs, the output includes information for only
       the specified instances. If you specify filters,  the  output  includes
       information  for only those instances that meet the filter criteria. If
       you do not specify instance IDs or filters, the output includes  infor-
       mation  for  all  instances, which can affect performance. We recommend
       that you use pagination to ensure that the  operation  returns  quickly
       and successfully.

       If  you specify an instance ID that is not valid, an error is returned.
       If you specify an instance that you do not own, it is not  included  in
       the output.

       Recently  terminated  instances  might  appear in the returned results.
       This interval is usually less than one hour.

       If you describe instances in the rare case where an  Availability  Zone
       is  experiencing a service disruption and you specify instance IDs that
       are in the affected zone, or do not specify any instance  IDs  at  all,
       the call fails. If you describe instances and specify only instance IDs
       that are in an unaffected zone, the call works normally.

       See also: AWS API Documentation

       See 'aws help' for descriptions of global parameters.

       describe-instances is a paginated operation. Multiple API calls may  be
       issued  in  order  to  retrieve the entire data set of results. You can
       disable pagination by providing the --no-paginate argument.  When using
       --output  text  and  the  --query argument on a paginated response, the
       --query argument must extract data from the results  of  the  following
       query expressions: Reservations

SYNOPSIS
            describe-instances
          [--filters <value>]
          [--instance-ids <value>]
          [--dry-run | --no-dry-run]
          [--cli-input-json | --cli-input-yaml]
          [--starting-token <value>]
          [--page-size <value>]
          [--max-items <value>]
          [--generate-cli-skeleton <value>]
          [--cli-auto-prompt <value>]

OPTIONS
       --filters (list)
          The filters.
[...]

EXAMPLES
       Example 1: To describe an instance

       The  following  describe-instances  example describes the specified in-
       stance.

          aws ec2 describe-instances \
              --instance-ids i-1234567890abcdef0

       Output:

          {
             "Instances": [
                  {
                      "AmiLaunchIndex": 0,
                      "ImageId": "ami-0abcdef1234567890,
                      "InstanceId": "i-1234567890abcdef0,
                      "InstanceType": "t2.micro",
                      "KeyName": "MyKeyPair",
                      "LaunchTime": "2018-05-10T08:05:20.000Z",
                      "Monitoring": {
                          "State": "disabled"
                      },
                      "Placement": {
                          "AvailabilityZone": "us-east-2a",
                          "GroupName": "",
                          "Tenancy": "default"
                      },
                      "PrivateDnsName": "ip-10-0-0-157.us-east-2.compute.internal",
                      "PrivateIpAddress": "10.0.0.157",
                      "ProductCodes": [],
                      "PublicDnsName": "",
                      "State": {
                          "Code": 0,
                          "Name": "pending"
                      },
                      "StateTransitionReason": "",
                      "SubnetId": "subnet-04a636d18e83cfacb",
                      "VpcId": "vpc-1234567890abcdef0",
                      "Architecture": "x86_64",
                      "BlockDeviceMappings": [],
                      "ClientToken": "",
                      "EbsOptimized": false,

[...]