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
stringThe id of instance to create a binding on.
bindingId
stringThe binding id of binding to create.
request
ServiceBindingRequestParameters for the requested Service Binding.
acceptsIncomplete
boolA 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
instanceId
stringThe id of instance associated with the binding.
bindingId
stringThe 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
instanceId
stringThe id of instance to find last operation applied to it
bindingId
stringThe binding id of Service Binding to find last operation applied to it
serviceId
stringThe id of the service associated with the binding.
planId
stringThe id of the plan associated with the binding.
operation
stringThe 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
instanceId
stringThe id of the instance associated with the binding being deleted.
bindingId
stringThe id of the binding being deleted.
serviceId
stringThe id of the service associated with the binding being deleted.
planId
stringThe id of the plan associated with the binding being deleted.
acceptsIncomplete
boolA 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.