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 SummaryNested Classes Modifier and Type Class Description static classBastionClient.BuilderBuilder class for this client.
 - 
Field SummaryFields Modifier and Type Field Description StringclientCommonLibraryVersionCompatible SDK version, provided by the codegen.Optional<String>minimumClientCommonLibraryVersionFromClientMinimum compatible SDK version, maybe provided by the codegen.static ServiceSERVICEService instance for Bastion.
 - 
Constructor SummaryConstructors Constructor Description BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)Deprecated.Use thebuilderinstead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)Deprecated.Use thebuilderinstead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)Deprecated.Use thebuilderinstead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)Deprecated.Use thebuilderinstead.BastionClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, ExecutorService executorService)Deprecated.Use thebuilderinstead.BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)Deprecated.Use thebuilderinstead.BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)Deprecated.Use thebuilderinstead.BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)Deprecated.Use thebuilderinstead.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BastionClient.Builderbuilder()Create a builder for this client.ChangeBastionCompartmentResponsechangeBastionCompartment(ChangeBastionCompartmentRequest request)Moves a bastion into a different compartment.voidclose()CreateBastionResponsecreateBastion(CreateBastionRequest request)Creates a new bastion.CreateSessionResponsecreateSession(CreateSessionRequest request)Creates a new session in a bastion.DeleteBastionResponsedeleteBastion(DeleteBastionRequest request)Deletes a bastion identified by the bastion ID.DeleteSessionResponsedeleteSession(DeleteSessionRequest request)Deletes a session identified by the session ID.GetBastionResponsegetBastion(GetBastionRequest request)Retrieves a bastion identified by the bastion ID.StringgetClientCommonLibraryVersion()protected ClientConfiguratorgetDefaultConfigurator()StringgetEndpoint()Optional<String>getMinimumClientCommonLibraryVersionFromClient()BastionPaginatorsgetPaginators()Gets the pre-configured paginators available for list operations in this service which may return multiple pages of data.GetSessionResponsegetSession(GetSessionRequest request)Retrieves a session identified by the session ID.BastionWaitersgetWaiters()Gets the pre-configured waiters available for resources for this service.GetWorkRequestResponsegetWorkRequest(GetWorkRequestRequest request)Gets the status of the work request with the given ID.ListBastionsResponselistBastions(ListBastionsRequest request)Retrieves a list of BastionSummary objects in a compartment.ListSessionsResponselistSessions(ListSessionsRequest request)Retrieves a list of SessionSummary objects for an existing bastion.ListWorkRequestErrorsResponselistWorkRequestErrors(ListWorkRequestErrorsRequest request)Return a (paginated) list of errors for a given work request.ListWorkRequestLogsResponselistWorkRequestLogs(ListWorkRequestLogsRequest request)Return a (paginated) list of logs for a given work request.ListWorkRequestsResponselistWorkRequests(ListWorkRequestsRequest request)Lists the work requests in a compartment.voidpopulateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)Populate the parameters in the endpoint with its corresponding value and update the base endpoint.voidrefreshClient()Rebuild the backingHttpClient.voidsetEndpoint(String endpoint)voidsetRegion(Region region)Sets the region to call (ex, Region.US_PHOENIX_1).voidsetRegion(String regionId)Sets the region to call (ex, ‘us-phoenix-1’).voidupdateBaseEndpoint(String endpoint)This method should be used for parameterized endpoint templates only.UpdateBastionResponseupdateBastion(UpdateBastionRequest request)Updates the bastion identified by the bastion ID.UpdateSessionResponseupdateSession(UpdateSessionRequest request)Updates the session identified by the session ID.voiduseRealmSpecificEndpointTemplate(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.BaseSyncClientclientCall
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.AutoCloseableclose
 - 
Methods inherited from interface com.oracle.bmc.bastion.BastiongetEndpoint, refreshClient, setEndpoint, useRealmSpecificEndpointTemplate
 
- 
 
- 
- 
- 
Constructor Detail- 
BastionClient@Deprecated public BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider) Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))
 
 - 
BastionClient@Deprecated public BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration) Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))
- configuration-- ClientBuilderBase.configuration
 
 - 
BastionClient@Deprecated public BastionClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator) Deprecated.Use thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.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 thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.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 thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.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 thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.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 thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.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 thebuilderinstead.Create a new client instance.- Parameters:
- authenticationDetailsProvider- The authentication details (see- BastionClient.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- 
builderpublic static BastionClient.Builder builder() Create a builder for this client.- Returns:
- builder
 
 - 
setRegionpublic void setRegion(Region region) Description copied from interface:BastionSets the region to call (ex, Region.US_PHOENIX_1).Note, this will call setEndpointafter resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised.
 - 
setRegionpublic void setRegion(String regionId) Description copied from interface:BastionSets 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.
 - 
changeBastionCompartmentpublic ChangeBastionCompartmentResponse changeBastionCompartment(ChangeBastionCompartmentRequest request) Description copied from interface:BastionMoves a bastion into a different compartment.- Specified by:
- changeBastionCompartmentin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
createBastionpublic CreateBastionResponse createBastion(CreateBastionRequest request) Description copied from interface:BastionCreates 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:
- createBastionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
createSessionpublic CreateSessionResponse createSession(CreateSessionRequest request) Description copied from interface:BastionCreates 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:
- createSessionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
deleteBastionpublic DeleteBastionResponse deleteBastion(DeleteBastionRequest request) Description copied from interface:BastionDeletes a bastion identified by the bastion ID.- Specified by:
- deleteBastionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
deleteSessionpublic DeleteSessionResponse deleteSession(DeleteSessionRequest request) Description copied from interface:BastionDeletes a session identified by the session ID.- Specified by:
- deleteSessionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
getBastionpublic GetBastionResponse getBastion(GetBastionRequest request) Description copied from interface:BastionRetrieves 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:
- getBastionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
getSessionpublic GetSessionResponse getSession(GetSessionRequest request) Description copied from interface:BastionRetrieves 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:
- getSessionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
getWorkRequestpublic GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) Description copied from interface:BastionGets the status of the work request with the given ID.- Specified by:
- getWorkRequestin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
listBastionspublic ListBastionsResponse listBastions(ListBastionsRequest request) Description copied from interface:BastionRetrieves 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:
- listBastionsin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
listSessionspublic ListSessionsResponse listSessions(ListSessionsRequest request) Description copied from interface:BastionRetrieves 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:
- listSessionsin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
listWorkRequestErrorspublic ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request) Description copied from interface:BastionReturn a (paginated) list of errors for a given work request.- Specified by:
- listWorkRequestErrorsin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
listWorkRequestLogspublic ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) Description copied from interface:BastionReturn a (paginated) list of logs for a given work request.- Specified by:
- listWorkRequestLogsin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
listWorkRequestspublic ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) Description copied from interface:BastionLists the work requests in a compartment.- Specified by:
- listWorkRequestsin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
updateBastionpublic UpdateBastionResponse updateBastion(UpdateBastionRequest request) Description copied from interface:BastionUpdates 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:
- updateBastionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
updateSessionpublic UpdateSessionResponse updateSession(UpdateSessionRequest request) Description copied from interface:BastionUpdates 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:
- updateSessionin interface- Bastion
- Parameters:
- request- The request object containing the details to send
- Returns:
- A response object containing details about the completed operation
 
 - 
getWaiterspublic BastionWaiters getWaiters() Description copied from interface:BastionGets the pre-configured waiters available for resources for this service.- Specified by:
- getWaitersin interface- Bastion
- Returns:
- The service waiters.
 
 - 
getPaginatorspublic BastionPaginators getPaginators() Description copied from interface:BastionGets the pre-configured paginators available for list operations in this service which may return multiple pages of data.These paginators provide an Iterableinterface so that service responses, or resources/records, can be iterated through without having to manually deal with pagination and page tokens.- Specified by:
- getPaginatorsin interface- Bastion
- Returns:
- The service paginators.
 
 - 
getDefaultConfiguratorprotected ClientConfigurator getDefaultConfigurator() 
 - 
useRealmSpecificEndpointTemplatepublic 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
 
 - 
populateServiceParametersInEndpointpublic 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 use
- requiredParametersMap- Map of parameter name as key and value set in request path or query parameter as value
 
 - 
updateBaseEndpointpublic 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
 
 - 
setEndpointpublic final void setEndpoint(String endpoint) 
 - 
getEndpointpublic final String getEndpoint() 
 - 
refreshClientpublic final void refreshClient() Rebuild the backingHttpClient.This will call ClientConfigurators again, and can be used to e.g. refresh the SSL certificate.
 - 
closepublic final void close() - Specified by:
- closein interface- AutoCloseable
 
 - 
getClientCommonLibraryVersionpublic String getClientCommonLibraryVersion() 
 
- 
 
-