Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type BasicAuth
- type Configuration
- type Credentials
- type ErrorReport
- type GenericOpenAPIError
- type ListResourceAliasesOpts
- type ListResourceBindingsOpts
- type ListResourceInstancesOpts
- type ListResourceKeysOpts
- type PlanHistoryItem
- type ResourceAlias
- type ResourceAliasPatch
- type ResourceAliasPost
- type ResourceAliasesApiService
- func (a *ResourceAliasesApiService) CreateResourceAlias(ctx _context.Context, authorization string, ...) (ResourceAlias, *_nethttp.Response, error)
- func (a *ResourceAliasesApiService) DeleteResourceAlias(ctx _context.Context, authorization string, id string) (*_nethttp.Response, error)
- func (a *ResourceAliasesApiService) GetResourceAlias(ctx _context.Context, authorization string, id string) (ResourceAlias, *_nethttp.Response, error)
- func (a *ResourceAliasesApiService) ListResourceAliases(ctx _context.Context, authorization string, ...) (ResourceAliasesList, *_nethttp.Response, error)
- func (a *ResourceAliasesApiService) UpdateResourceAlias(ctx _context.Context, authorization string, id string, ...) (ResourceAlias, *_nethttp.Response, error)
- type ResourceAliasesList
- type ResourceBinding
- type ResourceBindingPatch
- type ResourceBindingPost
- type ResourceBindingsApiService
- func (a *ResourceBindingsApiService) CreateResourceBinding(ctx _context.Context, authorization string, ...) (ResourceBinding, *_nethttp.Response, error)
- func (a *ResourceBindingsApiService) DeleteResourceBinding(ctx _context.Context, authorization string, id string) (*_nethttp.Response, error)
- func (a *ResourceBindingsApiService) GetResourceBinding(ctx _context.Context, authorization string, id string) (ResourceBinding, *_nethttp.Response, error)
- func (a *ResourceBindingsApiService) ListResourceBindings(ctx _context.Context, authorization string, ...) (ResourceBindingsList, *_nethttp.Response, error)
- func (a *ResourceBindingsApiService) UpdateResourceBinding(ctx _context.Context, authorization string, id string, ...) (ResourceBinding, *_nethttp.Response, error)
- type ResourceBindingsList
- type ResourceInstance
- type ResourceInstancePatch
- type ResourceInstancePost
- type ResourceInstancesApiService
- func (a *ResourceInstancesApiService) CreateResourceInstance(ctx _context.Context, authorization string, ...) (ResourceInstance, *_nethttp.Response, error)
- func (a *ResourceInstancesApiService) DeleteResourceInstance(ctx _context.Context, authorization string, id string) (ResourceInstance, *_nethttp.Response, error)
- func (a *ResourceInstancesApiService) GetResourceInstance(ctx _context.Context, authorization string, id string) (ResourceInstance, *_nethttp.Response, error)
- func (a *ResourceInstancesApiService) ListResourceInstances(ctx _context.Context, authorization string, ...) (ResourceInstancesList, *_nethttp.Response, error)
- func (a *ResourceInstancesApiService) UpdateResourceInstance(ctx _context.Context, authorization string, id string, ...) (ResourceInstance, *_nethttp.Response, error)
- type ResourceInstancesList
- type ResourceKey
- type ResourceKeyPatch
- type ResourceKeyPost
- type ResourceKeysApiService
- func (a *ResourceKeysApiService) CreateResourceKey(ctx _context.Context, authorization string, resourceKeyPost ResourceKeyPost) (ResourceKey, *_nethttp.Response, error)
- func (a *ResourceKeysApiService) DeleteResourceKey(ctx _context.Context, authorization string, id string) (*_nethttp.Response, error)
- func (a *ResourceKeysApiService) GetResourceKey(ctx _context.Context, authorization string, id string) (ResourceKey, *_nethttp.Response, error)
- func (a *ResourceKeysApiService) ListResourceKeys(ctx _context.Context, authorization string, ...) (ResourceKeysList, *_nethttp.Response, error)
- func (a *ResourceKeysApiService) UpdateResourceKey(ctx _context.Context, authorization string, id string, ...) (ResourceKey, *_nethttp.Response, error)
- type ResourceKeysList
- type ServerConfiguration
- type ServerVariable
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { ResourceAliasesApi *ResourceAliasesApiService ResourceBindingsApi *ResourceBindingsApiService ResourceInstancesApi *ResourceInstancesApiService ResourceKeysApi *ResourceKeysApiService // contains filtered or unexported fields }
APIClient manages communication with the IBM Cloud Resource Controller API API v2.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type Credentials ¶
type Credentials struct { // The API key for the credentials. Apikey string `json:"apikey,omitempty"` // The optional description of the API key. IamApikeyDescription string `json:"iam_apikey_description,omitempty"` // The name of the API key. IamApikeyName string `json:"iam_apikey_name,omitempty"` // The Cloud Resource Name for the role of the credentials. IamRoleCrn string `json:"iam_role_crn,omitempty"` // The Cloud Resource Name for the service ID of the credentials. IamServiceidCrn string `json:"iam_serviceid_crn,omitempty"` }
Credentials The credentials for a resource.
type ErrorReport ¶
type ErrorReport struct { // The error code encountered. ErrorCode string `json:"error_code,omitempty"` // The error message. Message string `json:"message,omitempty"` // The status code. StatusCode int32 `json:"status_code,omitempty"` // The transaction-id of the request. TransactionId string `json:"transaction_id,omitempty"` }
ErrorReport Description of an error that occurred in a service request.
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type ListResourceAliasesOpts ¶
type ListResourceAliasesOpts struct { Guid optional.String Name optional.String ResourceInstanceId optional.String RegionInstanceId optional.String ResourceId optional.String ResourceGroupId optional.String Limit optional.String }
ListResourceAliasesOpts Optional parameters for the method 'ListResourceAliases'
type ListResourceBindingsOpts ¶
type ListResourceBindingsOpts struct { Guid optional.String Name optional.String ResourceGroupId optional.String ResourceId optional.String RegionBindingId optional.String Limit optional.String }
ListResourceBindingsOpts Optional parameters for the method 'ListResourceBindings'
type ListResourceInstancesOpts ¶
type ListResourceInstancesOpts struct { Guid optional.String Name optional.String ResourceGroupId optional.String ResourceId optional.String ResourcePlanId optional.String Type_ optional.String SubType optional.String Limit optional.String }
ListResourceInstancesOpts Optional parameters for the method 'ListResourceInstances'
type ListResourceKeysOpts ¶
type ListResourceKeysOpts struct { Guid optional.String Name optional.String ResourceGroupId optional.String ResourceId optional.String Limit optional.String }
ListResourceKeysOpts Optional parameters for the method 'ListResourceKeys'
type PlanHistoryItem ¶
type PlanHistoryItem struct { // The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. ResourcePlanId string `json:"resource_plan_id"` // The date on which the plan was changed. StartDate time.Time `json:"start_date"` }
PlanHistoryItem An element of the plan history of the instance.
type ResourceAlias ¶
type ResourceAlias struct { // The ID associated with the alias. Id string `json:"id,omitempty"` // When you create a new alias, a globally unique identifier (GUID) is assigned. This GUID is a unique internal indentifier managed by the resource controller that corresponds to the alias. Guid string `json:"guid,omitempty"` // The full Cloud Resource Name (CRN) associated with the alias. For more information about this format, see [Cloud Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). Crn string `json:"crn,omitempty"` // When you created a new alias, a relative URL path is created identifying the location of the alias. Url string `json:"url,omitempty"` // The human-readable name of the alias. Name string `json:"name,omitempty"` // An alpha-numeric value identifying the account ID. AccountId string `json:"account_id,omitempty"` // The short ID of the resource group. ResourceGroupId string `json:"resource_group_id,omitempty"` // The long ID (full CRN) of the resource group. ResourceGroupCrn string `json:"resource_group_crn,omitempty"` // The CRN of the target namespace in the specific environment. TargetCrn string `json:"target_crn,omitempty"` // The state of the alias. State string `json:"state,omitempty"` // The short ID of the resource instance that is being aliased. ResourceInstanceId string `json:"resource_instance_id,omitempty"` // The short ID of the instance in the specific target environment, e.g. `service_instance_id` in a given IBM Cloud environment. RegionInstanceId string `json:"region_instance_id,omitempty"` // The relative path to the instance. ResourceInstanceUrl string `json:"resource_instance_url,omitempty"` // The relative path to the resource bindings for the alias. ResourceBindingsUrl string `json:"resource_bindings_url,omitempty"` // The relative path to the resource keys for the alias. ResourceKeysUrl string `json:"resource_keys_url,omitempty"` // The date when the alias was created. CreatedAt time.Time `json:"created_at,omitempty"` // The date when the alias was last updated. UpdatedAt time.Time `json:"updated_at,omitempty"` // The date when the alias was deleted. DeletedAt time.Time `json:"deleted_at,omitempty"` }
ResourceAlias A resource alias.
type ResourceAliasPatch ¶
type ResourceAliasPatch struct { // The new name of the alias. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. Name string `json:"name"` }
ResourceAliasPatch Updated property values for a resource alias.
type ResourceAliasPost ¶
type ResourceAliasPost struct { // The name of the alias. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. Name string `json:"name"` // The short or long ID of resource instance. Source string `json:"source"` // The CRN of target name(space) in a specific environment, e.g. space in Dallas YP, CFEE instance etc. Target string `json:"target"` }
ResourceAliasPost Property values for the new resource alias.
type ResourceAliasesApiService ¶
type ResourceAliasesApiService service
ResourceAliasesApiService ResourceAliasesApi service
func (*ResourceAliasesApiService) CreateResourceAlias ¶
func (a *ResourceAliasesApiService) CreateResourceAlias(ctx _context.Context, authorization string, resourceAliasPost ResourceAliasPost) (ResourceAlias, *_nethttp.Response, error)
CreateResourceAlias Create a new resource alias Alias a resource instance into a targeted environment's (name)space.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param resourceAliasPost
@return ResourceAlias
func (*ResourceAliasesApiService) DeleteResourceAlias ¶
func (a *ResourceAliasesApiService) DeleteResourceAlias(ctx _context.Context, authorization string, id string) (*_nethttp.Response, error)
DeleteResourceAlias Delete a resource alias Delete a resource alias by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the alias.
func (*ResourceAliasesApiService) GetResourceAlias ¶
func (a *ResourceAliasesApiService) GetResourceAlias(ctx _context.Context, authorization string, id string) (ResourceAlias, *_nethttp.Response, error)
GetResourceAlias Get a resource alias Retrieve a resource alias by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the alias.
@return ResourceAlias
func (*ResourceAliasesApiService) ListResourceAliases ¶
func (a *ResourceAliasesApiService) ListResourceAliases(ctx _context.Context, authorization string, localVarOptionals *ListResourceAliasesOpts) (ResourceAliasesList, *_nethttp.Response, error)
ListResourceAliases Get a list of all resource aliases Get a list of all resource aliases.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param optional nil or *ListResourceAliasesOpts - Optional Parameters:
- @param "Guid" (optional.String) - Short ID of the alias.
- @param "Name" (optional.String) - The human-readable name of the alias.
- @param "ResourceInstanceId" (optional.String) - Resource instance short ID.
- @param "RegionInstanceId" (optional.String) - Short ID of the instance in a specific targeted environment. For example, `service_instance_id` in a given IBM Cloud environment.
- @param "ResourceId" (optional.String) - The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
- @param "ResourceGroupId" (optional.String) - Short ID of Resource group.
- @param "Limit" (optional.String) - Limit on how many items should be returned.
@return ResourceAliasesList
func (*ResourceAliasesApiService) UpdateResourceAlias ¶
func (a *ResourceAliasesApiService) UpdateResourceAlias(ctx _context.Context, authorization string, id string, resourceAliasPatch ResourceAliasPatch) (ResourceAlias, *_nethttp.Response, error)
UpdateResourceAlias Update a resource alias Update a resource alias by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the alias.
- @param resourceAliasPatch
@return ResourceAlias
type ResourceAliasesList ¶
type ResourceAliasesList struct { // The URL for requesting the next page of results. NextUrl string `json:"next_url"` // A list of resource aliases. Resources []ResourceAlias `json:"resources"` // The number of resource aliases in `resources`. RowsCount float32 `json:"rows_count"` }
ResourceAliasesList A list of resource aliases.
type ResourceBinding ¶
type ResourceBinding struct { // The ID associated with the binding. Id string `json:"id,omitempty"` // When you create a new binding, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the binding. Guid string `json:"guid,omitempty"` // The full Cloud Resource Name (CRN) associated with the binding. For more information about this format, see [Cloud Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). Crn string `json:"crn,omitempty"` // When you provision a new binding, a relative URL path is created identifying the location of the binding. Url string `json:"url,omitempty"` // The human-readable name of the binding. Name string `json:"name,omitempty"` // An alpha-numeric value identifying the account ID. AccountId string `json:"account_id,omitempty"` // The short ID of the resource group. ResourceGroupId string `json:"resource_group_id,omitempty"` // The CRN of resource alias associated to the binding. SourceCrn string `json:"source_crn,omitempty"` // The CRN of target resource, e.g. application, in a specific environment. TargetCrn string `json:"target_crn,omitempty"` // The short ID of the binding in specific targeted environment, e.g. `service_binding_id` in a given IBM Cloud environment. RegionBindingId string `json:"region_binding_id,omitempty"` // The state of the binding. State string `json:"state,omitempty"` // The credentials for the binding. Additional key-value pairs are passed through from the resource brokers. For additional details, see the service’s documentation. Credentials Credentials `json:"credentials,omitempty"` // Specifies whether the binding’s credentials support IAM. IamCompatible bool `json:"iam_compatible,omitempty"` // The relative path to the resource alias that this binding is associated with. ResourceAliasUrl string `json:"resource_alias_url,omitempty"` // The date when the binding was created. CreatedAt time.Time `json:"created_at,omitempty"` // The date when the binding was last updated. UpdatedAt time.Time `json:"updated_at,omitempty"` // The date when the binding was deleted. DeletedAt time.Time `json:"deleted_at,omitempty"` }
ResourceBinding A resource binding.
type ResourceBindingPatch ¶
type ResourceBindingPatch struct { // The new name of the binding. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. Name string `json:"name"` }
ResourceBindingPatch Updated property values for the resource binding.
type ResourceBindingPost ¶
type ResourceBindingPost struct { // The name of the binding. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. Name string `json:"name,omitempty"` // The short or long ID of resource alias. Source string `json:"source"` // The CRN of application to bind to in a specific environment, e.g. Dallas YP, CFEE instance Target string `json:"target"` // Configuration options represented as key-value pairs that are passed through to the target resource brokers. Parameters map[string]map[string]interface{} `json:"parameters,omitempty"` // The role name or it's CRN. Role string `json:"role,omitempty"` }
ResourceBindingPost Property values for the new resource binding.
type ResourceBindingsApiService ¶
type ResourceBindingsApiService service
ResourceBindingsApiService ResourceBindingsApi service
func (*ResourceBindingsApiService) CreateResourceBinding ¶
func (a *ResourceBindingsApiService) CreateResourceBinding(ctx _context.Context, authorization string, resourceBindingPost ResourceBindingPost) (ResourceBinding, *_nethttp.Response, error)
CreateResourceBinding Create a new resource binding Create a new resource binding.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param resourceBindingPost
@return ResourceBinding
func (*ResourceBindingsApiService) DeleteResourceBinding ¶
func (a *ResourceBindingsApiService) DeleteResourceBinding(ctx _context.Context, authorization string, id string) (*_nethttp.Response, error)
DeleteResourceBinding Delete a resource binding Delete a resource binding by ID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the binding.
func (*ResourceBindingsApiService) GetResourceBinding ¶
func (a *ResourceBindingsApiService) GetResourceBinding(ctx _context.Context, authorization string, id string) (ResourceBinding, *_nethttp.Response, error)
GetResourceBinding Get a resource binding Retrieve a resource binding by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the binding.
@return ResourceBinding
func (*ResourceBindingsApiService) ListResourceBindings ¶
func (a *ResourceBindingsApiService) ListResourceBindings(ctx _context.Context, authorization string, localVarOptionals *ListResourceBindingsOpts) (ResourceBindingsList, *_nethttp.Response, error)
ListResourceBindings Get a list of all resource bindings Get a list of all resource bindings.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param optional nil or *ListResourceBindingsOpts - Optional Parameters:
- @param "Guid" (optional.String) - The short ID of the binding.
- @param "Name" (optional.String) - The human-readable name of the binding.
- @param "ResourceGroupId" (optional.String) - Short ID of the resource group.
- @param "ResourceId" (optional.String) - The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
- @param "RegionBindingId" (optional.String) - Short ID of the binding in the specific targeted environment, e.g. service_binding_id in a given IBM Cloud environment.
- @param "Limit" (optional.String) - Limit on how many items should be returned
@return ResourceBindingsList
func (*ResourceBindingsApiService) UpdateResourceBinding ¶
func (a *ResourceBindingsApiService) UpdateResourceBinding(ctx _context.Context, authorization string, id string, resourceBindingPatch ResourceBindingPatch) (ResourceBinding, *_nethttp.Response, error)
UpdateResourceBinding Update a resource binding Update a resource binding by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the binding.
- @param resourceBindingPatch
@return ResourceBinding
type ResourceBindingsList ¶
type ResourceBindingsList struct { // The URL for requesting the next page of results. NextUrl string `json:"next_url"` // A list of resource bindings. Resources []ResourceBinding `json:"resources"` // The number of resource bindings in `resources`. RowsCount float32 `json:"rows_count"` }
ResourceBindingsList A list of resource bindings.
type ResourceInstance ¶
type ResourceInstance struct { // The ID associated with the instance. Id string `json:"id,omitempty"` // When you create a new resource, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the instance. Guid string `json:"guid,omitempty"` // The full Cloud Resource Name (CRN) associated with the instance. For more information about this format, see [Cloud Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). Crn string `json:"crn,omitempty"` // When you provision a new resource, a relative URL path is created identifying the location of the instance. Url string `json:"url,omitempty"` // The human-readable name of the instance. Name string `json:"name,omitempty"` // An alpha-numeric value identifying the account ID. AccountId string `json:"account_id,omitempty"` // The short ID of the resource group. ResourceGroupId string `json:"resource_group_id,omitempty"` // The long ID (full CRN) of the resource group. ResourceGroupCrn string `json:"resource_group_crn,omitempty"` // The unique ID of the offering. This value is provided by and stored in the global catalog. ResourceId string `json:"resource_id,omitempty"` // The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. ResourcePlanId string `json:"resource_plan_id,omitempty"` // The full deployment CRN as defined in the global catalog. The Cloud Resource Name (CRN) of the deployment location where the instance is provisioned. TargetCrn string `json:"target_crn,omitempty"` // The current state of the instance. For example, if the instance is deleted, it will return removed. State string `json:"state,omitempty"` // The type of the instance, e.g. `service_instance`. Type string `json:"type,omitempty"` // The sub-type of instance, e.g. `cfaas`. SubType string `json:"sub_type,omitempty"` // The status of the last operation requested on the instance. LastOperation map[string]interface{} `json:"last_operation,omitempty"` // The resource-broker-provided URL to access administrative features of the instance. DashboardUrl string `json:"dashboard_url,omitempty"` // The plan history of the instance. PlanHistory []PlanHistoryItem `json:"plan_history,omitempty"` // The relative path to the resource aliases for the instance. ResourceAliasesUrl string `json:"resource_aliases_url,omitempty"` // The relative path to the resource bindings for the instance. ResourceBindingsUrl string `json:"resource_bindings_url,omitempty"` // The relative path to the resource keys for the instance. ResourceKeysUrl string `json:"resource_keys_url,omitempty"` // The date when the instance was created. CreatedAt time.Time `json:"created_at,omitempty"` // The date when the instance was last updated. UpdatedAt time.Time `json:"updated_at,omitempty"` // The date when the instance was deleted. DeletedAt time.Time `json:"deleted_at,omitempty"` }
ResourceInstance A resource instance.
type ResourceInstancePatch ¶
type ResourceInstancePatch struct { // The new name of the instance. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. Name string `json:"name,omitempty"` // The new configuration options for the instance. Parameters map[string]map[string]interface{} `json:"parameters,omitempty"` // The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. ResourcePlanId string `json:"resource_plan_id,omitempty"` }
ResourceInstancePatch Updated property values for a resource instance.
type ResourceInstancePost ¶
type ResourceInstancePost struct { // The name of the instance. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. Name string `json:"name"` // The deployment location where the instance should be hosted. Target string `json:"target"` // Short or long ID of resource group ResourceGroup string `json:"resource_group"` // The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. ResourcePlanId string `json:"resource_plan_id"` // Tags that are attached to the instance after provisioning. These tags can be searched and managed through the Tagging API in IBM Cloud. Tags []string `json:"tags,omitempty"` // Configuration options represented as key-value pairs that are passed through to the target resource brokers. Parameters map[string]map[string]interface{} `json:"parameters,omitempty"` }
ResourceInstancePost Property values for the new resource instance.
type ResourceInstancesApiService ¶
type ResourceInstancesApiService service
ResourceInstancesApiService ResourceInstancesApi service
func (*ResourceInstancesApiService) CreateResourceInstance ¶
func (a *ResourceInstancesApiService) CreateResourceInstance(ctx _context.Context, authorization string, resourceInstancePost ResourceInstancePost) (ResourceInstance, *_nethttp.Response, error)
CreateResourceInstance Create (provision) a new resource instance Provision a new resource in the specified location for the selected plan.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param resourceInstancePost
@return ResourceInstance
func (*ResourceInstancesApiService) DeleteResourceInstance ¶
func (a *ResourceInstancesApiService) DeleteResourceInstance(ctx _context.Context, authorization string, id string) (ResourceInstance, *_nethttp.Response, error)
DeleteResourceInstance Delete a resource instance Delete a resource instance by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the instance.
@return ResourceInstance
func (*ResourceInstancesApiService) GetResourceInstance ¶
func (a *ResourceInstancesApiService) GetResourceInstance(ctx _context.Context, authorization string, id string) (ResourceInstance, *_nethttp.Response, error)
GetResourceInstance Get a resource instance Retrieve a resource instance by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the instance.
@return ResourceInstance
func (*ResourceInstancesApiService) ListResourceInstances ¶
func (a *ResourceInstancesApiService) ListResourceInstances(ctx _context.Context, authorization string, localVarOptionals *ListResourceInstancesOpts) (ResourceInstancesList, *_nethttp.Response, error)
ListResourceInstances Get a list of all resource instances Get a list of all resource instances.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param optional nil or *ListResourceInstancesOpts - Optional Parameters:
- @param "Guid" (optional.String) - When you provision a new resource in the specified location for the selected plan, a GUID (globally unique identifier) is created. This is a unique internal GUID managed by Resource controller that corresponds to the instance.
- @param "Name" (optional.String) - The human-readable name of the instance.
- @param "ResourceGroupId" (optional.String) - Short ID of a resource group.
- @param "ResourceId" (optional.String) - The unique ID of the offering. This value is provided by and stored in the global catalog.
- @param "ResourcePlanId" (optional.String) - The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog.
- @param "Type_" (optional.String) - The type of the instance. For example, `service_instance`.
- @param "SubType" (optional.String) - The sub-type of instance, e.g. `cfaas`.
- @param "Limit" (optional.String) - Limit on how many items should be returned.
@return ResourceInstancesList
func (*ResourceInstancesApiService) UpdateResourceInstance ¶
func (a *ResourceInstancesApiService) UpdateResourceInstance(ctx _context.Context, authorization string, id string, resourceInstancePatch ResourceInstancePatch) (ResourceInstance, *_nethttp.Response, error)
UpdateResourceInstance Update a resource instance Update a resource instance by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the instance.
- @param resourceInstancePatch
@return ResourceInstance
type ResourceInstancesList ¶
type ResourceInstancesList struct { // The URL for requesting the next page of results. NextUrl string `json:"next_url"` // A list of resource instances. Resources []ResourceInstance `json:"resources"` // The number of resource instances in `resources`. RowsCount int32 `json:"rows_count"` }
ResourceInstancesList A list of resource instances.
type ResourceKey ¶
type ResourceKey struct { // The ID associated with the key. Id string `json:"id,omitempty"` // When you create a new key, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the key. Guid string `json:"guid,omitempty"` // The full Cloud Resource Name (CRN) associated with the key. For more information about this format, see [Cloud Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). Crn string `json:"crn,omitempty"` // When you created a new key, a relative URL path is created identifying the location of the key. Url string `json:"url,omitempty"` // The human-readable name of the key. Name string `json:"name,omitempty"` // An alpha-numeric value identifying the account ID. AccountId string `json:"account_id,omitempty"` // The short ID of the resource group. ResourceGroupId string `json:"resource_group_id,omitempty"` // The CRN of resource instance or alias associated to the key. SourceCrn string `json:"source_crn,omitempty"` // The state of the key. State string `json:"state,omitempty"` // The credentials for the key. Additional key-value pairs are passed through from the resource brokers. Refer to service’s documentation for additional details. Credentials Credentials `json:"credentials,omitempty"` // Specifies whether the key’s credentials support IAM. IamCompatible bool `json:"iam_compatible,omitempty"` // The relative path to the resource. ResourceInstanceUrl string `json:"resource_instance_url,omitempty"` // The date when the key was created. CreatedAt time.Time `json:"created_at,omitempty"` // The date when the key was last updated. UpdatedAt time.Time `json:"updated_at,omitempty"` // The date when the key was deleted. DeletedAt time.Time `json:"deleted_at,omitempty"` }
ResourceKey A resource key.
type ResourceKeyPatch ¶
type ResourceKeyPatch struct { // The new name of the key. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. Name string `json:"name"` }
ResourceKeyPatch Updated property values for the resource key.
type ResourceKeyPost ¶
type ResourceKeyPost struct { // The name of the key. Name string `json:"name"` // The short or long ID of resource instance or alias. Source string `json:"source"` // Configuration options represented as key-value pairs that are passed through to the target resource brokers. Parameters map[string]map[string]interface{} `json:"parameters,omitempty"` // The role name or it's CRN. Role string `json:"role,omitempty"` }
ResourceKeyPost Property values for the new resource key.
type ResourceKeysApiService ¶
type ResourceKeysApiService service
ResourceKeysApiService ResourceKeysApi service
func (*ResourceKeysApiService) CreateResourceKey ¶
func (a *ResourceKeysApiService) CreateResourceKey(ctx _context.Context, authorization string, resourceKeyPost ResourceKeyPost) (ResourceKey, *_nethttp.Response, error)
CreateResourceKey Create a new resource key Create a new resource key.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param resourceKeyPost
@return ResourceKey
func (*ResourceKeysApiService) DeleteResourceKey ¶
func (a *ResourceKeysApiService) DeleteResourceKey(ctx _context.Context, authorization string, id string) (*_nethttp.Response, error)
DeleteResourceKey Delete a resource key by ID Delete a resource key by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the key.
func (*ResourceKeysApiService) GetResourceKey ¶
func (a *ResourceKeysApiService) GetResourceKey(ctx _context.Context, authorization string, id string) (ResourceKey, *_nethttp.Response, error)
GetResourceKey Get resource key by ID Get resource key by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the key.
@return ResourceKey
func (*ResourceKeysApiService) ListResourceKeys ¶
func (a *ResourceKeysApiService) ListResourceKeys(ctx _context.Context, authorization string, localVarOptionals *ListResourceKeysOpts) (ResourceKeysList, *_nethttp.Response, error)
ListResourceKeys Get a list of resource keys List all resource keys
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param optional nil or *ListResourceKeysOpts - Optional Parameters:
- @param "Guid" (optional.String) - When you create a new key, a GUID (globally unique identifier) is assigned. This is a unique internal GUID managed by Resource controller that corresponds to the key.
- @param "Name" (optional.String) - The human-readable name of the key.
- @param "ResourceGroupId" (optional.String) - The short ID of the resource group.
- @param "ResourceId" (optional.String) - The unique ID of the offering. This value is provided by and stored in the global catalog.
- @param "Limit" (optional.String) - Limit on how many items should be returned.
@return ResourceKeysList
func (*ResourceKeysApiService) UpdateResourceKey ¶
func (a *ResourceKeysApiService) UpdateResourceKey(ctx _context.Context, authorization string, id string, resourceKeyPatch ResourceKeyPatch) (ResourceKey, *_nethttp.Response, error)
UpdateResourceKey Update a resource key Update a resource key by ID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization Authorization value should use the format Bearer [token] - where [token] is an opaque access token obtained by authenticating with IAM authentication services.
- @param id The short or long ID of the key.
- @param resourceKeyPatch
@return ResourceKey
type ResourceKeysList ¶
type ResourceKeysList struct { // The URL for requesting the next page of results. NextUrl string `json:"next_url"` // A list of resource keys. Resources []ResourceKey `json:"resources"` // The number of resource keys in `resources`. RowsCount float32 `json:"rows_count"` }
ResourceKeysList A list of resource keys.
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
Source Files ¶
- api_resource_aliases.go
- api_resource_bindings.go
- api_resource_instances.go
- api_resource_keys.go
- client.go
- configuration.go
- model_credentials.go
- model_error_report.go
- model_plan_history_item.go
- model_resource_alias.go
- model_resource_alias_patch.go
- model_resource_alias_post.go
- model_resource_aliases_list.go
- model_resource_binding.go
- model_resource_binding_patch.go
- model_resource_binding_post.go
- model_resource_bindings_list.go
- model_resource_instance.go
- model_resource_instance_patch.go
- model_resource_instance_post.go
- model_resource_instances_list.go
- model_resource_key.go
- model_resource_key_patch.go
- model_resource_key_post.go
- model_resource_keys_list.go
- response.go