Getting Virtual Private Cloud
You can get a list of available Amazon Virtual Private Clouds (Amazon VPC) dedicated to the specified cloud account.
Request
GET https://<hostname>:4443/v6/EC2Resources/VirtualPrivateCloud |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameters must be specified in the URL of the request:
Parameter | Type | Description |
---|---|---|
accountId | string | Specifies the identification number of a cloud account. For more information on how to get this parameter, see Getting Accounts. |
regionId | string | Specifies the region ID of Amazon S3 object storage. For more information, see this Amazon article. |
Request Body
None.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 OK.
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
---|---|
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
In the response body, the server returns a resource representation of the /EC2Resources/VirtualPrivateCloud resource. The response body contains the following properties:
Property | Type | Description |
---|---|---|
id | string | Specifies the Amazon Virtual Private Cloud ID. |
name | string | Specifies a name of Amazon Virtual Private Cloud. |
CIDR | string | Specifies a range of IPv4 addresses for the Amazon Virtual Private Cloud in the form of a Classless Inter-Domain Routing (CIDR) block. For more information, see this Amazon article. |
Example
The example returns a resource representation of available Amazon Virtual Private Clouds dedicated to the specified cloud account.
Request: GET https://abc.tech.local:4443/v6/EC2Resources/VirtualPrivateCloud?accountId=c0f030cb-a43a-4713-8da8-717c62a0b4f7®ionId=us-east-2
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: [ { "id": "vpc-831c72ea", "name": "VPC1", "cidr": "172.31.0.0/16" }, { "id": "vpc-00dbf08d436f378b3", "name": "VPC2", "cidr": "172.31.0.0/16" }, { "id": "vpc-06ec0093f0f30b4bb", "name": "VPC3", "cidr": "10.0.0.0/16" }, { "id": "vpc-045e0e7a28c7bb1f1", "name": "VPC4", "cidr": "10.0.0.0/16" }, { "id": "vpc-03ae0759d07d3bae6", "name": "VPC5", "cidr": "172.31.0.0/16" }, { "id": "vpc-025153bb09a792232", "name": "VPC6", "cidr": "172.31.0.0/16" } ] |