Class ContainerInstanceClient
Service client instance for ContainerInstance.
Implements
Inherited Members
Namespace: Oci.ContainerinstancesService
Assembly: OCI.DotNetSDK.Containerinstances.dll
Syntax
public class ContainerInstanceClient : RegionalClientBase, IDisposable
Constructors
ContainerInstanceClient(IBasicAuthenticationDetailsProvider, ClientConfiguration, string)
Creates a new service instance using the given authentication provider and/or client configuration and/or endpoint. A client configuration can also be provided optionally to adjust REST client behaviors.
Declaration
public ContainerInstanceClient(IBasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration clientConfiguration = null, string endpoint = null)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authenticationDetailsProvider | The authentication details provider. Required. |
ClientConfiguration | clientConfiguration | The client configuration that contains settings to adjust REST client behaviors. Optional. |
string | endpoint | The endpoint of the service. If not provided and the client is a regional client, the endpoint will be constructed based on region information. Optional. |
Properties
Paginators
Declaration
public ContainerInstancePaginators Paginators { get; }
Property Value
Type | Description |
---|---|
ContainerInstancePaginators |
Waiters
Declaration
public ContainerInstanceWaiters Waiters { get; }
Property Value
Type | Description |
---|---|
ContainerInstanceWaiters |
Methods
ChangeContainerInstanceCompartment(ChangeContainerInstanceCompartmentRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Moves a container instance resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
Declaration
public Task<ChangeContainerInstanceCompartmentResponse> ChangeContainerInstanceCompartment(ChangeContainerInstanceCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ChangeContainerInstanceCompartmentRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ChangeContainerInstanceCompartmentResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ChangeContainerInstanceCompartment API.
CreateContainerInstance(CreateContainerInstanceRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Creates a container instance and deploys the containers on it.
Declaration
public Task<CreateContainerInstanceResponse> CreateContainerInstance(CreateContainerInstanceRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
CreateContainerInstanceRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<CreateContainerInstanceResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use CreateContainerInstance API.
DeleteContainerInstance(DeleteContainerInstanceRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Deletes a container instance and its containers.
Declaration
public Task<DeleteContainerInstanceResponse> DeleteContainerInstance(DeleteContainerInstanceRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
DeleteContainerInstanceRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<DeleteContainerInstanceResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use DeleteContainerInstance API.
GetContainer(GetContainerRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Get details about a single container by the container ID.
Declaration
public Task<GetContainerResponse> GetContainer(GetContainerRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetContainerRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetContainerResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetContainer API.
GetContainerInstance(GetContainerInstanceRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets information about the specified container instance.
Declaration
public Task<GetContainerInstanceResponse> GetContainerInstance(GetContainerInstanceRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetContainerInstanceRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetContainerInstanceResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetContainerInstance API.
GetWorkRequest(GetWorkRequestRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets the status of the work request with the given ID.
Declaration
public Task<GetWorkRequestResponse> GetWorkRequest(GetWorkRequestRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetWorkRequestRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetWorkRequestResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetWorkRequest API.
ListContainerInstanceShapes(ListContainerInstanceShapesRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the shapes that can be used to create container instances.
Declaration
public Task<ListContainerInstanceShapesResponse> ListContainerInstanceShapes(ListContainerInstanceShapesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListContainerInstanceShapesRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListContainerInstanceShapesResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListContainerInstanceShapes API.
ListContainerInstances(ListContainerInstancesRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Returns a list of container instances.
Declaration
public Task<ListContainerInstancesResponse> ListContainerInstances(ListContainerInstancesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListContainerInstancesRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListContainerInstancesResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListContainerInstances API.
ListContainers(ListContainersRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Returns a list of containers in a compartment.
Declaration
public Task<ListContainersResponse> ListContainers(ListContainersRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListContainersRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListContainersResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListContainers API.
ListWorkRequestErrors(ListWorkRequestErrorsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Returns a paginated list of errors for a work request.
Declaration
public Task<ListWorkRequestErrorsResponse> ListWorkRequestErrors(ListWorkRequestErrorsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListWorkRequestErrorsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListWorkRequestErrorsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListWorkRequestErrors API.
ListWorkRequestLogs(ListWorkRequestLogsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Returns a paginated list of logs for a work request.
Declaration
public Task<ListWorkRequestLogsResponse> ListWorkRequestLogs(ListWorkRequestLogsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListWorkRequestLogsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListWorkRequestLogsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListWorkRequestLogs API.
ListWorkRequests(ListWorkRequestsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the work requests in a compartment.
Declaration
public Task<ListWorkRequestsResponse> ListWorkRequests(ListWorkRequestsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListWorkRequestsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListWorkRequestsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListWorkRequests API.
RestartContainerInstance(RestartContainerInstanceRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Restarts a container instance. When provided, If-Match is checked against ETag values of the container instance.
Declaration
public Task<RestartContainerInstanceResponse> RestartContainerInstance(RestartContainerInstanceRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
RestartContainerInstanceRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<RestartContainerInstanceResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use RestartContainerInstance API.
RetrieveLogs(RetrieveLogsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Returns the most recent 256 KB of logs from the specified container.
Declaration
public Task<RetrieveLogsResponse> RetrieveLogs(RetrieveLogsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
RetrieveLogsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<RetrieveLogsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use RetrieveLogs API.
StartContainerInstance(StartContainerInstanceRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Starts a container instance if it is "inactive". No effect otherwise. When provided, If-Match is checked against ETag values of the container instance.
Declaration
public Task<StartContainerInstanceResponse> StartContainerInstance(StartContainerInstanceRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
StartContainerInstanceRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<StartContainerInstanceResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use StartContainerInstance API.
StopContainerInstance(StopContainerInstanceRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Stops a container instance if it is "active". No effect otherwise. When provided, If-Match is checked against ETag values of the container instance.
Declaration
public Task<StopContainerInstanceResponse> StopContainerInstance(StopContainerInstanceRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
StopContainerInstanceRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<StopContainerInstanceResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use StopContainerInstance API.
UpdateContainer(UpdateContainerRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Updates a container.
Declaration
public Task<UpdateContainerResponse> UpdateContainer(UpdateContainerRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateContainerRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateContainerResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateContainer API.
UpdateContainerInstance(UpdateContainerInstanceRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Updates a container instance.
Declaration
public Task<UpdateContainerInstanceResponse> UpdateContainerInstance(UpdateContainerInstanceRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateContainerInstanceRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateContainerInstanceResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateContainerInstance API.