# README

Go API client for generated

Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a Cloud Foundry space in any region.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 2.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./generated"

Documentation for API Endpoints

All URIs are relative to https://resource-controller.cloud.ibm.com/v2

ClassMethodHTTP requestDescription
ResourceAliasesApiCreateResourceAliasPost /resource_aliasesCreate a new resource alias
ResourceAliasesApiDeleteResourceAliasDelete /resource_aliases/{id}Delete a resource alias
ResourceAliasesApiGetResourceAliasGet /resource_aliases/{id}Get a resource alias
ResourceAliasesApiListResourceAliasesGet /resource_aliasesGet a list of all resource aliases
ResourceAliasesApiUpdateResourceAliasPatch /resource_aliases/{id}Update a resource alias
ResourceBindingsApiCreateResourceBindingPost /resource_bindingsCreate a new resource binding
ResourceBindingsApiDeleteResourceBindingDelete /resource_bindings/{id}Delete a resource binding
ResourceBindingsApiGetResourceBindingGet /resource_bindings/{id}Get a resource binding
ResourceBindingsApiListResourceBindingsGet /resource_bindingsGet a list of all resource bindings
ResourceBindingsApiUpdateResourceBindingPatch /resource_bindings/{id}Update a resource binding
ResourceInstancesApiCreateResourceInstancePost /resource_instancesCreate (provision) a new resource instance
ResourceInstancesApiDeleteResourceInstanceDelete /resource_instances/{id}Delete a resource instance
ResourceInstancesApiGetResourceInstanceGet /resource_instances/{id}Get a resource instance
ResourceInstancesApiListResourceInstancesGet /resource_instancesGet a list of all resource instances
ResourceInstancesApiUpdateResourceInstancePatch /resource_instances/{id}Update a resource instance
ResourceKeysApiCreateResourceKeyPost /resource_keysCreate a new resource key
ResourceKeysApiDeleteResourceKeyDelete /resource_keys/{id}Delete a resource key by ID
ResourceKeysApiGetResourceKeyGet /resource_keys/{id}Get resource key by ID
ResourceKeysApiListResourceKeysGet /resource_keysGet a list of resource keys
ResourceKeysApiUpdateResourceKeyPatch /resource_keys/{id}Update a resource key

Documentation For Models

Documentation For Authorization

IAM

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
    Key: "APIKEY",
    Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResonse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewConfiguration returns a new Configuration object.

# Variables

ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKey takes an APIKey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.

# Structs

APIClient manages communication with the IBM Cloud Resource Controller API API v2.0 In most cases there should be only one, shared, APIClient.
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
APIResponse stores the API response returned by the server.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
Configuration stores the configuration of the API client.
Credentials The credentials for a resource.
ErrorReport Description of an error that occurred in a service request.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
ListResourceAliasesOpts Optional parameters for the method 'ListResourceAliases'.
ListResourceBindingsOpts Optional parameters for the method 'ListResourceBindings'.
ListResourceInstancesOpts Optional parameters for the method 'ListResourceInstances'.
ListResourceKeysOpts Optional parameters for the method 'ListResourceKeys'.
PlanHistoryItem An element of the plan history of the instance.
ResourceAlias A resource alias.
ResourceAliasesList A list of resource aliases.
ResourceAliasPatch Updated property values for a resource alias.
ResourceAliasPost Property values for the new resource alias.
ResourceBinding A resource binding.
ResourceBindingPatch Updated property values for the resource binding.
ResourceBindingPost Property values for the new resource binding.
ResourceBindingsList A list of resource bindings.
ResourceInstance A resource instance.
ResourceInstancePatch Updated property values for a resource instance.
ResourceInstancePost Property values for the new resource instance.
ResourceInstancesList A list of resource instances.
ResourceKey A resource key.
ResourceKeyPatch Updated property values for the resource key.
ResourceKeyPost Property values for the new resource key.
ResourceKeysList A list of resource keys.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.

# Type aliases

ResourceAliasesApiService ResourceAliasesApi service.
ResourceBindingsApiService ResourceBindingsApi service.
ResourceInstancesApiService ResourceInstancesApi service.
ResourceKeysApiService ResourceKeysApi service.