Class BastionClient
- java.lang.Object
-
- com.oracle.bmc.http.internal.BaseSyncClient
-
- com.oracle.bmc.bastion.BastionClient
-
- All Implemented Interfaces:
Bastion
,AutoCloseable
@Generated(value="OracleSDKGenerator", comments="API Version: 20210331") public class BastionClient extends BaseSyncClient implements Bastion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BastionClient.Builder
Builder class for this client.
-
Field Summary
Fields Modifier and Type Field Description String
clientCommonLibraryVersion
Compatible SDK version, provided by the codegen.Optional<String>
minimumClientCommonLibraryVersionFromClient
Minimum compatible SDK version, maybe provided by the codegen.static Service
SERVICE
Service instance for Bastion.
-
Constructor Summary
Constructors Constructor Description BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Deprecated.Use thebuilder
instead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Deprecated.Use thebuilder
instead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, ExecutorService executorService)
Deprecated.Use thebuilder
instead.BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.Use thebuilder
instead.BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Deprecated.Use thebuilder
instead.BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Deprecated.Use thebuilder
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BastionClient.Builder
builder()
Create a builder for this client.ChangeBastionCompartmentResponse
changeBastionCompartment(ChangeBastionCompartmentRequest request)
Moves a bastion into a different compartment.void
close()
CreateBastionResponse
createBastion(CreateBastionRequest request)
Creates a new bastion.CreateSessionResponse
createSession(CreateSessionRequest request)
Creates a new session in a bastion.DeleteBastionResponse
deleteBastion(DeleteBastionRequest request)
Deletes a bastion identified by the bastion ID.DeleteSessionResponse
deleteSession(DeleteSessionRequest request)
Deletes a session identified by the session ID.GetBastionResponse
getBastion(GetBastionRequest request)
Retrieves a bastion identified by the bastion ID.String
getClientCommonLibraryVersion()
protected ClientConfigurator
getDefaultConfigurator()
String
getEndpoint()
Optional<String>
getMinimumClientCommonLibraryVersionFromClient()
BastionPaginators
getPaginators()
Gets the pre-configured paginators available for list operations in this service which may return multiple pages of data.GetSessionResponse
getSession(GetSessionRequest request)
Retrieves a session identified by the session ID.BastionWaiters
getWaiters()
Gets the pre-configured waiters available for resources for this service.GetWorkRequestResponse
getWorkRequest(GetWorkRequestRequest request)
Gets the status of the work request with the given ID.ListBastionsResponse
listBastions(ListBastionsRequest request)
Retrieves a list of BastionSummary objects in a compartment.ListSessionsResponse
listSessions(ListSessionsRequest request)
Retrieves a list of SessionSummary objects for an existing bastion.ListWorkRequestErrorsResponse
listWorkRequestErrors(ListWorkRequestErrorsRequest request)
Return a (paginated) list of errors for a given work request.ListWorkRequestLogsResponse
listWorkRequestLogs(ListWorkRequestLogsRequest request)
Return a (paginated) list of logs for a given work request.ListWorkRequestsResponse
listWorkRequests(ListWorkRequestsRequest request)
Lists the work requests in a compartment.void
populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
Populate the parameters in the endpoint with its corresponding value and update the base endpoint.void
refreshClient()
Rebuild the backingHttpClient
.void
setEndpoint(String endpoint)
void
setRegion(Region region)
Sets the region to call (ex, Region.US_PHOENIX_1).void
setRegion(String regionId)
Sets the region to call (ex, ‘us-phoenix-1’).void
updateBaseEndpoint(String endpoint)
This method should be used for parameterized endpoint templates only.UpdateBastionResponse
updateBastion(UpdateBastionRequest request)
Updates the bastion identified by the bastion ID.UpdateSessionResponse
updateSession(UpdateSessionRequest request)
Updates the session identified by the session ID.void
useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template.-
Methods inherited from class com.oracle.bmc.http.internal.BaseSyncClient
clientCall
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface com.oracle.bmc.bastion.Bastion
getEndpoint, refreshClient, setEndpoint, useRealmSpecificEndpointTemplate
-
-
-
-
Constructor Detail
-
BastionClient
@Deprecated public BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)
-
BastionClient
@Deprecated public BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
-
BastionClient
@Deprecated public BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
-
BastionClient
@Deprecated public BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
-
BastionClient
@Deprecated public BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
-
BastionClient
@Deprecated public BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
-
BastionClient
@Deprecated public BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
signingStrategyRequestSignerFactories
-ClientBuilderBase.signingStrategyRequestSignerFactories
-
BastionClient
@Deprecated public BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, ExecutorService executorService)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
signingStrategyRequestSignerFactories
-ClientBuilderBase.signingStrategyRequestSignerFactories
executorService
-BastionClient.Builder.executorService
-
-
Method Detail
-
builder
public static BastionClient.Builder builder()
Create a builder for this client.- Returns:
- builder
-
setRegion
public void setRegion(Region region)
Description copied from interface:Bastion
Sets the region to call (ex, Region.US_PHOENIX_1).Note, this will call
setEndpoint
after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised.
-
setRegion
public void setRegion(String regionId)
Description copied from interface:Bastion
Sets the region to call (ex, ‘us-phoenix-1’).Note, this will first try to map the region ID to a known Region and call
setRegion
.If no known Region could be determined, it will create an endpoint based on the default endpoint format (
Region.formatDefaultRegionEndpoint(Service, String)
and then callsetEndpoint
.
-
changeBastionCompartment
public ChangeBastionCompartmentResponse changeBastionCompartment(ChangeBastionCompartmentRequest request)
Description copied from interface:Bastion
Moves a bastion into a different compartment.- Specified by:
changeBastionCompartment
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
createBastion
public CreateBastionResponse createBastion(CreateBastionRequest request)
Description copied from interface:Bastion
Creates a new bastion.A bastion provides secured, public access to target resources in the cloud that you cannot otherwise reach from the internet. A bastion resides in a public subnet and establishes the network infrastructure needed to connect a user to a target resource in a private subnet.
- Specified by:
createBastion
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
createSession
public CreateSessionResponse createSession(CreateSessionRequest request)
Description copied from interface:Bastion
Creates a new session in a bastion.A bastion session lets authorized users connect to a target resource for a predetermined amount of time. The Bastion service recognizes two types of sessions, managed SSH sessions and SSH port forwarding sessions. Managed SSH sessions require that the target resource has an OpenSSH server and the Oracle Cloud Agent both running.
- Specified by:
createSession
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
deleteBastion
public DeleteBastionResponse deleteBastion(DeleteBastionRequest request)
Description copied from interface:Bastion
Deletes a bastion identified by the bastion ID.- Specified by:
deleteBastion
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
deleteSession
public DeleteSessionResponse deleteSession(DeleteSessionRequest request)
Description copied from interface:Bastion
Deletes a session identified by the session ID.- Specified by:
deleteSession
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getBastion
public GetBastionResponse getBastion(GetBastionRequest request)
Description copied from interface:Bastion
Retrieves a bastion identified by the bastion ID.A bastion provides secured, public access to target resources in the cloud that you cannot otherwise reach from the internet.
- Specified by:
getBastion
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getSession
public GetSessionResponse getSession(GetSessionRequest request)
Description copied from interface:Bastion
Retrieves a session identified by the session ID.A bastion session lets authorized users connect to a target resource for a predetermined amount of time.
- Specified by:
getSession
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getWorkRequest
public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request)
Description copied from interface:Bastion
Gets the status of the work request with the given ID.- Specified by:
getWorkRequest
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listBastions
public ListBastionsResponse listBastions(ListBastionsRequest request)
Description copied from interface:Bastion
Retrieves a list of BastionSummary objects in a compartment.Bastions provide secured, public access to target resources in the cloud that you cannot otherwise reach from the internet.
- Specified by:
listBastions
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listSessions
public ListSessionsResponse listSessions(ListSessionsRequest request)
Description copied from interface:Bastion
Retrieves a list of SessionSummary objects for an existing bastion.Bastion sessions let authorized users connect to a target resource for a predetermined amount of time.
- Specified by:
listSessions
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listWorkRequestErrors
public ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request)
Description copied from interface:Bastion
Return a (paginated) list of errors for a given work request.- Specified by:
listWorkRequestErrors
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listWorkRequestLogs
public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request)
Description copied from interface:Bastion
Return a (paginated) list of logs for a given work request.- Specified by:
listWorkRequestLogs
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listWorkRequests
public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request)
Description copied from interface:Bastion
Lists the work requests in a compartment.- Specified by:
listWorkRequests
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
updateBastion
public UpdateBastionResponse updateBastion(UpdateBastionRequest request)
Description copied from interface:Bastion
Updates the bastion identified by the bastion ID.A bastion provides secured, public access to target resources in the cloud that you cannot otherwise reach from the internet.
- Specified by:
updateBastion
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
updateSession
public UpdateSessionResponse updateSession(UpdateSessionRequest request)
Description copied from interface:Bastion
Updates the session identified by the session ID.A bastion session lets authorized users connect to a target resource for a predetermined amount of time.
- Specified by:
updateSession
in interfaceBastion
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getWaiters
public BastionWaiters getWaiters()
Description copied from interface:Bastion
Gets the pre-configured waiters available for resources for this service.- Specified by:
getWaiters
in interfaceBastion
- Returns:
- The service waiters.
-
getPaginators
public BastionPaginators getPaginators()
Description copied from interface:Bastion
Gets the pre-configured paginators available for list operations in this service which may return multiple pages of data.These paginators provide an
Iterable
interface so that service responses, or resources/records, can be iterated through without having to manually deal with pagination and page tokens.- Specified by:
getPaginators
in interfaceBastion
- Returns:
- The service paginators.
-
getDefaultConfigurator
protected ClientConfigurator getDefaultConfigurator()
-
useRealmSpecificEndpointTemplate
public void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template.The default value is null. To enable the use of endpoint template defined for the realm in use, set the flag to true To disable the use of endpoint template defined for the realm in use, set the flag to false
- Parameters:
useOfRealmSpecificEndpointTemplateEnabled
- This flag can be set to true or false to enable or disable the use of realm-specific endpoint template respectively
-
populateServiceParametersInEndpoint
public final void populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
Populate the parameters in the endpoint with its corresponding value and update the base endpoint.The value will be populated iff the parameter in endpoint is a required request path parameter or a required request query parameter. If not, the parameter in the endpoint will be ignored and left blank.
- Parameters:
endpoint
- The endpoint template in userequiredParametersMap
- Map of parameter name as key and value set in request path or query parameter as value
-
updateBaseEndpoint
public final void updateBaseEndpoint(String endpoint)
This method should be used for parameterized endpoint templates only.This does not include {region} and {secondLevelDomain} parameters.
- Parameters:
endpoint
- The updated endpoint to use
-
setEndpoint
public final void setEndpoint(String endpoint)
-
getEndpoint
public final String getEndpoint()
-
refreshClient
public final void refreshClient()
Rebuild the backingHttpClient
.This will call
ClientConfigurator
s again, and can be used to e.g. refresh the SSL certificate.
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
getClientCommonLibraryVersion
public String getClientCommonLibraryVersion()
-
-