Documentation ¶
Index ¶
- Constants
- Variables
- type AccessToken
- type Client
- func (c *Client) CreateWebArenaIndigoV1AuthCreateAPIKey(ctx context.Context) (*CreateWebArenaIndigoV1AuthCreateAPIKeyResponse, error)
- func (c *Client) CreateWebArenaIndigoV1VmSSHKey(ctx context.Context, req *CreateWebArenaIndigoV1VmSSHKeyRequest) (*CreateWebArenaIndigoV1VmSSHKeyResponse, error)
- func (c *Client) DeleteWebArenaIndigoV1AuthAPIKey(ctx context.Context, apiKeyID int64) (*DeleteWebArenaIndigoV1AuthAPIKeyResponse, error)
- func (c *Client) DeleteWebArenaIndigoV1DiskDeleteSnapshot(ctx context.Context, snapshotID int64) (*DeleteWebArenaIndigoV1DiskDeleteSnapshotResponse, error)
- func (c *Client) DeleteWebArenaIndigoV1NwDeleteFirewall(ctx context.Context, firewallID int64) (*DeleteWebArenaIndigoV1NwDeleteFirewallResponse, error)
- func (c *Client) DestroyWebArenaIndigoV1VmSSHKey(ctx context.Context, sshKeyID int64) (*DestroyWebArenaIndigoV1VmSSHKeyResponse, error)
- func (c *Client) GetWebArenaIndigoV1AuthAPIKey(ctx context.Context) (*GetWebArenaIndigoV1AuthAPIKeyResponse, error)
- func (c *Client) GetWebArenaIndigoV1DiskSnapshotList(ctx context.Context, instanceID int64) (*GetWebArenaIndigoV1DiskSnapshotListResponse, error)
- func (c *Client) GetWebArenaIndigoV1NwGetFirewallList(ctx context.Context) (*GetWebArenaIndigoV1NwGetFirewallListResponse, error)
- func (c *Client) GetWebArenaIndigoV1NwGetTemplate(ctx context.Context, firewallID int64) (*GetWebArenaIndigoV1NwGetTemplateResponse, error)
- func (c *Client) GetWebArenaIndigoV1VmGetInstanceList(ctx context.Context) (GetWebArenaIndigoV1VmGetInstanceListResponse, error)
- func (c *Client) GetWebArenaIndigoV1VmGetRegion(ctx context.Context, instanceTypeID int64) (*GetWebArenaIndigoV1VmGetRegionResponse, error)
- func (c *Client) GetWebArenaIndigoV1VmInstanceSpec(ctx context.Context, instanceTypeID, osID int64) (*GetWebArenaIndigoV1VmInstanceSpecResponse, error)
- func (c *Client) GetWebArenaIndigoV1VmInstanceTypes(ctx context.Context) (*GetWebArenaIndigoV1VmInstanceTypesResponse, error)
- func (c *Client) GetWebArenaIndigoV1VmOSList(ctx context.Context, instanceTypeID int64) (*GetWebArenaIndigoV1VmOsListResponse, error)
- func (c *Client) GetWebArenaIndigoV1VmSSHKey(ctx context.Context) (*WebArenaIndigoV1VmSSHKeyResponse, error)
- func (c *Client) GetWebArenaIndigoV1VmSSHKeyActiveStatus(ctx context.Context) (*WebArenaIndigoV1VmSSHKeyActiveStatusResponse, error)
- func (c *Client) IssueAccessToken(ctx context.Context) (*AccessToken, error)
- func (c *Client) PostOAuthV1AccessTokens(ctx context.Context, req *PostOAuthV1AccessTokensRequest) (*PostOAuthV1AccessTokensResponse, error)
- func (c *Client) PostWebArenaIndigoV1DiskRestoreSnapshot(ctx context.Context, req *PostWebArenaIndigoV1DiskRestoreSnapshotRequest) (*PostWebArenaIndigoV1DiskRestoreSnapshotResponse, error)
- func (c *Client) PostWebArenaIndigoV1DiskRetakeSnapshot(ctx context.Context, req *PostWebArenaIndigoV1DiskRetakeSnapshotRequest) (*PostWebArenaIndigoV1DiskRetakeSnapshotResponse, error)
- func (c *Client) PostWebArenaIndigoV1DiskTakeSnapshot(ctx context.Context, req *PostWebArenaIndigoV1DiskTakeSnapshotRequest) (*PostWebArenaIndigoV1DiskTakeSnapshotResponse, error)
- func (c *Client) PostWebArenaIndigoV1NwAssign(ctx context.Context, req *PostWebArenaIndigoV1NwAssignRequest) (*PostWebArenaIndigoV1NwAssignResponse, error)
- func (c *Client) PostWebArenaIndigoV1NwCreateFirewall(ctx context.Context, req *PostWebArenaIndigoV1NwCreateFirewallRequest) (*PostWebArenaIndigoV1NwCreateFirewallResponse, error)
- func (c *Client) PostWebArenaIndigoV1VmCreateImportURLInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateImportURLInstanceRequest) (*PostWebArenaIndigoV1VmCreateImportURLInstanceResponse, error)
- func (c *Client) PostWebArenaIndigoV1VmCreateInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateInstanceRequest) (*PostWebArenaIndigoV1VmCreateInstanceResponse, error)
- func (c *Client) PostWebArenaIndigoV1VmCreateSnapshotInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateSnapshotInstanceRequest) (*PostWebArenaIndigoV1VmCreateSnapshotInstanceResponse, error)
- func (c *Client) PostWebArenaIndigoV1VmCreateWindowsInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateWindowsInstanceRequest) (*PostWebArenaIndigoV1VmCreateWindowsInstanceResponse, error)
- func (c *Client) PostWebArenaIndigoV1VmInstanceStatusUpdate(ctx context.Context, req *PostWebArenaIndigoV1VmInstanceStatusUpdateRequest) (*PostWebArenaIndigoV1VmInstanceStatusUpdateResponse, error)
- func (c *Client) RetrieveWebArenaIndigoV1VmSSHKey(ctx context.Context, sshKeyID int64) (*RetrieveWebArenaIndigoV1VmSSHKeyResponse, error)
- func (c *Client) UpdateWebArenaIndigoV1NwFirewall(ctx context.Context, req *UpdateWebArenaIndigoV1NwFirewallRequest) (*UpdateWebArenaIndigoV1NwFirewallResponse, error)
- func (c *Client) UpdateWebArenaIndigoV1VmSSHKey(ctx context.Context, id int64, req *UpdateWebArenaIndigoV1VmSSHKeyRequest) (*UpdateWebArenaIndigoV1VmSSHKeyResponse, error)
- type ClientOption
- func ClientOptionWithClientID(clientID string) ClientOption
- func ClientOptionWithClientSecret(clientSecret string) ClientOption
- func ClientOptionWithDebugLog(debugLog *log.Logger) ClientOption
- func ClientOptionWithEndpoint(endpoint string) ClientOption
- func ClientOptionWithHTTPClient(httpClient *http.Client) ClientOption
- func ClientOptionWithoutRateLimiter() ClientOption
- type CreateWebArenaIndigoV1AuthCreateAPIKeyResponse
- type CreateWebArenaIndigoV1VmSSHKeyRequest
- type CreateWebArenaIndigoV1VmSSHKeyResponse
- type DeleteWebArenaIndigoV1AuthAPIKeyResponse
- type DeleteWebArenaIndigoV1DiskDeleteSnapshotResponse
- type DeleteWebArenaIndigoV1NwDeleteFirewallResponse
- type DestroyWebArenaIndigoV1VmSSHKeyResponse
- type GetWebArenaIndigoV1AuthAPIKeyResponse
- type GetWebArenaIndigoV1DiskSnapshotListResponse
- type GetWebArenaIndigoV1NwGetFirewallListResponse
- type GetWebArenaIndigoV1NwGetTemplateResponse
- type GetWebArenaIndigoV1VmGetInstanceListResponse
- type GetWebArenaIndigoV1VmGetRegionResponse
- type GetWebArenaIndigoV1VmInstanceSpecResponse
- type GetWebArenaIndigoV1VmInstanceTypesResponse
- type GetWebArenaIndigoV1VmOsListResponse
- type PostOAuthV1AccessTokensRequest
- type PostOAuthV1AccessTokensResponse
- type PostWebArenaIndigoV1DiskRestoreSnapshotRequest
- type PostWebArenaIndigoV1DiskRestoreSnapshotResponse
- type PostWebArenaIndigoV1DiskRetakeSnapshotRequest
- type PostWebArenaIndigoV1DiskRetakeSnapshotResponse
- type PostWebArenaIndigoV1DiskTakeSnapshotRequest
- type PostWebArenaIndigoV1DiskTakeSnapshotResponse
- type PostWebArenaIndigoV1NwAssignRequest
- type PostWebArenaIndigoV1NwAssignResponse
- type PostWebArenaIndigoV1NwCreateFirewallRequest
- type PostWebArenaIndigoV1NwCreateFirewallResponse
- type PostWebArenaIndigoV1VmCreateImportURLInstanceRequest
- type PostWebArenaIndigoV1VmCreateImportURLInstanceResponse
- type PostWebArenaIndigoV1VmCreateInstanceRequest
- type PostWebArenaIndigoV1VmCreateInstanceResponse
- type PostWebArenaIndigoV1VmCreateSnapshotInstanceRequest
- type PostWebArenaIndigoV1VmCreateSnapshotInstanceResponse
- type PostWebArenaIndigoV1VmCreateWindowsInstanceRequest
- type PostWebArenaIndigoV1VmCreateWindowsInstanceResponse
- type PostWebArenaIndigoV1VmInstanceStatusUpdateRequest
- type PostWebArenaIndigoV1VmInstanceStatusUpdateResponse
- type RetrieveWebArenaIndigoV1VmSSHKeyResponse
- type UpdateWebArenaIndigoV1NwFirewallRequest
- type UpdateWebArenaIndigoV1NwFirewallResponse
- type UpdateWebArenaIndigoV1VmSSHKeyRequest
- type UpdateWebArenaIndigoV1VmSSHKeyResponse
- type WebArenaIndigoV1AuthAPIKey
- type WebArenaIndigoV1DiskSnapshot
- type WebArenaIndigoV1NwFirewall
- type WebArenaIndigoV1NwFirewallRule
- type WebArenaIndigoV1NwGetTemplateFirewall
- type WebArenaIndigoV1VmInstance
- type WebArenaIndigoV1VmInstanceDate
- type WebArenaIndigoV1VmInstanceOS
- type WebArenaIndigoV1VmInstanceSpec
- type WebArenaIndigoV1VmInstanceType
- type WebArenaIndigoV1VmOS
- type WebArenaIndigoV1VmRegion
- type WebArenaIndigoV1VmSSHKey
- type WebArenaIndigoV1VmSSHKeyActiveStatusResponse
- type WebArenaIndigoV1VmSSHKeyResponse
Constants ¶
const ( WEBARENA_INDIGO_ENDPOINT = "WEBARENA_INDIGO_ENDPOINT" //nolint:revive,stylecheck WEBARENA_INDIGO_CLIENT_ID = "WEBARENA_INDIGO_CLIENT_ID" //nolint:revive,stylecheck WEBARENA_INDIGO_CLIENT_SECRET = "WEBARENA_INDIGO_CLIENT_SECRET" //nolint:revive,stylecheck PathOAuthV1AccessTokens = "/oauth/v1/accesstokens" //nolint:gosec PathWebArenaIndigoV1VmSSHKey = "/webarenaIndigo/v1/vm/sshkey" PathWebArenaIndigoV1VmSSHKeyActiveStatus = "/webarenaIndigo/v1/vm/sshkey/active/status" PathWebArenaIndigoV1AuthCreateAPIKey = "/webarenaIndigo/v1/auth/create/apikey" PathWebArenaIndigoV1AuthAPIKey = "/webarenaIndigo/v1/auth/apikey" PathWebArenaIndigoV1VmInstanceTypes = "/webarenaIndigo/v1/vm/instancetypes" PathWebArenaIndigoV1VmInstanceType = "/webarenaIndigo/v1/vm/getregion" PathWebArenaIndigoV1VmOSList = "/webarenaIndigo/v1/vm/oslist" PathWebArenaIndigoV1VmInstanceSpec = "/webarenaIndigo/v1/vm/getinstancespec" PathWebArenaIndigoV1VmCreateInstance = "/webarenaIndigo/v1/vm/createinstance" PathWebArenaIndigoV1VmGetInstanceList = "/webarenaIndigo/v1/vm/getinstancelist" PathWebArenaIndigoV1VmInstanceStatusUpdate = "/webarenaIndigo/v1/vm/instance/statusupdate" PathWebArenaIndigoV1NwCreateFirewall = "/webarenaIndigo/v1/nw/createfirewall" PathWebArenaIndigoV1NwGetFirewallList = "/webarenaIndigo/v1/nw/getfirewalllist" PathWebArenaIndigoV1NwGetTemplate = "/webarenaIndigo/v1/nw/gettemplate" PathWebArenaIndigoV1NwUpdateFirewall = "/webarenaIndigo/v1/nw/updatefirewall" PathWebArenaIndigoV1NwAssign = "/webarenaIndigo/v1/nw/assign" PathWebArenaIndigoV1NwDeleteFirewall = "/webarenaIndigo/v1/nw/deletefirewall" PathWebArenaIndigoV1DiskTakeSnapshot = "/webarenaIndigo/v1/disk/takesnapshot" PathWebArenaIndigoV1DiskSnapshotList = "/webarenaIndigo/v1/disk/snapshotlist" PathWebArenaIndigoV1DiskRetakeSnapshot = "/webarenaIndigo/v1/disk/retakesnapshot" PathWebArenaIndigoV1DiskRestoreSnapshot = "/webarenaIndigo/v1/disk/restoresnapshot" PathWebArenaIndigoV1DiskDeleteSnapshot = "/webarenaIndigo/v1/disk/deletesnapshot" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateWebArenaIndigoV1AuthCreateAPIKey ¶
func (c *Client) CreateWebArenaIndigoV1AuthCreateAPIKey(ctx context.Context) (*CreateWebArenaIndigoV1AuthCreateAPIKeyResponse, error)
Generate API Key https://indigo.arena.ne.jp/userapi/#api_key_generate
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/auth/create/apikey \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 201 Created RESPONSE BODY
{ "apiKey": "m70QyrbMUZWl06SfSAvRBPQO0ofsadf", "apiSecret": "LmAY0pB1xA1fas" }
func (*Client) CreateWebArenaIndigoV1VmSSHKey ¶
func (c *Client) CreateWebArenaIndigoV1VmSSHKey(ctx context.Context, req *CreateWebArenaIndigoV1VmSSHKeyRequest) (*CreateWebArenaIndigoV1VmSSHKeyResponse, error)
Create SSH Key https://indigo.arena.ne.jp/userapi/#create_ssh_keys
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/vm/sshkey \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "sshName":"Example", "sshKey":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDRGTcjdlRYZ9" }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 201 Created RESPONSE BODY
{ "success": true, "message": "SSH key has been added successfully", "sshKey": { "name": "Example", "sshkey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDRGTcjdlRYZ9", "status": "ACTIVE", "user_id": 431, "service_id": "wsi-000001", "updated_at": "2019-10-23 11:24:31", "created_at": "2019-10-23 11:24:31", "id": 892 } }
func (*Client) DeleteWebArenaIndigoV1AuthAPIKey ¶
func (c *Client) DeleteWebArenaIndigoV1AuthAPIKey(ctx context.Context, apiKeyID int64) (*DeleteWebArenaIndigoV1AuthAPIKeyResponse, error)
Destroy API Key https://indigo.arena.ne.jp/userapi/#api_key_destroy
CURL EXAMPLE
curl -X DELETE \ https://api.customer.jp/webarenaIndigo/v1/auth/apikey/88 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "message": "API Key is removed successfully" }
func (*Client) DeleteWebArenaIndigoV1DiskDeleteSnapshot ¶
func (c *Client) DeleteWebArenaIndigoV1DiskDeleteSnapshot(ctx context.Context, snapshotID int64) (*DeleteWebArenaIndigoV1DiskDeleteSnapshotResponse, error)
Delete snapshot https://indigo.arena.ne.jp/userapi/#delete_snapshot
CURL EXAMPLE
curl -X DELETE \ https://api.customer.jp/webarenaIndigo/v1/disk/deletesnapshot/10 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 Created RESPONSE BODY {"STATUS":0}.
func (*Client) DeleteWebArenaIndigoV1NwDeleteFirewall ¶
func (c *Client) DeleteWebArenaIndigoV1NwDeleteFirewall(ctx context.Context, firewallID int64) (*DeleteWebArenaIndigoV1NwDeleteFirewallResponse, error)
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "message": "Firewall template has been deleted successfully.", "sucessCode": "F6005" }
func (*Client) DestroyWebArenaIndigoV1VmSSHKey ¶
func (c *Client) DestroyWebArenaIndigoV1VmSSHKey(ctx context.Context, sshKeyID int64) (*DestroyWebArenaIndigoV1VmSSHKeyResponse, error)
Destroy SSH Key https://indigo.arena.ne.jp/userapi/#destroy_ssh_keys
CURL EXAMPLE
curl -X DELETE \ https://api.customer.jp/webarenaIndigo/v1/vm/sshkey/34 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "message": "SSH key has been removed successfully" }
func (*Client) GetWebArenaIndigoV1AuthAPIKey ¶
func (c *Client) GetWebArenaIndigoV1AuthAPIKey(ctx context.Context) (*GetWebArenaIndigoV1AuthAPIKeyResponse, error)
API Key List https://indigo.arena.ne.jp/userapi/#api_key_list
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/auth/apikey \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 Ok RESPONSE BODY
{ "success": true, "total": 1, "accesstokens": [ { "id": 434, "apiKey": "3PwzRzZyXAmBSi0NiYGQjUGpDfsadf", "created_at": "2019-10-21 11:17:08" } ] }
func (*Client) GetWebArenaIndigoV1DiskSnapshotList ¶
func (c *Client) GetWebArenaIndigoV1DiskSnapshotList(ctx context.Context, instanceID int64) (*GetWebArenaIndigoV1DiskSnapshotListResponse, error)
Snapshot list https://indigo.arena.ne.jp/userapi/#snapshot_list
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/disk/snapshotlist/{instanceid} \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY [
{ "id": 3, "name": "Example", "service_id": "wsi-000401", "user_id": "134", "disk_id": 29, "volume": 1, "slot_number": 0, "status": "created", "size": "2000", "deleted": 0, "completed_timestamp": "2018-11-27 07:24:05", "deleted_timestamp": "0000-00-00 00:00:00" }, { "id": 8, "name": "Example2", "service_id": "wsi-000401", "user_id": "134", "disk_id": 29, "volume": 2, "slot_number": 0, "status": "failed", "size": "2000", "deleted": 0, "completed_timestamp": "2018-11-27 10:43:22", "deleted_timestamp": "0000-00-00 00:00:00" }
].
func (*Client) GetWebArenaIndigoV1NwGetFirewallList ¶
func (c *Client) GetWebArenaIndigoV1NwGetFirewallList(ctx context.Context) (*GetWebArenaIndigoV1NwGetFirewallListResponse, error)
Get Firewall list https://indigo.arena.ne.jp/userapi/#firewall_list
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/nw/getfirewalllist \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
[ { "id": 55, "service_id": "wsi-00003", "user_id": 6, "name": "Example", "status": 1, "created_at": "2018-11-14 10:35:33", "updated_at": "2018-11-14 10:35:33" }, { "id": 47, "service_id": "wsi-00003", "user_id": 6, "name": "Example2", "status": 1, "created_at": "2018-10-30 10:07:46", "updated_at": "2018-11-05 04:54:15" } ]
func (*Client) GetWebArenaIndigoV1NwGetTemplate ¶
func (c *Client) GetWebArenaIndigoV1NwGetTemplate(ctx context.Context, firewallID int64) (*GetWebArenaIndigoV1NwGetTemplateResponse, error)
Retrieve firewall https://indigo.arena.ne.jp/userapi/#retrive_firewall
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/nw/gettemplate/55 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "id": 55, "name": "Example", "direction": "in", "type": "HTTP", "protocol": "TCP", "port": "80", "source": "0.0.0.0" }, { "id": 55, "name": "Example", "direction": "in", "type": "HTTPS", "protocol": "TCP", "port": "443", "source": "0.0.0.0" }, { "id": 55, "name": "Example", "direction": "out", "type": "HTTP", "protocol": "TCP", "port": "80", "source": "0.0.0.0" }, { "id": 55, "name": "Example", "direction": "out", "type": "HTTPS", "protocol": "TCP", "port": "443", "source": "0.0.0.0" }
IMPORTANT: The response body is not a valid JSON, so we need to read it as a byte slice and then append '[' and ']' to make it a valid JSON.
func (*Client) GetWebArenaIndigoV1VmGetInstanceList ¶
func (c *Client) GetWebArenaIndigoV1VmGetInstanceList(ctx context.Context) (GetWebArenaIndigoV1VmGetInstanceListResponse, error)
Get Instance list https://indigo.arena.ne.jp/userapi/#instance_list
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/getinstancelist \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
[ { "id": 20, "instance_name": "Centos Dev Env", "set_no": 10, "vps_kind": 10, "sequence_id": 20, "user_id": 18, "service_id": "wsi-000200", "status": "UNUSED", "sshkey_id": 5, "start_date": "2018-11-07 17:11:21", "host_id": 2, "plan": "2CR2GB", "disk_point": 12, "memsize": 2, "cpus": 2, "os_id": 1, "otherstatus": 10, "uuid": "92fa4815-1ec1-403b-93bc-514a11dfeb56", "uidgid": 100001, "vnc_port": 10001, "vnc_passwd": "6z2d9ngprQuxofs6", "arpaname": "192-168-0-20.pro.static.arena.ne.jp", "arpadate": 0, "status_change_date": "2018-11-07 17:11:21", "updated_at": null, "vm_revert": 0, "VEID": "10100000000020", "os": { "id": 1, "name": "CentOS6.6", "viewname": "CentOS 6.6" }, "ip": "192.168.0.20" }, { "id": 19, "instance_name": "Centos Dev Env", "set_no": 10, "vps_kind": 10, "sequence_id": 19, "user_id": 18, "service_id": "wsi-000200", "status": "UNUSED", "sshkey_id": 11, "start_date": "2018-11-07 17:11:08", "host_id": 2, "plan": "2CR2GB", "disk_point": 12, "memsize": 2, "cpus": 2, "os_id": 1, "otherstatus": 10, "uuid": "372827ec-0946-494f-911c-fbb0bceba399", "uidgid": 100001, "vnc_port": 10001, "vnc_passwd": "GXr3VkGhGofT3yf8", "arpaname": "192-168-0-19.pro.static.arena.ne.jp", "arpadate": 0, "status_change_date": "2018-11-07 17:11:08", "updated_at": null, "vm_revert": 0, "VEID": "10100000000019", "os": { "id": 1, "name": "CentOS6.6", "viewname": "CentOS 6.6" }, "ip": "192.168.0.19" } ]
func (*Client) GetWebArenaIndigoV1VmGetRegion ¶
func (c *Client) GetWebArenaIndigoV1VmGetRegion(ctx context.Context, instanceTypeID int64) (*GetWebArenaIndigoV1VmGetRegionResponse, error)
Get region list https://indigo.arena.ne.jp/userapi/#get_region_list
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/getregion?instanceTypeId=1 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "total": 2, "regionlist": [ { "id": 1, "name": "Tokyo", "use_possible_date": "2018-09-30 12:00:00" }, { "id": 2, "name": "Tokyo1", "use_possible_date": "2018-12-09 00:00:00" } ] }
func (*Client) GetWebArenaIndigoV1VmInstanceSpec ¶
func (c *Client) GetWebArenaIndigoV1VmInstanceSpec(ctx context.Context, instanceTypeID, osID int64) (*GetWebArenaIndigoV1VmInstanceSpecResponse, error)
Get Instance Specification https://indigo.arena.ne.jp/userapi/#get_instance_specification
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/getinstancespec?instanceTypeId=1&osId=1 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "total": 1, "speclist": [ { "id": 1, "name": "2 CPU & 2 GB RAM plan", "description": "2 CPU & 2 GB RAM plan", "use_possible_date": "2019-01-03 08:50:00", "instancetype_id": 1, "created_at": "2019-01-04 08:40:57", "updated_at": "2019-01-04 08:40:57", "instance_type": { "id": 1, "name": "instance", "display_name": "KVM Instance", "created_at": "2019-02-12 22:46:35", "updated_at": "2019-02-12 22:46:35" } } ] }
func (*Client) GetWebArenaIndigoV1VmInstanceTypes ¶
func (c *Client) GetWebArenaIndigoV1VmInstanceTypes(ctx context.Context) (*GetWebArenaIndigoV1VmInstanceTypesResponse, error)
Instance Type List https://indigo.arena.ne.jp/userapi/#get_instance_type
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/instancetypes \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "total": 1, "instanceTypes": [ { "id": 1, "name": "instance", "display_name": "KVM Instance", "created_at": "2019-02-12 22:46:35", "updated_at": "2019-02-12 22:46:35" } ] }
func (*Client) GetWebArenaIndigoV1VmOSList ¶
func (c *Client) GetWebArenaIndigoV1VmOSList(ctx context.Context, instanceTypeID int64) (*GetWebArenaIndigoV1VmOsListResponse, error)
Get OS list https://indigo.arena.ne.jp/userapi/#get_os_list
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/oslist?instanceTypeId=1 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "total": 1, "osCategory": [ { "id": 1, "name": "Ubuntu", "logo": "Ubudu.png", "osLists": [ { "id": 1, "categoryid": 1, "name": "Ubuntu18.04", "viewname": "Ubuntu 18.04", "instancetype_id": 1 } ] } ] }
func (*Client) GetWebArenaIndigoV1VmSSHKey ¶
func (c *Client) GetWebArenaIndigoV1VmSSHKey(ctx context.Context) (*WebArenaIndigoV1VmSSHKeyResponse, error)
SSH Key List https://indigo.arena.ne.jp/userapi/#list_ssh_keys
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/sshkey \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR.
RESPONSE HEADERS content-type: application/json; status: 200 Ok RESPONSE BODY
{ "success": true, "total": 2, "sshkeys": [ { "id": 5, "service_id": "wsi-000001", "user_id": 431, "name": "Example", "sshkey": "example1", "status": "ACTIVE", "created_at": "2018-11-01 17:18:00", "updated_at": "2018-11-01 17:18:12" }, { "id": 5, "service_id": "wsi-000001", "user_id": 431, "name": "Example", "sshkey": "example2", "status": "ACTIVE", "created_at": "2018-11-01 05:37:03", "updated_at": "2018-11-01 05:37:03" } ] }
func (*Client) GetWebArenaIndigoV1VmSSHKeyActiveStatus ¶
func (c *Client) GetWebArenaIndigoV1VmSSHKeyActiveStatus(ctx context.Context) (*WebArenaIndigoV1VmSSHKeyActiveStatusResponse, error)
Active SSH Key List https://indigo.arena.ne.jp/userapi/#get_active_sshkey_list
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/sshkey/active/status \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 Ok RESPONSE BODY
{ "success": true, "total": 2, "sshkeys": [ { "id": 5, "service_id": "wsi-000001", "user_id": 431, "name": "Example", "sshkey": "examplekey1", "status": "ACTIVE", "created_at": "2018-11-01 17:18:00", "updated_at": "2018-11-01 17:18:12" }, { "id": 5, "service_id": "wsi-000001", "user_id": 431, "name": "Example", "sshkey": "examplekey2", "status": "ACTIVE", "created_at": "2018-11-01 05:37:03", "updated_at": "2018-11-01 05:37:03" } ] }
func (*Client) IssueAccessToken ¶
func (c *Client) IssueAccessToken(ctx context.Context) (*AccessToken, error)
func (*Client) PostOAuthV1AccessTokens ¶
func (c *Client) PostOAuthV1AccessTokens(ctx context.Context, req *PostOAuthV1AccessTokensRequest) (*PostOAuthV1AccessTokensResponse, error)
Access Token Generation https://indigo.arena.ne.jp/userapi/#generate_access_token
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/oauth/v1/accesstokens\ -H 'Content-Type: application/json' \ -d '{ "grantType": "client_credentials", "clientId": "YNG2yiyLDA3TqODlEXvLRwL7HzBjDsCQ", "clientSecret": "uDczeZJlxYvuzqcU", "code": "" }'
REQUEST HEADERS Content-Type: application/json.
RESPONSE HEADERS content-type: application/json; status: 201 Created RESPONSE BODY
{ "accessToken": "HnGma03YnFPIF4DMttywiSOCGUHR", "tokenType": "BearerToken", "expiresIn": "3599", "scope": "", "issuedAt": "1550570350202" }
func (*Client) PostWebArenaIndigoV1DiskRestoreSnapshot ¶
func (c *Client) PostWebArenaIndigoV1DiskRestoreSnapshot(ctx context.Context, req *PostWebArenaIndigoV1DiskRestoreSnapshotRequest) (*PostWebArenaIndigoV1DiskRestoreSnapshotResponse, error)
Restore snapshot https://indigo.arena.ne.jp/userapi/#restore_snapshot
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/disk/restoresnapshot \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{"instanceid":"12", "snapshotid":"12"}'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 Created RESPONSE BODY {"STATUS":0}.
func (*Client) PostWebArenaIndigoV1DiskRetakeSnapshot ¶
func (c *Client) PostWebArenaIndigoV1DiskRetakeSnapshot(ctx context.Context, req *PostWebArenaIndigoV1DiskRetakeSnapshotRequest) (*PostWebArenaIndigoV1DiskRetakeSnapshotResponse, error)
Retry to create snapshot https://indigo.arena.ne.jp/userapi/#retry_snapshot
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/disk/retakesnapshot \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{"instanceid":12, "snapshotid":"11"}'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 Created RESPONSE BODY
{"STATUS":0}.
func (*Client) PostWebArenaIndigoV1DiskTakeSnapshot ¶
func (c *Client) PostWebArenaIndigoV1DiskTakeSnapshot(ctx context.Context, req *PostWebArenaIndigoV1DiskTakeSnapshotRequest) (*PostWebArenaIndigoV1DiskTakeSnapshotResponse, error)
Snapshot Creation https://indigo.arena.ne.jp/userapi/#snapshot_creation
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/disk/takesnapshot \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{"name":"Example", "instanceid":12, "slotnum":"0"}'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 Created RESPONSE BODY
{"STATUS":0}.
func (*Client) PostWebArenaIndigoV1NwAssign ¶
func (c *Client) PostWebArenaIndigoV1NwAssign(ctx context.Context, req *PostWebArenaIndigoV1NwAssignRequest) (*PostWebArenaIndigoV1NwAssignResponse, error)
Assign Firewall https://indigo.arena.ne.jp/userapi/#assign_firewall
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/nw/assign \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "instanceid":"4", "templateid":"8" }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "message": "Firewall template is assigned successfully.", "sucessCode": "F60003" }
func (*Client) PostWebArenaIndigoV1NwCreateFirewall ¶
func (c *Client) PostWebArenaIndigoV1NwCreateFirewall(ctx context.Context, req *PostWebArenaIndigoV1NwCreateFirewallRequest) (*PostWebArenaIndigoV1NwCreateFirewallResponse, error)
Create Firewall https://indigo.arena.ne.jp/userapi/#firewall_creation
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/nw/createfirewall \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "name":"Example", "inbound":[ {"type":"HTTP","protocol":"TCP","port":"80","source":"0.0.0.0"}, {"type":"HTTPS","protocol":"TCP","port":"443","source":"0.0.0.0"} ], "outbound":[ {"type":"HTTP","protocol":"TCP","port":"80","source":"0.0.0.0"}, {"type":"HTTPS","protocol":"TCP","port":"443","source":"0.0.0.0"} ], "instances":["6","5"] }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "message": "Firewall template has been created successfully.", "sucessCode": "F60002", "firewallId": 55 }
func (*Client) PostWebArenaIndigoV1VmCreateImportURLInstance ¶
func (c *Client) PostWebArenaIndigoV1VmCreateImportURLInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateImportURLInstanceRequest) (*PostWebArenaIndigoV1VmCreateImportURLInstanceResponse, error)
Import URL Instance Creation https://indigo.arena.ne.jp/userapi/#import_instance_creation
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/vm/createinstance \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "importUrl": "https://203.138.52.188/cloudn_os/CentOS7.qcow2", "regionId": 1, "osId": 1, "instancePlan": 2, "instanceName": "ImportURLinstance" }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 201 Created RESPONSE BODY
{ "success": true, "message": "Instance created successfully", "vms": { "id": 3, "instance_name": "Centos Dev Env", "set_no": 10, "vps_kind": "10", "sequence_id": 3, "user_id": 1, "service_id": "wsi-000001", "status": "UNUSED", "sshkey_id": 1, "start_date": { "date": "2018-11-10 10:03:17.744562", "timezone_type": 3, "timezone": "UTC" }, "host_id": 1, "plan": "2CR2GB", "disk_point": 12, "memsize": 2, "cpus": 2, "os_id": 1, "otherstatus": 10, "uuid": "9868faef-e658-4880-b4ad-fd3078e51b6a", "uidgid": 100003, "vnc_port": 10003, "vnc_passwd": "fHTsl4EoLfMksYKW", "arpaname": "192-168-0-3.pro.static.arena.ne.jp", "arpadate": "", "status_change_date": { "date": "2018-11-10 10:03:17.746562", "timezone_type": 3, "timezone": "UTC" }, "updated_at": null, "vm_revert": 0 } }
func (*Client) PostWebArenaIndigoV1VmCreateInstance ¶
func (c *Client) PostWebArenaIndigoV1VmCreateInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateInstanceRequest) (*PostWebArenaIndigoV1VmCreateInstanceResponse, error)
Instance Creation https://indigo.arena.ne.jp/userapi/#instance_creation
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/vm/createinstance \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "sshKeyId": 11, "regionId": 1, "osId": 1, "instancePlan": 1, "instanceName": "Centos Dev Env" }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 201 Created RESPONSE BODY
{ "success": true, "message": "Instance created successfully", "vms": { "id": 3, "instance_name": "Centos Dev Env", "set_no": 10, "vps_kind": "10", "sequence_id": 3, "user_id": 1, "service_id": "wsi-000001", "status": "UNUSED", "sshkey_id": 1, "start_date": { "date": "2018-11-10 10:03:17.744562", "timezone_type": 3, "timezone": "UTC" }, "host_id": 1, "plan": "2CR2GB", "disk_point": 12, "memsize": 2, "cpus": 2, "os_id": 1, "otherstatus": 10, "uuid": "9868faef-e658-4880-b4ad-fd3078e51b6a", "uidgid": 100003, "vnc_port": 10003, "vnc_passwd": "fHTsl4EoLfMksYKW", "arpaname": "192-168-0-3.pro.static.arena.ne.jp", "arpadate": "", "status_change_date": { "date": "2018-11-10 10:03:17.746562", "timezone_type": 3, "timezone": "UTC" }, "updated_at": null, "vm_revert": 0 } }
func (*Client) PostWebArenaIndigoV1VmCreateSnapshotInstance ¶
func (c *Client) PostWebArenaIndigoV1VmCreateSnapshotInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateSnapshotInstanceRequest) (*PostWebArenaIndigoV1VmCreateSnapshotInstanceResponse, error)
Snapshot Instance Creation https://indigo.arena.ne.jp/userapi/#snapshot_instance_creation
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/vm/createinstance \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "sshKeyId": 1480, "snapshotId": "457", "instancePlan": 5, "instanceName": "from-api-2" }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 201 Created RESPONSE BODY
{ "success": true, "message": "Instance created successfully", "vms": { "id": 3, "instance_name": "Centos Dev Env", "set_no": 10, "vps_kind": "10", "sequence_id": 3, "user_id": 1, "service_id": "wsi-000001", "status": "UNUSED", "sshkey_id": 1, "start_date": { "date": "2018-11-10 10:03:17.744562", "timezone_type": 3, "timezone": "UTC" }, "host_id": 1, "plan": "2CR2GB", "disk_point": 12, "memsize": 2, "cpus": 2, "os_id": 1, "otherstatus": 10, "uuid": "9868faef-e658-4880-b4ad-fd3078e51b6a", "uidgid": 100003, "vnc_port": 10003, "vnc_passwd": "fHTsl4EoLfMksYKW", "arpaname": "192-168-0-3.pro.static.arena.ne.jp", "arpadate": "", "status_change_date": { "date": "2018-11-10 10:03:17.746562", "timezone_type": 3, "timezone": "UTC" }, "updated_at": null, "vm_revert": 0 } }
func (*Client) PostWebArenaIndigoV1VmCreateWindowsInstance ¶
func (c *Client) PostWebArenaIndigoV1VmCreateWindowsInstance(ctx context.Context, req *PostWebArenaIndigoV1VmCreateWindowsInstanceRequest) (*PostWebArenaIndigoV1VmCreateWindowsInstanceResponse, error)
Windows Instance Creation https://indigo.arena.ne.jp/userapi/#windows_instance_creation
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/vm/createinstance \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "winPassword": "Test#2345jh", "regionId": 1, "osId": 1, "instancePlan": 1, "instanceName": "Centos Dev Env" }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 201 Created RESPONSE BODY
{ "success": true, "message": "Instance created successfully", "vms": { "id": 3, "instance_name": "Centos Dev Env", "set_no": 10, "vps_kind": "10", "sequence_id": 3, "user_id": 1, "service_id": "wsi-000001", "status": "UNUSED", "sshkey_id": 1, "start_date": { "date": "2018-11-10 10:03:17.744562", "timezone_type": 3, "timezone": "UTC" }, "host_id": 1, "plan": "2CR2GB", "disk_point": 12, "memsize": 2, "cpus": 2, "os_id": 1, "otherstatus": 10, "uuid": "9868faef-e658-4880-b4ad-fd3078e51b6a", "uidgid": 100003, "vnc_port": 10003, "vnc_passwd": "fHTsl4EoLfMksYKW", "arpaname": "192-168-0-3.pro.static.arena.ne.jp", "arpadate": "", "status_change_date": { "date": "2018-11-10 10:03:17.746562", "timezone_type": 3, "timezone": "UTC" }, "updated_at": null, "vm_revert": 0 } }
func (*Client) PostWebArenaIndigoV1VmInstanceStatusUpdate ¶
func (c *Client) PostWebArenaIndigoV1VmInstanceStatusUpdate(ctx context.Context, req *PostWebArenaIndigoV1VmInstanceStatusUpdateRequest) (*PostWebArenaIndigoV1VmInstanceStatusUpdateResponse, error)
Update Instance Status https://indigo.arena.ne.jp/userapi/#instance_status_update
CURL EXAMPLE
curl -X POST \ https://api.customer.jp/webarenaIndigo/v1/vm/instance/statusupdate \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{"instanceId":"16","status":"stop"}'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 Ok RESPONSE BODY
{ "success": true, "message": "Instance has stopped successfully ", "sucessCode": "I20009", "instanceStatus": "shutoff" }
func (*Client) RetrieveWebArenaIndigoV1VmSSHKey ¶
func (c *Client) RetrieveWebArenaIndigoV1VmSSHKey(ctx context.Context, sshKeyID int64) (*RetrieveWebArenaIndigoV1VmSSHKeyResponse, error)
Retrieve SSH Key https://indigo.arena.ne.jp/userapi/#retrive_ssh_keys
CURL EXAMPLE
curl -X GET \ https://api.customer.jp/webarenaIndigo/v1/vm/sshkey/34 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "sshKey": [ { "id": 5, "service_id": "wsi-000001", "user_id": 431, "name": "Example", "sshkey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDRGTcjdlRYZ9J4KEaZ3A8FwPSWKHak1UKUusSX", "status": "ACTIVE", "created_at": "2018-11-01 17:35:32", "updated_at": "2018-11-01 17:35:32" } ] }
func (*Client) UpdateWebArenaIndigoV1NwFirewall ¶
func (c *Client) UpdateWebArenaIndigoV1NwFirewall(ctx context.Context, req *UpdateWebArenaIndigoV1NwFirewallRequest) (*UpdateWebArenaIndigoV1NwFirewallResponse, error)
Update Firewall https://indigo.arena.ne.jp/userapi/#update_firewall
CURL EXAMPLE
curl -X PUT \ https://api.customer.jp/webarenaIndigo/v1/nw/updatefirewall \ -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjNiZjI5MWU4NmMyMTY4ZTMxN2U2OTViMGFmYjI3MzBjYzUwZWFiYjg4MzIwZmQzMTcwY2FhYjE5ZDRjNzZmMDlkYzAyZWI4YTU1ZTYyN2Q0In0.eyJhdWQiOiJjbGllbnQxIiwianRpIjoiM2JmMjkxZTg2YzIxNjhlMzE3ZTY5NWIwYWZiMjczMGNjNTBlYWJiODgzMjBmZDMxNzBjYWFiMTlkNGM3NmYwOWRjMDJlYjhhNTVlNjI3ZDQiLCJpYXQiOjE1NDE1NjY2MjIsIm5iZiI6MTU0MTU2NjYyMiwiZXhwIjoxNTQxNjUzMDIyLCJzdWIiOiIxNzEiLCJzY29wZXMiOltdfQ.efsYC4sJx1Arms5qwuBf5tbBjGxJ1Ep_p6XYSf9ugO8PiZECmPcl4p3MaqPs_Loxz_EcQODGqIKSF3w0KBpf-gC9vGD4G_4pikGgpsRcmvsvJ64X5K1p_WOI_v_REUo3adW7Gu4QXyDeEjiAGesl23dSi0C4EZHQ2x7L7joGAzkS0cWASWrM7H3cOKIlXDVtqh8fdykSkxXghx504SSiDzObXt28VnFY4fRvqKawe2-vMvG5EmZgAejriyPIS8nbrd2gnlLCaBTD96u4qz05w4MRtgPPWSfQ8e6sYMavXGau8D60KSyTstJyVV3AKX5GY5ESD15Ikt4tSIWlk8BbdNovnkGx8oKv_rkDEY1thWu_40Jgf7plUQ9ox_kf1kbhhj-YXSxfpQFT_tLFIaM3Ntb-FhfFlaw37OhC93B79Bq0J3RbQO7qw3hPKaIb0AdTL_iYjU2IKUUZ6Sr--GuZiqWW5Ls-L4OTkl7NyNc0G8ZJk5Pibavgp91B1Do5jpVS43IsuQGKmVfLRqJc-mR5RR3FmbKaGvj3ULvxN9kYYeP2e98bcHIBmkWhMgkuaZqUFrgTdq6a9fc0vhUZTmNVINGjCA6BLCixTrQfZ_eAtIam2jW4TGZB0yuQuLNa-yKx_Sop6rwVv-y9U7H-gvXE5G-K7lIXd0-Lz-sROhKMwtA' \ -d '{ "templateid":"55", "name":"Example", "inbound":[ {"type":"HTTP","protocol":"TCP","port":"80","source":"0.0.0.0"}, {"type":"HTTPS","protocol":"TCP","port":"443","source":"0.0.0.0"} ], "outbound":[ {"type":"HTTP","protocol":"TCP","port":"80","source":"0.0.0.0"}, {"type":"HTTPS","protocol":"TCP","port":"443","source":"0.0.0.0"} ], "instances":["6","5"] }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "message": "Firewall template is updated successfully.", "sucessCode": "F6004", "firewallId": 55 }
func (*Client) UpdateWebArenaIndigoV1VmSSHKey ¶
func (c *Client) UpdateWebArenaIndigoV1VmSSHKey(ctx context.Context, id int64, req *UpdateWebArenaIndigoV1VmSSHKeyRequest) (*UpdateWebArenaIndigoV1VmSSHKeyResponse, error)
Update SSH Key https://indigo.arena.ne.jp/userapi/#update_ssh_keys
CURL EXAMPLE
curl -X PUT \ https://api.customer.jp/webarenaIndigo/v1/vm/sshkey/34 \ -H 'Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR' \ -d '{ "sshName": "Example", "sshKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDRGTcjdlRYZ9J4KEaZ3A8FwPSWKHak1UKUusSX", "sshKeyStatus": "ACTIVE" }'
REQUEST HEADERS Authorization: Bearer HnGma03YnFPIF4DMttywiSOCGUHR
RESPONSE HEADERS content-type: application/json; status: 200 OK RESPONSE BODY
{ "success": true, "message": "SSH key has been updated successfully" }
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
func ClientOptionWithClientID ¶
func ClientOptionWithClientID(clientID string) ClientOption
func ClientOptionWithClientSecret ¶
func ClientOptionWithClientSecret(clientSecret string) ClientOption
func ClientOptionWithDebugLog ¶
func ClientOptionWithDebugLog(debugLog *log.Logger) ClientOption
func ClientOptionWithEndpoint ¶
func ClientOptionWithEndpoint(endpoint string) ClientOption
func ClientOptionWithHTTPClient ¶
func ClientOptionWithHTTPClient(httpClient *http.Client) ClientOption
func ClientOptionWithoutRateLimiter ¶
func ClientOptionWithoutRateLimiter() ClientOption
type CreateWebArenaIndigoV1VmSSHKeyResponse ¶
type CreateWebArenaIndigoV1VmSSHKeyResponse struct { Success bool `json:"success"` Message string `json:"message"` SshKey WebArenaIndigoV1VmSSHKey `json:"sshKey"` //nolint:revive,stylecheck }
type DeleteWebArenaIndigoV1DiskDeleteSnapshotResponse ¶
type DeleteWebArenaIndigoV1DiskDeleteSnapshotResponse struct {
STATUS int64 `json:"STATUS"` //nolint:tagliatelle // JSON field name is defined by the API
}
type GetWebArenaIndigoV1AuthAPIKeyResponse ¶
type GetWebArenaIndigoV1AuthAPIKeyResponse struct { Success bool `json:"success"` Total int64 `json:"total"` AccessTokens []WebArenaIndigoV1AuthAPIKey `json:"accesstokens"` }
type GetWebArenaIndigoV1DiskSnapshotListResponse ¶
type GetWebArenaIndigoV1DiskSnapshotListResponse []WebArenaIndigoV1DiskSnapshot
type GetWebArenaIndigoV1NwGetFirewallListResponse ¶
type GetWebArenaIndigoV1NwGetFirewallListResponse []WebArenaIndigoV1NwFirewall
type GetWebArenaIndigoV1NwGetTemplateResponse ¶
type GetWebArenaIndigoV1NwGetTemplateResponse []WebArenaIndigoV1NwGetTemplateFirewall
type GetWebArenaIndigoV1VmGetInstanceListResponse ¶
type GetWebArenaIndigoV1VmGetInstanceListResponse []WebArenaIndigoV1VmInstance
type GetWebArenaIndigoV1VmGetRegionResponse ¶
type GetWebArenaIndigoV1VmGetRegionResponse struct { Success bool `json:"success"` Total int64 `json:"total"` RegionList []WebArenaIndigoV1VmRegion `json:"regionlist"` }
type GetWebArenaIndigoV1VmInstanceSpecResponse ¶
type GetWebArenaIndigoV1VmInstanceSpecResponse struct { Success bool `json:"success"` Total int64 `json:"total"` SpecList []WebArenaIndigoV1VmInstanceSpec `json:"speclist"` }
type GetWebArenaIndigoV1VmInstanceTypesResponse ¶
type GetWebArenaIndigoV1VmInstanceTypesResponse struct { Success bool `json:"success"` Total int64 `json:"total"` InstanceTypes []WebArenaIndigoV1VmInstanceType `json:"instanceTypes"` }
type GetWebArenaIndigoV1VmOsListResponse ¶
type GetWebArenaIndigoV1VmOsListResponse struct { Success bool `json:"success"` Total int64 `json:"total"` OsCategory []WebArenaIndigoV1VmInstanceSpec `json:"osCategory"` }
type PostWebArenaIndigoV1DiskRestoreSnapshotResponse ¶
type PostWebArenaIndigoV1DiskRestoreSnapshotResponse struct {
STATUS int64 `json:"STATUS"` //nolint:tagliatelle // JSON field name is defined by the API
}
type PostWebArenaIndigoV1DiskRetakeSnapshotResponse ¶
type PostWebArenaIndigoV1DiskRetakeSnapshotResponse struct {
Status int64 `json:"STATUS"` //nolint:tagliatelle // JSON field name is defined by the API
}
type PostWebArenaIndigoV1DiskTakeSnapshotResponse ¶
type PostWebArenaIndigoV1DiskTakeSnapshotResponse struct {
Status int64 `json:"STATUS"` //nolint:tagliatelle // JSON field name is defined by the API
}
type PostWebArenaIndigoV1NwCreateFirewallRequest ¶
type PostWebArenaIndigoV1NwCreateFirewallRequest struct { Name string `json:"name"` Inbound []WebArenaIndigoV1NwFirewallRule `json:"inbound"` Outbound []WebArenaIndigoV1NwFirewallRule `json:"outbound"` Instances []string `json:"instances"` }
type PostWebArenaIndigoV1VmCreateImportURLInstanceResponse ¶
type PostWebArenaIndigoV1VmCreateImportURLInstanceResponse struct { Success bool `json:"success"` Message string `json:"message"` Vms WebArenaIndigoV1VmInstance `json:"vms"` }
type PostWebArenaIndigoV1VmCreateInstanceResponse ¶
type PostWebArenaIndigoV1VmCreateInstanceResponse struct { Success bool `json:"success"` Message string `json:"message"` Vms WebArenaIndigoV1VmInstance `json:"vms"` }
type PostWebArenaIndigoV1VmCreateSnapshotInstanceResponse ¶
type PostWebArenaIndigoV1VmCreateSnapshotInstanceResponse struct { Success bool `json:"success"` Message string `json:"message"` Vms WebArenaIndigoV1VmInstance `json:"vms"` }
type PostWebArenaIndigoV1VmCreateWindowsInstanceResponse ¶
type PostWebArenaIndigoV1VmCreateWindowsInstanceResponse struct { Success bool `json:"success"` Message string `json:"message"` Vms WebArenaIndigoV1VmInstance `json:"vms"` }
type RetrieveWebArenaIndigoV1VmSSHKeyResponse ¶
type RetrieveWebArenaIndigoV1VmSSHKeyResponse struct { Success bool `json:"success"` SshKey []WebArenaIndigoV1VmSSHKey `json:"sshKey"` //nolint:revive,stylecheck }
type UpdateWebArenaIndigoV1NwFirewallRequest ¶
type UpdateWebArenaIndigoV1NwFirewallRequest struct { TemplateID int64 `json:"templateid"` Name string `json:"name"` Inbound []WebArenaIndigoV1NwFirewallRule `json:"inbound"` Outbound []WebArenaIndigoV1NwFirewallRule `json:"outbound"` Instances []string `json:"instances"` }
type WebArenaIndigoV1DiskSnapshot ¶
type WebArenaIndigoV1DiskSnapshot struct { ID int64 `json:"id"` Name string `json:"name"` ServiceID string `json:"service_id"` //nolint:tagliatelle // JSON field name is defined by the API UserID string `json:"user_id"` //nolint:tagliatelle // JSON field name is defined by the API DiskID int64 `json:"disk_id"` //nolint:tagliatelle // JSON field name is defined by the API Volume int64 `json:"volume"` SlotNumber int64 `json:"slot_number"` //nolint:tagliatelle // JSON field name is defined by the API Status string `json:"status"` Size string `json:"size"` Deleted int64 `json:"deleted"` CompletedTimestamp string `json:"completed_timestamp"` //nolint:tagliatelle // JSON field name is defined by the API DeletedTimestamp string `json:"deleted_timestamp"` //nolint:tagliatelle // JSON field name is defined by the API }
type WebArenaIndigoV1NwFirewall ¶
type WebArenaIndigoV1NwFirewall struct { ID int64 `json:"id"` ServiceID string `json:"service_id"` //nolint:tagliatelle // JSON field name is defined by the API UserID int64 `json:"user_id"` //nolint:tagliatelle // JSON field name is defined by the API Name string `json:"name"` Status int64 `json:"status"` CreatedAt string `json:"created_at"` //nolint:tagliatelle // JSON field name is defined by the API UpdatedAt string `json:"updated_at"` //nolint:tagliatelle // JSON field name is defined by the API }
type WebArenaIndigoV1VmInstance ¶
type WebArenaIndigoV1VmInstance struct { ID int64 `json:"id"` InstanceName string `json:"instance_name"` //nolint:tagliatelle // JSON field name is defined by the API SetNo int64 `json:"set_no"` //nolint:tagliatelle // JSON field name is defined by the API VpsKind string `json:"vps_kind"` //nolint:tagliatelle // JSON field name is defined by the API SequenceID int64 `json:"sequence_id"` //nolint:tagliatelle // JSON field name is defined by the API UserID int64 `json:"user_id"` //nolint:tagliatelle // JSON field name is defined by the API ServiceID string `json:"service_id"` //nolint:tagliatelle // JSON field name is defined by the API Status string `json:"status"` SshKeyID int64 `json:"sshkey_id"` //nolint:revive,stylecheck,tagliatelle // JSON field name is defined by the API StartDate WebArenaIndigoV1VmInstanceDate `json:"start_date"` //nolint:tagliatelle // JSON field name is defined by the API HostID int64 `json:"host_id"` //nolint:tagliatelle // JSON field name is defined by the API Plan string `json:"plan"` DiskPoint int64 `json:"disk_point"` //nolint:tagliatelle // JSON field name is defined by the API MemSize int64 `json:"memsize"` CPUs int64 `json:"cpus"` OsID int64 `json:"os_id"` //nolint:tagliatelle // JSON field name is defined by the API OtherStatus int64 `json:"otherstatus"` UUID string `json:"uuid"` UIDGID int64 `json:"uidgid"` VncPort int64 `json:"vnc_port"` //nolint:tagliatelle // JSON field name is defined by the API VncPasswd string `json:"vnc_passwd"` //nolint:tagliatelle // JSON field name is defined by the API ArpaName string `json:"arpaname"` ArpaDate string `json:"arpadate"` StatusChangeDate WebArenaIndigoV1VmInstanceDate `json:"status_change_date"` //nolint:tagliatelle // JSON field name is defined by the API UpdatedAt string `json:"updated_at"` //nolint:tagliatelle // JSON field name is defined by the API VMRevert int64 `json:"vm_revert"` //nolint:tagliatelle // JSON field name is defined by the API VEID string `json:"VEID"` //nolint:tagliatelle // JSON field name is defined by the API OS WebArenaIndigoV1VmInstanceOS `json:"os"` IP string `json:"ip"` }
type WebArenaIndigoV1VmInstanceDate ¶
type WebArenaIndigoV1VmInstanceDate struct { Date string `json:"date"` TimezoneType int64 `json:"timezone_type"` //nolint:tagliatelle // JSON field name is defined by the API Timezone string `json:"timezone"` }
func (WebArenaIndigoV1VmInstanceDate) UnmarshalJSON ¶
func (d WebArenaIndigoV1VmInstanceDate) UnmarshalJSON(b []byte) error
type WebArenaIndigoV1VmInstanceSpec ¶
type WebArenaIndigoV1VmInstanceSpec struct { ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` UsePossibleDate string `json:"use_possible_date"` //nolint:tagliatelle // JSON field name is defined by the API InstanceTypeID int64 `json:"instancetype_id"` //nolint:tagliatelle // JSON field name is defined by the API CreatedAt string `json:"created_at"` //nolint:tagliatelle // JSON field name is defined by the API UpdatedAt string `json:"updated_at"` //nolint:tagliatelle // JSON field name is defined by the API InstanceType WebArenaIndigoV1VmInstanceType `json:"instance_type"` //nolint:tagliatelle // JSON field name is defined by the API }
type WebArenaIndigoV1VmInstanceType ¶
type WebArenaIndigoV1VmInstanceType struct { ID int64 `json:"id"` Name string `json:"name"` DisplayName string `json:"display_name"` //nolint:tagliatelle // JSON field name is defined by the API CreatedAt string `json:"created_at"` //nolint:tagliatelle // JSON field name is defined by the API UpdatedAt string `json:"updated_at"` //nolint:tagliatelle // JSON field name is defined by the API }
type WebArenaIndigoV1VmOS ¶
type WebArenaIndigoV1VmSSHKey ¶
type WebArenaIndigoV1VmSSHKey struct { Id int64 `json:"id"` //nolint:revive,stylecheck ServiceId string `json:"service_id"` //nolint:revive,stylecheck,tagliatelle UserId int64 `json:"user_id"` //nolint:revive,stylecheck Name string `json:"name"` Sshkey string `json:"sshkey"` Status string `json:"status"` CreatedAt string `json:"created_at"` //nolint:revive,stylecheck,tagliatelle UpdatedAt string `json:"updated_at"` //nolint:revive,stylecheck,tagliatelle }
type WebArenaIndigoV1VmSSHKeyActiveStatusResponse ¶
type WebArenaIndigoV1VmSSHKeyActiveStatusResponse struct { Success bool `json:"success"` Total int64 `json:"total"` Sshkeys []WebArenaIndigoV1VmSSHKey `json:"sshkeys"` }
type WebArenaIndigoV1VmSSHKeyResponse ¶
type WebArenaIndigoV1VmSSHKeyResponse struct { Success bool `json:"success"` Total int64 `json:"total"` Sshkeys []WebArenaIndigoV1VmSSHKey `json:"sshkeys"` }
Source Files ¶
- api_oauth_v1_accesstokens.go
- api_webarenaIndigo_v1_auth_apikey.go
- api_webarenaIndigo_v1_auth_create_apikey.go
- api_webarenaIndigo_v1_disk_deletesnapshot.go
- api_webarenaIndigo_v1_disk_restoresnapshot.go
- api_webarenaIndigo_v1_disk_retakesnapshot.go
- api_webarenaIndigo_v1_disk_snapshotlist.go
- api_webarenaIndigo_v1_disk_takesnapshot.go
- api_webarenaIndigo_v1_nw_assign.go
- api_webarenaIndigo_v1_nw_createfirewall.go
- api_webarenaIndigo_v1_nw_deletefirewall.go
- api_webarenaIndigo_v1_nw_getfirewalllist.go
- api_webarenaIndigo_v1_nw_gettemplate.go
- api_webarenaIndigo_v1_nw_updatefirewall.go
- api_webarenaIndigo_v1_vm_createinstance.go
- api_webarenaIndigo_v1_vm_getinstancelist.go
- api_webarenaIndigo_v1_vm_getinstancespec.go
- api_webarenaIndigo_v1_vm_getregion.go
- api_webarenaIndigo_v1_vm_instance_statusupdate.go
- api_webarenaIndigo_v1_vm_instancetypes.go
- api_webarenaIndigo_v1_vm_oslist.go
- api_webarenaIndigo_v1_vm_sshkey.go
- api_webarenaIndigo_v1_vm_sshkey_active_status.go
- client.go
- consts.go
- errors.go
- otel.go