AWS EC2 Instance Connect icon

AWS EC2 Instance Connect

Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH public keys to EC2, providing users a simple and secure way to connect to their instances

COMMUNITYAPI KEY0 INSTALLS
API Docs
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "info": {
    "version": "2018-04-02",
    "x-release": "v4",
    "title": "AWS EC2 Instance Connect",
    "description": "Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH public keys to EC2, providing users a simple and secure way to connect to their instances.",
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_awscloud_profile_image.png",
      "backgroundColor": "#FFFFFF"
    },
    "termsOfService": "https://aws.amazon.com/service-terms/",
    "contact": {
      "name": "Mike Ralphson",
      "email": "mike.ralphson@gmail.com",
      "url": "https://github.com/mermade/aws2openapi",
      "x-twitter": "PermittedSoc"
    },
    "license": {
      "name": "Apache 2.0 License",
      "url": "http://www.apache.org/licenses/"
    },
    "x-providerName": "amazonaws.com",
    "x-serviceName": "ec2-instance-connect",
    "x-origin": [
      {
        "contentType": "application/json",
        "url": "https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/ec2-instance-connect-2018-04-02.normal.json",
        "converter": {
          "url": "https://github.com/mermade/aws2openapi",
          "version": "1.0.0"
        },
        "x-apisguru-driver": "external"
      }
    ],
    "x-apiClientRegistration": {
      "url": "https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct"
    },
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-preferred": true
  },
  "externalDocs": {
    "description": "Amazon Web Services documentation",
    "url": "https://docs.aws.amazon.com/ec2-instance-connect/"
  },
  "servers": [
    {
      "url": "http://ec2-instance-connect.{region}.amazonaws.com",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "us-east-1",
            "us-east-2",
            "us-west-1",
            "us-west-2",
            "us-gov-west-1",
            "us-gov-east-1",
            "ca-central-1",
            "eu-north-1",
            "eu-west-1",
            "eu-west-2",
            "eu-west-3",
            "eu-central-1",
            "eu-south-1",
            "af-south-1",
            "ap-northeast-1",
            "ap-northeast-2",
            "ap-northeast-3",
            "ap-southeast-1",
            "ap-southeast-2",
            "ap-east-1",
            "ap-south-1",
            "sa-east-1",
            "me-south-1"
          ],
          "default": "us-east-1"
        }
      },
      "description": "The EC2 Instance Connect multi-region endpoint"
    },
    {
      "url": "https://ec2-instance-connect.{region}.amazonaws.com",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "us-east-1",
            "us-east-2",
            "us-west-1",
            "us-west-2",
            "us-gov-west-1",
            "us-gov-east-1",
            "ca-central-1",
            "eu-north-1",
            "eu-west-1",
            "eu-west-2",
            "eu-west-3",
            "eu-central-1",
            "eu-south-1",
            "af-south-1",
            "ap-northeast-1",
            "ap-northeast-2",
            "ap-northeast-3",
            "ap-southeast-1",
            "ap-southeast-2",
            "ap-east-1",
            "ap-south-1",
            "sa-east-1",
            "me-south-1"
          ],
          "default": "us-east-1"
        }
      },
      "description": "The EC2 Instance Connect multi-region endpoint"
    },
    {
      "url": "http://ec2-instance-connect.{region}.amazonaws.com.cn",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "cn-north-1",
            "cn-northwest-1"
          ],
          "default": "cn-north-1"
        }
      },
      "description": "The EC2 Instance Connect endpoint for China (Beijing) and China (Ningxia)"
    },
    {
      "url": "https://ec2-instance-connect.{region}.amazonaws.com.cn",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "cn-north-1",
            "cn-northwest-1"
          ],
          "default": "cn-north-1"
        }
      },
      "description": "The EC2 Instance Connect endpoint for China (Beijing) and China (Ningxia)"
    }
  ],
  "x-hasEquivalentPaths": true,
  "paths": {
    "/#X-Amz-Target=AWSEC2InstanceConnectService.SendSSHPublicKey": {
      "post": {
        "operationId": "SendSSHPublicKey",
        "description": "Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 seconds. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html\">Connect to your Linux instance using EC2 Instance Connect</a> in the <i>Amazon EC2 User Guide</i>.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendSSHPublicKeyResponse"
                }
              }
            }
          },
          "480": {
            "description": "AuthException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthException"
                }
              }
            }
          },
          "481": {
            "description": "InvalidArgsException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgsException"
                }
              }
            }
          },
          "482": {
            "description": "ServiceException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceException"
                }
              }
            }
          },
          "483": {
            "description": "ThrottlingException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThrottlingException"
                }
              }
            }
          },
          "484": {
            "description": "EC2InstanceNotFoundException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EC2InstanceNotFoundException"
                }
              }
            }
          },
          "485": {
            "description": "EC2InstanceStateInvalidException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EC2InstanceStateInvalidException"
                }
              }
            }
          },
          "486": {
            "description": "EC2InstanceUnavailableException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EC2InstanceUnavailableException"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSSHPublicKeyRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Amz-Target",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AWSEC2InstanceConnectService.SendSSHPublicKey"
              ]
            }
          }
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/X-Amz-Content-Sha256"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Date"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Algorithm"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Credential"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Security-Token"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Signature"
        },
        {
          "$ref": "#/components/parameters/X-Amz-SignedHeaders"
        }
      ]
    },
    "/#X-Amz-Target=AWSEC2InstanceConnectService.SendSerialConsoleSSHPublicKey": {
      "post": {
        "operationId": "SendSerialConsoleSSHPublicKey",
        "description": "Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 seconds to establish a serial console connection to the instance using SSH. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-serial-console.html\">EC2 Serial Console</a> in the <i>Amazon EC2 User Guide</i>.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendSerialConsoleSSHPublicKeyResponse"
                }
              }
            }
          },
          "480": {
            "description": "AuthException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthException"
                }
              }
            }
          },
          "481": {
            "description": "SerialConsoleAccessDisabledException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialConsoleAccessDisabledException"
                }
              }
            }
          },
          "482": {
            "description": "InvalidArgsException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgsException"
                }
              }
            }
          },
          "483": {
            "description": "ServiceException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceException"
                }
              }
            }
          },
          "484": {
            "description": "ThrottlingException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThrottlingException"
                }
              }
            }
          },
          "485": {
            "description": "EC2InstanceNotFoundException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EC2InstanceNotFoundException"
                }
              }
            }
          },
          "486": {
            "description": "EC2InstanceTypeInvalidException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EC2InstanceTypeInvalidException"
                }
              }
            }
          },
          "487": {
            "description": "SerialConsoleSessionLimitExceededException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialConsoleSessionLimitExceededException"
                }
              }
            }
          },
          "488": {
            "description": "SerialConsoleSessionUnavailableException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialConsoleSessionUnavailableException"
                }
              }
            }
          },
          "489": {
            "description": "EC2InstanceStateInvalidException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EC2InstanceStateInvalidException"
                }
              }
            }
          },
          "490": {
            "description": "EC2InstanceUnavailableException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EC2InstanceUnavailableException"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSerialConsoleSSHPublicKeyRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Amz-Target",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AWSEC2InstanceConnectService.SendSerialConsoleSSHPublicKey"
              ]
            }
          }
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/X-Amz-Content-Sha256"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Date"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Algorithm"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Credential"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Security-Token"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Signature"
        },
        {
          "$ref": "#/components/parameters/X-Amz-SignedHeaders"
        }
      ]
    }
  },
  "components": {
    "parameters": {
      "X-Amz-Content-Sha256": {
        "name": "X-Amz-Content-Sha256",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Date": {
        "name": "X-Amz-Date",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Algorithm": {
        "name": "X-Amz-Algorithm",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Credential": {
        "name": "X-Amz-Credential",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Security-Token": {
        "name": "X-Amz-Security-Token",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Signature": {
        "name": "X-Amz-Signature",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-SignedHeaders": {
        "name": "X-Amz-SignedHeaders",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      }
    },
    "securitySchemes": {
      "hmac": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Amazon Signature authorization v4",
        "x-amazon-apigateway-authtype": "awsSigv4"
      }
    },
    "schemas": {
      "SendSSHPublicKeyResponse": {
        "type": "object",
        "example": {
          "RequestId": "abcd1234-abcd-1234-abcd-1234abcd1234",
          "Success": true
        },
        "properties": {
          "RequestId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RequestId"
              },
              {
                "description": "The ID of the request. Please provide this ID when contacting AWS Support for assistance."
              }
            ]
          },
          "Success": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Success"
              },
              {
                "description": "Is true if the request succeeds and an error otherwise."
              }
            ]
          }
        }
      },
      "SendSSHPublicKeyRequest": {
        "type": "object",
        "required": [
          "InstanceId",
          "InstanceOSUser",
          "SSHPublicKey"
        ],
        "title": "SendSSHPublicKeyRequest",
        "properties": {
          "InstanceId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InstanceId"
              },
              {
                "description": "The ID of the EC2 instance."
              }
            ]
          },
          "InstanceOSUser": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InstanceOSUser"
              },
              {
                "description": "The OS user on the EC2 instance for whom the key can be used to authenticate."
              }
            ]
          },
          "SSHPublicKey": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SSHPublicKey"
              },
              {
                "description": "The public key material. To use the public key, you must have the matching private key."
              }
            ]
          },
          "AvailabilityZone": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailabilityZone"
              },
              {
                "description": "The Availability Zone in which the EC2 instance was launched."
              }
            ]
          }
        }
      },
      "AuthException": {},
      "InvalidArgsException": {},
      "ServiceException": {},
      "ThrottlingException": {},
      "EC2InstanceNotFoundException": {},
      "EC2InstanceStateInvalidException": {},
      "EC2InstanceUnavailableException": {},
      "SendSerialConsoleSSHPublicKeyResponse": {
        "type": "object",
        "properties": {
          "RequestId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RequestId"
              },
              {
                "description": "The ID of the request. Please provide this ID when contacting AWS Support for assistance."
              }
            ]
          },
          "Success": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Success"
              },
              {
                "description": "Is true if the request succeeds and an error otherwise."
              }
            ]
          }
        }
      },
      "SendSerialConsoleSSHPublicKeyRequest": {
        "type": "object",
        "required": [
          "InstanceId",
          "SSHPublicKey"
        ],
        "title": "SendSerialConsoleSSHPublicKeyRequest",
        "properties": {
          "InstanceId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InstanceId"
              },
              {
                "description": "The ID of the EC2 instance."
              }
            ]
          },
          "SerialPort": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SerialPort"
              },
              {
                "description": "<p>The serial port of the EC2 instance. Currently only port 0 is supported.</p> <p>Default: 0</p>"
              }
            ]
          },
          "SSHPublicKey": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SSHPublicKey"
              },
              {
                "description": "The public key material. To use the public key, you must have the matching private key. For information about the supported key formats and lengths, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws\">Requirements for key pairs</a> in the <i>Amazon EC2 User Guide</i>."
              }
            ]
          }
        }
      },
      "SerialConsoleAccessDisabledException": {},
      "EC2InstanceTypeInvalidException": {},
      "SerialConsoleSessionLimitExceededException": {},
      "SerialConsoleSessionUnavailableException": {},
      "AvailabilityZone": {
        "type": "string",
        "pattern": "^(\\w+-){2,3}\\d+\\w+$",
        "minLength": 6,
        "maxLength": 32
      },
      "InstanceId": {
        "type": "string",
        "pattern": "^i-[a-f0-9]+$",
        "minLength": 10,
        "maxLength": 32
      },
      "InstanceOSUser": {
        "type": "string",
        "pattern": "^[A-Za-z_][A-Za-z0-9\\@\\._-]{0,30}[A-Za-z0-9\\$_-]?$",
        "minLength": 1,
        "maxLength": 32
      },
      "RequestId": {
        "type": "string"
      },
      "SSHPublicKey": {
        "type": "string",
        "minLength": 80,
        "maxLength": 4096
      },
      "Success": {
        "type": "boolean"
      },
      "SerialPort": {
        "type": "integer",
        "minimum": 0,
        "maximum": 0
      }
    }
  },
  "security": [
    {
      "hmac": []
    }
  ]
}