Class OpenServiceBroker


  • public class OpenServiceBroker
    extends com.ibm.cloud.sdk.core.service.BaseService
    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:
    v1
    • Field Detail

      • DEFAULT_SERVICE_NAME

        public static final java.lang.String DEFAULT_SERVICE_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • OpenServiceBroker

        public OpenServiceBroker​(java.lang.String serviceName,
                                 com.ibm.cloud.sdk.core.security.Authenticator authenticator)
        Constructs an instance of the `OpenServiceBroker` client. The specified service name and authenticator are used to configure the client instance.
        Parameters:
        serviceName - the service name to be used when configuring the client instance
        authenticator - the Authenticator instance to be configured for this client
    • Method Detail

      • newInstance

        public static OpenServiceBroker newInstance()
        Class method which constructs an instance of the `OpenServiceBroker` client. The default service name is used to configure the client instance.
        Returns:
        an instance of the `OpenServiceBroker` client using external configuration
      • newInstance

        public static OpenServiceBroker newInstance​(java.lang.String serviceName)
        Class method which constructs an instance of the `OpenServiceBroker` client. The specified service name is used to configure the client instance.
        Parameters:
        serviceName - the service name to be used when configuring the client instance
        Returns:
        an instance of the `OpenServiceBroker` client using external configuration
      • getServiceInstanceState

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp1874644Root> getServiceInstanceState​(GetServiceInstanceStateOptions getServiceInstanceStateOptions)
        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.
        Parameters:
        getServiceInstanceStateOptions - the GetServiceInstanceStateOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp1874644Root
      • replaceServiceInstanceState

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp2448145Root> replaceServiceInstanceState​(ReplaceServiceInstanceStateOptions replaceServiceInstanceStateOptions)
        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.
        Parameters:
        replaceServiceInstanceStateOptions - the ReplaceServiceInstanceStateOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp2448145Root
      • replaceServiceInstance

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp2079872Root> replaceServiceInstance​(ReplaceServiceInstanceOptions replaceServiceInstanceOptions)
        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).
        Parameters:
        replaceServiceInstanceOptions - the ReplaceServiceInstanceOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp2079872Root
      • updateServiceInstance

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp2079874Root> updateServiceInstance​(UpdateServiceInstanceOptions updateServiceInstanceOptions)
        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.
        Parameters:
        updateServiceInstanceOptions - the UpdateServiceInstanceOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp2079874Root
      • deleteServiceInstance

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp2079874Root> deleteServiceInstance​(DeleteServiceInstanceOptions deleteServiceInstanceOptions)
        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.
        Parameters:
        deleteServiceInstanceOptions - the DeleteServiceInstanceOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp2079874Root
      • listCatalog

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp1874650Root> listCatalog​(ListCatalogOptions listCatalogOptions)
        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.
        Parameters:
        listCatalogOptions - the ListCatalogOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp1874650Root
      • listCatalog

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp1874650Root> 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.
        Returns:
        a ServiceCall with a result of type Resp1874650Root
      • getLastOperation

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp2079894Root> getLastOperation​(GetLastOperationOptions getLastOperationOptions)
        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.
        Parameters:
        getLastOperationOptions - the GetLastOperationOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp2079894Root
      • replaceServiceBinding

        public com.ibm.cloud.sdk.core.http.ServiceCall<Resp2079876Root> replaceServiceBinding​(ReplaceServiceBindingOptions replaceServiceBindingOptions)
        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).
        Parameters:
        replaceServiceBindingOptions - the ReplaceServiceBindingOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type Resp2079876Root
      • deleteServiceBinding

        public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteServiceBinding​(DeleteServiceBindingOptions deleteServiceBindingOptions)
        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.
        Parameters:
        deleteServiceBindingOptions - the DeleteServiceBindingOptions containing the options for the call
        Returns:
        a ServiceCall with a void result