openapi: 3.2.0 info: title: Amazon Lightsail Key Pairs API description: Amazon Lightsail is the easiest way to get started with Amazon Web Services (AWS) for developers who need to build websites or web applications. version: '2016-11-28' contact: name: AWS Support url: https://aws.amazon.com/premiumsupport/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html x-logo: url: https://a0.awsstatic.com/libra-css/images/logos/aws_logo_smile_1200x630.png x-generated-from: AWS Smithy 2.0 service model (https://github.com/aws/api-models-aws) — mechanical transform, no hand-authored operations servers: - url: https://lightsail.us-east-1.amazonaws.com description: Amazon Lightsail regional endpoint (us-east-1). Lightsail is regional — one endpoint per AWS Region, lightsail.{region}.amazonaws.com (IPv4) or lightsail.{region}.api.aws (dual-stack). See https://docs.aws.amazon.com/general/latest/gr/lightsail.html security: - sigv4: [] tags: - name: Keypairs paths: /ls/api/2016-11-28/CreateKeyPair: post: operationId: CreateKeyPair summary: Creates a custom SSH key pair that you can use with an Amazon Lightsail instance description: Creates a custom SSH key pair that you can use with an Amazon Lightsail instance. Use the DownloadDefaultKeyPair action to create a Lightsail default key pair in an Amazon Web Services Region where a default key pair does not currently exist. The create key pair operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide . tags: - Keypairs requestBody: required: true content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/CreateKeyPairRequest' responses: '200': description: Success content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/CreateKeyPairResult' '403': description: AccessDeniedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/AccessDeniedException' '428': description: AccountSetupInProgressException, RegionSetupInProgressException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/AccountSetupInProgressException' - $ref: '#/components/schemas/RegionSetupInProgressException' '400': description: InvalidInputException, OperationFailureException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/InvalidInputException' - $ref: '#/components/schemas/OperationFailureException' '404': description: NotFoundException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/NotFoundException' '500': description: ServiceException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ServiceException' '401': description: UnauthenticatedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/UnauthenticatedException' x-amz-target: Lightsail_20161128.CreateKeyPair /ls/api/2016-11-28/DeleteKeyPair: post: operationId: DeleteKeyPair summary: Deletes the specified key pair by removing the public key from Amazon Lightsail description: Deletes the specified key pair by removing the public key from Amazon Lightsail. You can delete key pairs that were created using the ImportKeyPair and CreateKeyPair actions, as well as the Lightsail default key pair. A new default key pair will not be created unless you launch an instance without specifying a custom key pair, or you call the DownloadDefaultKeyPair API. The delete key pair operation supports tag-based access control via resource tags applied to the resource identified by key pair name . For more information, see the Amazon Lightsail Developer Guide . tags: - Keypairs requestBody: required: true content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/DeleteKeyPairRequest' responses: '200': description: Success content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/DeleteKeyPairResult' '403': description: AccessDeniedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/AccessDeniedException' '428': description: AccountSetupInProgressException, RegionSetupInProgressException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/AccountSetupInProgressException' - $ref: '#/components/schemas/RegionSetupInProgressException' '400': description: InvalidInputException, OperationFailureException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/InvalidInputException' - $ref: '#/components/schemas/OperationFailureException' '404': description: NotFoundException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/NotFoundException' '500': description: ServiceException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ServiceException' '401': description: UnauthenticatedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/UnauthenticatedException' x-amz-target: Lightsail_20161128.DeleteKeyPair /ls/api/2016-11-28/DownloadDefaultKeyPair: post: operationId: DownloadDefaultKeyPair summary: Downloads the regional Amazon Lightsail default key pair description: Downloads the regional Amazon Lightsail default key pair. This action also creates a Lightsail default key pair if a default key pair does not currently exist in the Amazon Web Services Region. tags: - Keypairs responses: '200': description: Success content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/DownloadDefaultKeyPairResult' '403': description: AccessDeniedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/AccessDeniedException' '428': description: AccountSetupInProgressException, RegionSetupInProgressException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/AccountSetupInProgressException' - $ref: '#/components/schemas/RegionSetupInProgressException' '400': description: InvalidInputException, OperationFailureException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/InvalidInputException' - $ref: '#/components/schemas/OperationFailureException' '404': description: NotFoundException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/NotFoundException' '500': description: ServiceException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ServiceException' '401': description: UnauthenticatedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/UnauthenticatedException' x-amz-target: Lightsail_20161128.DownloadDefaultKeyPair /ls/api/2016-11-28/GetKeyPair: post: operationId: GetKeyPair summary: Returns information about a specific key pair description: Returns information about a specific key pair. tags: - Keypairs requestBody: required: true content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/GetKeyPairRequest' responses: '200': description: Success content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/GetKeyPairResult' '403': description: AccessDeniedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/AccessDeniedException' '428': description: AccountSetupInProgressException, RegionSetupInProgressException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/AccountSetupInProgressException' - $ref: '#/components/schemas/RegionSetupInProgressException' '400': description: InvalidInputException, OperationFailureException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/InvalidInputException' - $ref: '#/components/schemas/OperationFailureException' '404': description: NotFoundException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/NotFoundException' '500': description: ServiceException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ServiceException' '401': description: UnauthenticatedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/UnauthenticatedException' x-amz-target: Lightsail_20161128.GetKeyPair /ls/api/2016-11-28/GetKeyPairs: post: operationId: GetKeyPairs summary: Returns information about all key pairs in the user's account description: Returns information about all key pairs in the user's account. tags: - Keypairs requestBody: required: true content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/GetKeyPairsRequest' responses: '200': description: Success content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/GetKeyPairsResult' '403': description: AccessDeniedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/AccessDeniedException' '428': description: AccountSetupInProgressException, RegionSetupInProgressException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/AccountSetupInProgressException' - $ref: '#/components/schemas/RegionSetupInProgressException' '400': description: InvalidInputException, OperationFailureException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/InvalidInputException' - $ref: '#/components/schemas/OperationFailureException' '404': description: NotFoundException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/NotFoundException' '500': description: ServiceException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ServiceException' '401': description: UnauthenticatedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/UnauthenticatedException' x-amz-target: Lightsail_20161128.GetKeyPairs /ls/api/2016-11-28/ImportKeyPair: post: operationId: ImportKeyPair summary: Imports a public SSH key from a specific key pair description: Imports a public SSH key from a specific key pair. tags: - Keypairs requestBody: required: true content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ImportKeyPairRequest' responses: '200': description: Success content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ImportKeyPairResult' '403': description: AccessDeniedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/AccessDeniedException' '428': description: AccountSetupInProgressException, RegionSetupInProgressException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/AccountSetupInProgressException' - $ref: '#/components/schemas/RegionSetupInProgressException' '400': description: InvalidInputException, OperationFailureException content: application/x-amz-json-1.1: schema: oneOf: - $ref: '#/components/schemas/InvalidInputException' - $ref: '#/components/schemas/OperationFailureException' '404': description: NotFoundException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/NotFoundException' '500': description: ServiceException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/ServiceException' '401': description: UnauthenticatedException content: application/x-amz-json-1.1: schema: $ref: '#/components/schemas/UnauthenticatedException' x-amz-target: Lightsail_20161128.ImportKeyPair components: schemas: GetKeyPairResult: type: object properties: keyPair: allOf: - $ref: '#/components/schemas/KeyPair' description: An array of key-value pairs containing information about the key pair. AccessDeniedException: type: object properties: code: $ref: '#/components/schemas/string' docs: $ref: '#/components/schemas/string' message: $ref: '#/components/schemas/string' tip: $ref: '#/components/schemas/string' description: Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource. ImportKeyPairResult: type: object properties: operation: allOf: - $ref: '#/components/schemas/Operation' description: An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request. Base64: type: string ResourceName: type: string pattern: ^\w[\w\-]*\w$ NotFoundException: type: object properties: code: $ref: '#/components/schemas/string' docs: $ref: '#/components/schemas/string' message: $ref: '#/components/schemas/string' tip: $ref: '#/components/schemas/string' description: Lightsail throws this exception when it cannot find a resource. IsoDate: type: string format: date-time KeyPairList: type: array items: $ref: '#/components/schemas/KeyPair' ImportKeyPairRequest: type: object properties: keyPairName: allOf: - $ref: '#/components/schemas/ResourceName' description: The name of the key pair for which you want to import the public key. publicKeyBase64: allOf: - $ref: '#/components/schemas/Base64' description: A base64-encoded public key of the ssh-rsa type. required: - keyPairName - publicKeyBase64 RegionSetupInProgressException: type: object properties: code: $ref: '#/components/schemas/string' docs: allOf: - $ref: '#/components/schemas/string' description: Regions and Availability Zones for Lightsail message: $ref: '#/components/schemas/string' tip: allOf: - $ref: '#/components/schemas/string' description: Opt-in Regions typically take a few minutes to finish setting up before you can work with them. Wait a few minutes and try again. description: Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up. CreateKeyPairRequest: type: object properties: keyPairName: allOf: - $ref: '#/components/schemas/ResourceName' description: The name for your new key pair. tags: allOf: - $ref: '#/components/schemas/TagList' description: The tag keys and optional values to add to the resource during create. Use the TagResource action to tag a resource after it's created. required: - keyPairName TagKey: type: string InvalidInputException: type: object properties: code: $ref: '#/components/schemas/string' docs: $ref: '#/components/schemas/string' message: $ref: '#/components/schemas/string' tip: $ref: '#/components/schemas/string' description: Lightsail throws this exception when user input does not conform to the validation rules of an input field. Domain and distribution APIs are only available in the N. Virginia ( us-east-1 ) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit these resources. DeleteKeyPairResult: type: object properties: operation: allOf: - $ref: '#/components/schemas/Operation' description: An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request. OperationFailureException: type: object properties: code: $ref: '#/components/schemas/string' docs: $ref: '#/components/schemas/string' message: $ref: '#/components/schemas/string' tip: $ref: '#/components/schemas/string' description: Lightsail throws this exception when an operation fails to execute. GetKeyPairsRequest: type: object properties: pageToken: allOf: - $ref: '#/components/schemas/string' description: The token to advance to the next page of results from your request. To get a page token, perform an initial GetKeyPairs request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request. includeDefaultKeyPair: allOf: - $ref: '#/components/schemas/boolean' description: A Boolean value that indicates whether to include the default key pair in the response of your request. DownloadDefaultKeyPairResult: type: object properties: publicKeyBase64: allOf: - $ref: '#/components/schemas/Base64' description: A base64-encoded public key of the ssh-rsa type. privateKeyBase64: allOf: - $ref: '#/components/schemas/Base64' description: A base64-encoded RSA private key. createdAt: allOf: - $ref: '#/components/schemas/IsoDate' description: The timestamp when the default key pair was created. RegionName: type: string enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-north-1 - eu-south-2 - ca-central-1 - ap-east-1 - ap-south-1 - ap-southeast-1 - ap-southeast-2 - ap-northeast-1 - ap-northeast-2 - ap-southeast-3 - ap-southeast-5 - sa-east-1 ResourceType: type: string enum: - ContainerService - Instance - StaticIp - KeyPair - InstanceSnapshot - Domain - PeeredVpc - LoadBalancer - LoadBalancerTlsCertificate - Disk - DiskSnapshot - RelationalDatabase - RelationalDatabaseSnapshot - ExportSnapshotRecord - CloudFormationStackRecord - Alarm - ContactMethod - Distribution - Certificate - Bucket TagList: type: array items: $ref: '#/components/schemas/Tag' AccountSetupInProgressException: type: object properties: code: $ref: '#/components/schemas/string' docs: $ref: '#/components/schemas/string' message: $ref: '#/components/schemas/string' tip: $ref: '#/components/schemas/string' description: Lightsail throws this exception when an account is still in the setup in progress state. string: type: string Operation: type: object properties: id: allOf: - $ref: '#/components/schemas/NonEmptyString' description: The ID of the operation. resourceName: allOf: - $ref: '#/components/schemas/ResourceName' description: The resource name. resourceType: allOf: - $ref: '#/components/schemas/ResourceType' description: The resource type. createdAt: allOf: - $ref: '#/components/schemas/IsoDate' description: The timestamp when the operation was initialized ( 1479816991.349 ). location: allOf: - $ref: '#/components/schemas/ResourceLocation' description: The Amazon Web Services Region and Availability Zone. isTerminal: allOf: - $ref: '#/components/schemas/boolean' description: A Boolean value indicating whether the operation is terminal. operationDetails: allOf: - $ref: '#/components/schemas/string' description: Details about the operation ( Debian-1GB-Ohio-1 ). operationType: allOf: - $ref: '#/components/schemas/OperationType' description: The type of operation. status: allOf: - $ref: '#/components/schemas/OperationStatus' description: The status of the operation. statusChangedAt: allOf: - $ref: '#/components/schemas/IsoDate' description: The timestamp when the status was changed ( 1479816991.349 ). errorCode: allOf: - $ref: '#/components/schemas/string' description: The error code. errorDetails: allOf: - $ref: '#/components/schemas/string' description: The error details. description: Describes the API operation. boolean: type: boolean UnauthenticatedException: type: object properties: code: $ref: '#/components/schemas/string' docs: $ref: '#/components/schemas/string' message: $ref: '#/components/schemas/string' tip: $ref: '#/components/schemas/string' description: Lightsail throws this exception when the user has not been authenticated. CreateKeyPairResult: type: object properties: keyPair: allOf: - $ref: '#/components/schemas/KeyPair' description: An array of key-value pairs containing information about the new key pair you just created. publicKeyBase64: allOf: - $ref: '#/components/schemas/Base64' description: A base64-encoded public key of the ssh-rsa type. privateKeyBase64: allOf: - $ref: '#/components/schemas/Base64' description: A base64-encoded RSA private key. operation: allOf: - $ref: '#/components/schemas/Operation' description: An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request. ResourceLocation: type: object properties: availabilityZone: allOf: - $ref: '#/components/schemas/string' description: The Availability Zone. Follows the format us-east-2a (case-sensitive). regionName: allOf: - $ref: '#/components/schemas/RegionName' description: The Amazon Web Services Region name. description: Describes the resource location. TagValue: type: string Tag: type: object properties: key: allOf: - $ref: '#/components/schemas/TagKey' description: 'The key of the tag. Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @' value: allOf: - $ref: '#/components/schemas/TagValue' description: 'The value of the tag. Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @' description: Describes a tag key and optional value assigned to an Amazon Lightsail resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide . NonEmptyString: type: string pattern: \S OperationType: type: string enum: - DeleteKnownHostKeys - DeleteInstance - CreateInstance - StopInstance - StartInstance - RebootInstance - OpenInstancePublicPorts - PutInstancePublicPorts - CloseInstancePublicPorts - AllocateStaticIp - ReleaseStaticIp - AttachStaticIp - DetachStaticIp - UpdateDomainEntry - DeleteDomainEntry - CreateDomain - DeleteDomain - CreateInstanceSnapshot - DeleteInstanceSnapshot - CreateInstancesFromSnapshot - CreateLoadBalancer - DeleteLoadBalancer - AttachInstancesToLoadBalancer - DetachInstancesFromLoadBalancer - UpdateLoadBalancerAttribute - CreateLoadBalancerTlsCertificate - DeleteLoadBalancerTlsCertificate - AttachLoadBalancerTlsCertificate - CreateDisk - DeleteDisk - AttachDisk - DetachDisk - CreateDiskSnapshot - DeleteDiskSnapshot - CreateDiskFromSnapshot - CreateRelationalDatabase - UpdateRelationalDatabase - DeleteRelationalDatabase - CreateRelationalDatabaseFromSnapshot - CreateRelationalDatabaseSnapshot - DeleteRelationalDatabaseSnapshot - UpdateRelationalDatabaseParameters - StartRelationalDatabase - RebootRelationalDatabase - StopRelationalDatabase - EnableAddOn - DisableAddOn - PutAlarm - GetAlarms - DeleteAlarm - TestAlarm - CreateContactMethod - GetContactMethods - SendContactMethodVerification - DeleteContactMethod - CreateDistribution - UpdateDistribution - DeleteDistribution - ResetDistributionCache - AttachCertificateToDistribution - DetachCertificateFromDistribution - UpdateDistributionBundle - SetIpAddressType - CreateCertificate - DeleteCertificate - CreateContainerService - UpdateContainerService - DeleteContainerService - CreateContainerServiceDeployment - CreateContainerServiceRegistryLogin - RegisterContainerImage - DeleteContainerImage - CreateBucket - DeleteBucket - CreateBucketAccessKey - DeleteBucketAccessKey - UpdateBucketBundle - UpdateBucket - SetResourceAccessForBucket - UpdateInstanceMetadataOptions - StartGUISession - StopGUISession - SetupInstanceHttps - GetProfile GetKeyPairsResult: type: object properties: keyPairs: allOf: - $ref: '#/components/schemas/KeyPairList' description: An array of key-value pairs containing information about the key pairs. nextPageToken: allOf: - $ref: '#/components/schemas/string' description: The token to advance to the next page of results from your request. A next page token is not returned if there are no more results to display. To get the next page of results, perform another GetKeyPairs request and specify the next page token using the pageToken parameter. OperationStatus: type: string enum: - NotStarted - Started - Failed - Completed - Succeeded KeyPair: type: object properties: name: allOf: - $ref: '#/components/schemas/ResourceName' description: The friendly name of the SSH key pair. arn: allOf: - $ref: '#/components/schemas/NonEmptyString' description: The Amazon Resource Name (ARN) of the key pair ( arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE ). supportCode: allOf: - $ref: '#/components/schemas/string' description: The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. createdAt: allOf: - $ref: '#/components/schemas/IsoDate' description: The timestamp when the key pair was created ( 1479816991.349 ). location: allOf: - $ref: '#/components/schemas/ResourceLocation' description: The region name and Availability Zone where the key pair was created. resourceType: allOf: - $ref: '#/components/schemas/ResourceType' description: The resource type (usually KeyPair ). tags: allOf: - $ref: '#/components/schemas/TagList' description: The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide . fingerprint: allOf: - $ref: '#/components/schemas/Base64' description: The RSA fingerprint of the key pair. description: Describes an SSH key pair. DeleteKeyPairRequest: type: object properties: keyPairName: allOf: - $ref: '#/components/schemas/ResourceName' description: The name of the key pair to delete. expectedFingerprint: allOf: - $ref: '#/components/schemas/string' description: The RSA fingerprint of the Lightsail default key pair to delete. The expectedFingerprint parameter is required only when specifying to delete a Lightsail default key pair. required: - keyPairName GetKeyPairRequest: type: object properties: keyPairName: allOf: - $ref: '#/components/schemas/ResourceName' description: The name of the key pair for which you are requesting information. required: - keyPairName ServiceException: type: object properties: code: $ref: '#/components/schemas/string' docs: $ref: '#/components/schemas/string' message: $ref: '#/components/schemas/string' tip: $ref: '#/components/schemas/string' description: A general service exception. securitySchemes: sigv4: type: apiKey name: Authorization in: header description: AWS Signature Version 4. Sign each request with IAM credentials for service name "lightsail"; the Authorization header carries the AWS4-HMAC-SHA256 credential scope, signed headers and signature. Temporary STS credentials additionally require X-Amz-Security-Token. See https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/CommonParameters.html externalDocs: description: Amazon Lightsail API Reference url: https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/Welcome.html