openservicebrokerv1

package
v0.72.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package openservicebrokerv1 : Operations and models for the OpenServiceBrokerV1 service

Index

Constants

View Source
const DefaultServiceName = "open_service_broker"

DefaultServiceName is the default key used to find external configuration information.

Variables

This section is empty.

Functions

func GetServiceURLForRegion added in v0.17.2

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalBindResource

func UnmarshalBindResource(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBindResource unmarshals an instance of BindResource from the specified map of raw messages.

func UnmarshalContext

func UnmarshalContext(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalContext unmarshals an instance of Context from the specified map of raw messages.

func UnmarshalPlans

func UnmarshalPlans(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPlans unmarshals an instance of Plans from the specified map of raw messages.

func UnmarshalResp1874644Root

func UnmarshalResp1874644Root(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResp1874644Root unmarshals an instance of Resp1874644Root from the specified map of raw messages.

func UnmarshalResp1874650Root

func UnmarshalResp1874650Root(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResp1874650Root unmarshals an instance of Resp1874650Root from the specified map of raw messages.

func UnmarshalResp2079872Root

func UnmarshalResp2079872Root(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResp2079872Root unmarshals an instance of Resp2079872Root from the specified map of raw messages.

func UnmarshalResp2079874Root

func UnmarshalResp2079874Root(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResp2079874Root unmarshals an instance of Resp2079874Root from the specified map of raw messages.

func UnmarshalResp2079876Root

func UnmarshalResp2079876Root(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResp2079876Root unmarshals an instance of Resp2079876Root from the specified map of raw messages.

func UnmarshalResp2079894Root

func UnmarshalResp2079894Root(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResp2079894Root unmarshals an instance of Resp2079894Root from the specified map of raw messages.

func UnmarshalResp2448145Root

func UnmarshalResp2448145Root(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResp2448145Root unmarshals an instance of Resp2448145Root from the specified map of raw messages.

func UnmarshalServices

func UnmarshalServices(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalServices unmarshals an instance of Services from the specified map of raw messages.

func UnmarshalVolumeMount

func UnmarshalVolumeMount(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalVolumeMount unmarshals an instance of VolumeMount from the specified map of raw messages.

Types

type BindResource

type BindResource struct {
	// Account owner of resource to bind.
	AccountID *string `json:"account_id,omitempty"`

	// Service ID of resource to bind.
	ServiceidCRN *string `json:"serviceid_crn,omitempty"`

	// Target ID of resource to bind.
	TargetCRN *string `json:"target_crn,omitempty"`

	// GUID of an application associated with the binding. For credentials bindings.
	AppGUID *string `json:"app_guid,omitempty"`

	// URL of the application to be intermediated. For route services bindings.
	Route *string `json:"route,omitempty"`
}

BindResource : A JSON object that contains data for platform resources associated with the binding to be created.

type Context

type Context struct {
	// Returns the ID of the account in IBM Cloud that is provisioning the service instance.
	AccountID *string `json:"account_id,omitempty"`

	// When a customer provisions your service in IBM Cloud, a service instance is created and this instance is identified
	// by its IBM Cloud Resource Name (CRN). The CRN is utilized in all aspects of the interaction with IBM Cloud including
	// provisioning, binding (creating credentials and endpoints), metering, dashboard display, and access control. From a
	// service provider perspective, the CRN can largely be treated as an opaque string to be utilized with the IBM Cloud
	// APIs, but it can also be decomposed via the following structure:
	// `crn:version:cname:ctype:service-name:location:scope:service-instance:resource-type:resource`.
	CRN *string `json:"crn,omitempty"`

	// Identifies the platform as "ibmcloud".
	Platform *string `json:"platform,omitempty"`
}

Context : Platform specific contextual information under which the service instance is to be provisioned.

type DeleteServiceBindingOptions

type DeleteServiceBindingOptions struct {
	// The `binding_id` is the ID of a previously provisioned binding for that service instance.
	BindingID *string `json:"binding_id" validate:"required,ne="`

	// The `instance_id` is the ID of a previously provisioned service instance.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// The ID of the plan from the catalog.json in the broker. It MUST be a non-empty string and should be a GUID.
	PlanID *string `json:"plan_id" validate:"required"`

	// The ID of the service from the catalog.json in the broker. It MUST be a non-empty string and should be a GUID.
	ServiceID *string `json:"service_id" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteServiceBindingOptions : The DeleteServiceBinding options.

func (*DeleteServiceBindingOptions) SetBindingID

func (options *DeleteServiceBindingOptions) SetBindingID(bindingID string) *DeleteServiceBindingOptions

SetBindingID : Allow user to set BindingID

func (*DeleteServiceBindingOptions) SetHeaders

func (options *DeleteServiceBindingOptions) SetHeaders(param map[string]string) *DeleteServiceBindingOptions

SetHeaders : Allow user to set Headers

func (*DeleteServiceBindingOptions) SetInstanceID

func (options *DeleteServiceBindingOptions) SetInstanceID(instanceID string) *DeleteServiceBindingOptions

SetInstanceID : Allow user to set InstanceID

func (*DeleteServiceBindingOptions) SetPlanID

SetPlanID : Allow user to set PlanID

func (*DeleteServiceBindingOptions) SetServiceID

func (options *DeleteServiceBindingOptions) SetServiceID(serviceID string) *DeleteServiceBindingOptions

SetServiceID : Allow user to set ServiceID

type DeleteServiceInstanceOptions

type DeleteServiceInstanceOptions struct {
	// The ID of the service stored in the catalog.json of your broker. This value should be a GUID. MUST be a non-empty
	// string.
	ServiceID *string `json:"service_id" validate:"required"`

	// The ID of the plan for which the service instance has been requested, which is stored in the catalog.json of your
	// broker. This value should be a GUID. MUST be a non-empty string.
	PlanID *string `json:"plan_id" validate:"required"`

	// The ID of a previously provisioned service instance.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// A value of true indicates that both the IBM Cloud platform and the requesting client support asynchronous
	// deprovisioning. If this parameter is not included in the request, and the broker can only deprovision a service
	// instance of the requested plan asynchronously, the broker MUST reject the request with a `422` Unprocessable Entity.
	AcceptsIncomplete *bool `json:"accepts_incomplete,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteServiceInstanceOptions : The DeleteServiceInstance options.

func (*DeleteServiceInstanceOptions) SetAcceptsIncomplete

func (options *DeleteServiceInstanceOptions) SetAcceptsIncomplete(acceptsIncomplete bool) *DeleteServiceInstanceOptions

SetAcceptsIncomplete : Allow user to set AcceptsIncomplete

func (*DeleteServiceInstanceOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*DeleteServiceInstanceOptions) SetInstanceID

func (options *DeleteServiceInstanceOptions) SetInstanceID(instanceID string) *DeleteServiceInstanceOptions

SetInstanceID : Allow user to set InstanceID

func (*DeleteServiceInstanceOptions) SetPlanID

SetPlanID : Allow user to set PlanID

func (*DeleteServiceInstanceOptions) SetServiceID

func (options *DeleteServiceInstanceOptions) SetServiceID(serviceID string) *DeleteServiceInstanceOptions

SetServiceID : Allow user to set ServiceID

type GetLastOperationOptions

type GetLastOperationOptions struct {
	// The unique instance ID generated during provisioning by the IBM Cloud platform.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// A broker-provided identifier for the operation. When a value for operation is included with asynchronous responses
	// for provision and update, and deprovision requests, the IBM Cloud platform will provide the same value using this
	// query parameter as a URL-encoded string. If present, MUST be a non-empty string.
	Operation *string `json:"operation,omitempty"`

	// ID of the plan from the catalog.json in your broker. If present, MUST be a non-empty string.
	PlanID *string `json:"plan_id,omitempty"`

	// ID of the service from the catalog.json in your service broker. If present, MUST be a non-empty string.
	ServiceID *string `json:"service_id,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetLastOperationOptions : The GetLastOperation options.

func (*GetLastOperationOptions) SetHeaders

func (options *GetLastOperationOptions) SetHeaders(param map[string]string) *GetLastOperationOptions

SetHeaders : Allow user to set Headers

func (*GetLastOperationOptions) SetInstanceID

func (options *GetLastOperationOptions) SetInstanceID(instanceID string) *GetLastOperationOptions

SetInstanceID : Allow user to set InstanceID

func (*GetLastOperationOptions) SetOperation

func (options *GetLastOperationOptions) SetOperation(operation string) *GetLastOperationOptions

SetOperation : Allow user to set Operation

func (*GetLastOperationOptions) SetPlanID

func (options *GetLastOperationOptions) SetPlanID(planID string) *GetLastOperationOptions

SetPlanID : Allow user to set PlanID

func (*GetLastOperationOptions) SetServiceID

func (options *GetLastOperationOptions) SetServiceID(serviceID string) *GetLastOperationOptions

SetServiceID : Allow user to set ServiceID

type GetServiceInstanceStateOptions

type GetServiceInstanceStateOptions struct {
	// The `instance_id` of a service instance is provided by the IBM Cloud platform. This ID will be used for future
	// requests to bind and deprovision, so the broker can use it to correlate the resource it creates.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetServiceInstanceStateOptions : The GetServiceInstanceState options.

func (*GetServiceInstanceStateOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*GetServiceInstanceStateOptions) SetInstanceID

func (options *GetServiceInstanceStateOptions) SetInstanceID(instanceID string) *GetServiceInstanceStateOptions

SetInstanceID : Allow user to set InstanceID

type ListCatalogOptions

type ListCatalogOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListCatalogOptions : The ListCatalog options.

func (*ListCatalogOptions) SetHeaders

func (options *ListCatalogOptions) SetHeaders(param map[string]string) *ListCatalogOptions

SetHeaders : Allow user to set Headers

type OpenServiceBrokerV1

type OpenServiceBrokerV1 struct {
	Service *core.BaseService
}

OpenServiceBrokerV1 : Contribute resources to the IBM Cloud catalog by implementing a `service broker` that conforms to the [Open Service Broker API](https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md) version 2.12 specification and provides enablement extensions for integration with IBM Cloud and the Resource Controller provisioning model.

Version: 1.4

func NewOpenServiceBrokerV1

func NewOpenServiceBrokerV1(options *OpenServiceBrokerV1Options) (service *OpenServiceBrokerV1, err error)

NewOpenServiceBrokerV1 : constructs an instance of OpenServiceBrokerV1 with passed in options.

func NewOpenServiceBrokerV1UsingExternalConfig

func NewOpenServiceBrokerV1UsingExternalConfig(options *OpenServiceBrokerV1Options) (openServiceBroker *OpenServiceBrokerV1, err error)

NewOpenServiceBrokerV1UsingExternalConfig : constructs an instance of OpenServiceBrokerV1 with passed in options and external configuration.

func (*OpenServiceBrokerV1) Clone added in v0.17.2

func (openServiceBroker *OpenServiceBrokerV1) Clone() *OpenServiceBrokerV1

Clone makes a copy of "openServiceBroker" suitable for processing requests.

func (*OpenServiceBrokerV1) DeleteServiceBinding

func (openServiceBroker *OpenServiceBrokerV1) DeleteServiceBinding(deleteServiceBindingOptions *DeleteServiceBindingOptions) (response *core.DetailedResponse, err error)

DeleteServiceBinding : Delete (unbind) the credentials bound to a resource Delete instance binding by GUID.

When a broker receives an unbind request from the IBM Cloud platform, it MUST delete any resources associated with the binding. In the case where credentials were generated, this might result in requests to the service instance failing to authenticate.

**Note**: Brokers that do not provide any bindable services or plans do not need to implement this endpoint.

func (*OpenServiceBrokerV1) DeleteServiceBindingWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) DeleteServiceBindingWithContext(ctx context.Context, deleteServiceBindingOptions *DeleteServiceBindingOptions) (response *core.DetailedResponse, err error)

DeleteServiceBindingWithContext is an alternate form of the DeleteServiceBinding method which supports a Context parameter

func (*OpenServiceBrokerV1) DeleteServiceInstance

func (openServiceBroker *OpenServiceBrokerV1) DeleteServiceInstance(deleteServiceInstanceOptions *DeleteServiceInstanceOptions) (result *Resp2079874Root, response *core.DetailedResponse, err error)

DeleteServiceInstance : Delete (deprovision) a service instance Delete (deprovision) a service instance by GUID. When a service broker receives a deprovision request from the IBM Cloud platform, it MUST delete any resources it created during the provision. Usually this means that all resources are immediately reclaimed for future provisions.

func (*OpenServiceBrokerV1) DeleteServiceInstanceWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) DeleteServiceInstanceWithContext(ctx context.Context, deleteServiceInstanceOptions *DeleteServiceInstanceOptions) (result *Resp2079874Root, response *core.DetailedResponse, err error)

DeleteServiceInstanceWithContext is an alternate form of the DeleteServiceInstance method which supports a Context parameter

func (*OpenServiceBrokerV1) DisableRetries added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*OpenServiceBrokerV1) EnableRetries added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*OpenServiceBrokerV1) GetEnableGzipCompression added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*OpenServiceBrokerV1) GetLastOperation

func (openServiceBroker *OpenServiceBrokerV1) GetLastOperation(getLastOperationOptions *GetLastOperationOptions) (result *Resp2079894Root, response *core.DetailedResponse, err error)

GetLastOperation : Get the current status of a provision in-progress for a service instance Get `last_operation` for instance by GUID (for asynchronous provision calls). When a broker returns status code `202 Accepted` during a provision, update, or deprovision call, the IBM Cloud platform will begin polling the `last_operation` endpoint to obtain the state of the last requested operation. The broker response MUST contain the field `state` and MAY contain the field `description`.

Valid values for `state` are `in progress`, `succeeded`, and `failed`. The platform will poll the `last_operation `endpoint as long as the broker returns "state": "in progress". Returning "state": "succeeded" or "state": "failed" will cause the platform to cease polling. The value provided for description will be passed through to the platform API client and can be used to provide additional detail for users about the progress of the operation.

func (*OpenServiceBrokerV1) GetLastOperationWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) GetLastOperationWithContext(ctx context.Context, getLastOperationOptions *GetLastOperationOptions) (result *Resp2079894Root, response *core.DetailedResponse, err error)

GetLastOperationWithContext is an alternate form of the GetLastOperation method which supports a Context parameter

func (*OpenServiceBrokerV1) GetServiceInstanceState

func (openServiceBroker *OpenServiceBrokerV1) GetServiceInstanceState(getServiceInstanceStateOptions *GetServiceInstanceStateOptions) (result *Resp1874644Root, response *core.DetailedResponse, err error)

GetServiceInstanceState : Get the current state of the service instance Get the current state information associated with the service instance.

As a service provider you need a way to manage provisioned service instances. If an account comes past due, you may need a to disable the service (without deleting it), and when the account is settled re-enable the service.

This endpoint allows both the provider and IBM Cloud to query for the state of a provisioned service instance. For example, IBM Cloud may query the provider to figure out if a given service is disabled or not and present that state to the user.

func (*OpenServiceBrokerV1) GetServiceInstanceStateWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) GetServiceInstanceStateWithContext(ctx context.Context, getServiceInstanceStateOptions *GetServiceInstanceStateOptions) (result *Resp1874644Root, response *core.DetailedResponse, err error)

GetServiceInstanceStateWithContext is an alternate form of the GetServiceInstanceState method which supports a Context parameter

func (*OpenServiceBrokerV1) GetServiceURL added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*OpenServiceBrokerV1) ListCatalog

func (openServiceBroker *OpenServiceBrokerV1) ListCatalog(listCatalogOptions *ListCatalogOptions) (result *Resp1874650Root, response *core.DetailedResponse, err error)

ListCatalog : Get the catalog metadata stored within the broker This endpoints defines the contract between the broker and the IBM Cloud platform for the services and plans that the broker supports. This endpoint returns the catalog metadata stored within your broker. These values define the minimal provisioning contract between your service and the IBM Cloud platform. All additional catalog metadata that is not required for provisioning is stored within the IBM Cloud catalog, and any updates to catalog display values that are used to render your dashboard like links, icons, and i18n translated metadata should be updated in the Resource Management Console (RMC), and not housed in your broker. None of metadata stored in your broker is displayed in the IBM Cloud console or the IBM Cloud CLI; the console and CLI will return what was set withn RMC and stored in the IBM Cloud catalog.

func (*OpenServiceBrokerV1) ListCatalogWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) ListCatalogWithContext(ctx context.Context, listCatalogOptions *ListCatalogOptions) (result *Resp1874650Root, response *core.DetailedResponse, err error)

ListCatalogWithContext is an alternate form of the ListCatalog method which supports a Context parameter

func (*OpenServiceBrokerV1) NewDeleteServiceBindingOptions

func (*OpenServiceBrokerV1) NewDeleteServiceBindingOptions(bindingID string, instanceID string, planID string, serviceID string) *DeleteServiceBindingOptions

NewDeleteServiceBindingOptions : Instantiate DeleteServiceBindingOptions

func (*OpenServiceBrokerV1) NewDeleteServiceInstanceOptions

func (*OpenServiceBrokerV1) NewDeleteServiceInstanceOptions(serviceID string, planID string, instanceID string) *DeleteServiceInstanceOptions

NewDeleteServiceInstanceOptions : Instantiate DeleteServiceInstanceOptions

func (*OpenServiceBrokerV1) NewGetLastOperationOptions

func (*OpenServiceBrokerV1) NewGetLastOperationOptions(instanceID string) *GetLastOperationOptions

NewGetLastOperationOptions : Instantiate GetLastOperationOptions

func (*OpenServiceBrokerV1) NewGetServiceInstanceStateOptions

func (*OpenServiceBrokerV1) NewGetServiceInstanceStateOptions(instanceID string) *GetServiceInstanceStateOptions

NewGetServiceInstanceStateOptions : Instantiate GetServiceInstanceStateOptions

func (*OpenServiceBrokerV1) NewListCatalogOptions

func (*OpenServiceBrokerV1) NewListCatalogOptions() *ListCatalogOptions

NewListCatalogOptions : Instantiate ListCatalogOptions

func (*OpenServiceBrokerV1) NewReplaceServiceBindingOptions

func (*OpenServiceBrokerV1) NewReplaceServiceBindingOptions(bindingID string, instanceID string) *ReplaceServiceBindingOptions

NewReplaceServiceBindingOptions : Instantiate ReplaceServiceBindingOptions

func (*OpenServiceBrokerV1) NewReplaceServiceInstanceOptions

func (*OpenServiceBrokerV1) NewReplaceServiceInstanceOptions(instanceID string) *ReplaceServiceInstanceOptions

NewReplaceServiceInstanceOptions : Instantiate ReplaceServiceInstanceOptions

func (*OpenServiceBrokerV1) NewReplaceServiceInstanceStateOptions

func (*OpenServiceBrokerV1) NewReplaceServiceInstanceStateOptions(instanceID string) *ReplaceServiceInstanceStateOptions

NewReplaceServiceInstanceStateOptions : Instantiate ReplaceServiceInstanceStateOptions

func (*OpenServiceBrokerV1) NewUpdateServiceInstanceOptions

func (*OpenServiceBrokerV1) NewUpdateServiceInstanceOptions(instanceID string) *UpdateServiceInstanceOptions

NewUpdateServiceInstanceOptions : Instantiate UpdateServiceInstanceOptions

func (*OpenServiceBrokerV1) ReplaceServiceBinding

func (openServiceBroker *OpenServiceBrokerV1) ReplaceServiceBinding(replaceServiceBindingOptions *ReplaceServiceBindingOptions) (result *Resp2079876Root, response *core.DetailedResponse, err error)

ReplaceServiceBinding : Bind a service instance to another resource Create binding by GUID on service instance.

If your service can be bound to applications in IBM Cloud, `bindable:true` must be specified in the catalog.json of your service broker. If bindable, it must be able to return API endpoints and credentials to your service consumers.

**Note:** Brokers that do not offer any bindable services do not need to implement the endpoint for bind requests.

See the OSB 2.12 spec for more details on [binding](https://github.com/openservicebrokerapi/servicebroker/blob/v2.12/spec.md#binding).

func (*OpenServiceBrokerV1) ReplaceServiceBindingWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) ReplaceServiceBindingWithContext(ctx context.Context, replaceServiceBindingOptions *ReplaceServiceBindingOptions) (result *Resp2079876Root, response *core.DetailedResponse, err error)

ReplaceServiceBindingWithContext is an alternate form of the ReplaceServiceBinding method which supports a Context parameter

func (*OpenServiceBrokerV1) ReplaceServiceInstance

func (openServiceBroker *OpenServiceBrokerV1) ReplaceServiceInstance(replaceServiceInstanceOptions *ReplaceServiceInstanceOptions) (result *Resp2079872Root, response *core.DetailedResponse, err error)

ReplaceServiceInstance : Create (provision) a service instance Create a service instance with GUID. When your service broker receives a provision request from the IBM Cloud platform, it MUST take whatever action is necessary to create a new resource.

When a user creates a service instance from the IBM Cloud console or the IBM Cloud CLI, the IBM Cloud platform validates that the user has permission to create the service instance using IBM Cloud IAM. After this validation occurs, your service broker's provision endpoint (PUT /v2/resource_instances/:instance_id) will be invoked. When provisioning occurs, the IBM Cloud platform provides the following values:

- The IBM Cloud context is included in the context variable - The X-Broker-API-Originating-Identity will have the IBM IAM ID of the user that initiated the request - The parameters section will include the requested location (and additional parameters required by your service).

func (*OpenServiceBrokerV1) ReplaceServiceInstanceState

func (openServiceBroker *OpenServiceBrokerV1) ReplaceServiceInstanceState(replaceServiceInstanceStateOptions *ReplaceServiceInstanceStateOptions) (result *Resp2448145Root, response *core.DetailedResponse, err error)

ReplaceServiceInstanceState : Update the state of a provisioned service instance Update (disable or enable) the state of a provisioned service instance. As a service provider you need a way to manage provisioned service instances. If an account comes past due, you may need a to disable the service (without deleting it), and when the account is settled re-enable the service. This endpoint allows the provider to enable or disable the state of a provisioned service instance. It is the service provider's responsibility to disable access to the service instance when the disable endpoint is invoked and to re-enable that access when the enable endpoint is invoked. When your service broker receives an enable / disable request, it should take whatever action is necessary to enable / disable (respectively) the service. Additionally, If a bind request comes in for a disabled service, the broker should reject that request with any code other than `204`, and provide a user-facing message in the description.

func (*OpenServiceBrokerV1) ReplaceServiceInstanceStateWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) ReplaceServiceInstanceStateWithContext(ctx context.Context, replaceServiceInstanceStateOptions *ReplaceServiceInstanceStateOptions) (result *Resp2448145Root, response *core.DetailedResponse, err error)

ReplaceServiceInstanceStateWithContext is an alternate form of the ReplaceServiceInstanceState method which supports a Context parameter

func (*OpenServiceBrokerV1) ReplaceServiceInstanceWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) ReplaceServiceInstanceWithContext(ctx context.Context, replaceServiceInstanceOptions *ReplaceServiceInstanceOptions) (result *Resp2079872Root, response *core.DetailedResponse, err error)

ReplaceServiceInstanceWithContext is an alternate form of the ReplaceServiceInstance method which supports a Context parameter

func (*OpenServiceBrokerV1) SetDefaultHeaders added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*OpenServiceBrokerV1) SetEnableGzipCompression added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*OpenServiceBrokerV1) SetServiceURL

func (openServiceBroker *OpenServiceBrokerV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*OpenServiceBrokerV1) UpdateServiceInstance

func (openServiceBroker *OpenServiceBrokerV1) UpdateServiceInstance(updateServiceInstanceOptions *UpdateServiceInstanceOptions) (result *Resp2079874Root, response *core.DetailedResponse, err error)

UpdateServiceInstance : Update a service instance Patch an instance by GUID. Enabling this endpoint allows your user to change plans and service parameters in a provisioned service instance. If your offering supports multiple plans, and you want users to be able to change plans for a provisioned instance, you will need to enable the ability for users to update their service instance.

To enable support for the update of the plan, a broker MUST declare support per service by specifying `"plan_updateable": true` in your brokers' catalog.json.

func (*OpenServiceBrokerV1) UpdateServiceInstanceWithContext added in v0.12.2

func (openServiceBroker *OpenServiceBrokerV1) UpdateServiceInstanceWithContext(ctx context.Context, updateServiceInstanceOptions *UpdateServiceInstanceOptions) (result *Resp2079874Root, response *core.DetailedResponse, err error)

UpdateServiceInstanceWithContext is an alternate form of the UpdateServiceInstance method which supports a Context parameter

type OpenServiceBrokerV1Options

type OpenServiceBrokerV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

OpenServiceBrokerV1Options : Service options

type Plans

type Plans struct {
	// A short description of the plan. It MUST be a non-empty string. The description is NOT displayed in the IBM Cloud
	// catalog or IBM Cloud CLI.
	Description *string `json:"description" validate:"required"`

	// When false, service instances of this plan have a cost. The default is true.
	Free *bool `json:"free,omitempty"`

	// An identifier used to correlate this plan in future requests to the broker.  This MUST be globally unique within a
	// platform marketplace. It MUST be a non-empty string and using a GUID is RECOMMENDED. If you define your service in
	// the RMC, it will create a unique GUID for you to use. It is recommended to use the RMC to define and generate these
	// values and then use them in your catalog.json metadata in your broker. This value is NOT displayed in the IBM Cloud
	// catalog or IBM Cloud CLI.
	ID *string `json:"id" validate:"required"`

	// The programmatic name of the plan. It MUST be unique within the service. All lowercase, no spaces. It MUST be a
	// non-empty string, and it's NOT displayed in the IBM Cloud catalog or IBM Cloud CLI.
	Name *string `json:"name" validate:"required"`
}

Plans : Where is this in the source?.

type ReplaceServiceBindingOptions

type ReplaceServiceBindingOptions struct {
	// The `binding_id` is provided by the IBM Cloud platform. This ID will be used for future unbind requests, so the
	// broker can use it to correlate the resource it creates.
	BindingID *string `json:"binding_id" validate:"required,ne="`

	// The :`instance_id` is the ID of a previously provisioned service instance.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// A JSON object that contains data for platform resources associated with the binding to be created.
	BindResource *BindResource `json:"bind_resource,omitempty"`

	// Configuration options for the service instance. An opaque object, controller treats this as a blob. Brokers should
	// ensure that the client has provided valid configuration parameters and values for the operation. If this field is
	// not present in the request message, then the broker MUST NOT change the parameters of the instance as a result of
	// this request.
	Parameters map[string]string `json:"parameters,omitempty"`

	// The ID of the plan from the catalog.json in your broker. If present, it MUST be a non-empty string.
	PlanID *string `json:"plan_id,omitempty"`

	// The ID of the service from the catalog.json in your broker. If present, it MUST be a non-empty string.
	ServiceID *string `json:"service_id,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ReplaceServiceBindingOptions : The ReplaceServiceBinding options.

func (*ReplaceServiceBindingOptions) SetBindResource

func (options *ReplaceServiceBindingOptions) SetBindResource(bindResource *BindResource) *ReplaceServiceBindingOptions

SetBindResource : Allow user to set BindResource

func (*ReplaceServiceBindingOptions) SetBindingID

func (options *ReplaceServiceBindingOptions) SetBindingID(bindingID string) *ReplaceServiceBindingOptions

SetBindingID : Allow user to set BindingID

func (*ReplaceServiceBindingOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*ReplaceServiceBindingOptions) SetInstanceID

func (options *ReplaceServiceBindingOptions) SetInstanceID(instanceID string) *ReplaceServiceBindingOptions

SetInstanceID : Allow user to set InstanceID

func (*ReplaceServiceBindingOptions) SetParameters

func (options *ReplaceServiceBindingOptions) SetParameters(parameters map[string]string) *ReplaceServiceBindingOptions

SetParameters : Allow user to set Parameters

func (*ReplaceServiceBindingOptions) SetPlanID

SetPlanID : Allow user to set PlanID

func (*ReplaceServiceBindingOptions) SetServiceID

func (options *ReplaceServiceBindingOptions) SetServiceID(serviceID string) *ReplaceServiceBindingOptions

SetServiceID : Allow user to set ServiceID

type ReplaceServiceInstanceOptions

type ReplaceServiceInstanceOptions struct {
	// The `instance_id` of a service instance is provided by the IBM Cloud platform. This ID will be used for future
	// requests to bind and deprovision, so the broker can use it to correlate the resource it creates.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// Platform specific contextual information under which the service instance is to be provisioned.
	Context *Context `json:"context,omitempty"`

	// Deprecated in favor of `context`. The IBM Cloud platform GUID for the organization under which the service instance
	// is to be provisioned. Although most brokers will not use this field, it might be helpful for executing operations on
	// a user's behalf. It MUST be a non-empty string.
	OrganizationGUID *string `json:"organization_guid,omitempty"`

	// Configuration options for the service instance. An opaque object, controller treats this as a blob. Brokers should
	// ensure that the client has provided valid configuration parameters and values for the operation. If this field is
	// not present in the request message, then the broker MUST NOT change the parameters of the instance as a result of
	// this request.
	Parameters map[string]string `json:"parameters,omitempty"`

	// The ID of the plan for which the service instance has been requested, which is stored in the catalog.json of your
	// broker. This value should be a GUID and it MUST be unique to a service.
	PlanID *string `json:"plan_id,omitempty"`

	// The ID of the service stored in the catalog.json of your broker. This value should be a GUID and it MUST be a
	// non-empty string.
	ServiceID *string `json:"service_id,omitempty"`

	// Deprecated in favor of `context`. The identifier for the project space within the IBM Cloud platform organization.
	// Although most brokers will not use this field, it might be helpful for executing operations on a user's behalf. It
	// MUST be a non-empty string.
	SpaceGUID *string `json:"space_guid,omitempty"`

	// A value of true indicates that both the IBM Cloud platform and the requesting client support asynchronous
	// deprovisioning. If this parameter is not included in the request, and the broker can only deprovision a service
	// instance of the requested plan asynchronously, the broker MUST reject the request with a `422` Unprocessable Entity.
	AcceptsIncomplete *bool `json:"accepts_incomplete,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ReplaceServiceInstanceOptions : The ReplaceServiceInstance options.

func (*ReplaceServiceInstanceOptions) SetAcceptsIncomplete

func (options *ReplaceServiceInstanceOptions) SetAcceptsIncomplete(acceptsIncomplete bool) *ReplaceServiceInstanceOptions

SetAcceptsIncomplete : Allow user to set AcceptsIncomplete

func (*ReplaceServiceInstanceOptions) SetContext

SetContext : Allow user to set Context

func (*ReplaceServiceInstanceOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*ReplaceServiceInstanceOptions) SetInstanceID

func (options *ReplaceServiceInstanceOptions) SetInstanceID(instanceID string) *ReplaceServiceInstanceOptions

SetInstanceID : Allow user to set InstanceID

func (*ReplaceServiceInstanceOptions) SetOrganizationGUID added in v0.17.2

func (options *ReplaceServiceInstanceOptions) SetOrganizationGUID(organizationGUID string) *ReplaceServiceInstanceOptions

SetOrganizationGUID : Allow user to set OrganizationGUID

func (*ReplaceServiceInstanceOptions) SetParameters

func (options *ReplaceServiceInstanceOptions) SetParameters(parameters map[string]string) *ReplaceServiceInstanceOptions

SetParameters : Allow user to set Parameters

func (*ReplaceServiceInstanceOptions) SetPlanID

SetPlanID : Allow user to set PlanID

func (*ReplaceServiceInstanceOptions) SetServiceID

func (options *ReplaceServiceInstanceOptions) SetServiceID(serviceID string) *ReplaceServiceInstanceOptions

SetServiceID : Allow user to set ServiceID

func (*ReplaceServiceInstanceOptions) SetSpaceGUID added in v0.17.2

func (options *ReplaceServiceInstanceOptions) SetSpaceGUID(spaceGUID string) *ReplaceServiceInstanceOptions

SetSpaceGUID : Allow user to set SpaceGUID

type ReplaceServiceInstanceStateOptions

type ReplaceServiceInstanceStateOptions struct {
	// The `instance_id` of a service instance is provided by the IBM Cloud platform. This ID will be used for future
	// requests to bind and deprovision, so the broker can use it to correlate the resource it creates.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// Indicates the current state of the service instance.
	Enabled *bool `json:"enabled,omitempty"`

	// Optional string that shows the user ID that is initiating the call.
	InitiatorID *string `json:"initiator_id,omitempty"`

	// Optional string that states the reason code for the service instance state change. Valid values are
	// `IBMCLOUD_ACCT_ACTIVATE`, `IBMCLOUD_RECLAMATION_RESTORE`, or `IBMCLOUD_SERVICE_INSTANCE_BELOW_CAP` for enable calls;
	// `IBMCLOUD_ACCT_SUSPEND`, `IBMCLOUD_RECLAMATION_SCHEDULE`, or `IBMCLOUD_SERVICE_INSTANCE_ABOVE_CAP` for disable
	// calls; and `IBMCLOUD_ADMIN_REQUEST` for enable and disable calls.<br/><br/>Previously accepted values had a `BMX_`
	// prefix, such as `BMX_ACCT_ACTIVATE`. These values are deprecated.
	ReasonCode *string `json:"reason_code,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ReplaceServiceInstanceStateOptions : The ReplaceServiceInstanceState options.

func (*ReplaceServiceInstanceStateOptions) SetEnabled

SetEnabled : Allow user to set Enabled

func (*ReplaceServiceInstanceStateOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*ReplaceServiceInstanceStateOptions) SetInitiatorID

SetInitiatorID : Allow user to set InitiatorID

func (*ReplaceServiceInstanceStateOptions) SetInstanceID

SetInstanceID : Allow user to set InstanceID

func (*ReplaceServiceInstanceStateOptions) SetReasonCode

SetReasonCode : Allow user to set ReasonCode

type Resp1874644Root

type Resp1874644Root struct {
	// Indicates (from the viewpoint of the provider) whether the service instance is active and is meaningful if enabled
	// is true. The default value is true if not specified.
	Active *bool `json:"active,omitempty"`

	// Indicates the current state of the service instance.
	Enabled *bool `json:"enabled,omitempty"`

	// Indicates when the service instance was last accessed/modified/etc., and is meaningful if enabled is true AND active
	// is false. Represented as milliseconds since the epoch, but does not need to be accurate to the second/hour.
	LastActive *float64 `json:"last_active,omitempty"`
}

Resp1874644Root : Check the active status of an enabled service.

type Resp1874650Root

type Resp1874650Root struct {
	// List of services.
	Services []Services `json:"services,omitempty"`
}

Resp1874650Root : Resp1874650Root struct

type Resp2079872Root

type Resp2079872Root struct {
	// The URL of a web-based management user interface for the service instance; we refer to this as a service dashboard.
	// The URL MUST contain enough information for the dashboard to identify the resource being accessed. Note: a broker
	// that wishes to return `dashboard_url` for a service instance MUST return it with the initial response to the
	// provision request, even if the service is provisioned asynchronously. If present, it MUST be a non-empty string.
	DashboardURL *string `json:"dashboard_url,omitempty"`

	// For asynchronous responses, service brokers MAY return an identifier representing the operation. The value of this
	// field MUST be provided by the platform with requests to the `last_operation` endpoint in a URL encoded query
	// parameter. If present, MUST be a non-empty string.
	Operation *string `json:"operation,omitempty"`
}

Resp2079872Root : OK - MUST be returned if the service instance already exists, is fully provisioned, and the requested parameters are identical to the existing service instance.

type Resp2079874Root

type Resp2079874Root struct {
	// For asynchronous responses, service brokers MAY return an identifier representing the operation. The value of this
	// field MUST be provided by the platform with requests to the Last Operation endpoint in a URL encoded query
	// parameter. If present, MUST be a non-empty string.
	Operation *string `json:"operation,omitempty"`
}

Resp2079874Root : Accepted - MUST be returned if the service instance provisioning is in progress. This triggers the IBM Cloud platform to poll the Service Instance `last_operation` Endpoint for operation status. Note that a re-sent `PUT` request MUST return a `202 Accepted`, not a `200 OK`, if the service instance is not yet fully provisioned.

type Resp2079876Root

type Resp2079876Root struct {
	// A free-form hash of credentials that can be used by applications or users to access the service.
	Credentials interface{} `json:"credentials,omitempty"`

	// A URL to which logs MUST be streamed. 'requires':['syslog_drain'] MUST be declared in the Catalog endpoint or the
	// platform MUST consider the response invalid.
	SyslogDrainURL *string `json:"syslog_drain_url,omitempty"`

	// A URL to which the platform MUST proxy requests for the address sent with bind_resource.route in the request body.
	// 'requires':['route_forwarding'] MUST be declared in the Catalog endpoint or the platform can consider the response
	// invalid.
	RouteServiceURL *string `json:"route_service_url,omitempty"`

	// An array of configuration for remote storage devices to be mounted into an application container filesystem.
	// 'requires':['volume_mount'] MUST be declared in the Catalog endpoint or the platform can consider the response
	// invalid.
	VolumeMounts []VolumeMount `json:"volume_mounts,omitempty"`
}

Resp2079876Root : Resp2079876Root struct

type Resp2079894Root

type Resp2079894Root struct {
	// A user-facing message displayed to the platform API client. Can be used to tell the user details about the status of
	// the operation. If present, MUST be a non-empty string.
	Description *string `json:"description,omitempty"`

	// Valid values are `in progress`, `succeeded`, and `failed`. While `†state": "in progress†`, the platform SHOULD
	// continue polling. A response with `†state": "succeeded†` or `†state": "failed†` MUST cause the platform to
	// cease polling.
	State *string `json:"state" validate:"required"`
}

Resp2079894Root : OK - MUST be returned upon successful processing of this request.

type Resp2448145Root

type Resp2448145Root struct {
	// Indicates (from the viewpoint of the provider) whether the service instance is active and is meaningful if `enabled`
	// is true.  The default value is true if not specified.
	Active *bool `json:"active,omitempty"`

	// Indicates the current state of the service instance.
	Enabled *bool `json:"enabled" validate:"required"`

	// Indicates when the service instance was last accessed or modified, and is meaningful if `enabled` is true AND
	// `active` is false.  Represented as milliseconds since the epoch, but does not need to be accurate to the
	// second/hour.
	LastActive *int64 `json:"last_active,omitempty"`
}

Resp2448145Root : Check the enabled status of active service.

type Services

type Services struct {
	// Specifies whether or not your service can be bound to applications in IBM Cloud. If bindable, it must be able to
	// return API endpoints and credentials to your service consumers.
	Bindable *bool `json:"bindable" validate:"required"`

	// A short description of the service. It MUST be a non-empty string. Note that this description is not displayed by
	// the the IBM Cloud console or IBM Cloud CLI.
	Description *string `json:"description" validate:"required"`

	// An identifier used to correlate this service in future requests to the broker. This MUST be globally unique within
	// the IBM Cloud platform. It MUST be a non-empty string, and using a GUID is recommended. Recommended: If you define
	// your service in the RMC, the RMC will generate a globally unique GUID service ID that you can use in your service
	// broker.
	ID *string `json:"id" validate:"required"`

	// The service name is not your display name. Your service name must follow the follow these rules:
	//  - It must be all lowercase.
	//  - It can't include spaces but may include hyphens (`-`).
	//  - It must be less than 32 characters.
	//  Your service name should include your company name. If your company has more then one offering your service name
	// should include both company and offering as part of the name. For example, the Compose company has offerings for
	// Redis and Elasticsearch. Sample service names on IBM Cloud for these offerings would be `compose-redis` and
	// `compose-elasticsearch`.  Each of these service names have associated display names that are shown in the IBM Cloud
	// catalog: *Compose Redis* and *Compose Elasticsearch*. Another company (e.g. FastJetMail) may only have the single
	// JetMail offering, in which case the service name should be `fastjetmail`. Recommended: If you define your service in
	// RMC, you can export a catalog.json that will include the service name you defined within the RMC.
	Name *string `json:"name" validate:"required"`

	// The Default is false. This specifices whether or not you support plan changes for provisioned instances. If your
	// offering supports multiple plans, and you want users to be able to change plans for a provisioned instance, you will
	// need to enable the ability for users to update their service instance by using /v2/service_instances/{instance_id}
	// PATCH.
	PlanUpdateable *bool `json:"plan_updateable,omitempty"`

	// A list of plans for this service that must contain at least one plan.
	Plans []Plans `json:"plans" validate:"required"`
}

Services : The service object that describes the properties of your service.

type UpdateServiceInstanceOptions

type UpdateServiceInstanceOptions struct {
	// The ID of a previously provisioned service instance.
	InstanceID *string `json:"instance_id" validate:"required,ne="`

	// Platform specific contextual information under which the service instance is to be provisioned.
	Context *Context `json:"context,omitempty"`

	// Configuration options for the service instance. An opaque object, controller treats this as a blob. Brokers should
	// ensure that the client has provided valid configuration parameters and values for the operation. If this field is
	// not present in the request message, then the broker MUST NOT change the parameters of the instance as a result of
	// this request.
	Parameters map[string]string `json:"parameters,omitempty"`

	// The ID of the plan for which the service instance has been requested, which is stored in the catalog.json of your
	// broker. This value should be a GUID. MUST be unique to a service. If present, MUST be a non-empty string. If this
	// field is not present in the request message, then the broker MUST NOT change the plan of the instance as a result of
	// this request.
	PlanID *string `json:"plan_id,omitempty"`

	// Information about the service instance prior to the update.
	PreviousValues map[string]string `json:"previous_values,omitempty"`

	// The ID of the service stored in the catalog.json of your broker. This value should be a GUID. It MUST be a non-empty
	// string.
	ServiceID *string `json:"service_id,omitempty"`

	// A value of true indicates that both the IBM Cloud platform and the requesting client support asynchronous
	// deprovisioning. If this parameter is not included in the request, and the broker can only deprovision a service
	// instance of the requested plan asynchronously, the broker MUST reject the request with a `422` Unprocessable Entity.
	AcceptsIncomplete *bool `json:"accepts_incomplete,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateServiceInstanceOptions : The UpdateServiceInstance options.

func (*UpdateServiceInstanceOptions) SetAcceptsIncomplete

func (options *UpdateServiceInstanceOptions) SetAcceptsIncomplete(acceptsIncomplete bool) *UpdateServiceInstanceOptions

SetAcceptsIncomplete : Allow user to set AcceptsIncomplete

func (*UpdateServiceInstanceOptions) SetContext

func (options *UpdateServiceInstanceOptions) SetContext(context *Context) *UpdateServiceInstanceOptions

SetContext : Allow user to set Context

func (*UpdateServiceInstanceOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*UpdateServiceInstanceOptions) SetInstanceID

func (options *UpdateServiceInstanceOptions) SetInstanceID(instanceID string) *UpdateServiceInstanceOptions

SetInstanceID : Allow user to set InstanceID

func (*UpdateServiceInstanceOptions) SetParameters

func (options *UpdateServiceInstanceOptions) SetParameters(parameters map[string]string) *UpdateServiceInstanceOptions

SetParameters : Allow user to set Parameters

func (*UpdateServiceInstanceOptions) SetPlanID

SetPlanID : Allow user to set PlanID

func (*UpdateServiceInstanceOptions) SetPreviousValues

func (options *UpdateServiceInstanceOptions) SetPreviousValues(previousValues map[string]string) *UpdateServiceInstanceOptions

SetPreviousValues : Allow user to set PreviousValues

func (*UpdateServiceInstanceOptions) SetServiceID

func (options *UpdateServiceInstanceOptions) SetServiceID(serviceID string) *UpdateServiceInstanceOptions

SetServiceID : Allow user to set ServiceID

type VolumeMount

type VolumeMount struct {
	// A free-form hash of credentials that can be used by applications or users to access the service.
	Driver *string `json:"driver" validate:"required"`

	// The path in the application container onto which the volume will be mounted. This specification does not mandate
	// what action the platform is to take if the path specified already exists in the container.
	ContainerDir *string `json:"container_dir" validate:"required"`

	// 'r' to mount the volume read-only or 'rw' to mount it read-write.
	Mode *string `json:"mode" validate:"required"`

	// A string specifying the type of device to mount. Currently the only supported value is 'shared'.
	DeviceType *string `json:"device_type" validate:"required"`

	// Device object containing device_type specific details. Currently only shared devices are supported.
	Device *string `json:"device" validate:"required"`
}

VolumeMount : VolumeMount struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL