Skip to content

Latest commit

 

History

History
841 lines (553 loc) · 24.2 KB

CloudProvidersApi.md

File metadata and controls

841 lines (553 loc) · 24.2 KB

\CloudProvidersApi

All URIs are relative to http://localhost

Method HTTP request Description
AccessKeyRotation Post /api/v1/customers/{cUUID}/providers/{pUUID}/access_key_rotation Rotate access key for a provider
CreateProviders Post /api/v1/customers/{cUUID}/providers Create a provider
Delete Delete /api/v1/customers/{cUUID}/providers/{pUUID} Delete a cloud provider
EditAccessKeyRotationSchedule Put /api/v1/customers/{cUUID}/providers/{pUUID}/access_key_rotation/schedule/{sUUID} Edit a access key rotation schedule
EditProvider Put /api/v1/customers/{cUUID}/providers/{pUUID}/edit Update a provider
GetListOfProviders Get /api/v1/customers/{cUUID}/providers List cloud providers
GetProvider Get /api/v1/customers/{cUUID}/providers/{pUUID} Get a cloud provider
GetRegionMetadata Get /api/v1/customers/{cUUID}/providers/region_metadata/{code} Retrieves the region metadata for the cloud providers
ListSchedules Get /api/v1/customers/{cUUID}/providers/{pUUID}/access_key_rotation/schedule List all schedules for a provider's access key rotation
RefreshPricing Put /api/v1/customers/{cUUID}/providers/{pUUID}/refresh_pricing Refresh provider pricing info
ScheduledAccessKeyRotation Post /api/v1/customers/{cUUID}/providers/{pUUID}/access_key_rotation/schedule Rotate access key for a provider - Scheduled

AccessKeyRotation

YBPTask AccessKeyRotation(ctx, cUUID, pUUID).Request(request).Execute()

Rotate access key for a provider

Example

package main

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

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

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.AccessKeyRotation(context.Background(), cUUID, pUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.AccessKeyRotation``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AccessKeyRotation`: YBPTask
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.AccessKeyRotation`: %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 apiAccessKeyRotationRequest struct via the builder pattern

Name Type Description Notes

request | interface{} | |

Return type

YBPTask

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]

CreateProviders

YBPTask CreateProviders(ctx, cUUID).CreateProviderRequest(createProviderRequest).Validate(validate).IgnoreValidationErrors(ignoreValidationErrors).Request(request).Execute()

Create a provider

Example

package main

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

func main() {
    cUUID := TODO // string | 
    createProviderRequest := *openapiclient.NewProvider([]openapiclient.ImageBundle{*openapiclient.NewImageBundle()}, []openapiclient.Region{*openapiclient.NewRegion([]openapiclient.AvailabilityZone{*openapiclient.NewAvailabilityZone("us-west1-a")})}) // Provider | 
    validate := true // bool |  (optional) (default to false)
    ignoreValidationErrors := true // bool |  (optional) (default to false)
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.CreateProviders(context.Background(), cUUID).CreateProviderRequest(createProviderRequest).Validate(validate).IgnoreValidationErrors(ignoreValidationErrors).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.CreateProviders``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateProviders`: YBPTask
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.CreateProviders`: %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 apiCreateProvidersRequest struct via the builder pattern

Name Type Description Notes

createProviderRequest | Provider | | validate | bool | | [default to false] ignoreValidationErrors | bool | | [default to false] request | interface{} | |

Return type

YBPTask

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]

Delete

YBPTask Delete(ctx, cUUID, pUUID).Request(request).Execute()

Delete a cloud provider

Example

package main

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

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

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.Delete(context.Background(), cUUID, pUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.Delete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Delete`: YBPTask
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.Delete`: %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 apiDeleteRequest struct via the builder pattern

Name Type Description Notes

request | interface{} | |

Return type

YBPTask

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]

EditAccessKeyRotationSchedule

Schedule EditAccessKeyRotationSchedule(ctx, cUUID, pUUID, sUUID).Body(body).Request(request).Execute()

Edit a access key rotation schedule

Example

package main

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

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 
    sUUID := TODO // string | 
    body := *openapiclient.NewEditAccessKeyRotationScheduleParams() // EditAccessKeyRotationScheduleParams | 
    request := TODO // interface{} |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

body | EditAccessKeyRotationScheduleParams | | request | interface{} | |

Return type

Schedule

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]

EditProvider

YBPTask EditProvider(ctx, cUUID, pUUID).EditProviderRequest(editProviderRequest).Validate(validate).IgnoreValidationErrors(ignoreValidationErrors).Request(request).Execute()

Update a provider

Example

package main

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

func main() {
    cUUID := TODO // string | 
    pUUID := TODO // string | 
    editProviderRequest := *openapiclient.NewProvider([]openapiclient.ImageBundle{*openapiclient.NewImageBundle()}, []openapiclient.Region{*openapiclient.NewRegion([]openapiclient.AvailabilityZone{*openapiclient.NewAvailabilityZone("us-west1-a")})}) // Provider | edit provider form data
    validate := true // bool |  (optional) (default to false)
    ignoreValidationErrors := true // bool |  (optional) (default to false)
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.EditProvider(context.Background(), cUUID, pUUID).EditProviderRequest(editProviderRequest).Validate(validate).IgnoreValidationErrors(ignoreValidationErrors).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.EditProvider``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `EditProvider`: YBPTask
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.EditProvider`: %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 apiEditProviderRequest struct via the builder pattern

Name Type Description Notes

editProviderRequest | Provider | edit provider form data | validate | bool | | [default to false] ignoreValidationErrors | bool | | [default to false] request | interface{} | |

Return type

YBPTask

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]

GetListOfProviders

[]Provider GetListOfProviders(ctx, cUUID).Name(name).ProviderCode(providerCode).Execute()

List cloud providers

Example

package main

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

func main() {
    cUUID := TODO // string | 
    name := "name_example" // string |  (optional) (default to "null")
    providerCode := "providerCode_example" // string |  (optional) (default to "null")

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.GetListOfProviders(context.Background(), cUUID).Name(name).ProviderCode(providerCode).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.GetListOfProviders``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetListOfProviders`: []Provider
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.GetListOfProviders`: %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 apiGetListOfProvidersRequest struct via the builder pattern

Name Type Description Notes

name | string | | [default to "null"] providerCode | string | | [default to "null"]

Return type

[]Provider

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]

GetProvider

Provider GetProvider(ctx, cUUID, pUUID).Execute()

Get a cloud provider

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.CloudProvidersApi.GetProvider(context.Background(), cUUID, pUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.GetProvider``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetProvider`: Provider
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.GetProvider`: %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 apiGetProviderRequest struct via the builder pattern

Name Type Description Notes

Return type

Provider

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]

GetRegionMetadata

RegionMetadata GetRegionMetadata(ctx, cUUID, code).SubType(subType).Execute()

Retrieves the region metadata for the cloud providers

Example

package main

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

func main() {
    cUUID := TODO // string | 
    code := "code_example" // string | 
    subType := "subType_example" // string |  (optional) (default to "null")

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.GetRegionMetadata(context.Background(), cUUID, code).SubType(subType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.GetRegionMetadata``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetRegionMetadata`: RegionMetadata
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.GetRegionMetadata`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

subType | string | | [default to "null"]

Return type

RegionMetadata

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]

ListSchedules

[]Schedule ListSchedules(ctx, cUUID, pUUID).Execute()

List all schedules for a provider's access key rotation

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.CloudProvidersApi.ListSchedules(context.Background(), cUUID, pUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.ListSchedules``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListSchedules`: []Schedule
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.ListSchedules`: %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 apiListSchedulesRequest struct via the builder pattern

Name Type Description Notes

Return type

[]Schedule

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]

RefreshPricing

YBPSuccess RefreshPricing(ctx, cUUID, pUUID).Request(request).Execute()

Refresh provider pricing info

Example

package main

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

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

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.RefreshPricing(context.Background(), cUUID, pUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.RefreshPricing``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RefreshPricing`: YBPSuccess
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.RefreshPricing`: %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 apiRefreshPricingRequest struct via the builder pattern

Name Type Description Notes

request | interface{} | |

Return type

YBPSuccess

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]

ScheduledAccessKeyRotation

Schedule ScheduledAccessKeyRotation(ctx, cUUID, pUUID).Request(request).Execute()

Rotate access key for a provider - Scheduled

Example

package main

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

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

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CloudProvidersApi.ScheduledAccessKeyRotation(context.Background(), cUUID, pUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CloudProvidersApi.ScheduledAccessKeyRotation``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ScheduledAccessKeyRotation`: Schedule
    fmt.Fprintf(os.Stdout, "Response from `CloudProvidersApi.ScheduledAccessKeyRotation`: %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 apiScheduledAccessKeyRotationRequest struct via the builder pattern

Name Type Description Notes

request | interface{} | |

Return type

Schedule

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]