Show / Hide Table of Contents

Class EndpointBuilder

EndpointBuilder provides a wrapper to construct the appropriate endpoint for a service. The service may override the endpoint template, but if not, a default template will be used.

Inheritance
object
EndpointBuilder
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.Common.Internal
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class EndpointBuilder

Fields

DEFAULT_ENDPOINT_TEMPLATE

Declaration
public static readonly string DEFAULT_ENDPOINT_TEMPLATE
Field Value
Type Description
string

DOTTED_REGION_ENDPOINT_TEMPLATE

Declaration
public static readonly string DOTTED_REGION_ENDPOINT_TEMPLATE
Field Value
Type Description
string

logger

Declaration
protected static Logger logger
Field Value
Type Description
Logger

Methods

BuildEndpoint(string, Service, string)

Builds the service endpoint using EndpointServiceName if available, otherwise extrapolating the service name from the ServiceEndpointTemplate.

Declaration
public static string BuildEndpoint(string template, Service service, string region)
Parameters
Type Name Description
string template

The endpoint template, i.e https://{service}.{region}

Service service

The service object with EndpointServiceName or ServiceEndpointTemplate fields.

string region

The region with a dot.

Returns
Type Description
string

The endpoint for this service.

BuildEndpoint(string, string, string, Realm)

Builds the service endpoint

Declaration
public static string BuildEndpoint(string template, string regionId, string endpointPrefix, Realm realm)
Parameters
Type Name Description
string template

The endpoint template.

string regionId

The region id.

string endpointPrefix

The endpoint prefix.

Realm realm

The Realm to use.

Returns
Type Description
string

The endpoint (protocol + FQDN) for this service.

CreateEndpoint(Service, Region)

Creates the service endpoint from region.

Declaration
public static string CreateEndpoint(Service service, Region region)
Parameters
Type Name Description
Service service

The service.

Region region

The region id.

Returns
Type Description
string

The endpoint (protocol + FQDN) for this service.

CreateEndpoint(Service, string, Realm)

Creates the service endpoint

Declaration
public static string CreateEndpoint(Service service, string regionId, Realm realm)
Parameters
Type Name Description
Service service

The service.

string regionId

The region id.

Realm realm
Returns
Type Description
string

The endpoint (protocol + FQDN) for this service.

GetRealmSpecificEndpointTemplate(Service, string, Realm)

Declaration
public static string GetRealmSpecificEndpointTemplate(Service service, string regionId, Realm realm)
Parameters
Type Name Description
Service service
string regionId
Realm realm
Returns
Type Description
string

GetServiceEndpointTemplateToUse(Service, string, Realm)

Declaration
public static string GetServiceEndpointTemplateToUse(Service service, string regionId, Realm realm)
Parameters
Type Name Description
Service service
string regionId
Realm realm
Returns
Type Description
string
In this article
Back to top