@Generated(value="OracleSDKGenerator", comments="API Version: 20210331") public interface BastionAsync extends AutoCloseable
Use the Bastion API to provide restricted and time-limited access to target resources that don’t have public endpoints. Bastions let authorized users connect from specific IP addresses to target resources using Secure Shell (SSH) sessions. For more information, see the Bastion documentation.
close
void refreshClient()
Rebuilds the client from scratch. Useful to refresh certificates.
void setEndpoint(String endpoint)
Sets the endpoint to call (ex, https://www.example.com).
endpoint
- The endpoint of the serice.String getEndpoint()
Gets the set endpoint for REST call (ex, https://www.example.com)
void setRegion(Region region)
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.
region
- The region of the service.void setRegion(String regionId)
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 call setEndpoint
.
regionId
- The public region ID.void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled)
Determines whether realm specific endpoint should be used or not. Set realmSpecificEndpointTemplateEnabled to “true” if the user wants to enable use of realm specific endpoint template, otherwise set it to “false”
realmSpecificEndpointTemplateEnabled
- flag to enable the use of realm specific endpoint
templateFuture<ChangeBastionCompartmentResponse> changeBastionCompartment(ChangeBastionCompartmentRequest request, AsyncHandler<ChangeBastionCompartmentRequest,ChangeBastionCompartmentResponse> handler)
Moves a bastion into a different compartment.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateBastionResponse> createBastion(CreateBastionRequest request, AsyncHandler<CreateBastionRequest,CreateBastionResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateSessionResponse> createSession(CreateSessionRequest request, AsyncHandler<CreateSessionRequest,CreateSessionResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteBastionResponse> deleteBastion(DeleteBastionRequest request, AsyncHandler<DeleteBastionRequest,DeleteBastionResponse> handler)
Deletes a bastion identified by the bastion ID.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteSessionResponse> deleteSession(DeleteSessionRequest request, AsyncHandler<DeleteSessionRequest,DeleteSessionResponse> handler)
Deletes a session identified by the session ID.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetBastionResponse> getBastion(GetBastionRequest request, AsyncHandler<GetBastionRequest,GetBastionResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetSessionResponse> getSession(GetSessionRequest request, AsyncHandler<GetSessionRequest,GetSessionResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetWorkRequestResponse> getWorkRequest(GetWorkRequestRequest request, AsyncHandler<GetWorkRequestRequest,GetWorkRequestResponse> handler)
Gets the status of the work request with the given ID.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListBastionsResponse> listBastions(ListBastionsRequest request, AsyncHandler<ListBastionsRequest,ListBastionsResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListSessionsResponse> listSessions(ListSessionsRequest request, AsyncHandler<ListSessionsRequest,ListSessionsResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestErrorsResponse> listWorkRequestErrors(ListWorkRequestErrorsRequest request, AsyncHandler<ListWorkRequestErrorsRequest,ListWorkRequestErrorsResponse> handler)
Return a (paginated) list of errors for a given work request.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestLogsResponse> listWorkRequestLogs(ListWorkRequestLogsRequest request, AsyncHandler<ListWorkRequestLogsRequest,ListWorkRequestLogsResponse> handler)
Return a (paginated) list of logs for a given work request.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestsResponse> listWorkRequests(ListWorkRequestsRequest request, AsyncHandler<ListWorkRequestsRequest,ListWorkRequestsResponse> handler)
Lists the work requests in a compartment.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateBastionResponse> updateBastion(UpdateBastionRequest request, AsyncHandler<UpdateBastionRequest,UpdateBastionResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateSessionResponse> updateSession(UpdateSessionRequest request, AsyncHandler<UpdateSessionRequest,UpdateSessionResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Copyright © 2016–2024. All rights reserved.