Table of Contents

Class ServiceBindingsController

Namespace
OpenServiceBroker.Bindings
Assembly
OpenServiceBroker.Server.dll

Exposes bindings for Service Instances.

[Route("v2/service_instances/{instance_id}/service_bindings/{binding_id}")]
public class ServiceBindingsController : BrokerControllerBase<IServiceBindingBlocking, IServiceBindingDeferred>, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable
Inheritance
ServiceBindingsController
Implements
Inherited Members
Extension Methods

Constructors

ServiceBindingsController(IServiceProvider)

public ServiceBindingsController(IServiceProvider provider)

Parameters

provider IServiceProvider

Methods

Bind(string, string, ServiceBindingRequest, bool)

Generates a Service Binding.

[HttpPut("")]
[ProducesResponseType(typeof(ServiceBinding), 200)]
[ProducesResponseType(typeof(ServiceBinding), 201)]
[ProducesResponseType(typeof(AsyncOperation), 202)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 409)]
[ProducesResponseType(typeof(Error), 422)]
public Task<IActionResult> Bind(string instanceId, string bindingId, ServiceBindingRequest request, bool acceptsIncomplete = false)

Parameters

instanceId string

The id of instance to create a binding on.

bindingId string

The binding id of binding to create.

request ServiceBindingRequest

Parameters for the requested Service Binding.

acceptsIncomplete bool

A value of true indicates that the Platform and its clients support deferred (asynchronous) Service Broker operations. If this parameter is false, and the Service Broker can only handle a request deferred (asynchronously) AsyncRequiredException is thrown.

Returns

Task<IActionResult>

Fetch(string, string)

Fetches a Service Binding.

[HttpGet("")]
[ProducesResponseType(typeof(ServiceBindingResource), 200)]
[ProducesResponseType(typeof(Error), 404)]
[ProducesResponseType(typeof(Error), 422)]
public Task<IActionResult> Fetch(string instanceId, string bindingId)

Parameters

instanceId string

The id of instance associated with the binding.

bindingId string

The binding id of binding to fetch

Returns

Task<IActionResult>

GetLastOperation(string, string, string?, string?, string?)

Gets the state of the last requested deferred (asynchronous) operation for a Service Binding.

[HttpGet("last_operation")]
[ProducesResponseType(typeof(LastOperationResource), 200)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 410)]
public Task<IActionResult> GetLastOperation(string instanceId, string bindingId, string? serviceId = null, string? planId = null, string? operation = null)

Parameters

instanceId string

The id of instance to find last operation applied to it

bindingId string

The binding id of Service Binding to find last operation applied to it

serviceId string

The id of the service associated with the binding.

planId string

The id of the plan associated with the binding.

operation string

The value provided in Operation.

Returns

Task<IActionResult>

Unbind(string, string, string, string, bool)

Unbinds/deletes a Service Binding.

[HttpDelete("")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(AsyncOperation), 202)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 410)]
[ProducesResponseType(typeof(Error), 422)]
public Task<IActionResult> Unbind(string instanceId, string bindingId, string serviceId, string planId, bool acceptsIncomplete = false)

Parameters

instanceId string

The id of the instance associated with the binding being deleted.

bindingId string

The id of the binding being deleted.

serviceId string

The id of the service associated with the binding being deleted.

planId string

The id of the plan associated with the binding being deleted.

acceptsIncomplete bool

A value of true indicates that the Platform and its clients support deferred (asynchronous) Service Broker operations. If this parameter is false, and the Service Broker can only handle a request deferred (asynchronously) AsyncRequiredException is thrown.

Returns

Task<IActionResult>