pulpcore.client.pulp_file.DistributionsFileApi
All URIs are relative to http://localhost:24817
Method | HTTP request | Description |
---|---|---|
add_role | POST {file_file_distribution_href}add_role/ | Add a role |
create | POST /pulp/api/v3/distributions/file/file/ | Create a file distribution |
delete | DELETE {file_file_distribution_href} | Delete a file distribution |
list | GET /pulp/api/v3/distributions/file/file/ | List file distributions |
list_roles | GET {file_file_distribution_href}list_roles/ | List roles |
my_permissions | GET {file_file_distribution_href}my_permissions/ | List user permissions |
partial_update | PATCH {file_file_distribution_href} | Update a file distribution |
read | GET {file_file_distribution_href} | Inspect a file distribution |
remove_role | POST {file_file_distribution_href}remove_role/ | Remove a role |
set_label | POST {file_file_distribution_href}set_label/ | Set a label |
unset_label | POST {file_file_distribution_href}unset_label/ | Unset a label |
update | PUT {file_file_distribution_href} | Update a file distribution |
add_role
NestedRoleResponse add_role(file_file_distribution_href, nested_role)
Add a role
Add a role for this object to users/groups.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
nested_role = pulpcore.client.pulp_file.NestedRole() # NestedRole |
try:
# Add a role
api_response = api_instance.add_role(file_file_distribution_href, nested_role)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->add_role: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
nested_role = pulpcore.client.pulp_file.NestedRole() # NestedRole |
try:
# Add a role
api_response = api_instance.add_role(file_file_distribution_href, nested_role)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->add_role: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
nested_role | NestedRole |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
create
AsyncOperationResponse create(file_file_distribution)
Create a file distribution
Trigger an asynchronous create task
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution = pulpcore.client.pulp_file.FileFileDistribution() # FileFileDistribution |
try:
# Create a file distribution
api_response = api_instance.create(file_file_distribution)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->create: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution = pulpcore.client.pulp_file.FileFileDistribution() # FileFileDistribution |
try:
# Create a file distribution
api_response = api_instance.create(file_file_distribution)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->create: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution | FileFileDistribution |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
delete
AsyncOperationResponse delete(file_file_distribution_href)
Delete a file distribution
Trigger an asynchronous delete task
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
try:
# Delete a file distribution
api_response = api_instance.delete(file_file_distribution_href)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->delete: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
try:
# Delete a file distribution
api_response = api_instance.delete(file_file_distribution_href)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->delete: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
list
PaginatedfileFileDistributionResponseList list(base_path=base_path, base_path__contains=base_path__contains, base_path__icontains=base_path__icontains, base_path__in=base_path__in, limit=limit, name=name, name__contains=name__contains, name__icontains=name__icontains, name__iexact=name__iexact, name__in=name__in, name__iregex=name__iregex, name__istartswith=name__istartswith, name__regex=name__regex, name__startswith=name__startswith, offset=offset, ordering=ordering, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, pulp_label_select=pulp_label_select, q=q, repository=repository, repository__in=repository__in, with_content=with_content, fields=fields, exclude_fields=exclude_fields)
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
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
base_path = 'base_path_example' # str | Filter results where base_path matches value (optional)
base_path__contains = 'base_path__contains_example' # str | Filter results where base_path contains value (optional)
base_path__icontains = 'base_path__icontains_example' # str | Filter results where base_path contains value (optional)
base_path__in = ['base_path__in_example'] # list[str] | Filter results where base_path is in a comma-separated list of values (optional)
limit = 56 # int | Number of results to return per page. (optional)
name = 'name_example' # str | Filter results where name matches value (optional)
name__contains = 'name__contains_example' # str | Filter results where name contains value (optional)
name__icontains = 'name__icontains_example' # str | Filter results where name contains value (optional)
name__iexact = 'name__iexact_example' # str | Filter results where name matches value (optional)
name__in = ['name__in_example'] # list[str] | Filter results where name is in a comma-separated list of values (optional)
name__iregex = 'name__iregex_example' # str | Filter results where name matches regex value (optional)
name__istartswith = 'name__istartswith_example' # str | Filter results where name starts with value (optional)
name__regex = 'name__regex_example' # str | Filter results where name matches regex value (optional)
name__startswith = 'name__startswith_example' # str | Filter results where name starts with value (optional)
offset = 56 # int | The initial index from which to return the results. (optional)
ordering = ['ordering_example'] # list[str] | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional)
pulp_href__in = ['pulp_href__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_id__in = ['pulp_id__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_label_select = 'pulp_label_select_example' # str | Filter labels by search string (optional)
q = 'q_example' # str | (optional)
repository = 'repository_example' # str | Filter results where repository matches value (optional)
repository__in = ['repository__in_example'] # list[str] | Filter results where repository is in a comma-separated list of values (optional)
with_content = 'with_content_example' # str | Filter distributions based on the content served by them (optional)
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List file distributions
api_response = api_instance.list(base_path=base_path, base_path__contains=base_path__contains, base_path__icontains=base_path__icontains, base_path__in=base_path__in, limit=limit, name=name, name__contains=name__contains, name__icontains=name__icontains, name__iexact=name__iexact, name__in=name__in, name__iregex=name__iregex, name__istartswith=name__istartswith, name__regex=name__regex, name__startswith=name__startswith, offset=offset, ordering=ordering, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, pulp_label_select=pulp_label_select, q=q, repository=repository, repository__in=repository__in, with_content=with_content, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->list: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
base_path = 'base_path_example' # str | Filter results where base_path matches value (optional)
base_path__contains = 'base_path__contains_example' # str | Filter results where base_path contains value (optional)
base_path__icontains = 'base_path__icontains_example' # str | Filter results where base_path contains value (optional)
base_path__in = ['base_path__in_example'] # list[str] | Filter results where base_path is in a comma-separated list of values (optional)
limit = 56 # int | Number of results to return per page. (optional)
name = 'name_example' # str | Filter results where name matches value (optional)
name__contains = 'name__contains_example' # str | Filter results where name contains value (optional)
name__icontains = 'name__icontains_example' # str | Filter results where name contains value (optional)
name__iexact = 'name__iexact_example' # str | Filter results where name matches value (optional)
name__in = ['name__in_example'] # list[str] | Filter results where name is in a comma-separated list of values (optional)
name__iregex = 'name__iregex_example' # str | Filter results where name matches regex value (optional)
name__istartswith = 'name__istartswith_example' # str | Filter results where name starts with value (optional)
name__regex = 'name__regex_example' # str | Filter results where name matches regex value (optional)
name__startswith = 'name__startswith_example' # str | Filter results where name starts with value (optional)
offset = 56 # int | The initial index from which to return the results. (optional)
ordering = ['ordering_example'] # list[str] | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional)
pulp_href__in = ['pulp_href__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_id__in = ['pulp_id__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_label_select = 'pulp_label_select_example' # str | Filter labels by search string (optional)
q = 'q_example' # str | (optional)
repository = 'repository_example' # str | Filter results where repository matches value (optional)
repository__in = ['repository__in_example'] # list[str] | Filter results where repository is in a comma-separated list of values (optional)
with_content = 'with_content_example' # str | Filter distributions based on the content served by them (optional)
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List file distributions
api_response = api_instance.list(base_path=base_path, base_path__contains=base_path__contains, base_path__icontains=base_path__icontains, base_path__in=base_path__in, limit=limit, name=name, name__contains=name__contains, name__icontains=name__icontains, name__iexact=name__iexact, name__in=name__in, name__iregex=name__iregex, name__istartswith=name__istartswith, name__regex=name__regex, name__startswith=name__startswith, offset=offset, ordering=ordering, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, pulp_label_select=pulp_label_select, q=q, repository=repository, repository__in=repository__in, with_content=with_content, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->list: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
base_path | str | Filter results where base_path matches value | [optional] |
base_path__contains | str | Filter results where base_path contains value | [optional] |
base_path__icontains | str | Filter results where base_path contains value | [optional] |
base_path__in | list[str] | Filter results where base_path is in a comma-separated list of values | [optional] |
limit | int | Number of results to return per page. | [optional] |
name | str | Filter results where name matches value | [optional] |
name__contains | str | Filter results where name contains value | [optional] |
name__icontains | str | Filter results where name contains value | [optional] |
name__iexact | str | Filter results where name matches value | [optional] |
name__in | list[str] | Filter results where name is in a comma-separated list of values | [optional] |
name__iregex | str | Filter results where name matches regex value | [optional] |
name__istartswith | str | Filter results where name starts with value | [optional] |
name__regex | str | Filter results where name matches regex value | [optional] |
name__startswith | str | Filter results where name starts with value | [optional] |
offset | int | The initial index from which to return the results. | [optional] |
ordering | list[str] | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] |
pulp_href__in | list[str] | Multiple values may be separated by commas. | [optional] |
pulp_id__in | list[str] | Multiple values may be separated by commas. | [optional] |
pulp_label_select | str | Filter labels by search string | [optional] |
q | str | [optional] | |
repository | str | Filter results where repository matches value | [optional] |
repository__in | list[str] | Filter results where repository is in a comma-separated list of values | [optional] |
with_content | str | Filter distributions based on the content served by them | [optional] |
fields | list[str] | A list of fields to include in the response. | [optional] |
exclude_fields | list[str] | A list of fields to exclude from the response. | [optional] |
Return type
PaginatedfileFileDistributionResponseList
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
list_roles
ObjectRolesResponse list_roles(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
List roles
List roles assigned to this object.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List roles
api_response = api_instance.list_roles(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->list_roles: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List roles
api_response = api_instance.list_roles(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->list_roles: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
fields | list[str] | A list of fields to include in the response. | [optional] |
exclude_fields | list[str] | A list of fields to exclude from the response. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
my_permissions
MyPermissionsResponse my_permissions(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
List user permissions
List permissions available to the current user on this object.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List user permissions
api_response = api_instance.my_permissions(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->my_permissions: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List user permissions
api_response = api_instance.my_permissions(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->my_permissions: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
fields | list[str] | A list of fields to include in the response. | [optional] |
exclude_fields | list[str] | A list of fields to exclude from the response. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
partial_update
AsyncOperationResponse partial_update(file_file_distribution_href, patchedfile_file_distribution)
Update a file distribution
Trigger an asynchronous partial update task
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
patchedfile_file_distribution = pulpcore.client.pulp_file.PatchedfileFileDistribution() # PatchedfileFileDistribution |
try:
# Update a file distribution
api_response = api_instance.partial_update(file_file_distribution_href, patchedfile_file_distribution)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->partial_update: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
patchedfile_file_distribution = pulpcore.client.pulp_file.PatchedfileFileDistribution() # PatchedfileFileDistribution |
try:
# Update a file distribution
api_response = api_instance.partial_update(file_file_distribution_href, patchedfile_file_distribution)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->partial_update: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
patchedfile_file_distribution | PatchedfileFileDistribution |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
read
FileFileDistributionResponse read(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
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
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# Inspect a file distribution
api_response = api_instance.read(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->read: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# Inspect a file distribution
api_response = api_instance.read(file_file_distribution_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->read: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
fields | list[str] | A list of fields to include in the response. | [optional] |
exclude_fields | list[str] | A list of fields to exclude from the response. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
remove_role
NestedRoleResponse remove_role(file_file_distribution_href, nested_role)
Remove a role
Remove a role for this object from users/groups.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
nested_role = pulpcore.client.pulp_file.NestedRole() # NestedRole |
try:
# Remove a role
api_response = api_instance.remove_role(file_file_distribution_href, nested_role)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->remove_role: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
nested_role = pulpcore.client.pulp_file.NestedRole() # NestedRole |
try:
# Remove a role
api_response = api_instance.remove_role(file_file_distribution_href, nested_role)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->remove_role: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
nested_role | NestedRole |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
set_label
SetLabelResponse set_label(file_file_distribution_href, set_label)
Set a label
Set a single pulp_label on the object to a specific value or null.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
set_label = pulpcore.client.pulp_file.SetLabel() # SetLabel |
try:
# Set a label
api_response = api_instance.set_label(file_file_distribution_href, set_label)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->set_label: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
set_label = pulpcore.client.pulp_file.SetLabel() # SetLabel |
try:
# Set a label
api_response = api_instance.set_label(file_file_distribution_href, set_label)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->set_label: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
set_label | SetLabel |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
unset_label
UnsetLabelResponse unset_label(file_file_distribution_href, unset_label)
Unset a label
Unset a single pulp_label on the object.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
unset_label = pulpcore.client.pulp_file.UnsetLabel() # UnsetLabel |
try:
# Unset a label
api_response = api_instance.unset_label(file_file_distribution_href, unset_label)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->unset_label: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
unset_label = pulpcore.client.pulp_file.UnsetLabel() # UnsetLabel |
try:
# Unset a label
api_response = api_instance.unset_label(file_file_distribution_href, unset_label)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->unset_label: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
unset_label | UnsetLabel |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
update
AsyncOperationResponse update(file_file_distribution_href, file_file_distribution)
Update a file distribution
Trigger an asynchronous update task
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
file_file_distribution = pulpcore.client.pulp_file.FileFileDistribution() # FileFileDistribution |
try:
# Update a file distribution
api_response = api_instance.update(file_file_distribution_href, file_file_distribution)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->update: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_file
from pulpcore.client.pulp_file.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_file.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_file.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_file.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_file.DistributionsFileApi(api_client)
file_file_distribution_href = 'file_file_distribution_href_example' # str |
file_file_distribution = pulpcore.client.pulp_file.FileFileDistribution() # FileFileDistribution |
try:
# Update a file distribution
api_response = api_instance.update(file_file_distribution_href, file_file_distribution)
pprint(api_response)
except ApiException as e:
print("Exception when calling DistributionsFileApi->update: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_file_distribution_href | str | ||
file_file_distribution | FileFileDistribution |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]