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)
public ServiceInstancesController(IServiceProvider provider)
Parameters
provider
IServiceProvider
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
instanceId
stringThe id of instance being deleted.
serviceId
stringThe id of the service associated with the instance being deleted.
planId
stringThe id of the plan associated with the instance 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.
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
instanceId
stringThe 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
instanceId
stringThe instance id of instance to find last operation applied to it
serviceId
stringThe id of the service associated with the instance.
planId
stringThe id of the plan associated with the instance.
operation
stringThe 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
instanceId
stringThe id of instance to provision.
request
ServiceInstanceProvisionRequestParameters for the requested Service Instance provision
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
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
instanceId
stringThe instance id of instance to update
request
ServiceInstanceUpdateRequestParameters for the requested Service Instance update
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.