Class OpenServiceBrokerClient
A type-safe client for the Open Service Broker API.
Implements
Namespace: OpenServiceBroker
Assembly: OpenServiceBroker.Client.dll
Syntax
public class OpenServiceBrokerClient : EntryEndpoint, IOpenServiceBrokerClient
Constructors
OpenServiceBrokerClient(HttpClient, Uri)
Creates a new Open Service Broker Client using a custom HttpClient. This is usually used for custom authentication schemes, e.g. client certificates.
Declaration
public OpenServiceBrokerClient(HttpClient httpClient, Uri uri)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient | The HttpClient to use for communication with My Service. |
Uri | uri | The base URI of the Open Service Broker API instance (without the version number). |
OpenServiceBrokerClient(Uri, NetworkCredential)
Creates a new Open Service Broker Client.
Declaration
public OpenServiceBrokerClient(Uri uri, NetworkCredential credentials = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The base URI of the Open Service Broker API instance (without the version number). |
NetworkCredential | credentials | Optional HTTP Basic Auth credentials used to authenticate against the REST interface. |
OpenServiceBrokerClient(Uri, String)
Creates a new Open Service Broker Client.
Declaration
public OpenServiceBrokerClient(Uri uri, string token)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The base URI of the Open Service Broker API instance (without the version number). |
String | token | The OAuth token to present as a "Bearer" to the REST interface. |
Properties
Catalog
Exposes a list of all services available on the Service Broker.
Declaration
public IElementEndpoint<Catalog> Catalog { get; }
Property Value
Type | Description |
---|---|
IElementEndpoint<Catalog> |
DefaultApiVersion
The default Open Service Broker API version to set for requests.
Declaration
public static ApiVersion DefaultApiVersion { get; }
Property Value
Type | Description |
---|---|
ApiVersion |
ServiceInstancesBlocking
Exposes Service Instances with blocking operations. If the Service Broker can only handle a request deferred (asynchronously) AsyncRequiredException is thrown.
Declaration
public IIndexerEndpoint<IServiceInstanceEndpoint> ServiceInstancesBlocking { get; }
Property Value
Type | Description |
---|---|
IIndexerEndpoint<IServiceInstanceEndpoint> |
ServiceInstancesDeferred
Exposes Service Instances with potentially deferred (asynchronous) operations.
Declaration
public IIndexerEndpoint<IServiceInstanceDeferredEndpoint> ServiceInstancesDeferred { get; }
Property Value
Type | Description |
---|---|
IIndexerEndpoint<IServiceInstanceDeferredEndpoint> |
ServiceInstancesPolling
Exposes Service Instances. Uses potentially deferred (asynchronous) operations and automatically handles polling to make them appear blocking.
Declaration
public IIndexerEndpoint<IServiceInstanceEndpoint> ServiceInstancesPolling { get; }
Property Value
Type | Description |
---|---|
IIndexerEndpoint<IServiceInstanceEndpoint> |
Methods
SetApiVersion(ApiVersion)
Sets the Open Service Broker API version to a custom value. Only use this if you know what you are doing!
Declaration
public void SetApiVersion(ApiVersion version)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | version |
SetOriginatingIdentity(OriginatingIdentity)
Sets the identity of the user that initiated the request from the Platform.
Declaration
public void SetOriginatingIdentity(OriginatingIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
OriginatingIdentity | identity |