Table of Contents

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 string

The id of instance being deleted.

serviceId string

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

planId string

The id of the plan associated with the instance 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>

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 string

The id of instance to fetch.

Returns

Task<IActionResult>

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 string

The instance id of instance to find last operation applied to it

serviceId string

The id of the service associated with the instance.

planId string

The id of the plan associated with the instance.

operation string

The value provided in Operation.

Returns

Task<IActionResult>

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 string

The id of instance to provision.

request ServiceInstanceProvisionRequest

Parameters for the requested Service Instance provision

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>

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 string

The instance id of instance to update

request ServiceInstanceUpdateRequest

Parameters for the requested Service Instance update

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>