# PulpAnsibleClient::ContentRolesApi All URIs are relative to *http://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](ContentRolesApi.md#create) | **POST** /pulp/api/v3/content/ansible/roles/ | Create a role [**list**](ContentRolesApi.md#list) | **GET** /pulp/api/v3/content/ansible/roles/ | List roles [**read**](ContentRolesApi.md#read) | **GET** {ansible_role_href} | Inspect a role ## create > AnsibleRoleResponse create(ansible_role) Create a role ViewSet for Role. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::ContentRolesApi.new ansible_role = PulpAnsibleClient::AnsibleRole.new # AnsibleRole | begin #Create a role result = api_instance.create(ansible_role) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling ContentRolesApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ansible_role** | [**AnsibleRole**](AnsibleRole.md)| | ### Return type [**AnsibleRoleResponse**](AnsibleRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## list > PaginatedansibleRoleResponseList list(opts) List roles ViewSet for Role. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::ContentRolesApi.new opts = { limit: 56, # Integer | Number of results to return per page. name: 'name_example', # String | Filter results where name matches value namespace: 'namespace_example', # String | Filter results where namespace matches value offset: 56, # Integer | The initial index from which to return the results. ordering: ['ordering_example'], # Array | 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) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `version` - Version * `-version` - Version (descending) * `pk` - Pk * `-pk` - Pk (descending) orphaned_for: 3.4, # Float | Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. pulp_href__in: ['pulp_href__in_example'], # Array | Multiple values may be separated by commas. pulp_id__in: ['pulp_id__in_example'], # Array | Multiple values may be separated by commas. q: 'q_example', # String | repository_version: 'repository_version_example', # String | Repository Version referenced by HREF repository_version_added: 'repository_version_added_example', # String | Repository Version referenced by HREF repository_version_removed: 'repository_version_removed_example', # String | Repository Version referenced by HREF version: 'version_example', # String | Filter results where version matches value 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 roles result = api_instance.list(opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling ContentRolesApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| Number of results to return per page. | [optional] **name** | **String**| Filter results where name matches value | [optional] **namespace** | **String**| Filter results where namespace matches value | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | [**Array<String>**](String.md)| 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) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `version` - Version * `-version` - Version (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] **orphaned_for** | **Float**| Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. | [optional] **pulp_href__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **pulp_id__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **q** | **String**| | [optional] **repository_version** | **String**| Repository Version referenced by HREF | [optional] **repository_version_added** | **String**| Repository Version referenced by HREF | [optional] **repository_version_removed** | **String**| Repository Version referenced by HREF | [optional] **version** | **String**| Filter results where version matches value | [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 [**PaginatedansibleRoleResponseList**](PaginatedansibleRoleResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > AnsibleRoleResponse read(ansible_role_href, opts) Inspect a role ViewSet for Role. ### Example ```ruby # load the gem require 'pulp_ansible_client' # setup authorization PulpAnsibleClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpAnsibleClient::ContentRolesApi.new ansible_role_href = 'ansible_role_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 role result = api_instance.read(ansible_role_href, opts) p result rescue PulpAnsibleClient::ApiError => e puts "Exception when calling ContentRolesApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ansible_role_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 [**AnsibleRoleResponse**](AnsibleRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json