Skip to content

Instantly share code, notes, and snippets.

@marcosborges
Created April 15, 2024 21:59
Show Gist options
  • Save marcosborges/d27f952e83ea7f8dc6ce57860f0e0425 to your computer and use it in GitHub Desktop.
Save marcosborges/d27f952e83ea7f8dc6ce57860f0e0425 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: Cloud Pro Engine
version: 1.0.0
servers:
- url: http://{{url}}data-azure
- url: http://{{url}}update-azure
- url: localhost://
- url: http://{{url}}pub-create-azure
- url: http://{{url}}sizes-azure
- url: http://{{url}}disks-azure
- url: http://{{url}}images-azure
- url: http://{{url}}networks-azure
- url: http://{{url}}status-azure
- url: http://{{url}}update-access-azure
- url: http://{{url}}create-azure
- url: http://{{url}}data-cloudstack
- url: http://{{url}}update-cloudstack
- url: http://{{url}}sizes-cloudstack
- url: http://{{url}}disks-cloudstack
- url: http://{{url}}images-cloudstack
- url: http://{{url}}status-cloudstack
- url: http://{{url}}update-access-cloudstack
- url: http://{{url}}create-cloudstack
- url: https://cloudpro.auth.sa-east-1.amazoncognito.com
components:
securitySchemes:
inheritAuth:
type: http
scheme: inherit
tags:
- name: Azure
- name: Azure > Networking
- name: Azure > Networking > PublicIP
- name: Azure > Networking > SecurityGroup
- name: Azure > Computing
- name: Azure > Computing > VM
- name: Azure > Computing > SSH
- name: Cloudstack
- name: Cloudstack > Networking
- name: Cloudstack > Networking > PublicIP
- name: Cloudstack > Networking > SecurityGroup
- name: Cloudstack > Computing
- name: Cloudstack > Computing > VM
- name: Cloudstack > Computing > SSH
paths:
/{suffix}/list:
get:
tags:
- Cloudstack > Computing > VM
summary: Cloudstack VM List
security:
- inheritAuth: []
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: Access-Control-Allow-Origin
in: header
schema:
type: string
example: '*'
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/get:
get:
tags:
- Cloudstack > Computing > VM
summary: Cloudstack VM Get
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: Access-Control-Allow-Origin
in: header
schema:
type: string
example: '*'
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/update:
post:
tags:
- Cloudstack > Computing > VM
summary: Cloudstack Vm Update Access
requestBody:
content:
application/json:
schema:
type: object
example:
account: ativy-lab
name: vm-ativy-lab-dev
project: rg-cloud-pro
ssh-key-pair: vm-ativy-lab-dev
parameters:
- name: Content-type
in: header
schema:
type: string
example: application/json
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/associate:
post:
tags:
- Azure > Networking > SecurityGroup
summary: Azure Security Group Associate
requestBody:
content:
application/json:
schema:
type: object
example:
account: ativy-lab
virtual-machine-name: vm-test
project: rg-cloud-pro
security-group-id: null
parameters:
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/rules:
post:
tags:
- Azure > Networking > SecurityGroup
summary: Azure Security Group Rules
requestBody:
content:
application/json:
schema:
type: object
example:
id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg
project: rg-cloud-pro
account: ativy-lab
name: vm-test-nsg
description: ''
egress-security-rules:
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/defaultSecurityRules/AllowVnetOutBound
name: AllowVnetOutBound
account: ativy-lab
project: rg-cloud-pro
start-address: VirtualNetwork
start-port: '*'
end-address: VirtualNetwork
destination-port: '*'
protocol: '*'
priority: 65000
security-group-name: vm-test-nsg
type: egress
tags: null
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/defaultSecurityRules/AllowInternetOutBound
name: AllowInternetOutBound
account: ativy-lab
project: rg-cloud-pro
start-address: '*'
start-port: '*'
end-address: Internet
destination-port: '*'
protocol: '*'
priority: 65001
security-group-name: vm-test-nsg
type: egress
tags: null
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/defaultSecurityRules/DenyAllOutBound
name: DenyAllOutBound
account: ativy-lab
project: rg-cloud-pro
start-address: '*'
start-port: '*'
end-address: '*'
destination-port: '*'
protocol: '*'
priority: 65500
security-group-name: vm-test-nsg
type: egress
tags: null
ingress-security-rules:
- name: AllowSSHPort
account: ativy-lab
project: rg-cloud-pro
start-address: '*'
start-port: '*'
end-address: '*'
destination-port: '22'
protocol: Tcp
priority: 1000
security-group-name: vm-test-nsg
type: ingress
tags: null
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/securityRules/AllowHttpPort
name: AllowHttpPort
account: ativy-lab
project: rg-cloud-pro
start-address: '*'
start-port: '*'
end-address: '*'
destination-port: '80'
protocol: Tcp
priority: 1001
security-group-name: vm-test-nsg
type: ingress
tags: null
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/securityRules/AllowHTTPSPort
name: AllowHTTPSPort
account: ativy-lab
project: rg-cloud-pro
start-address: '*'
start-port: '*'
end-address: '*'
destination-port: '443'
protocol: Tcp
priority: 1002
security-group-name: vm-test-nsg
type: ingress
tags: null
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/defaultSecurityRules/AllowVnetInBound
name: AllowVnetInBound
account: ativy-lab
project: rg-cloud-pro
start-address: VirtualNetwork
start-port: '*'
end-address: VirtualNetwork
destination-port: '*'
protocol: '*'
priority: 65000
security-group-name: vm-test-nsg
type: ingress
tags: null
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/defaultSecurityRules/AllowAzureLoadBalancerInBound
name: AllowAzureLoadBalancerInBound
account: ativy-lab
project: rg-cloud-pro
start-address: AzureLoadBalancer
start-port: '*'
end-address: '*'
destination-port: '*'
protocol: '*'
priority: 65001
security-group-name: vm-test-nsg
type: ingress
tags: null
- id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-cloud-pro/providers/Microsoft.Network/networkSecurityGroups/vm-test-nsg/defaultSecurityRules/DenyAllInBound
name: DenyAllInBound
account: ativy-lab
project: rg-cloud-pro
start-address: '*'
start-port: '*'
end-address: '*'
destination-port: '*'
protocol: '*'
priority: 65500
security-group-name: vm-test-nsg
type: ingress
tags: null
tags: null
virtual-machine-id: ''
parameters:
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/500/v1.0/publish/cloudpro/computing:
post:
tags:
- Cloudstack > Computing > VM
summary: Cloudstack VM Create
requestBody:
content:
application/json:
schema:
type: object
example:
specversion: '1.0'
type: deploy
source: /create
datacontenttype: application/cloudevents+json
data:
name: vm-api-create2
account: ativy-lab
project: ativy-lab
os: linux
disk-id: afa093c4-a836-4cca-80d5-9a17f77c0bae
network-id: 0b1642af-fb11-4745-bd09-bae0fdce84f2
create-public-ip: false
image:
id: 4353600c-dca3-4241-bdf6-f3647c3524c2
name: ubuntu-server-22.04-amd64
publisher: admin
offer: ROOT
sku: Other Ubuntu (64-bit)
version: '22.04'
os: linux
tags:
user: lucas.batista
zone: 90a11f7a-dd67-407b-a43e-55ebe8745179
size: c23b2750-0fea-4e1f-b532-8fdb7aed684c
ssh-key-pair: vm-ativy-lab-dev
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/cloudevents+json
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/create:
post:
tags:
- Azure > Computing > VM
summary: Azure VM Pub Create
requestBody:
content:
application/json:
schema:
type: object
example:
name: vm-test-3
account: ativy-lab
project: rg-cloud-pro
os: linux
disk-size: 32
region: eastus
env: dev
vnet: vnet-ativy-lab
network-id: >-
/subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/resourceGroups/rg-ativy-lab/providers/Microsoft.Network/virtualNetworks/vnet-ativy-lab/subnets/default
create-public-ip: true
image:
id: >-
/Subscriptions/25de927b-50ec-43d5-b454-bb2da119a76f/Providers/Microsoft.Compute/Locations/brazilsouth/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-jammy/Skus/22_04-lts-gen2/Versions/22.04.202403080
name: Ubuntu 22.04
publisher: Canonical
offer: 0001-com-ubuntu-server-jammy
sku: 22_04-lts-gen2
version: 22.04.202403080
os: Linux
tags:
user: lucas.batista
size: Standard_DS1_v2
security:
- inheritAuth: []
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/cloudevents+json
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/502/v1.0/publish/cloudpro/computing:
post:
tags:
- Azure > Computing > VM
summary: Azure VM Delete
requestBody:
content:
application/json:
schema:
type: object
example:
specversion: '1.0'
type: delete
source: /delete
datacontenttype: application/cloudevents+json
data:
name: vm-test
account: ativy-lab
project: rg-cloud-pro
delete-associated: true
security:
- inheritAuth: []
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/cloudevents+json
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/status:
get:
tags:
- Cloudstack > Computing > VM
summary: Cloudstack VM Status
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: Access-Control-Allow-Origin
in: header
schema:
type: string
example: '*'
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/start:
post:
tags:
- Cloudstack > Computing > VM
summary: Cloudstack VM Start
requestBody:
content:
application/json:
schema:
type: object
example:
account: ativy-lab
project: ativy-lab
name: vm-ativy-lab-dev
security:
- inheritAuth: []
parameters:
- name: Content-type
in: header
schema:
type: string
example: application/json
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/stop:
post:
tags:
- Cloudstack > Computing > VM
summary: Cloudstack VM Stop
requestBody:
content:
application/json:
schema:
type: object
example:
account: ativy-lab
project: ativy-lab
name: vm-ativy-lab-dev
security:
- inheritAuth: []
parameters:
- name: Content-type
in: header
schema:
type: string
example: application/json
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/restart:
post:
tags:
- Cloudstack > Computing > VM
summary: Azure Vm Restart
requestBody:
content:
application/json:
schema:
type: object
example:
account: ativy-lab
name: vm-cloud-pro-test
provider: rg-cloud-pro
security:
- inheritAuth: []
parameters:
- name: Content-type
in: header
schema:
type: string
example: application/json
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/{suffix}/deploy:
post:
tags:
- Cloudstack > Computing > SSH
summary: Cloudstack Create SSH
requestBody:
content:
application/json:
schema:
type: object
example:
account: ativy-lab
project: rg-cloud-pro
name: ssh-vm-test-23
parameters:
- name: suffix
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json: {}
/oauth2/token:
post:
tags:
- default
summary: cognito client credentials
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
grant_type:
type: string
example: client_credentials
client_id:
type: string
example: 4l3jav3mih42p7lakclu9049e4
scope:
type: string
example: computing/admin
security:
- inheritAuth: []
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/x-www-form-urlencoded
responses:
'200':
description: Successful response
content:
application/json: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment