# PulpFileClient::DistributionsFileApi All URIs are relative to *https://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**add_role**](DistributionsFileApi.md#add_role) | **POST** {file_file_distribution_href}add_role/ | [**create**](DistributionsFileApi.md#create) | **POST** /pulp/api/v3/distributions/file/file/ | Create a file distribution [**delete**](DistributionsFileApi.md#delete) | **DELETE** {file_file_distribution_href} | Delete a file distribution [**list**](DistributionsFileApi.md#list) | **GET** /pulp/api/v3/distributions/file/file/ | List file distributions [**list_roles**](DistributionsFileApi.md#list_roles) | **GET** {file_file_distribution_href}list_roles/ | [**my_permissions**](DistributionsFileApi.md#my_permissions) | **GET** {file_file_distribution_href}my_permissions/ | [**partial_update**](DistributionsFileApi.md#partial_update) | **PATCH** {file_file_distribution_href} | Update a file distribution [**read**](DistributionsFileApi.md#read) | **GET** {file_file_distribution_href} | Inspect a file distribution [**remove_role**](DistributionsFileApi.md#remove_role) | **POST** {file_file_distribution_href}remove_role/ | [**update**](DistributionsFileApi.md#update) | **PUT** {file_file_distribution_href} | Update a file distribution ## add_role > NestedRoleResponse add_role(file_file_distribution_href, nested_role) Add a role for this object to users/groups. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | nested_role = PulpFileClient::NestedRole.new # NestedRole | begin result = api_instance.add_role(file_file_distribution_href, nested_role) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->add_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | **nested_role** | [**NestedRole**](NestedRole.md)| | ### Return type [**NestedRoleResponse**](NestedRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## create > AsyncOperationResponse create(file_file_distribution) Create a file distribution Trigger an asynchronous create task ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution = PulpFileClient::FileFileDistribution.new # FileFileDistribution | begin #Create a file distribution result = api_instance.create(file_file_distribution) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution** | [**FileFileDistribution**](FileFileDistribution.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(file_file_distribution_href) Delete a file distribution Trigger an asynchronous delete task ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | begin #Delete a file distribution result = api_instance.delete(file_file_distribution_href) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## list > PaginatedfileFileDistributionResponseList list(opts) List file distributions FileDistributions host File Publications which makes the metadata and the referenced File Content available to HTTP clients. Additionally, a FileDistribution with an associated FilePublication can be the target url of a File Remote , allowing another instance of Pulp to sync the content. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new opts = { base_path: 'base_path_example', # String | Filter results where base_path matches value 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 | Filter results where name matches value 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 repository: 'repository_example', # String | Filter results where repository matches value repository__in: ['repository__in_example'], # Array | Filter results where repository is in a comma-separated list of values with_content: 'with_content_example', # String | Filter distributions based on the content served by them fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #List file distributions result = api_instance.list(opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **base_path** | **String**| Filter results where base_path matches value | [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**| Filter results where name matches value | [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] **repository** | **String**| Filter results where repository matches value | [optional] **repository__in** | [**Array<String>**](String.md)| Filter results where repository is in a comma-separated list of values | [optional] **with_content** | **String**| Filter distributions based on the content served by them | [optional] **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| A list of fields to exclude from the response. | [optional] ### Return type [**PaginatedfileFileDistributionResponseList**](PaginatedfileFileDistributionResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## list_roles > ObjectRolesResponse list_roles(file_file_distribution_href, opts) List roles assigned to this object. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | opts = { fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin result = api_instance.list_roles(file_file_distribution_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->list_roles: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| A list of fields to exclude from the response. | [optional] ### Return type [**ObjectRolesResponse**](ObjectRolesResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## my_permissions > MyPermissionsResponse my_permissions(file_file_distribution_href, opts) List permissions available to the current user on this object. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | opts = { fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin result = api_instance.my_permissions(file_file_distribution_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->my_permissions: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| A list of fields to exclude from the response. | [optional] ### Return type [**MyPermissionsResponse**](MyPermissionsResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## partial_update > AsyncOperationResponse partial_update(file_file_distribution_href, patchedfile_file_distribution) Update a file distribution Trigger an asynchronous partial update task ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | patchedfile_file_distribution = PulpFileClient::PatchedfileFileDistribution.new # PatchedfileFileDistribution | begin #Update a file distribution result = api_instance.partial_update(file_file_distribution_href, patchedfile_file_distribution) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->partial_update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | **patchedfile_file_distribution** | [**PatchedfileFileDistribution**](PatchedfileFileDistribution.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 > FileFileDistributionResponse read(file_file_distribution_href, opts) Inspect a file distribution FileDistributions host File Publications which makes the metadata and the referenced File Content available to HTTP clients. Additionally, a FileDistribution with an associated FilePublication can be the target url of a File Remote , allowing another instance of Pulp to sync the content. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | opts = { fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #Inspect a file distribution result = api_instance.read(file_file_distribution_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| A list of fields to exclude from the response. | [optional] ### Return type [**FileFileDistributionResponse**](FileFileDistributionResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## remove_role > NestedRoleResponse remove_role(file_file_distribution_href, nested_role) Remove a role for this object from users/groups. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | nested_role = PulpFileClient::NestedRole.new # NestedRole | begin result = api_instance.remove_role(file_file_distribution_href, nested_role) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->remove_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | **nested_role** | [**NestedRole**](NestedRole.md)| | ### Return type [**NestedRoleResponse**](NestedRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## update > AsyncOperationResponse update(file_file_distribution_href, file_file_distribution) Update a file distribution Trigger an asynchronous update task ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::DistributionsFileApi.new file_file_distribution_href = 'file_file_distribution_href_example' # String | file_file_distribution = PulpFileClient::FileFileDistribution.new # FileFileDistribution | begin #Update a file distribution result = api_instance.update(file_file_distribution_href, file_file_distribution) p result rescue PulpFileClient::ApiError => e puts "Exception when calling DistributionsFileApi->update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_distribution_href** | **String**| | **file_file_distribution** | [**FileFileDistribution**](FileFileDistribution.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