Class ServiceInstancesController
- Namespace
- OpenServiceBroker.Instances
- Assembly
- OpenServiceBroker.Server.dll
Exposes Service Instances.
[Route("v2/service_instances/{instance_id}")]
public class ServiceInstancesController : BrokerControllerBase<IServiceInstanceBlocking, IServiceInstanceDeferred>, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable
- Inheritance
-
ServiceInstancesController
- Implements
- Inherited Members
- Extension Methods
Constructors
ServiceInstancesController(IServiceProvider)
Exposes Service Instances.
public ServiceInstancesController(IServiceProvider provider)
Parameters
providerIServiceProvider
Methods
Deprovision(string, string, string, bool)
Deprovisions/deletes a Service Instance.
[HttpDelete("")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(ServiceInstanceAsyncOperation), 202)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 410)]
[ProducesResponseType(typeof(Error), 422)]
public Task<IActionResult> Deprovision(string instanceId, string serviceId, string planId, bool acceptsIncomplete = false)
Parameters
instanceIdstringThe id of instance being deleted.
serviceIdstringThe id of the service associated with the instance being deleted.
planIdstringThe id of the plan associated with the instance 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.
Returns
Fetch(string)
Fetches a Service Instance.
[HttpGet("")]
[ProducesResponseType(typeof(ServiceInstanceResource), 200)]
[ProducesResponseType(typeof(Error), 404)]
[ProducesResponseType(typeof(Error), 422)]
public Task<IActionResult> Fetch(string instanceId)
Parameters
instanceIdstringThe id of instance to fetch.
Returns
GetLastOperation(string, string?, string?, string?)
Gets the state of the last requested deferred (asynchronous) operation for a Service Instance.
[HttpGet("last_operation")]
[ProducesResponseType(typeof(LastOperationResource), 200)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 410)]
public Task<IActionResult> GetLastOperation(string instanceId, string? serviceId = null, string? planId = null, string? operation = null)
Parameters
instanceIdstringThe instance id of instance to find last operation applied to it
serviceIdstringThe id of the service associated with the instance.
planIdstringThe id of the plan associated with the instance.
operationstringThe value provided in Operation.
Returns
Provision(string, ServiceInstanceProvisionRequest, bool)
Provisions a Service Instance.
[HttpPut("")]
[ProducesResponseType(typeof(ServiceInstanceProvision), 200)]
[ProducesResponseType(typeof(ServiceInstanceProvision), 201)]
[ProducesResponseType(typeof(ServiceInstanceAsyncOperation), 202)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 409)]
[ProducesResponseType(typeof(Error), 422)]
public Task<IActionResult> Provision(string instanceId, ServiceInstanceProvisionRequest request, bool acceptsIncomplete = false)
Parameters
instanceIdstringThe id of instance to provision.
requestServiceInstanceProvisionRequestParameters for the requested Service Instance provision
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
Update(string, ServiceInstanceUpdateRequest, bool)
Updates a Service Instance.
[HttpPatch("")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(ServiceInstanceAsyncOperation), 202)]
[ProducesResponseType(typeof(Error), 400)]
[ProducesResponseType(typeof(Error), 422)]
public Task<IActionResult> Update(string instanceId, ServiceInstanceUpdateRequest request, bool acceptsIncomplete = false)
Parameters
instanceIdstringThe instance id of instance to update
requestServiceInstanceUpdateRequestParameters for the requested Service Instance update
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.