Skip to content

Latest commit

 

History

History
283 lines (205 loc) · 10.7 KB

AccountAttributesApi.md

File metadata and controls

283 lines (205 loc) · 10.7 KB

cloudcheckr_cmx_client.AccountAttributesApi

All URIs are relative to //api-us.cloudcheckr.com/

Method HTTP request Description
attach_account_attribute PUT /customer/v1/customers/{customerId}/account-attributes/{attributeName}/values/{value}/assign Bulk associate account attribute name-value to list of general accounts.
delete_account_attribute DELETE /customer/v1/customers/{customerId}/account-attributes/{attributeName} Delete an account attribute.
get_account_attribute GET /customer/v1/customers/{customerId}/account-attributes/{attributeName} Get an individual account attribute.
list_account_attributes GET /customer/v1/customers/{customerId}/account-attributes Get all account attributes.
update_account_attribute PUT /customer/v1/customers/{customerId}/account-attributes Create/Update an account attribute.

attach_account_attribute

BulkAccountAssignmentResponseModelAccountAttributeAssignmentResponseModel attach_account_attribute(customer_id, attribute_name, value, body=body)

Bulk associate account attribute name-value to list of general accounts.

Example

from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = cloudcheckr_cmx_client.AccountAttributesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
attribute_name = 'attribute_name_example' # str | 
value = 'value_example' # str | 
body = cloudcheckr_cmx_client.BulkAccountAttributeAssignmentRequestModel() # BulkAccountAttributeAssignmentRequestModel |  (optional)

try:
    # Bulk associate account attribute name-value to list of general accounts.
    api_response = api_instance.attach_account_attribute(customer_id, attribute_name, value, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountAttributesApi->attach_account_attribute: %s\n" % e)

Parameters

Name Type Description Notes
customer_id str
attribute_name str
value str
body BulkAccountAttributeAssignmentRequestModel [optional]

Return type

BulkAccountAssignmentResponseModelAccountAttributeAssignmentResponseModel

Authorization

oauth

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_account_attribute

delete_account_attribute(customer_id, attribute_name)

Delete an account attribute.

Example

from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = cloudcheckr_cmx_client.AccountAttributesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
attribute_name = 'attribute_name_example' # str | 

try:
    # Delete an account attribute.
    api_instance.delete_account_attribute(customer_id, attribute_name)
except ApiException as e:
    print("Exception when calling AccountAttributesApi->delete_account_attribute: %s\n" % e)

Parameters

Name Type Description Notes
customer_id str
attribute_name str

Return type

void (empty response body)

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_account_attribute

AccountAttributeResponseModel get_account_attribute(customer_id, attribute_name)

Get an individual account attribute.

Example

from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = cloudcheckr_cmx_client.AccountAttributesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
attribute_name = 'attribute_name_example' # str | 

try:
    # Get an individual account attribute.
    api_response = api_instance.get_account_attribute(customer_id, attribute_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountAttributesApi->get_account_attribute: %s\n" % e)

Parameters

Name Type Description Notes
customer_id str
attribute_name str

Return type

AccountAttributeResponseModel

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_account_attributes

PaginationResponseAccountAttributeResponseModel list_account_attributes(customer_id, include_values=include_values, search=search, page_size=page_size, pagination_key=pagination_key, order_by=order_by)

Get all account attributes.

Example

from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = cloudcheckr_cmx_client.AccountAttributesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
include_values = false # bool |  (optional) (default to false)
search = 'search_example' # str | finds all resources that match the specified value (optional)
page_size = 56 # int | number of items to include in the response (optional)
pagination_key = 'pagination_key_example' # str | key used to fetch the next page of items (optional)
order_by = 'order_by_example' # str | orders a given property (optional)

try:
    # Get all account attributes.
    api_response = api_instance.list_account_attributes(customer_id, include_values=include_values, search=search, page_size=page_size, pagination_key=pagination_key, order_by=order_by)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountAttributesApi->list_account_attributes: %s\n" % e)

Parameters

Name Type Description Notes
customer_id str
include_values bool [optional] [default to false]
search str finds all resources that match the specified value [optional]
page_size int number of items to include in the response [optional]
pagination_key str key used to fetch the next page of items [optional]
order_by str orders a given property [optional]

Return type

PaginationResponseAccountAttributeResponseModel

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_account_attribute

AccountAttributeResponseModel update_account_attribute(customer_id, body=body)

Create/Update an account attribute.

Example

from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = cloudcheckr_cmx_client.AccountAttributesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
body = cloudcheckr_cmx_client.UpdateRequestAccountAttributeRequestModel() # UpdateRequestAccountAttributeRequestModel |  (optional)

try:
    # Create/Update an account attribute.
    api_response = api_instance.update_account_attribute(customer_id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountAttributesApi->update_account_attribute: %s\n" % e)

Parameters

Name Type Description Notes
customer_id str
body UpdateRequestAccountAttributeRequestModel [optional]

Return type

AccountAttributeResponseModel

Authorization

oauth

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]