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)
Exposes bindings for Service Instances.
public ServiceBindingsController(IServiceProvider provider)
Parameters
providerIServiceProvider
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
instanceIdstringThe id of instance to create a binding on.
bindingIdstringThe binding id of binding to create.
requestServiceBindingRequestParameters for the requested Service Binding.
acceptsIncompleteboolA 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
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
instanceIdstringThe id of instance associated with the binding.
bindingIdstringThe binding id of binding to fetch
Returns
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
instanceIdstringThe id of instance to find last operation applied to it
bindingIdstringThe binding id of Service Binding to find last operation applied to it
serviceIdstringThe id of the service associated with the binding.
planIdstringThe id of the plan associated with the binding.
operationstringThe value provided in Operation.
Returns
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
instanceIdstringThe id of the instance associated with the binding being deleted.
bindingIdstringThe id of the binding being deleted.
serviceIdstringThe id of the service associated with the binding being deleted.
planIdstringThe id of the plan associated with the binding being deleted.
acceptsIncompleteboolA 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.