Skip to content

Latest commit

 

History

History
544 lines (355 loc) · 15.4 KB

RegionManagementApi.md

File metadata and controls

544 lines (355 loc) · 15.4 KB

\RegionManagementApi

All URIs are relative to http://localhost

Method HTTP request Description
CreateProviderRegion Post /api/v1/customers/{cUUID}/providers/{pUUID}/provider_regions Create a new region
CreateRegion Post /api/v1/customers/{cUUID}/providers/{pUUID}/regions Create Region - deprecated
DeleteRegion Delete /api/v1/customers/{cUUID}/providers/{pUUID}/regions/{rUUID} Delete a region
EditProviderRegion Put /api/v1/customers/{cUUID}/providers/{pUUID}/provider_regions/{rUUID} Modify a region
EditRegion Put /api/v1/customers/{cUUID}/providers/{pUUID}/regions/{rUUID} Edit regions - deprecated
GetRegion Get /api/v1/customers/{cUUID}/providers/{pUUID}/regions List a provider's regions
ListAllRegions Get /api/v1/customers/{cUUID}/regions List regions for all providers

CreateProviderRegion

Region CreateProviderRegion(ctx, cUUID, pUUID).Region(region).Request(request).Execute()

Create a new region

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 
    region := *openapiclient.NewRegion([]openapiclient.AvailabilityZone{*openapiclient.NewAvailabilityZone("us-west1-a")}) // Region | Specification of Region to be created
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RegionManagementApi.CreateProviderRegion(context.Background(), cUUID, pUUID).Region(region).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RegionManagementApi.CreateProviderRegion``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateProviderRegion`: Region
    fmt.Fprintf(os.Stdout, "Response from `RegionManagementApi.CreateProviderRegion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
pUUID string

Other Parameters

Other parameters are passed through a pointer to a apiCreateProviderRegionRequest struct via the builder pattern

Name Type Description Notes

region | Region | Specification of Region to be created | request | interface{} | |

Return type

Region

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateRegion

Region CreateRegion(ctx, cUUID, pUUID).Region(region).Request(request).Execute()

Create Region - deprecated

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 
    region := *openapiclient.NewRegionFormData("Code_example", "DestVpcId_example", "HostVpcId_example", "HostVpcRegion_example", float64(123), float64(123), "Name_example", "SecurityGroupId_example", "VnetName_example", "YbImage_example") // RegionFormData | region form data for new region to be created
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RegionManagementApi.CreateRegion(context.Background(), cUUID, pUUID).Region(region).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RegionManagementApi.CreateRegion``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateRegion`: Region
    fmt.Fprintf(os.Stdout, "Response from `RegionManagementApi.CreateRegion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
pUUID string

Other Parameters

Other parameters are passed through a pointer to a apiCreateRegionRequest struct via the builder pattern

Name Type Description Notes

region | RegionFormData | region form data for new region to be created | request | interface{} | |

Return type

Region

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteRegion

map[string]interface{} DeleteRegion(ctx, cUUID, pUUID, rUUID).Request(request).Execute()

Delete a region

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 
    rUUID := TODO // string | 
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RegionManagementApi.DeleteRegion(context.Background(), cUUID, pUUID, rUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RegionManagementApi.DeleteRegion``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteRegion`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `RegionManagementApi.DeleteRegion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
pUUID string
rUUID string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteRegionRequest struct via the builder pattern

Name Type Description Notes

request | interface{} | |

Return type

map[string]interface{}

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EditProviderRegion

Region EditProviderRegion(ctx, cUUID, pUUID, rUUID).Region(region).Request(request).Execute()

Modify a region

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 
    rUUID := TODO // string | 
    region := *openapiclient.NewRegion([]openapiclient.AvailabilityZone{*openapiclient.NewAvailabilityZone("us-west1-a")}) // Region | Specification of Region to be edited
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RegionManagementApi.EditProviderRegion(context.Background(), cUUID, pUUID, rUUID).Region(region).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RegionManagementApi.EditProviderRegion``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `EditProviderRegion`: Region
    fmt.Fprintf(os.Stdout, "Response from `RegionManagementApi.EditProviderRegion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
pUUID string
rUUID string

Other Parameters

Other parameters are passed through a pointer to a apiEditProviderRegionRequest struct via the builder pattern

Name Type Description Notes

region | Region | Specification of Region to be edited | request | interface{} | |

Return type

Region

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EditRegion

map[string]interface{} EditRegion(ctx, cUUID, pUUID, rUUID).Region(region).Request(request).Execute()

Edit regions - deprecated

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 
    rUUID := TODO // string | 
    region := *openapiclient.NewRegionFormData("Code_example", "DestVpcId_example", "HostVpcId_example", "HostVpcRegion_example", float64(123), float64(123), "Name_example", "SecurityGroupId_example", "VnetName_example", "YbImage_example") // RegionFormData | region edit form data
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RegionManagementApi.EditRegion(context.Background(), cUUID, pUUID, rUUID).Region(region).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RegionManagementApi.EditRegion``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `EditRegion`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `RegionManagementApi.EditRegion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
pUUID string
rUUID string

Other Parameters

Other parameters are passed through a pointer to a apiEditRegionRequest struct via the builder pattern

Name Type Description Notes

region | RegionFormData | region edit form data | request | interface{} | |

Return type

map[string]interface{}

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetRegion

[]Region GetRegion(ctx, cUUID, pUUID).Execute()

List a provider's regions

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RegionManagementApi.GetRegion(context.Background(), cUUID, pUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RegionManagementApi.GetRegion``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetRegion`: []Region
    fmt.Fprintf(os.Stdout, "Response from `RegionManagementApi.GetRegion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
pUUID string

Other Parameters

Other parameters are passed through a pointer to a apiGetRegionRequest struct via the builder pattern

Name Type Description Notes

Return type

[]Region

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListAllRegions

[]Region ListAllRegions(ctx, cUUID).Execute()

List regions for all providers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RegionManagementApi.ListAllRegions(context.Background(), cUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RegionManagementApi.ListAllRegions``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListAllRegions`: []Region
    fmt.Fprintf(os.Stdout, "Response from `RegionManagementApi.ListAllRegions`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

Other parameters are passed through a pointer to a apiListAllRegionsRequest struct via the builder pattern

Name Type Description Notes

Return type

[]Region

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]