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 classBastionClient.BuilderBuilder class for this client.
-
Field Summary
Fields 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 Summary
Constructors 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 Summary
All 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.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 thebuilderinstead.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 thebuilderinstead.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 thebuilderinstead.Create a new client instance.- Parameters:
authenticationDetailsProvider- The authentication details (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))configuration-ClientBuilderBase.configurationclientConfigurator-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 (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))configuration-ClientBuilderBase.configurationclientConfigurator-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 (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))configuration-ClientBuilderBase.configurationclientConfigurator-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)defaultRequestSignerFactory-ClientBuilderBase.requestSignerFactoryadditionalClientConfigurators-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 (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))configuration-ClientBuilderBase.configurationclientConfigurator-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)defaultRequestSignerFactory-ClientBuilderBase.requestSignerFactoryadditionalClientConfigurators-ClientBuilderBase.additionalClientConfiguratorsendpoint-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 (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))configuration-ClientBuilderBase.configurationclientConfigurator-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)defaultRequestSignerFactory-ClientBuilderBase.requestSignerFactoryadditionalClientConfigurators-ClientBuilderBase.additionalClientConfiguratorsendpoint-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 (seeBastionClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider))configuration-ClientBuilderBase.configurationclientConfigurator-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)defaultRequestSignerFactory-ClientBuilderBase.requestSignerFactoryadditionalClientConfigurators-ClientBuilderBase.additionalClientConfiguratorsendpoint-ClientBuilderBase.endpoint(java.lang.String)signingStrategyRequestSignerFactories-ClientBuilderBase.signingStrategyRequestSignerFactoriesexecutorService-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: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.
-
setRegion
public 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.
-
changeBastionCompartment
public ChangeBastionCompartmentResponse changeBastionCompartment(ChangeBastionCompartmentRequest request)
Description copied from interface:BastionMoves a bastion into a different compartment.- Specified by:
changeBastionCompartmentin 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: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 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: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 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:BastionDeletes a bastion identified by the bastion ID.- Specified by:
deleteBastionin 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:BastionDeletes a session identified by the session ID.- Specified by:
deleteSessionin 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: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 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: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 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:BastionGets the status of the work request with the given ID.- Specified by:
getWorkRequestin 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: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 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: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 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:BastionReturn a (paginated) list of errors for a given work request.- Specified by:
listWorkRequestErrorsin 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:BastionReturn a (paginated) list of logs for a given work request.- Specified by:
listWorkRequestLogsin 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:BastionLists the work requests in a compartment.- Specified by:
listWorkRequestsin 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: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 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: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 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:BastionGets the pre-configured waiters available for resources for this service.- Specified by:
getWaitersin interfaceBastion- Returns:
- The service waiters.
-
getPaginators
public 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 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
ClientConfigurators again, and can be used to e.g. refresh the SSL certificate.
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable
-
getClientCommonLibraryVersion
public String getClientCommonLibraryVersion()
-
-