Skip to content

Latest commit

 

History

History
398 lines (354 loc) · 34.3 KB

README.md

File metadata and controls

398 lines (354 loc) · 34.3 KB

ct-cloudcheckr-cmx-client

CloudCheckr API

This Python package is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

How this client was generated

The command used to generate this Python package:

docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli-v3:3.0.24 generate \
    --input-spec https://developer.cloudcheckr.com/us/CloudCheckrApi.json \
    --lang python \
    --config /local/swag.config.python.json \
    --output /local/out/python \
    --git-user-id CU-CommunityApps \
    --git-repo-id ct-cloudcheckr-cmx-client

Change Log

1.0.1

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/CU-CommunityApps/ct-cloudcheckr-cmx-client.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/CU-CommunityApps/ct-cloudcheckr-cmx-client.git)

Then import the package:

import cloudcheckr_cmx_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import cloudcheckr_cmx_client

Getting Started

Please follow the installation procedure and then run the following:

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.AWSCredentialsApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
account_id = 'account_id_example' # str | 
aws_region_group = 'aws_region_group_example' # str | AWS region group where the cross-account role will be created.

try:
    # Get the external ID to use when creating an AWS cross-account role.
    api_response = api_instance.get_aws_external_id(customer_id, account_id, aws_region_group)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AWSCredentialsApi->get_aws_external_id: %s\n" % e)

# 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.AWSCredentialsApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
account_id = 'account_id_example' # str | 
purpose = 'purpose_example' # str | How the credential will be used.
body = cloudcheckr_cmx_client.UpdateRequestAwsCredentialRequestModel() # UpdateRequestAwsCredentialRequestModel |  (optional)

try:
    # Modify the credential on the account.
    api_response = api_instance.modify_credential(customer_id, account_id, purpose, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AWSCredentialsApi->modify_credential: %s\n" % e)

# 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.AWSCredentialsApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
aws_region_group = 'aws_region_group_example' # str | 
body = cloudcheckr_cmx_client.UpdateRequestAwsAssumeRoleCredentialRequestModel() # UpdateRequestAwsAssumeRoleCredentialRequestModel |  (optional)

try:
    # Set the credential to use when assuming a cross-acount role.
    api_response = api_instance.modify_customer_aws_assume_role_credential(customer_id, aws_region_group, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AWSCredentialsApi->modify_customer_aws_assume_role_credential: %s\n" % e)

# 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.AWSCredentialsApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str | 
account_id = 'account_id_example' # str | 
body = cloudcheckr_cmx_client.UpdateRequestAwsCredentialRequestModel() # UpdateRequestAwsCredentialRequestModel |  (optional)

try:
    # Modify the default credential on the account.
    api_response = api_instance.modify_default_credential(customer_id, account_id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AWSCredentialsApi->modify_default_credential: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AWSCredentialsApi get_aws_external_id GET /credential/v1/customers/{customerId}/accounts/{accountId}/external-id/aws/{awsRegionGroup} Get the external ID to use when creating an AWS cross-account role.
AWSCredentialsApi modify_credential PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credentials/aws/{purpose} Modify the credential on the account.
AWSCredentialsApi modify_customer_aws_assume_role_credential PUT /credential/v1/customers/{customerId}/credentials/aws/assume-role/{awsRegionGroup} Set the credential to use when assuming a cross-acount role.
AWSCredentialsApi modify_default_credential PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credentials/aws Modify the default credential on the account.
AccountAttributesApi 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.
AccountAttributesApi delete_account_attribute DELETE /customer/v1/customers/{customerId}/account-attributes/{attributeName} Delete an account attribute.
AccountAttributesApi get_account_attribute GET /customer/v1/customers/{customerId}/account-attributes/{attributeName} Get an individual account attribute.
AccountAttributesApi list_account_attributes GET /customer/v1/customers/{customerId}/account-attributes Get all account attributes.
AccountAttributesApi update_account_attribute PUT /customer/v1/customers/{customerId}/account-attributes Create/Update an account attribute.
AccountManagementApi attach_account_groups PUT /customer/v1/customers/{customerId}/account-management/account-groups/{groupId}/attach Bulk move account groups into a parent account group.
AccountManagementApi attach_account_groups_to_root PUT /customer/v1/customers/{customerId}/account-management/account-groups/root/attach Bulk move account groups into the root path.
AccountManagementApi create_account POST /customer/v1/customers/{customerId}/account-management/accounts Create a General Account.
AccountManagementApi create_account_group POST /customer/v1/customers/{customerId}/account-management/account-groups Create a new account group.
AccountManagementApi create_mav POST /customer/v1/customers/{customerId}/account-management/mavs Create a MAV.
AccountManagementApi delete_account DELETE /customer/v1/customers/{customerId}/account-management/accounts/{accountId} Delete a general account.
AccountManagementApi delete_account_group DELETE /customer/v1/customers/{customerId}/account-management/account-groups/{accountId} Delete an account group
AccountManagementApi delete_mav DELETE /customer/v1/customers/{customerId}/account-management/mavs/{accountId} Delete a MAV.
AccountManagementApi get_account GET /customer/v1/customers/{customerId}/account-management/accounts/{accountId} Get an individual general account.
AccountManagementApi get_account_group_parent_assignment GET /customer/v1/customers/{customerId}/account-management/parent-assignments/{parentAssignmentId} Get an individual account group parent assignment.
AccountManagementApi get_account_group_parent_assignments GET /customer/v1/customers/{customerId}/account-management/parent-assignments Get all account group parent assignments.
AccountManagementApi get_general_accounts GET /customer/v1/customers/{customerId}/account-management/accounts Get all general accounts.
AccountManagementApi get_group GET /customer/v1/customers/{customerId}/account-management/account-groups/{groupId} Get an individual account group.
AccountManagementApi get_group_children GET /customer/v1/customers/{customerId}/account-management/account-groups/{groupId}/children Get all children of an account group.
AccountManagementApi get_groups GET /customer/v1/customers/{customerId}/account-management/account-groups Get all account groups.
AccountManagementApi get_mav GET /customer/v1/customers/{customerId}/account-management/mavs/{accountId} Get an individual MAV.
AccountManagementApi get_mav_accounts GET /customer/v1/customers/{customerId}/account-management/mavs Get all MAVs.
AccountManagementApi get_mav_referenced_accounts GET /customer/v1/customers/{customerId}/account-management/mavs/{accountId}/referenced-accounts Get accounts associated with a MAV.
AccountManagementApi get_root_children GET /customer/v1/customers/{customerId}/account-management/account-groups/root/children Get the root of the account hierarchy.
AccountManagementApi update_account PUT /customer/v1/customers/{customerId}/account-management/accounts/{accountId} Update a General Account.
AccountManagementApi update_account_group PUT /customer/v1/customers/{customerId}/account-management/account-groups/{accountId} Update an account group.
AccountManagementApi update_mav PUT /customer/v1/customers/{customerId}/account-management/mavs/{accountId} Update a MAV.
AccountsApi get_account GET /customer/v1/customers/{customerId}/accounts/{accountId} Get an individual account, account group, or MAV.
AccountsApi get_accounts GET /customer/v1/customers/{customerId}/accounts Get all accounts, account groups, and MAVs.
AccountsApi get_ancestors GET /customer/v1/customers/{customerId}/accounts/{accountId}/ancestors Get all ancestors of an account.
AzureCommonCredentialsApi assign_billing_account PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credential/azure/billing-accounts Assigns a billing account ID to an Azure credential.
AzureCommonCredentialsApi get_billing_accounts GET /credential/v1/customers/{customerId}/accounts/{accountId}/credential/azure/billing-accounts Retrieve billing accounts associated with credential.
AzureCommonCredentialsApi request_authorization PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credentials/azure/request-authorization Start the Azure authorization consent flow.
AzureCredentialsApi modify_azure_enterprise_agreement_credentials PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credentials/azure/enterprise-agreement Modify the credentials on the account.
AzureCredentialsApi modify_azure_subscription_credentials PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credentials/azure/subscription Modify the credentials on the account.
AzureCredentialsApi request_csp_authorization PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credentials/azure/csp/request-authorization Start the Azure CSP authorization consent flow.
ClientAccessKeysApi create_client_access_key POST /auth/v1/customers/{customerId}/clients/{clientId}/access-keys Create a new client access key.
ClientAccessKeysApi delete_client_access_key DELETE /auth/v1/customers/{customerId}/clients/{clientId}/access-keys/{accessKeyId} Delete a client access key.
ClientAccessKeysApi list_client_access_keys GET /auth/v1/customers/{customerId}/clients/{clientId}/access-keys Get all client access keys.
ClientsApi create_client POST /auth/v1/customers/{customerId}/clients Create a new client.
ClientsApi delete_client DELETE /auth/v1/customers/{customerId}/clients/{clientId} Delete a client.
ClientsApi get_client GET /auth/v1/customers/{customerId}/clients/{clientId} Get an individual client.
ClientsApi list_clients GET /auth/v1/customers/{customerId}/clients Get all clients.
ClientsApi update_client PUT /auth/v1/customers/{customerId}/clients/{clientId} Update a client.
CredentialsApi get_account_credentials GET /credential/v1/customers/{customerId}/accounts/{accountId}/credentials Get all credentials configured on the account.
CredentialsApi get_customer_credentials GET /credential/v1/customers/{customerId}/credentials Get all credentials configured on the customer.
CustomThemeSettingsApi get_theme_settings GET /customer/v1/customers/theme Retrieves the customer's theme settings.
CustomThemeSettingsApi update_custom_theme_settings PUT /customer/v1/customers/{customerId}/theme Update the custom theme settings such as logo, colors, etc.
CustomersApi get_customer GET /customer/v1/customers/{customerId} Get an individual customer.
CustomersApi list_customers GET /customer/v1/customers Get all customers.
GoogleCredentialsApi modify_google_credential PUT /credential/v1/customers/{customerId}/accounts/{accountId}/credentials/google Modify the default credential on the account.
PermissionSetsApi create_permission_set POST /policy/v1/customers/{customerId}/permission-sets Create a permission set.
PermissionSetsApi delete_permission_set DELETE /policy/v1/customers/{customerId}/permission-sets/{permissionSetId} Delete a permission set.
PermissionSetsApi get_all GET /policy/v1/customers/{customerId}/permission-sets Get all permission sets.
PermissionSetsApi get_permission_set GET /policy/v1/customers/{customerId}/permission-sets/{permissionSetId} Get an individual permission set.
PermissionSetsApi update_permission_set PUT /policy/v1/customers/{customerId}/permission-sets/{permissionSetId} Update a permission set.
PermissionsApi get_all GET /policy/v1/customers/{customerId}/permissions Get all permissions.
RolesApi create_role POST /policy/v1/customers/{customerId}/roles Create a new role.
RolesApi delete_role DELETE /policy/v1/customers/{customerId}/roles/{roleId} Delete a role.
RolesApi get_all GET /policy/v1/customers/{customerId}/roles Get all roles.
RolesApi get_role GET /policy/v1/customers/{customerId}/roles/{roleId} Get an individual role.
RolesApi list_clients_with_role_id GET /auth/v1/customers/{customerId}/roles/{roleId}/clients Get all clients belonging to a role.
RolesApi list_users_with_role_id GET /auth/v1/customers/{customerId}/roles/{roleId}/users Get all users belonging to a role.
RolesApi modify_client_roles PUT /auth/v1/customers/{customerId}/roles/{roleId}/clients Add or remove a role from multiple clients.
RolesApi modify_user_roles PUT /auth/v1/customers/{customerId}/roles/{roleId}/users Add or remove a role from multiple users.
RolesApi update_role PUT /policy/v1/customers/{customerId}/roles/{roleId} Update a role.
SAMLProviderRulesApi create_saml_provider_rule POST /auth/v1/customers/{customerId}/saml-providers/{samlProviderId}/rules Creates a new SAML provider rule for the specified SAML provider.
SAMLProviderRulesApi delete_saml_provider_rule DELETE /auth/v1/customers/{customerId}/saml-providers/{samlProviderId}/rules/{ruleId} Deletes a SAML provider rule.
SAMLProviderRulesApi list_saml_provider_rules GET /auth/v1/customers/{customerId}/saml-providers/{samlProviderId}/rules Get all SAML provider rules assigned to a SAML provider.
SAMLProviderRulesApi update_saml_provider_rule PUT /auth/v1/customers/{customerId}/saml-providers/{samlProviderId}/rules/{ruleId} Updates a SAML provider rule.
SAMLProvidersApi create_saml_provider POST /auth/v1/customers/{customerId}/saml-providers Creates a new SAML provider entry for this customer.
SAMLProvidersApi delete_saml_provider DELETE /auth/v1/customers/{customerId}/saml-providers/{samlProviderId} Deletes an existing SAML provider entry for this customer.
SAMLProvidersApi get_saml_provider GET /auth/v1/customers/{customerId}/saml-providers/{samlProviderId} Get a single SAML provider by ID.
SAMLProvidersApi list_saml_providers GET /auth/v1/customers/{customerId}/saml-providers Get all SAML providers.
SAMLProvidersApi update_saml_provider PUT /auth/v1/customers/{customerId}/saml-providers/{samlProviderId} Updates an existing SAML provider entry for this customer.
TokenManagementApi exchange_token_for_delegate_access_token PUT /auth/v1/token/exchange/{customerId} Exchange a token for a different customer.
TokenManagementApi get_token_info GET /auth/v1/token/info Get information about the current bearer token.
UserLevelAccessApi get_user_level_access GET /policy/v1/customers/{customerId}/user-level-access/{userId} Get user-level access for a single user.
UserLevelAccessApi update_user_level_access PUT /policy/v1/customers/{customerId}/user-level-access/{userId} Updates the user-level access for the given user.
UsersApi create_user POST /auth/v1/customers/{customerId}/users Create a new user.
UsersApi delete_user DELETE /auth/v1/customers/{customerId}/users/{userId} Delete a user.
UsersApi get_user GET /auth/v1/customers/{customerId}/users/{userId} Get an individual user.
UsersApi list_users GET /auth/v1/customers/{customerId}/users Get all users.
UsersApi send_activation POST /auth/v1/customers/{customerId}/users/{userId}/send-activation Send a user activation email.
UsersApi update_user PUT /auth/v1/customers/{customerId}/users/{userId} Update a user.

Documentation For Models

Documentation For Authorization

oauth

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • ****:

Author

support@cloudcheckr.com