# 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 > InlineResponse2002 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 | name namespace: 'namespace_example', # String | namespace offset: 56, # Integer | The initial index from which to return the results. ordering: 'ordering_example', # String | Which field to use when ordering the results. repository_version: 'repository_version_example', # String | repository_version repository_version_added: 'repository_version_added_example', # String | repository_version_added repository_version_removed: 'repository_version_removed_example', # String | repository_version_removed version: 'version_example', # String | version 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 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**| name | [optional] **namespace** | **String**| namespace | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | **String**| Which field to use when ordering the results. | [optional] **repository_version** | **String**| repository_version | [optional] **repository_version_added** | **String**| repository_version_added | [optional] **repository_version_removed** | **String**| repository_version_removed | [optional] **version** | **String**| version | [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 [**InlineResponse2002**](InlineResponse2002.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', # 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 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** | **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 [**AnsibleRoleResponse**](AnsibleRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json