# pcluster-client ParallelCluster API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.8.0 - Package version: 1.0.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. Python >=3.6 ## Installation & Usage ### pip install If the python package is hosted on a repository, you can install directly using: ```sh pip install git+https://github.com/aws/aws-parallelcluster.git#subdirectory=api/client/src ``` (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) Then import the package: ```python import pcluster_client ``` ### Setuptools Install via [Setuptools](http://pypi.python.org/pypi/setuptools). ```sh python setup.py install --user ``` (or `sudo python setup.py install` to install the package for all users) Then import the package: ```python import pcluster_client ``` ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: ```python import time import pcluster_client from pprint import pprint from pcluster_client.api import cluster_compute_fleet_api from pcluster_client.model.bad_request_exception_response_content import BadRequestExceptionResponseContent from pcluster_client.model.describe_compute_fleet_response_content import DescribeComputeFleetResponseContent from pcluster_client.model.internal_service_exception_response_content import InternalServiceExceptionResponseContent from pcluster_client.model.limit_exceeded_exception_response_content import LimitExceededExceptionResponseContent from pcluster_client.model.not_found_exception_response_content import NotFoundExceptionResponseContent from pcluster_client.model.unauthorized_client_error_response_content import UnauthorizedClientErrorResponseContent from pcluster_client.model.update_compute_fleet_request_content import UpdateComputeFleetRequestContent from pcluster_client.model.update_compute_fleet_response_content import UpdateComputeFleetResponseContent # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = pcluster_client.Configuration(host = "http://localhost") # Set the base URL of the ParallelCluster API # The client needs to authenticate with the ParallelCluster API server using SigV4. # Please ensure that your `AWS_SECRET_ACCESS_KEY` and `AWS_ACCESS_KEY_ID` # are set appropriately for the client to authenticate using SigV4. # Enter a context with an instance of the API client with pcluster_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cluster_compute_fleet_api.ClusterComputeFleetApi(api_client) cluster_name = "mycluster" # str | Name of the cluster region = "region_example" # str | AWS Region that the operation corresponds to. (optional) try: api_response = api_instance.describe_compute_fleet(cluster_name, region=region) pprint(api_response) except pcluster_client.ApiException as e: print("Exception when calling ClusterComputeFleetApi->describe_compute_fleet: %s\n" % e) ``` ## Documentation for API Endpoints All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *ClusterComputeFleetApi* | [**describe_compute_fleet**](docs/ClusterComputeFleetApi.md#describe_compute_fleet) | **GET** /v3/clusters/{clusterName}/computefleet | *ClusterComputeFleetApi* | [**update_compute_fleet**](docs/ClusterComputeFleetApi.md#update_compute_fleet) | **PATCH** /v3/clusters/{clusterName}/computefleet | *ClusterInstancesApi* | [**delete_cluster_instances**](docs/ClusterInstancesApi.md#delete_cluster_instances) | **DELETE** /v3/clusters/{clusterName}/instances | *ClusterInstancesApi* | [**describe_cluster_instances**](docs/ClusterInstancesApi.md#describe_cluster_instances) | **GET** /v3/clusters/{clusterName}/instances | *ClusterLogsApi* | [**get_cluster_log_events**](docs/ClusterLogsApi.md#get_cluster_log_events) | **GET** /v3/clusters/{clusterName}/logstreams/{logStreamName} | *ClusterLogsApi* | [**get_cluster_stack_events**](docs/ClusterLogsApi.md#get_cluster_stack_events) | **GET** /v3/clusters/{clusterName}/stackevents | *ClusterLogsApi* | [**list_cluster_log_streams**](docs/ClusterLogsApi.md#list_cluster_log_streams) | **GET** /v3/clusters/{clusterName}/logstreams | *ClusterOperationsApi* | [**create_cluster**](docs/ClusterOperationsApi.md#create_cluster) | **POST** /v3/clusters | *ClusterOperationsApi* | [**delete_cluster**](docs/ClusterOperationsApi.md#delete_cluster) | **DELETE** /v3/clusters/{clusterName} | *ClusterOperationsApi* | [**describe_cluster**](docs/ClusterOperationsApi.md#describe_cluster) | **GET** /v3/clusters/{clusterName} | *ClusterOperationsApi* | [**list_clusters**](docs/ClusterOperationsApi.md#list_clusters) | **GET** /v3/clusters | *ClusterOperationsApi* | [**update_cluster**](docs/ClusterOperationsApi.md#update_cluster) | **PUT** /v3/clusters/{clusterName} | *ImageLogsApi* | [**get_image_log_events**](docs/ImageLogsApi.md#get_image_log_events) | **GET** /v3/images/custom/{imageId}/logstreams/{logStreamName} | *ImageLogsApi* | [**get_image_stack_events**](docs/ImageLogsApi.md#get_image_stack_events) | **GET** /v3/images/custom/{imageId}/stackevents | *ImageLogsApi* | [**list_image_log_streams**](docs/ImageLogsApi.md#list_image_log_streams) | **GET** /v3/images/custom/{imageId}/logstreams | *ImageOperationsApi* | [**build_image**](docs/ImageOperationsApi.md#build_image) | **POST** /v3/images/custom | *ImageOperationsApi* | [**delete_image**](docs/ImageOperationsApi.md#delete_image) | **DELETE** /v3/images/custom/{imageId} | *ImageOperationsApi* | [**describe_image**](docs/ImageOperationsApi.md#describe_image) | **GET** /v3/images/custom/{imageId} | *ImageOperationsApi* | [**list_images**](docs/ImageOperationsApi.md#list_images) | **GET** /v3/images/custom | *ImageOperationsApi* | [**list_official_images**](docs/ImageOperationsApi.md#list_official_images) | **GET** /v3/images/official | ## Documentation For Models - [AmiInfo](docs/AmiInfo.md) - [BadRequestExceptionResponseContent](docs/BadRequestExceptionResponseContent.md) - [BuildImageBadRequestExceptionResponseContent](docs/BuildImageBadRequestExceptionResponseContent.md) - [BuildImageRequestContent](docs/BuildImageRequestContent.md) - [BuildImageResponseContent](docs/BuildImageResponseContent.md) - [Change](docs/Change.md) - [CloudFormationResourceStatus](docs/CloudFormationResourceStatus.md) - [CloudFormationStackStatus](docs/CloudFormationStackStatus.md) - [ClusterConfigurationStructure](docs/ClusterConfigurationStructure.md) - [ClusterInfoSummary](docs/ClusterInfoSummary.md) - [ClusterInstance](docs/ClusterInstance.md) - [ClusterStatus](docs/ClusterStatus.md) - [ClusterStatusFilteringOption](docs/ClusterStatusFilteringOption.md) - [ComputeFleetStatus](docs/ComputeFleetStatus.md) - [ConfigValidationMessage](docs/ConfigValidationMessage.md) - [ConflictExceptionResponseContent](docs/ConflictExceptionResponseContent.md) - [CreateClusterBadRequestExceptionResponseContent](docs/CreateClusterBadRequestExceptionResponseContent.md) - [CreateClusterRequestContent](docs/CreateClusterRequestContent.md) - [CreateClusterResponseContent](docs/CreateClusterResponseContent.md) - [DeleteClusterResponseContent](docs/DeleteClusterResponseContent.md) - [DeleteImageResponseContent](docs/DeleteImageResponseContent.md) - [DescribeClusterInstancesResponseContent](docs/DescribeClusterInstancesResponseContent.md) - [DescribeClusterResponseContent](docs/DescribeClusterResponseContent.md) - [DescribeComputeFleetResponseContent](docs/DescribeComputeFleetResponseContent.md) - [DescribeImageResponseContent](docs/DescribeImageResponseContent.md) - [DryrunOperationExceptionResponseContent](docs/DryrunOperationExceptionResponseContent.md) - [EC2Instance](docs/EC2Instance.md) - [Ec2AmiInfo](docs/Ec2AmiInfo.md) - [Ec2AmiInfoSummary](docs/Ec2AmiInfoSummary.md) - [Ec2AmiState](docs/Ec2AmiState.md) - [Failure](docs/Failure.md) - [GetClusterLogEventsResponseContent](docs/GetClusterLogEventsResponseContent.md) - [GetClusterStackEventsResponseContent](docs/GetClusterStackEventsResponseContent.md) - [GetImageLogEventsResponseContent](docs/GetImageLogEventsResponseContent.md) - [GetImageStackEventsResponseContent](docs/GetImageStackEventsResponseContent.md) - [ImageBuildStatus](docs/ImageBuildStatus.md) - [ImageBuilderImageStatus](docs/ImageBuilderImageStatus.md) - [ImageConfigurationStructure](docs/ImageConfigurationStructure.md) - [ImageInfoSummary](docs/ImageInfoSummary.md) - [ImageStatusFilteringOption](docs/ImageStatusFilteringOption.md) - [InstanceState](docs/InstanceState.md) - [InternalServiceExceptionResponseContent](docs/InternalServiceExceptionResponseContent.md) - [LimitExceededExceptionResponseContent](docs/LimitExceededExceptionResponseContent.md) - [ListClusterLogStreamsResponseContent](docs/ListClusterLogStreamsResponseContent.md) - [ListClustersResponseContent](docs/ListClustersResponseContent.md) - [ListImageLogStreamsResponseContent](docs/ListImageLogStreamsResponseContent.md) - [ListImagesResponseContent](docs/ListImagesResponseContent.md) - [ListOfficialImagesResponseContent](docs/ListOfficialImagesResponseContent.md) - [LogEvent](docs/LogEvent.md) - [LogStream](docs/LogStream.md) - [LoginNodesPool](docs/LoginNodesPool.md) - [LoginNodesState](docs/LoginNodesState.md) - [Metadata](docs/Metadata.md) - [NodeType](docs/NodeType.md) - [NotFoundExceptionResponseContent](docs/NotFoundExceptionResponseContent.md) - [RequestedComputeFleetStatus](docs/RequestedComputeFleetStatus.md) - [Scheduler](docs/Scheduler.md) - [StackEvent](docs/StackEvent.md) - [Tag](docs/Tag.md) - [UnauthorizedClientErrorResponseContent](docs/UnauthorizedClientErrorResponseContent.md) - [UpdateClusterBadRequestExceptionResponseContent](docs/UpdateClusterBadRequestExceptionResponseContent.md) - [UpdateClusterRequestContent](docs/UpdateClusterRequestContent.md) - [UpdateClusterResponseContent](docs/UpdateClusterResponseContent.md) - [UpdateComputeFleetRequestContent](docs/UpdateComputeFleetRequestContent.md) - [UpdateComputeFleetResponseContent](docs/UpdateComputeFleetResponseContent.md) - [UpdateError](docs/UpdateError.md) - [ValidationLevel](docs/ValidationLevel.md) ## Documentation For Authorization ## aws.auth.sigv4 - **Type**: API key - **API key parameter name**: Authorization - **Location**: HTTP header ## Author ## Notes for Large OpenAPI documents If the OpenAPI document is large, imports in pcluster_client.apis and pcluster_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: Solution 1: Use specific imports for apis and models like: - `from pcluster_client.api.default_api import DefaultApi` - `from pcluster_client.model.pet import Pet` Solution 2: Before importing the package, adjust the maximum recursion limit as shown below: ``` import sys sys.setrecursionlimit(1500) import pcluster_client from pcluster_client.apis import * from pcluster_client.models import * ```