# PulpcoreClient::DistributionsApi All URIs are relative to *https://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](DistributionsApi.md#create) | **POST** /pulp/api/v3/distributions/ | Create a distribution [**delete**](DistributionsApi.md#delete) | **DELETE** {distribution_href} | Delete a distribution [**list**](DistributionsApi.md#list) | **GET** /pulp/api/v3/distributions/ | List distributions [**partial_update**](DistributionsApi.md#partial_update) | **PATCH** {distribution_href} | Update a distribution [**read**](DistributionsApi.md#read) | **GET** {distribution_href} | Inspect a distribution [**update**](DistributionsApi.md#update) | **PUT** {distribution_href} | Update a distribution ## create > AsyncOperationResponse create(distribution) Create a distribution Trigger an asynchronous create task ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::DistributionsApi.new distribution = PulpcoreClient::Distribution.new # Distribution | begin #Create a distribution result = api_instance.create(distribution) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling DistributionsApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **distribution** | [**Distribution**](Distribution.md)| | ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## delete > AsyncOperationResponse delete(distribution_href) Delete a distribution Trigger an asynchronous delete task ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::DistributionsApi.new distribution_href = 'distribution_href_example' # String | begin #Delete a distribution result = api_instance.delete(distribution_href) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling DistributionsApi->delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **distribution_href** | **String**| | ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## list > PaginatedDistributionResponseList list(opts) List distributions Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks with reservation that lock all Distributions preventing race conditions during base_path checking. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::DistributionsApi.new opts = { base_path: 'base_path_example', # String | base_path__contains: 'base_path__contains_example', # String | Filter results where base_path contains value base_path__icontains: 'base_path__icontains_example', # String | Filter results where base_path contains value base_path__in: ['base_path__in_example'], # Array | Filter results where base_path is in a comma-separated list of values limit: 56, # Integer | Number of results to return per page. name: 'name_example', # String | name__contains: 'name__contains_example', # String | Filter results where name contains value name__icontains: 'name__icontains_example', # String | Filter results where name contains value name__in: ['name__in_example'], # Array | Filter results where name is in a comma-separated list of values name__startswith: 'name__startswith_example', # String | Filter results where name starts with value offset: 56, # Integer | The initial index from which to return the results. ordering: ['ordering_example'], # Array | Ordering pulp_label_select: 'pulp_label_select_example', # String | Filter labels by search string fields: 'fields_example', # String | A list of fields to include in the response. exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response. } begin #List distributions result = api_instance.list(opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling DistributionsApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **base_path** | **String**| | [optional] **base_path__contains** | **String**| Filter results where base_path contains value | [optional] **base_path__icontains** | **String**| Filter results where base_path contains value | [optional] **base_path__in** | [**Array<String>**](String.md)| Filter results where base_path is in a comma-separated list of values | [optional] **limit** | **Integer**| Number of results to return per page. | [optional] **name** | **String**| | [optional] **name__contains** | **String**| Filter results where name contains value | [optional] **name__icontains** | **String**| Filter results where name contains value | [optional] **name__in** | [**Array<String>**](String.md)| Filter results where name is in a comma-separated list of values | [optional] **name__startswith** | **String**| Filter results where name starts with value | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | [**Array<String>**](String.md)| Ordering | [optional] **pulp_label_select** | **String**| Filter labels by search string | [optional] **fields** | **String**| A list of fields to include in the response. | [optional] **exclude_fields** | **String**| A list of fields to exclude from the response. | [optional] ### Return type [**PaginatedDistributionResponseList**](PaginatedDistributionResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## partial_update > AsyncOperationResponse partial_update(distribution_href, patched_distribution) Update a distribution Trigger an asynchronous partial update task ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::DistributionsApi.new distribution_href = 'distribution_href_example' # String | patched_distribution = PulpcoreClient::PatchedDistribution.new # PatchedDistribution | begin #Update a distribution result = api_instance.partial_update(distribution_href, patched_distribution) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling DistributionsApi->partial_update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **distribution_href** | **String**| | **patched_distribution** | [**PatchedDistribution**](PatchedDistribution.md)| | ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## read > DistributionResponse read(distribution_href, opts) Inspect a distribution Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks with reservation that lock all Distributions preventing race conditions during base_path checking. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::DistributionsApi.new distribution_href = 'distribution_href_example' # String | opts = { fields: 'fields_example', # String | A list of fields to include in the response. exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response. } begin #Inspect a distribution result = api_instance.read(distribution_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling DistributionsApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **distribution_href** | **String**| | **fields** | **String**| A list of fields to include in the response. | [optional] **exclude_fields** | **String**| A list of fields to exclude from the response. | [optional] ### Return type [**DistributionResponse**](DistributionResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## update > AsyncOperationResponse update(distribution_href, distribution) Update a distribution Trigger an asynchronous update task ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::DistributionsApi.new distribution_href = 'distribution_href_example' # String | distribution = PulpcoreClient::Distribution.new # Distribution | begin #Update a distribution result = api_instance.update(distribution_href, distribution) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling DistributionsApi->update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **distribution_href** | **String**| | **distribution** | [**Distribution**](Distribution.md)| | ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json