API Reference Guide

Below is the list of CloudCheckr API calls. Most calls can be made against general CloudCheckr accounts, or against CloudCheckr Multi-Account Views where noted.

Certain API calls have been deprecated and are maintained for historical reasons only. A list of deprecated calls can be found here.

Click here for the list of Admin-Level API methods

The Admin-Level API is used for account management and requires an Admin-Level Access Key.


Click here for the list of Inventory-related API methods


Other API methods

alert/add_cost_alert*
alert/delete_cost_alert*
alert/get_alerts
alert/get_cost_alert_results*
alert/get_resources_alert_results*
alert/get_utilization_alert_results*
best_practice/get_best_practices_v2
billing/create_customer*
billing/get_cost_saving
billing/get_dashboard
billing/get_ec2_reserved_instance_rebalancer_ec2_instances_v2
billing/get_detailed_billing_analysis*
billing/get_detailed_billing_file*
billing/get_detailed_billing_with_grouping_v2*
billing/get_invoice*
billing/get_invoice_customers*
billing/get_monthly_bill
billing/get_ri_upfront_cost_amortization*
change_monitoring/get_changes*
cloudwatch/get_history*
help/get_all_api_endpoints
inventory/get_resources
security/get_cloudtrail_alert_results_v2
security/get_cloudtrail_custom_metrics
security/get_publicly_accessible_resources
* these calls are not compatible with Multi-Account Views.

USING ACCESS KEYS

CloudCheckr requires an Access Key to be passed as a parameter to all API calls.

IMPORTANT: An Admin-Level Access Key is needed to make calls which affect any account functions. A General Access Key will not be able to authorize these types of calls and will result in an error.

Click here for details on creating and managing Access Keys.

Example of using an Access Key:

https://api.cloudcheckr.com/api/change_monitoring.json/get_changes?access_key=[access_key]

Access Keys are 64 bytes long and have the following format.

56422A55E6B340239D6F472537128F979A86766B738C4BD1AC29F1F42DFEF55A

Putting it all together:

https://api.cloudcheckr.com/api/change_monitoring.json/get_changes?access_key=56422A55E6B340239D6F472537128F979A86766B738C4BD1AC29F1F42DFEF55A

API PAGINATION

When you select from the API, it returns up to 100 results. If the output of your call contains more than 100 results, CloudCheckr will pass back a token allowing you to get the next 100 results, which you should pass to the API to get the next set of 100 results.

For more information on using pagination with the CloudCheckr API please go here: http://support.cloudcheckr.com/cloudcheckr-api-userguide/#api_pagination


PREFERRED HTTP METHODS

When using libraries such as curl, you may need to indicate the HTTP method to use (POST or GET). The CloudCheckr API accepts both POST and GET in most API calls. However, we recommend you use the preferred HTTP Method when possible.

The preferred HTTP method for each call is GET unless specifically note in the API CALLS section.

For more information on HTTP methods, click here: http://www.w3schools.com/tags/ref_httpmethods.asp


OPTIONAL DATE PARAMETER FOR INVENTORY-RELATED API CALLS

For all inventory-related calls, you can use the option parameter “date”. By passing in “date” you can select the day for which to return the inventory. If date is not defined, the most recent inventory will be returned. If there is not a specific inventory for the date, CloudCheckr will attempt to use the last previous inventory to the date passed in.

XML call:

https://api.cloudcheckr.com/api/best_practice.xml/get_best_practices?access_key=[access_key]&date=2015-10-23

JSON call:

https://api.cloudcheckr.com/api/best_practice.json/get_best_practices?access_key=[access_key]&date=2015-10-23

The API response will include “DateOfResults”:”2015-11-23T20:13:03″ which will allow you to determine what specific date the inventory is for.


TROUBLESHOOTING

For help with troubleshooting common API issues, click here.


API CALLS

GET ALL API ENDPOINTS

The API method “get_all_api_endpoints” is used to return a complete list of all available CloudCheckr API calls and their parameters.

The preferred HTTP method for this call is GET.

XML call:

https://api.cloudcheckr.com/api/help.xml/get_all_api_endpoints?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/help.json/get_all_api_endpoints?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Either a General or Admin-Level Access Key is required for this call.

OUTPUT

XML Example:

<ArrayOfControllerContainer
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ControllerContainer>
        <controller_name>best_practice</controller_name>
        <api_calls>
            <ApiCall>
                <method_name>get_best_practices</method_name>
                <param_names>
                    <string>(admin level)access_key</string>
                    <string>date</string>
                    <string>aws_account_ids</string>
                    <string>all_result</string>
                    <string>importance</string>
                    <string>category</string>
                </param_names>
            </ApiCall>
        </api_calls>
    </ControllerContainer>
    <ControllerContainer>
        <controller_name>help</controller_name>
        <api_calls>
            <ApiCall>
                <method_name>get_resources_cloudformation_details</method_name>
                <param_names>
                    <string>date</string>
                    <string>aws_account_ids</string>
                    <string>max_results</string>
                </param_names>
            </ApiCall>
        </api_calls>
    </ControllerContainer>
</ArrayOfControllerContainer>

JSON Example:

[
  {
    "controller_name": "best_practice",
    "api_calls": [
      {
        "method_name": "get_best_practices",
        "param_names": [
          "(admin level)access_key",
          "date",
          "aws_account_ids",
          "all_result",
          "importance",
          "category"
        ]
      }
    ]
  },
  {
    "controller_name": "inventory",
    "api_calls": [
      {
        "method_name": "get_resources_cloudformation_details",
        "param_names": [
          "date",
          "aws_account_ids",
          "max_results"
        ]
      }
    ]
  }
]


GET BEST PRACTICE RESULTS V2

The API method “best_practice/get_best_practices_v2” is used to pull the list of best practice results from a CloudCheckr account. This call will also show ignored checks and the reasons for those ignored items.

XML call:

https://api.cloudcheckr.com/api/best_practice.xml/get_best_practices_v2?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/best_practice.json/get_best_practices_v2?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Standard Access Key required for all API calls
  • date (optional) – Date to pull the list of Best Practice results. Used to access historical data.
  • category (optional) – The category of the Best Practice report to pull. Accepts Security, Cost, Availability, and/or Usage.
  • importance (optional) – The importance level of the Best Practice checks to pull. Accepts ShowAll, High, Medium, Low, Informational, InformationAndHigher, LowAndHigher, MediumAndHigher
  • all_result (optional) – This will allow you to pull ALL results from the best practice report, even those with no issues. Accepts true or false.
  • aws_account_ids (optional; multi-account view only) – return statistics from these accounts.
  • bpc_id (optional) – This will allow you to pull results for a specific Best Practice ID number. Note: To get a list of available ID numbers, pull a list of results without specifying an ID.

OUTPUT

XML Example:

<GetBestPracticesResponse
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <BestPracticeChecks>
        <BestPracticeCheck>
            <CheckId>42</CheckId>
            <Name>Auto Scaling Groups Not Using Cooldown Period</Name>
            <ShortDescription>
Checks each Auto Scaling group to verify they are configured to utilize cooldown periods. Lists each group that does not.
</ShortDescription>
            <LongDescription>
                <p>When enabled, Auto Scaling will automatically scale EC2 capacity up or down, according to pre-defined conditions. During period of high-demand, the number of EC2 instances will increase to meet that demand. When there is little or no demand, the number of instances decreases to help minimize costs. </p>
                <p>Cooldown periods help to prevent Auto Scaling from initiating additional scaling activities before the effects of previous activities are visible. Because scaling activities are suspended when an Auto Scaling group is in cooldown, an adequate cooldown period helps to prevent a trigger from firing based on stale metrics. If a cool-down period is not configured, the scaling policy may scale up and down too quickly. </p>
                <p>
                    <a href="http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/scaling_plan.html#scaling_policies" target="_blank">Go here to learn more.</a>
                </p>
            </LongDescription>
            <Category>Usage</Category>
            <Importance>Low</Importance>
            <CountOfResults>2</CountOfResults>
            <Ignored>true</Ignored>
            <IgnoredReason>IgnoreExample</IgnoredReason>

            <Results>
                <Result>
Auto Scaling Group: agcmgroup | Cooldown: 1 second(s) | Region: US East (Northern Virginia)
</Result>
                <Result>
Auto Scaling Group: changemon | Cooldown: 1 second(s) | Region: US East (Northern Virginia)
</Result>
            </Results>
        </BestPracticeCheck>
    </BestPracticeChecks>
    <DateOfResults>2016-01-29T15:47:56</DateOfResults>
</GetBestPracticesResponse>

JSON Example:

{
  "BestPracticeChecks": [
    {
      "CheckId": 42,
      "Name": "Auto Scaling Groups Not Using Cooldown Period",
      "ShortDescription": "Checks each Auto Scaling group to verify they are configured to utilize cooldown periods. Lists each group that does not.",
      "LongDescription": "<p>When enabled, Auto Scaling will automatically scale EC2 capacity up or down, according to pre-defined conditions. During period of high-demand, the number of EC2 instances will increase to meet that demand. When there is little or no demand, the number of instances decreases to help minimize costs. </p><p>Cooldown periods help to prevent Auto Scaling from initiating additional scaling activities before the effects of previous activities are visible. Because scaling activities are suspended when an Auto Scaling group is in cooldown, an adequate cooldown period helps to prevent a trigger from firing based on stale metrics. If a cool-down period is not configured, the scaling policy may scale up and down too quickly. </p><p><a href=\"http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/scaling_plan.html#scaling_policies\" target=\"_blank\">Go here to learn more.</a></p>",
      "Category": "Usage",
      "Importance": "Low",
      "CountOfResults": 2,
      "Ignored",
      "IgnoredExample",
      "Results": [
        "Auto Scaling Group: agcmgroup | Cooldown: 1 second(s) | Region: US East (Northern Virginia)",
        "Auto Scaling Group: changemon | Cooldown: 1 second(s) | Region: US East (Northern Virginia)"
      ]
    }
  ],
  "DateOfResults": "2016-01-29T15:47:56"
}

LIST OF CHANGES FROM CHANGE MONITORING

The API method “change_monitoring/get_changes” is used to pull the list of changes in your AWS account.

XML call:

https://api.cloudcheckr.com/api/change_monitoring.xml/get_changes?access_key=[access_key]&start=2013-11-08&end=2013-11-15&resource_id=i-123456

JSON call:

https://api.cloudcheckr.com/api/change_monitoring.json/get_changes?access_key=[access_key]&start=2013-11-08&end=2013-11-15&resource_id=i-123456

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • start (optional) – return changes from after this date.
  • end (optional) – return changes from before this date.
  • NOTE: if start and end are not defined, the last 30 days will be returned.
  • resource_id (optional) – filter the list of changes to a specific resource, such as an instance ID or S3 bucket.

OUTPUT

XML Example:

<GetChangesResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Changes>
		<Change>
			<ChangeType>Modified</ChangeType>
			<EntityType>CloudTrailTrail</EntityType>
			<Identifier>Default</Identifier>
			<ServiceType>CloudTrail</ServiceType>
			<ChangeFound>2013-12-10T23:17:29</ChangeFound>
			<Region>us-west-2</Region>
			<OldState>[{"Key":"SnsTopicName","Value":""}]</OldState>
			<NewState>[{"Key":"SnsTopicName","Value":"CloudTrailOregon"}]</NewState>
		</Change>
		<Change>
			<ChangeType>Modified</ChangeType>
			<EntityType>CloudTrailTrail</EntityType>
			<Identifier>Default</Identifier>
			<ServiceType>CloudTrail</ServiceType>
			<ChangeFound>2013-12-16T23:16:01</ChangeFound>
			<Region>us-east-1</Region>
			<OldState>[{"Key":"TimeLoggingStarted","Value":"12\/6\/2013 6:27:57 PM"},{"Key":"TimeLoggingStopped","Value":"12\/5\/2013 12:03:27 AM"}]</OldState>
			<NewState>[{"Key":"TimeLoggingStarted","Value":"12\/16\/2013 4:53:53 PM"},{"Key":"TimeLoggingStopped","Value":"12\/16\/2013 4:53:51 PM"}]</NewState>
		</Change>
	</Changes>
	<FromDate>2013-11-17T00:00:00</FromDate>
	<ToDate>2013-12-17T23:59:59</ToDate>
</GetChangesResponse>

JSON Example:

{
   "Changes":[
      {
         "ChangeType":"Modified",
         "EntityType":"CloudTrailTrail",
         "Identifier":"Default",
         "ServiceType":"CloudTrail",
         "ChangeFound":"2013-12-10T23:17:29",
         "Region":"us-west-2",
         "OldState":"[{\"Key\":\"SnsTopicName\",\"Value\":\"\"}]",
         "NewState":"[{\"Key\":\"SnsTopicName\",\"Value\":\"CloudTrailOregon\"}]"
      },
      {
         "ChangeType":"Modified",
         "EntityType":"CloudTrailTrail",
         "Identifier":"Default",
         "ServiceType":"CloudTrail",
         "ChangeFound":"2013-12-16T23:16:01",
         "Region":"us-east-1",
         "OldState":"[{\"Key\":\"TimeLoggingStarted\",\"Value\":\"12\\/6\\/2013 6:27:57 PM\"},{\"Key\":\"TimeLoggingStopped\",\"Value\":\"12\\/5\\/2013 12:03:27 AM\"}]",
         "NewState":"[{\"Key\":\"TimeLoggingStarted\",\"Value\":\"12\\/16\\/2013 4:53:53 PM\"},{\"Key\":\"TimeLoggingStopped\",\"Value\":\"12\\/16\\/2013 4:53:51 PM\"}]"
      },
   ],
   "FromDate":"2013-11-17T00:00:00",
   "ToDate":"2013-12-17T23:59:59"
}

LIST RESULTS FROM AN ADVANCED FILTERING (W/TAGS) SAVED FILTER

The API method “billing/get_detailed_billing_analysis” is used to pull the results from a Saved Filter in the Advanced Filtering (w/ Tags) report.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_detailed_billing_analysis?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_detailed_billing_analysis?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • saved_filter_name (required) – The name of the Saved Filter from which to pull the results.
  • start (optional) – return costs from after this date.
  • end (optional) – return costs from before this date.
  • NOTE: if start and end are not defined, the last 14 days will be returned.

OUTPUT

XML Example:

<GetDetailedBillingAnalysisResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Groupings>
		<Grouping>
			<Name>All</Name>
			<Costs>
				<Cost>
					<Date>2013-12-03T00:00:00</Date>
					<Amount>1.0541985900</Amount>
				</Cost>
				<Cost>
					<Date>2013-12-03T01:00:00</Date>
					<Amount>0.8642166300</Amount>
				</Cost>
				<Cost>
					<Date>2013-12-03T02:00:00</Date>
					<Amount>0.8251885500</Amount>
				</Cost>
				<Cost>
					<Date>2013-12-03T03:00:00</Date>
					<Amount>0.8248988300</Amount>
				</Cost>
				...snip...
				<Cost>
					<Date>2013-12-17T23:00:00</Date>
					<Amount>0.9257002500</Amount>
				</Cost>
			</Costs>
		</Grouping>
	</Groupings>
</GetDetailedBillingAnalysisResponse>

JSON Example:

{
	"Groupings":[
	{
		"Name":"All",
		"Costs":[
			{"Date":"2013-12-03T00:00:00","Amount":1.0541985900},
			{"Date":"2013-12-03T01:00:00","Amount":0.8642166300},
			{"Date":"2013-12-03T02:00:00","Amount":0.8251885500},
			{"Date":"2013-12-03T03:00:00","Amount":0.8248988300},
			...snip...
			{"Date":"2013-12-17T16:00:00","Amount":0.9264072500},
			{"Date":"2013-12-17T17:00:00","Amount":0.9240584100}
		]
	}]
}

LIST RESULTS FROM AN ADVANCED GROUPING (W/TAGS) SAVED FILTER

The API method “billing/get_detailed_billing_with_grouping_v2” is used to pull the results from a Saved Filter in the Advanced Grouping (w/ Tags) report. Version 2 of the call includes two additional parameters.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_detailed_billing_with_grouping_v2?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_detailed_billing_with_grouping_v2?access_key=[access_key]&start=2013-11-08&end=2013-11-15&saved_filter_name=aaronsfilter

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • saved_filter_name (required) – The name of the Saved Filter from which to pull the results.
  • use_account (required) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required — either use this or ‘use_account’) – The CloudCheckr ID of the account you are making the call for.
  • with_costs_by_group (optional – defaults to true if not specified) – Retrieves costs per group. Accepts true/false.
  • with_costs_by_time (optional – defaults to true if not specified) – Retrieves costs per time period. Accepts true/false.
  • start (optional) – return costs from after this date.
  • end (optional) – return costs from before this date.
  • NOTE: if start and end are not defined, the last 14 days will be returned.

OUTPUT

XML Example:

<GetDetailedBillingWithGroupingResponseV2 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Total>30.7983416200</Total>
    <Max>30.7983416200</Max>
    <Min>30.7983416200</Min>
    <Average>30.798698086413034906518967198</Average>
    <CostsByGroup>
        <GroupingLevel>
            <GroupName>Service</GroupName>
            <GroupValue>AmazonS3</GroupValue>
            <FriendlyName>S3</FriendlyName>
            <Cost>0.1099985400</Cost>
            <NextLevel>
                <GroupingLevel>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI5X7LBFKDHYABCDE:mikeb</GroupValue>
                    <FriendlyName />
                    <Cost>0.1083478400</Cost>
                    <NextLevel />
                </GroupingLevel>
            </NextLevel>
        </GroupingLevel>
        <GroupingLevel>
            <GroupName>Service</GroupName>
            <GroupValue>AmazonEC2</GroupValue>
            <FriendlyName>EC2</FriendlyName>
            <Cost>22.6078574000</Cost>
            <NextLevel>
                <GroupingLevel>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
                    <FriendlyName />
                    <Cost>0.0750056100</Cost>
                    <NextLevel />
                </GroupingLevel>
            </NextLevel>
        </GroupingLevel>
    </CostsByGroup>
    <CostsByTime>
        <GroupingByTime>
            <Groups>
                <Grouping>
                    <GroupName>Service</GroupName>
                    <GroupValue>AmazonEC2</GroupValue>
                    <FriendlyName>EC2</FriendlyName>
                </Grouping>
                <Grouping>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
                    <FriendlyName />
                </Grouping>
            </Groups>
            <CostDates>
                <GroupCostDate>
                    <Date>1/20/2017 12:00:00 AM</Date>
                    <Cost>0.0750056100</Cost>
                    <UsageQuantity>24.0000619600</UsageQuantity>
                </GroupCostDate>
            </CostDates>
        </GroupingByTime>
        <GroupingByTime>
            <Groups>
                <Grouping>
                    <GroupName>Service</GroupName>
                    <GroupValue>AmazonS3</GroupValue>
                    <FriendlyName>S3</FriendlyName>
                </Grouping>
                <Grouping>
                    <GroupName>aws:createdBy</GroupName>
                    <GroupValue>IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb</GroupValue>
                    <FriendlyName />
                </Grouping>
            </Groups>
            <CostDates>
                <GroupCostDate>
                    <Date>1/20/2017 12:00:00 AM</Date>
                    <Cost>0.1083478400</Cost>
                    <UsageQuantity>418.5352970600</UsageQuantity>
                </GroupCostDate>
            </CostDates>
        </GroupingByTime>
    </CostsByTime>
</GetDetailedBillingWithGroupingResponseV2>

JSON Example:

{
  "Total": 30.79834162,
  "Max": 30.79834162,
  "Min": 30.79834162,
  "Average": 30.798698086413037,
  "CostsByGroup": [
    {
      "GroupName": "Service",
      "GroupValue": "AmazonS3",
      "FriendlyName": "S3",
      "Cost": "0.1099985400",
      "NextLevel": [
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
          "FriendlyName": "",
          "Cost": "0.1083478400",
          "NextLevel": []
        }
      ]
    },
    {
      "GroupName": "Service",
      "GroupValue": "AmazonEC2",
      "FriendlyName": "EC2",
      "Cost": "22.6078574000",
      "NextLevel": [
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
          "FriendlyName": "",
          "Cost": "0.0750056100",
          "NextLevel": []
        }
      ]
    }
  ],
  "CostsByTime": [
    {
      "Groups": [
        {
          "GroupName": "Service",
          "GroupValue": "AmazonEC2",
          "FriendlyName": "EC2"
        },
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
          "FriendlyName": ""
        }
      ],
      "CostDates": [
        {
          "Date": "1/20/2017 12:00:00 AM",
          "Cost": "0.0750056100",
          "UsageQuantity": "24.0000619600"
        }
      ]
    },
    {
      "Groups": [
        {
          "GroupName": "Service",
          "GroupValue": "AmazonS3",
          "FriendlyName": "S3"
        },
        {
          "GroupName": "aws:createdBy",
          "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
          "FriendlyName": ""
        }
      ],
      "CostDates": [
        {
          "Date": "1/20/2017 12:00:00 AM",
          "Cost": "0.1083478400",
          "UsageQuantity": "418.5352970600"
        }
      ]
    }
  ]
}

EXPORT DETAILED BILLING FILE

The API method “get_detailed_billing_file” is used to export the RAW DBR file.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_detailed_billing_file?access_key=[access_key]&start=[Start Date]&end=[End Date]&cost_type=[Cost Type]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_detailed_billing_file?access_key=[access_key]&start=[Start Date]&end=[End Date]&cost_type=[Cost Type]

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • start (required) – datetime
  • end (required) – datetime
  • cost_type (required) – List, Blended or Unblended

OUTPUT

{"Message":"Sucessfully created customer.","Code":200}

RI UPFRONT COST AMORTIZATION

The API method “get_ri_upfront_cost_amortization” is used to gather information regarding amortization of the upfront costs of your purchased Reserved Instances.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_ri_upfront_cost_amortization?access_key[access_key]&account_name=MyAccountName

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_ri_upfront_cost_amortization?access_key[access_key]&account_name=MyAccountName

This call accepts 5 parameters:

  • access_key (required) – standard access key required for all API calls.
  • start (optional) – Start Date.
  • end (optional) – End Date.
  • service (optional) – The specific service you wish to query.
  • use_account (required for admin API key) – The specific account you wish to query.

OUTPUT

XML Output:

<GetRIUpfrontCostAmortizationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <start>2014-12-23T13:07:07.2988635Z</start>
    <end>2016-06-23T13:07:07.2988635Z</end>
    <service>EC2,RDS,ElastiCache,Redshift</service>
    <RiItems>
        <ReservedInstanceAmortizationItem>
            <Month>2014-12-01T00:00:00</Month>
            <TotalUpfrontCosts>811.00</TotalUpfrontCosts>
            <TotalAmortizedCosts>139.95</TotalAmortizedCosts>
            <PurchasedRis>...</PurchasedRis>
            <AmortizedRis>
                <ReservedInstanceAmortizationItemDetail>...</ReservedInstanceAmortizationItemDetail>
                <ReservedInstanceAmortizationItemDetail>...</ReservedInstanceAmortizationItemDetail>
                <ReservedInstanceAmortizationItemDetail>...</ReservedInstanceAmortizationItemDetail>
                <ReservedInstanceAmortizationItemDetail>
                    <UnqiueId>040354a6-e547-4116-939c-ea7693b33cb8</UnqiueId>
                    <Month>2014-12-01T00:00:00</Month>
                    <Service>EC2</Service>
                    <InstanceType>t1.micro</InstanceType>
                    <AvailabilityZone>us-east-1b</AvailabilityZone>
                    <Platform>WindowsVpc</Platform>
                    <Term>1 Year</Term>
                    <Cost>4.9660515644977168949771689655</Cost>
                    <AccountName>949195593353</AccountName>
                </ReservedInstanceAmortizationItemDetail>
            </AmortizedRis>
        </ReservedInstanceAmortizationItem>
    </RiItems>
</GetRIUpfrontCostAmortizationResponse>

JSON Output:

{  
   "start":"2014-12-23T14:23:43.1871277Z",
   "end":"2016-06-23T14:23:43.1871277Z",
   "service":"EC2,RDS,ElastiCache,Redshift",
   "RiItems":[  
      {  
         "Month":"2014-12-01T00:00:00",
         "TotalUpfrontCosts":811.00,
         "TotalAmortizedCosts":139.95,
         "PurchasedRis":[  
            {  
               "UnqiueId":"byaaron",
               "Month":"2014-12-01T00:00:00",
               "Service":"RDS",
               "InstanceType":"db.m3.medium",
               "AvailabilityZone":"us-east-1",
               "Platform":"sqlserver-se(byol)",
               "Term":"1 Year",
               "Cost":0.0,
               "AccountName":"949195593353"
            },
            {  
               "UnqiueId":"376d19e5-8aed-4942-a72e-5dcdfed3ce54",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"m3.medium",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":749.000,
               "AccountName":"949195593353"
            },
            {  
               "UnqiueId":"142453e2-b296-4e37-a707-dc65d7bda4a3",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailabilityZone":"us-west-2b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":0.000,
               "AccountName":"949195593353"
            },
            {  
               "UnqiueId":"040354a6-e547-4116-939c-ea7693b33cb8",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":62.000,
               "AccountName":"9491553353"
            }
         ],
         "AmortizedRis":[  
            {  
               "UnqiueId":"byaaron",
               "Month":"2014-12-01T00:00:00",
               "Service":"RDS",
               "InstanceType":"db.m3.medium",
               "AvailabilityZone":"us-east-1",
               "Platform":"sqlserver-se(byol)",
               "Term":"1 Year",
               "Cost":75.000,
               "AccountName":"9491953353"
            },
            {  
               "UnqiueId":"376d19e5-8aed-4942-a72e-5dcdfed3ce54",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"m3.medium",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":59.977241379724721004566210044,
               "AccountName":"94915593353"
            },
            {  
               "UnqiueId":"142453e2-b296-4e37-a707-dc65d7bda4a3",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailablityZone":"us-west-2b",
               "Platform":"Windowspc",
               "Term":"1 Year",
               "Cost":0.0,
               "AccountName":"94919593353"
            },
            {  
               "UnqiueId":"040354a6-e547-4116-939c-ea7693b33cb8",
               "Month":"2014-12-01T00:00:00",
               "Service":"EC2",
               "InstanceType":"t1.micro",
               "AvailabilityZone":"us-east-1b",
               "Platform":"WindowsVpc",
               "Term":"1 Year",
               "Cost":4.9660515644977168949771689655,
               "AccountName":"949195593353"
            }
         ]
      },
   ]
} 


GET INVOICE DATA FROM INVOICE GENERATOR

The API method “get_invoice” is used to retrieve the invoice data from the CloudCheckr Invoice Generator.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&group_by=awsservice&cost_type=list

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&group_by=awsservice&cost_type=list

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • customer_names (required) – The name of the customer for the invoice you want to retrieve.
  • start_date (required) – The beginning date to pull cost data for the invoice.
  • end_date (required) – The end date to pull cost data for the invoice.
  • format (required) – The report format for the invoice. Accepts Summary, Detailed, SavedFilter.
  • group_by (required) – The group_by to be used based on the value of the format parameter.
    • When format – Summary group_by accepts values of region, awsservice or awsserviceandregion.
    • When format – Detailed group_by  accepts values of bydescription, byoperation or byusagetypeanddescription.
    • When format – SavedFilter  replace group_by with saved_filter_name and you must provided the the name of the SavedFilter being used
  • cost_type (required) – The cost type to use for the invoice data. Accepts: List, Unblended, or Blended.
  • currency_denomination (optional) – The type of currency to display if converting from US $.
  • currency_conversion (optional) – What to use to convert the currency from US $.
  • show_credits (optional) – Choose whether to apply the AWS credits to the account or not. Accepts yes or no.
  • tag_key (optional) – The name of the tag key you would like to filter the costs to.
  • tag_value (optional) – The name of the tag value you would like to filter the costs to.
  • use_account (required for admin API key) – The specific account you wish to query.

OUTPUT

XML Output:

<GetInvoic0eResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CustomerInvoices>
   <CustomerInvoice>
    <CustomerName>[CustomerName]</CustomerName>
    <CustomerAddress/>
    <CustomerEmail>qacheckr@gmail.com</CustomerEmail>
    <AWSServiceTotal>$1.92</AWSServiceTotal>
    <CustomChargeTotal>$0.00</CustomChargeTotal>
    <InvoiceSummary>
     <ServiceInvoice>
      <ServiceName>EC2</ServiceName>
      <Cost>$1.68</Cost>
      <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
      <ServiceName>Support Business</ServiceName>
      <Cost>$0.17</Cost>
      <Regions/>
    </ServiceInvoice>
      <ServiceInvoice>
       <ServiceName>S3</ServiceName>
       <Cost>$0.05</Cost>
       <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>Custom Charge</ServiceName>
     <Cost>$0.02</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>SimpleDB</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>Glacier</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>DynamoDB</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
    <ServiceInvoice>
     <ServiceName>SWF</ServiceName>
     <Cost>< $0.01</Cost>
     <Regions/>
    </ServiceInvoice>
   </InvoiceSummary>
   <InvoiceDetail/>
   <HasData>true</HasData>
  </CustomerInvoice>
 </CustomerInvoices>
</GetInvoiceResponse>

JSON Output:

{"CustomerInvoices":[{"CustomerName":"[CustomerName]",
                      "CustomerAddress":"",
                      "CustomerEmail":"qacheckr@gmail.com",
                      "AWSServiceTotal":"$1.16",
                      "CustomChargeTotal":"$0.00",
                      "CreditTotal":null,
                      "InvoiceSummary":[{"ServiceName":"EC2","Cost":"$1.11","Regions":[]},
                                        {"ServiceName":"S3","Cost":"$0.04","Regions":[]},
                                        {"ServiceName":"Custom Charge","Cost":"$0.01","Regions":[]},
                                        {"ServiceName":"SimpleDB","Cost":"< $0.01","Regions":[]},
                                        {"ServiceName":"Glacier","Cost":"< $0.01","Regions":[]},
                                        {"ServiceName":"DynamoDB","Cost":"< $0.01","Regions":[]},
                                        {"ServiceName":"SWF","Cost":"< $0.01","Regions":[]}],
                                         "InvoiceDetail":[],"HasData":true}]}

GET LIST OF CUSTOMERS SETUP IN INVOICE GENERATOR

The API method “get_invoice_customers” is used to retrieve the list of customers that are configured within the CloudCheckr Invoice Generator.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&cost_type=list

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_invoice?access_key=[access_key]&customer_names=[customer]&start_date=07/01/2015&end_date=07/31/2015&format=summary&cost_type=list

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • use_account (required — either this field or ‘use_cc_account_id’) – The specific account you wish to query.
  • use_cc_account_id (required — either this field or ‘use_account’) – The CloudCheckr ID number for the AWS account within the application.

OUTPUT

XML Output:

<GetInvoiceCustomersResponse
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Customers>
        <BillingInvoiceCustomer>
            <Name>Acount 1</Name>
            <Email>elvis@presley.com</Email>
            <Address>123 Elvis Presley Blvd Memphis, TN 12345</Address>
            <Accounts/>
        </BillingInvoiceCustomer>
        <BillingInvoiceCustomer>
            <Name>Account 2 </Name>
            <Email>user@domain.com</Email>
            <Address>1 Pleasant Street, Awesomeville, NY 123456</Address>
            <Accounts/>
    </Customers>
</GetInvoiceCustomersResponse>

 


CREATE CUSTOMERS FOR THE INVOICE GENERATOR

The API method “create_customer” is used to create customers for use in the CloudCheckr Invoice Generator.

XML call:

https://api.cloudcheckr.com/api/billing.xml/create_customer?access_key=[access_key]&name=[name]&email=[email_address]&address=[address]&aws_accounts=[accounts]

JSON call:

https://api.cloudcheckr.com/api/billing.json/create_customer?access_key=[access_key]&name=[name]&email=[email_address]&address=[address]&aws_accounts=[accounts]

This call accepts these parameters:

“(required)name”, “(required)email”, “(required)address”, “(required)aws_accounts”]

  • access_key (required) – standard access key required for all API calls.
  • name (required) – the name of the customer to be used in the invoice generator.
  • email (required) – the email address to be associated with the customer.
  • address (required) – the mailing address to be associated with the customer.
  • aws_accounts (required) – the name(s) of the AWS Account(s) that you will like to use to create the customer. Will accept multiple accounts.

OUTPUT

{"Message":"Sucessfully created customer.","Code":200}

 


CLOUDWATCH STATISTICS

The API method “get_history” is used to pull CloudWatch metrics from your AWS account.

XML call:

https://api.cloudcheckr.com/api/CloudWatch.xml/get_history?access_key=[access_key]&service=EC2:CPUUtilization

JSON call:

https://api.cloudcheckr.com/api/CloudWatch.json/get_history?access_key=[access_key]&service=EC2:CPUUtilization

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • service (required) – the CloudWatch metric from which to pull the results.
  • start (optional) – return statistics from after this date.
  • end (optional) – return statistics from before this date.
  • NOTE: if start and end are not defined, the last 7 days will be returned.

OUTPUT

XML Example:

<CloudWatchHistory xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Service>EC2</Service>
  <MetricType>CPUUtilization</MetricType>
  <CloudWatch>
    <CloudWatchDetail>
       <ResourceId>i-3cf3f56f</ResourceId>
       <Region>US East (Northern Virginia)</Region>
       <Value>4.76</Value>
       <Time>2014-06-06T15:00:00</Time>
    </CloudWatchDetail>
  </CloudWatch>
  <FromDate>2014-08-12T00:00:00</FromDate>
  <ToDate>2014-08-19T00:00:00</ToDate>
</CloudWatchHistory>

JSON Example:

{
    "Service": "EC2",
    "MetricType": "CPUUtilization",
    "CloudWatch": [{
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "0.167",
        "Time": "2014-08-15T16:00:00"
    }, {
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "1.226",
        "Time": "2014-08-15T15:00:00"
    }, {
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "0.2225",
        "Time": "2014-08-15T14:00:00"
    }, {
        "ResourceId": "i-05c10a2e",
        "Region": "US East (Northern Virginia)",
        "MetricType": null,
        "Value": "0.194166666666667",
        "Time": "2014-08-15T13:00:00"
    }],
    "FromDate": "2014-08-12T00:00:00",
    "ToDate": "2014-08-19T23:59:59"
}

ADD COST ALERT

The API method “add_cost_alert” is used to programmatically create new cost alert within CloudCheckr.

The preferred HTTP method for this call is POST.

XML call:

https://api.cloudcheckr.com/api/alert.xml/add_cost_alert?access_key=[access_key]&alert_name=Alert&budget=10000&percent_of_budget=75&only_send_once=true&budget_period=monthly&emails=user@domain.com

JSON call:

https://api.cloudcheckr.com/api/alert.json/add_cost_alert?access_key=[access_key]&alert_name=Alert&budget=10000&percent_of_budget=75&only_send_once=true&budget_period=monthly&emails=user@domain.com

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • alert_name (required) – the name of the new alert.
  • emails (optional) – the email addresses that will receive the alert email. Separate multiple addresses using commas.
  • sns_topics (optional) – the ARN for the SNS topic that you would like the alert delivered.
  • pagerduty_service_key (optional) – the Key for the PagerDuty alert you would like the CloudCheckr alert to be delivered to.
  • budget (required) – the dollar amount for the budget.
  • percent_of_budget (required) – the percentage of costs versus budget that will trigger the alert.
  • send_every_days (optional) – dictates how frequently the alert is sent.
  • only_send_once (optional) – set to true to only receive one alert when the percent of budget is met.
  • budget_period (optional) – enter daily to set a daily budget or monthly to have the budget align with the AWS month-to-date costs.
  • budget_custom_start_date (optional) – the month/day/year you would like the budget to start comparing against.
  • budget_custom_end_date (optional) – the month/day/year you would like the budget to stop comparing against.
  • saved_filters (optional) – the name of the Advanced Filtering saved filter you would like to create the alert against.
  • account_to_filter (optional) – the AWS Account ID you would like to compare create the alert against. If parameter is not used, budget will compare against all accounts.

OUTPUT

XML & JSON Example:

{"Code":200,"Message":"OK"}

DELETE COST ALERT

The API method “delete_cost_alert” is used to programmatically delete an already-created cost alert within CloudCheckr.

The preferred HTTP method for this call is POST.

XML call:

https://api.cloudcheckr.com/api/alert.xml/delete_cost_alert?access_key=[access_key]&alert_name=Alert

JSON call:

https://api.cloudcheckr.com/api/alert.json/delete_cost_alert?access_key=[access_key]&alert_name=Alert

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • alert_name (required) – the name of the alert that you would like to delete.

OUTPUT

XML & JSON Example:

{"Code":200,"Message":"OK"}

GET COST ALERT RESULTS

The API method “get_cost_alert_results” is used to programmatically retrieve the results of configured Cost alerts within an account.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_cost_alert_results?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_cost_alert_results?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY.
  • to (optional) – return report to this date. The date format is MM/DD/YYYY.
  • alert_name (optional) – the name of the alert.
  • max_results (optional) – the max number of results to return before paginating the results.
  • enabled (optional) – retrieve all the alerts that are currently enabled for the project. Accepts true/false.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<AlertResults>
	<AlertResultItemModel>
		<Id>59321</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>10/26/2016 3:00 PM</Triggered>
		<Text>
			Cost:$2,4631.90|Reserved Instance Upfront Cost:$100.00|TriggerPercent:100.00%
		</Text>
		<AlertType>AWS Costs</AlertType>
		<TriggeredBy>alert_test</TriggeredBy>
	</AlertResultItemModel>
</AlertResults>

JSON Example:

{
  "AlertResults": {
    "AlertResultItemModel": {
      "Id": "59321",
      "CanIgnore": "false",
      "Triggered": "10/26/2016 3:00 PM",
      "Text": "Cost:$2,4631.90|Reserved Instance Upfront Cost:$100.00|TriggerPercent:100.00%",
      "AlertType": "AWS Costs",
      "TriggeredBy": "alert_test"
    }
  }
}

GET UTILIZATION ALERT RESULTS

The API method “get_utilization_alert_results” is used to programmatically retrieve the list of configured utilization alerts within an account.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_utilization_alert_results?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_utilization_alert_results?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY.
  • to (optional) – return report to this date. The date format is MM/DD/YYYY.
  • alert_name (optional) – the name of the alert.
  • max_results (optional) – the max number of results to return before paginating the results.
  • enabled (optional) – retrieve all the alerts that are currently enabled for the project. Accepts true/false.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<AlertResults>
	<AlertResultItemModel>
		<Id>59368</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>10/26/2016 1:23 PM</Triggered>
		<Text>InstanceCount:16</Text>
		<AlertType>EC2 Number of Instances</AlertType>
		<TriggeredBy>Test1</TriggeredBy>
	</AlertResultItemModel>
	<AlertResultItemModel>
		<Id>5296</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>7/21/2016 10:17 PM</Triggered>
		<Text>InstanceCount:8</Text>
		<AlertType>EC2 Number of Instances</AlertType>
		<TriggeredBy>Test1</TriggeredBy>
	</AlertResultItemModel>
	<AlertResultItemModel>
		<Id>5219</Id>
		<UiId>
			Instance: i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)
		</UiId>
		<CanIgnore>true</CanIgnore>
		<Triggered>7/9/2016 4:18 PM</Triggered>
		<Text>
			Resource:CPUUtilization|Instance:i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)|Average:26.21%
		</Text>
		<AlertType>EC2 Resource Utilization</AlertType>
		<TriggeredBy>Testing 201</TriggeredBy>
	</AlertResultItemModel>
</AlertResults>

JSON Example:

{
  "AlertResults": {
    "AlertResultItemModel": [
      {
        "Id": "59368",
        "CanIgnore": "false",
        "Triggered": "10/26/2016 1:23 PM",
        "Text": "InstanceCount:16",
        "AlertType": "EC2 Number of Instances",
        "TriggeredBy": "Test1"
      },
      {
        "Id": "5296",
        "CanIgnore": "false",
        "Triggered": "7/21/2016 10:17 PM",
        "Text": "InstanceCount:8",
        "AlertType": "EC2 Number of Instances",
        "TriggeredBy": "Test1"
      },
      {
        "Id": "5219",
        "UiId": "Instance: i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)",
        "CanIgnore": "true",
        "Triggered": "7/9/2016 4:18 PM",
        "Text": "Resource:CPUUtilization|Instance:i-42c89df7 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c)|Average:26.21%",
        "AlertType": "EC2 Resource Utilization",
        "TriggeredBy": "Testing 201"
      }
    ]
  }
}

GET RESOURCES ALERT RESULTS

The API method “get_resources_alert_results” is used to programmatically retrieve the list of configured alerts related to resources within an account.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_resources_alert_results?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_resources_alert_results?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard access key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY.
  • to (optional) – return report to this date. The date format is MM/DD/YYYY.
  • alert_name (optional) – the name of the alert.
  • max_results (optional) – the max number of results to return before paginating the results.
  • enabled (optional) – retrieve all the alerts that are currently enabled for the project. Accepts true/false.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<AlertResults>
	<AlertResultItemModel>
		<Id>63146</Id>
		<CanIgnore>false</CanIgnore>
		<Triggered>11/8/2016 7:52 PM</Triggered>
		<Text>
			ChangeType:Added|Service:EC2|Region:US East (Northern Virginia)|Identifier:launch-wizard-00|OldValue:[]|NewValue:[{"Key":"GroupDescription","Value":"launch-wizard-00 created 2016-05-02T08:55:32.509-04:00"},{"Key":"GroupId","Value":"sg-6a0f1XXd"},{"Key":"GroupName","Value":"launch-wizard-00"}]
		</Text>
		<AlertType>Security Group Changes</AlertType>
		<TriggeredBy>TEST_Sec_Grp_Changes</TriggeredBy>
	</AlertResultItemModel>
</AlertResults>

JSON Example:

{
  "AlertResults": {
    "AlertResultItemModel": {
      "Id": "63146",
      "CanIgnore": "false",
      "Triggered": "11/8/2016 7:52 PM",
      "Text": "ChangeType:Added|Service:EC2|Region:US East (Northern Virginia)|Identifier:launch-wizard-00|OldValue:[]|NewValue:[{\"Key\":\"GroupDescription\",\"Value\":\"launch-wizard-00 created 2016-05-02T08:55:32.509-04:00\"},{\"Key\":\"GroupId\",\"Value\":\"sg-6a0f1XXd\"},{\"Key\":\"GroupName\",\"Value\":\"launch-wizard-00\"}]",
      "AlertType": "Security Group Changes",
      "TriggeredBy": "TEST_Sec_Grp_Changes"
    }
  }
}

PUBLICLY ACCESSIBLE RESOURCES

The API method “get_publicly_accessible_resources” is used to show you the publicly accessible resources for any given account within CloudChecker.

XML call:

https://api.cloudcheckr.com/api/security.xml/get_publicly_accessible_resources?access_key=[ACCESS KEY]

JSON call:

https://api.cloudcheckr.com/api/security.json/get_publicly_accessible_resources?access_key=[ACCESS KEY]

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.

Note: If using an admin API key, use_account is required

OUTPUT

XML Example:

<PubliclyAccessibleResourcesResponse>
    <PubliclyAccessibleEc2Instances>
        <PubliclyAccessibleEc2Instance>
            <Region>US East (Northern Virginia)</Region>
            <AvailabilityZone>us-east-1d</AvailabilityZone>
            <VpcId>vpc-24343948</VpcId>
            <SubnetId>subnet-38343954</SubnetId>
            <Instance>i-ecbca690 (VPCTest)</Instance>
            <IpAddress>54.208.129.79</IpAddress>
        </PubliclyAccessibleEc2Instance>
        <PubliclyAccessibleEc2Instance>
            <Region>US East (Northern Virginia)</Region>
            <AvailabilityZone>us-east-1d</AvailabilityZone>
            <VpcId>vpc-24343948</VpcId>
            <SubnetId>subnet-b116b3c6</SubnetId>
            <Instance>i-f2c28109</Instance>
            <IpAddress>54.86.207.128</IpAddress>
        </PubliclyAccessibleEc2Instance>
        <PubliclyAccessibleEc2Instance>
            <Region>EU (Frankfurt)</Region>
            <AvailabilityZone>eu-central-1a</AvailabilityZone>
            <VpcId>vpc-4c08ec25</VpcId>
            <SubnetId>subnet-ecef0885</SubnetId>
            <Instance>i-945d3d5a (Frankfurt)</Instance>
            <IpAddress>54.93.171.200</IpAddress>
        </PubliclyAccessibleEc2Instance>
    </PubliclyAccessibleEc2Instances>
    <PubliclyAccessibleRdsInstances/>
    <PubliclyAccessibleRedshiftClusters/>
    <PubliclyAccessibleS3Buckets></PubliclyAccessibleS3Buckets>
</PubliclyAccessibleResourcesResponse>

JSON Example:

{
    "PubliclyAccessibleEc2Instances":[
        {
            "Instance":"i-932ce7c1 (Default-Environment)",
            "IpAddress":"54.211.156.217",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":null,
            "VpcId":null,
            "SubnetId":null
        },
        {
            "Instance":"i-0c1ad1e3",
            "IpAddress":"23.20.180.34",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":null,
            "VpcId":null,
            "SubnetId":null
        },
        {
            "Instance":"i-1cca06e6 (testingvpc1-env)",
            "IpAddress":"52.0.169.238",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":"us-east-1d",
            "VpcId":"vpc-24343948",
            "SubnetId":"subnet-38343954"		
        },
        {
            "Instance":"i-ecbca690 (VPCTest)",
            "IpAddress":"54.208.129.79",
            "Region":"US East (Northern Virginia)",
            "AvailabilityZone":"us-east-1d",
            "VpcId":"vpc-24343948",
            "SubnetId":"subnet-38343954"
        }
    ],
    "PubliclyAccessibleRdsInstances":[
    ],
    "PubliclyAccessibleRedshiftClusters":[
    ],
    "PubliclyAccessibleS3Buckets":[
        {
            "Name":"examplebucket",
            "Endpoint":"https://s3.amazonaws.com/examplebucket/",
            "Region":"South America (São Paulo)",
            "Permissions":" 	
                "Bucket: examplebucket | Grantee: Everyone | Permission: List (Read)"
                "Bucket: examplebucket | Grantee: Everyone | Permission: View Permissions (Read_Acp)"
            }
	]
}

INVENTORY SUMMARY

The API method “get_resources” is used to pull the data for the Inventory Summary report from CloudCheckr. This will provide the total number of resources being run across each AWS Service.

XML call:

https://api.cloudcheckr.com/api/inventory.xml/get_resources?access_key=[access_key]&date=01/01/2014

JSON call:

https://api.cloudcheckr.com/api/inventory.json/get_resources?access_key=[access_key]&date=01/01/2014

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • date (optional) – return report from this date. If date is not defined, the most recent report will be returned.
  • use_account (optional; required if using an Admin API key) – return report for this account.

OUTPUT

XML Example:

<GetResourcesResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DateOfResults>2014-08-01T22:43:06</DateOfResults>
    <Services>
      <Service>
          <Name>EC2</Name>
       <Metrics>
          <Metric>
             <Name>Running Instances</Name>
             <Value>7</Value>
             <Description>Across 8 Regions</Description>
       </Metric>
          <Metric>
             <Name>EBS Volumes</Name>
             <Value>37</Value>
          </Metric>
       </Metrics>
    </Service>

JSON Example:

{
    "DateOfResults": "2014-08-18T20:31:21",
    "Services": [{
        "Name": "EC2",
        "Metrics": [{
        "Name": "Running Instances",
        "Value": "4",
        "Description": "Across 8 Regions"
        }, {
        "Name": "EBS Volumes",
        "Value": "37",
        "Description": null
        }]
    }, {
        "Name": "Reserved Instances",
        "Metrics": [{
        "Name": "Active Reservations",
        "Value": "4",
        "Description": "For 4 instances"
        }, {
        "Name": "Retired Reservations",
        "Value": "12",
        "Description": null
        }]
    }, {
        "Name": "S3",
        "Metrics": [{
        "Name": "Buckets",
        "Value": "34",
        "Description": null
        }, {
        "Name": "Objects",
        "Value": "434,623",
        "Description": "Storage used: 116.10 GB"
        }]
    }, {
        "Name": "CloudFront",
        "Metrics": [{
        "Name": "Web Distributions",
        "Value": "4",
        "Description": "3 Enabled"
        }, {
        "Name": "RTMP Distributions",
        "Value": "1",
        "Description": "1 Enabled"
        }]
    }]
}

COST SAVINGS REPORT RESULTS

The API method “get_cost_saving” is used to export results from the Cost Savings Report.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_cost_saving?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_cost_saving?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Standard Access Key required for all API calls
  • date (optional) – Return report from this date. If date is not defined, the most recent report will be returned.
  • groupby (optional) – Accepts values ‘ByCheck’ or ‘ByAccount’. Groups Results by Check or Account.
  • use_account (required when using Admin API Access Key) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

OUTPUT

XML Example:

<GetCostSavingResponse
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <TotalSaving>337.68083333333333333333333333</TotalSaving>
    <TotalIdleResourcesSaving>104.08</TotalIdleResourcesSaving>
    <TotalUnusedResourcesSaving>124.40</TotalUnusedResourcesSaving>
    <TotalMisProvisionedResourcesSaving>38.80</TotalMisProvisionedResourcesSaving>
    <TotalPreviousGenerationResourcesSaving>35.28</TotalPreviousGenerationResourcesSaving>
    <TotalRIPurchaseRecommendationResourcesSaving>35.120833333333333333333333333</TotalRIPurchaseRecommendationResourcesSaving>
    <TotalMiscellaneousResourcesSaving>0</TotalMiscellaneousResourcesSaving>
    <IdleResources>
        <Resources>
            <Name>Idle EC2 Instances</Name>
            <TotalCount>8</TotalCount>
            <TotalSaving>103.96</TotalSaving>
            <Detail>
                <string>
Instance: i-0234039a (TestingRIRec - Magnus) | CPU Util: 0.02% | Network In (Bytes): 124 | Network Out (Bytes): 122 | Predicted Monthly Cost: $5.36 | Region: US East (Northern Virginia)
</string>
                <string>
Instance: i-05057cb7 (ECS Instance - EC2ContainerService-default-de0d31f9-78d0-48da-9c29-e65de700a7d9) | CPU Util: 0.47% | Network In (Bytes): 147 | Network Out (Bytes): 90 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)
</string>

JSON Example:

{
    "GetCostSavingResponse": {
        "TotalSaving": "337.68083333333333333333333333",
        "TotalIdleResourcesSaving": "104.08",
        "TotalUnusedResourcesSaving": "124.40",
        "TotalMisProvisionedResourcesSaving": "38.80",
        "TotalPreviousGenerationResourcesSaving": "35.28",
        "TotalRIPurchaseRecommendationResourcesSaving": "35.120833333333333333333333333",
        "TotalMiscellaneousResourcesSaving": "0",
        "IdleResources": {
            "Resources": [
                {
                    "Name": "Idle EC2 Instances",
                    "TotalCount": "8",
                    "TotalSaving": "103.96",
                    "Detail": {
                        "string": [
                            "\nInstance: i-0234039a (TestingRIRec - Magnus) | CPU Util: 0.02% | Network In (Bytes): 124 | Network Out (Bytes): 122 | Predicted Monthly Cost: $5.36 | Region: US East (Northern Virginia)\n",
                            "\nInstance: i-05057cb7 (ECS Instance - EC2ContainerService-default-de0d31f9-78d0-48da-9c29-e65de700a7d9) | CPU Util: 0.47% | Network In (Bytes): 147 | Network Out (Bytes): 90 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)\n",
                            "\nInstance: i-10bc0ab7 (Seoul) | CPU Util: 0.03% | Network In (Bytes): 706 | Network Out (Bytes): 1,102 | Predicted Monthly Cost: $7.92 | Region: Asia Pacific (Seoul)\n",
                            "\nInstance: i-5082b990 (ECS Instance - EC2ContainerService-default-367f5c36-273e-4735-8009-ebf34c8fb46c) | CPU Util: 0.49% | Network In (Bytes): 146 | Network Out (Bytes): 98 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)\n",
                            "\nInstance: i-681292f3 (CWLogs_Test) | CPU Util: 0.17% | Network In (Bytes): 2,025 | Network Out (Bytes): 1,813 | Predicted Monthly Cost: $31.49 | Region: US East (Northern Virginia)\n",
                            "\nInstance: i-945d3d5a (Frankfurt) | CPU Util: 0.04% | Network In (Bytes): 2,430 | Network Out (Bytes): 5,405 | Predicted Monthly Cost: $10.99 | Region: EU (Frankfurt)\n",
                            "\nInstance: i-9e13195e (ECS Instance - EC2ContainerService-default-fa0353c5-b32c-4c5c-9fbd-3df92d3551d9) | CPU Util: 0.74% | Network In (Bytes): 1,975 | Network Out (Bytes): 6,970 | Predicted Monthly Cost: $15.52 | Region: US West (Northern California)\n",
                            "\nInstance: i-a920192d (BriceLinuxTest) | CPU Util: 0.02% | Network In (Bytes): 97 | Network Out (Bytes): 63 | Predicted Monthly Cost: $1.64 | Region: US East (Northern Virginia)\n"
                        ]
                    }
                },
                {
                    "Name": "Idle DynamoDB Tables",
                    "TotalCount": "6",
                    "TotalSaving": "0.12",
                    "Detail": {
                        "string": [
                            "\nTable: ProductCatallog | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 10.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 5.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US East (Northern Virginia) | Timeframe: Previous 24 hours\n",
                            "\nTable: aarontestdynamo | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 1.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 2.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US East (Northern Virginia) | Timeframe: Previous 24 hours\n",
                            "\nTable: testagain | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 1.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 1.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US East (Northern Virginia) | Timeframe: Previous 24 hours\n",
                            "\nTable: SimpleLookupTable | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 1.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 1.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US West (Oregon) | Timeframe: Previous 24 hours\n",
                            "\nTable: TestFromAWSExplorer | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 5.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 10.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: US West (Oregon) | Timeframe: Previous 24 hours\n",
                            "\nTable: cm-test-1 | Average Read Capacity Consumed: 0.00 | Provisioned Reads: 3.00 | Read Percent Utilized: 0.00% | Monthly Provisioned Reads Cost: $0.01 | Average Write Capacity Consumed: 0.00 | Provisioned Writes: 1.00 | Write Percent Utilized: 0.00% | Monthly Provisioned Writes Cost: $0.01 | Region: Asia Pacific (Singapore) | Timeframe: Previous 24 hours\n"
                        ]
                    }
                }
            ]
        },
        "UnusedResources": {
            "Resources": [
                {
                    "Name": "Unattached EBS Volumes",
                    "TotalCount": "9",
                    "TotalSaving": "120.80",
                    "Detail": {
                        "string": [
                            "\nVolume ID: vol-0fcac9cc | Size: 100 GiB | Predicted Monthly Cost: $11.00 | EC2 Instance: None | Region: EU (Ireland)\n",
                            "\nVolume ID: vol-288874cc | Size: 100 GiB | Predicted Monthly Cost: $12.00 | EC2 Instance: None | Region: US West (Northern California)\n",
                            "\nVolume ID: vol-4665bc03 | Size: 2 GiB | Predicted Monthly Cost: $0.20 | EC2 Instance: None | Region: US East (Northern Virginia)\n",
                            "\nVolume ID: vol-4a11cbbd | Size: 100 GiB | Predicted Monthly Cost: $19.00 | EC2 Instance: None | Region: US West (Oregon)\n",
                            "\nVolume ID: vol-6acac9a9 | Size: 100 GiB | Predicted Monthly Cost: $21.00 | EC2 Instance: None | Region: EU (Ireland)\n",
                            "\nVolume ID: vol-8aa0e353 | Size: 100 GiB | Predicted Monthly Cost: $22.70 | EC2 Instance: None | Region: EU (Frankfurt)\n",
                            "\nVolume ID: vol-b6a0e36f | Size: 100 GiB | Predicted Monthly Cost: $5.90 | EC2 Instance: None | Region: EU (Frankfurt)\n",
                            "\nVolume ID: vol-cdefb40a | Size: 100 GiB | Predicted Monthly Cost: $8.00 | EC2 Instance: None | Region: Asia Pacific (Singapore)\n",
                            "\nVolume ID: vol-e7efb420 | Size: 100 GiB | Predicted Monthly Cost: $21.00 | EC2 Instance: None | Region: Asia Pacific (Singapore)\n"
                        ]
                    }
                },
                {
                    "Name": "Unused Elastic IP Addresses",
                    "TotalCount": "1",
                    "TotalSaving": "3.60",
                    "Detail": {
                        "string": "\nIP: 177.71.178.126 | Associated with: No instance | Predicted Monthly Cost: $3.60 | Region: South America (S?o Paulo)\n"
                    }
                },
                {
                    "Name": "Unused DynamoDB Tables",
                    "TotalCount": "4",
                    "TotalSaving": "0.00",
                    "Detail": {
                        "string": [
                            "\nTable: testagain | Status: ACTIVE | Created: 6/26/2013 8:09:40 PM UTC | Item Count: 0 | Region: US East (Northern Virginia) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n",
                            "\nTable: SimpleLookupTable | Status: ACTIVE | Created: 7/9/2015 1:23:50 PM UTC | Item Count: 0 | Region: US West (Oregon) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n",
                            "\nTable: TestFromAWSExplorer | Status: ACTIVE | Created: 6/24/2014 6:09:47 PM UTC | Item Count: 0 | Region: US West (Oregon) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n",
                            "\nTable: cm-test-1 | Status: ACTIVE | Created: 10/7/2013 6:25:20 PM UTC | Item Count: 0 | Region: Asia Pacific (Singapore) | MTD Read Cost: $0.00 | MTD Write Cost: $0.00\n"
                        ]
                    }
                }
            ]
        },
        "MisProvisionedResources": {
            "Resources": {
                "Name": "\nEBS PIOPS Volumes Should Be Converted To General Purpose SSD\n",
                "TotalCount": "4",
                "TotalSaving": "38.80",
                "Detail": {
                    "string": [
                        "\nEBS Volume Id: vol-4a11cbbd | Region: US West (Oregon) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $19.00 | Monthly Cost for recommended General Purpose (SSD): $10.00 | Monthly Saving: $9.00\n",
                        "\nEBS Volume Id: vol-6acac9a9 | Region: EU (Ireland) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $21.00 | Monthly Cost for recommended General Purpose (SSD): $11.00 | Monthly Saving: $10.00\n",
                        "\nEBS Volume Id: vol-8aa0e353 | Region: EU (Frankfurt) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $22.70 | Monthly Cost for recommended General Purpose (SSD): $11.90 | Monthly Saving: $10.80\n",
                        "\nEBS Volume Id: vol-e7efb420 | Region: Asia Pacific (Singapore) | Recommendation: convert from Provisioned IOPS to General Purpose (SSD) Storage Type | Current Disk Size: 100GB | Current IOPS: 100 | Convert Disk to SSD of size: 100GB | IOPS from new SSD: 300 | Monthly Cost for Provisioned IOPS: $21.00 | Monthly Cost for recommended General Purpose (SSD): $12.00 | Monthly Saving: $9.00\n"
                    ]
                }
            }
        },
        "PreviousGenerationResources": {
            "Resources": {
                "Name": "\nPrevious Generation EC2 Instances Should Be Migrated\n",
                "TotalCount": "6",
                "TotalSaving": "35.28",
                "Detail": {
                    "string": [
                        "\nInstance: i-5560c207 (MediumRI) | Region: US East (Northern Virginia) | Recommendation: Migrate from m1.small to t2.small | On-Demand Current Monthly Cost: $31.68 | Cost for Recommended: $18.72 | Yearly Savings: $155.52 | Platform: Linux | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 1.7 GB | Memory for next gen: 2 GB\n",
                        "\nInstance: i-a21a9dee | Region: EU (Ireland) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $14.40 | Cost for Recommended: $13.68 | Yearly Savings: $8.64 | Platform: Windows | Virtualization Type: hvm | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-188ddd36 (NewRelic) | Region: US East (Northern Virginia) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $14.40 | Cost for Recommended: $9.36 | Yearly Savings: $60.48 | Platform: Linux | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-ecbca690 (VPCTest) | Region: US East (Northern Virginia) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $14.40 | Cost for Recommended: $9.36 | Yearly Savings: $60.48 | Platform: LinuxVpc | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-daba0280 | Region: US West (Northern California) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $25.20 | Cost for Recommended: $19.44 | Yearly Savings: $69.12 | Platform: LinuxSuse | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n",
                        "\nInstance: i-2895fd72 (OpenSuseCali) | Region: US West (Northern California) | Recommendation: Migrate from t1.micro to t2.micro | On-Demand Current Monthly Cost: $18.00 | Cost for Recommended: $12.24 | Yearly Savings: $69.12 | Platform: Linux | Virtualization Type: paravirtual | vCPU for current: 1 | vCPU for next gen: 1 | Memory for current: 0.615 GB | Memory for next gen: 1 GB\n"
                    ]
                }
            }
        },
        "RIPurchaseRecommendationResources": {
            "Resources": [
                {
                    "Name": "EC2 Reserved Instance Purchase Recommendations",
                    "TotalCount": "7",
                    "TotalSaving": "28.767500000000000000000000000",
                    "Detail": {
                        "string": [
                            "\nNumber: 1 | Instance Type: t2.micro | AZ: eu-central-1a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $55.00 | Reserved Monthly Cost: $2.92 | On-Demand Monthly Cost: $10.66 | Total Savings: $37.89\n",
                            "\nNumber: 2 | Instance Type: t2.micro | AZ: us-west-1a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $136.00 | Reserved Monthly Cost: $5.84 | On-Demand Monthly Cost: $24.17 | Total Savings: $83.90\n",
                            "\nNumber: 1 | Instance Type: t2.micro | AZ: us-west-1c | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $68.00 | Reserved Monthly Cost: $2.92 | On-Demand Monthly Cost: $12.08 | Total Savings: $41.95\n",
                            "\nNumber: 1 | Instance Type: t2.nano | AZ: ap-northeast-2a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $32.00 | Reserved Monthly Cost: $2.92 | On-Demand Monthly Cost: $7.11 | Total Savings: $18.25\n",
                            "\nNumber: 1 | Instance Type: t1.micro | AZ: us-west-1b | Platform: Linux | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $62.00 | Reserved Monthly Cost: $5.84 | On-Demand Monthly Cost: $17.77 | Total Savings: $81.14\n",
                            "\nNumber: 1 | Instance Type: t1.micro | AZ: us-west-2b | Platform: Linux | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $62.00 | Reserved Monthly Cost: $3.65 | On-Demand Monthly Cost: $14.21 | Total Savings: $64.78\n",
                            "\nNumber: 1 | Instance Type: t2.nano | AZ: us-east-1a | Platform: LinuxVpc | Commitment Type: 1 Year Partial Upfront | Tenancy: Default | Upfront RI Cost: $25.00 | Reserved Monthly Cost: $1.10 | On-Demand Monthly Cost: $4.62 | Total Savings: $17.30\n"
                        ]
                    }
                },
                {
                    "Name": "ElastiCache Reserved Node Purchase Recommendations",
                    "TotalCount": "1",
                    "TotalSaving": "6.3533333333333333333333333333",
                    "Detail": {
                        "string": "\nNumber: 1 | Cache Node Type: cache.t1.micro | Engine: memcached | Region: US East (Northern Virginia) | Upfront RI Cost: $62.00 | Reserved Monthly Cost: $4.32 | On-Demand Monthly Cost: $15.84 | Total Savings: $76.24\n"
                    }
                }
            ]
        },
        "_xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
        "_xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
    }
}

BILLING & COST MANAGEMENT DASHBOARD

The API method “get_dashboard” is used to export the Billing Dashboard.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_dashboard?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_dashboard?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Standard Access Key required for all API calls
  • use_account (required when using Admin API Access Key) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

OUTPUT

XML Example:

<GetDashboardResponse 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Summary>
        <DashboardSummary>
            <AccountName>2150 AWS</AccountName>
            <LastMonth>$3,817.33</LastMonth>
            <MonthToDate>$1,400.29</MonthToDate>
            <Forecast>$3,354.74</Forecast>
            <SpendByService>
                <BillingDashboardService>
                    <ServiceCost>1073.0788971200</ServiceCost>
                    <Service>AmazonEC2</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>138.5757164400</ServiceCost>
                    <Service>AmazonRDS</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>111.3280377255</ServiceCost>
                    <Service>AWSSupportBusiness</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>37.5842575500</ServiceCost>
                    <Service>AmazonS3</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>12.2500025100</ServiceCost>
                    <Service>AmazonVPC</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>11.0580385245</ServiceCost>
                    <Service>Others</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>11.0250000000</ServiceCost>
                    <Service>AmazonKinesis</Service>
                </BillingDashboardService>
                <BillingDashboardService>
                    <ServiceCost>5.3900000000</ServiceCost>
                    <Service>AmazonElastiCache</Service>
                </BillingDashboardService>
            </SpendByService>
        </DashboardSummary>
    </Summary>
</GetDashboardResponse>

JSON Example:

{
  "Summary": [
    {
      "AccountName": "2150 AWS",
      "LastMonth": "$3,817.33",
      "MonthToDate": "$1,400.29",
      "Forecast": "$3,354.74",
      "SpendByService": [
        {
          "ServiceCost": 1073.07889712,
          "Service": "AmazonEC2"
        },
        {
          "ServiceCost": 138.57571644,
          "Service": "AmazonRDS"
        },
        {
          "ServiceCost": 111.3280377255,
          "Service": "AWSSupportBusiness"
        },
        {
          "ServiceCost": 37.58425755,
          "Service": "AmazonS3"
        },
        {
          "ServiceCost": 12.25000251,
          "Service": "AmazonVPC"
        },
        {
          "ServiceCost": 11.0580385245,
          "Service": "Others"
        },
        {
          "ServiceCost": 11.025,
          "Service": "AmazonKinesis"
        },
        {
          "ServiceCost": 5.39,
          "Service": "AmazonElastiCache"
        }
      ]
    }
  ]
}

MONTHLY BILL

The API method “get_monthly_bill” is used to export the Single Month Billing Summary.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_monthly_bill?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_monthly_bill?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Standard Access Key required for all API calls
  • use_account (required when using Admin API Access Key) – The name of the account you are making the call for, where the name is the name of the account added in CloudCheckr.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • aws_account_id (optional) – return statistics from specific AWS accounts. Enter the full AWS Account Id.  Defaults to ALL accounts when looking at a payer account.
  • include_services (optional) – comma separated list of services such as amazons3, amazonec2.
  • for_date (optional) – date of bill to analyze, defaults to current month. The format for the value of this parameter is MM-DD-YYYY
  • amortize_cost (optional) -This accepts values of yes/no. This is equivalent to selecting the box Amortize Reserved Instance Cost within the Single Month Billing Summary.
  • cost_type (optional) – List, Blended or Unblended. This defaults to List Cost.

OUTPUT

XML call:

<Summary>
  <MonthlyToDateCost>$722.78</MonthlyToDateCost>
  <MonthlyToDateCredit>$50.00</MonthlyToDateCredit>
  <MonthlyToDateBill>$672.78</MonthlyToDateBill>
  <AverageDailyNetBill>$25.51</AverageDailyNetBill>
  <HighestCost>
    <ServiceName>EC2</ServiceName>
    <Cost>$527.06</Cost>
  </HighestCost>
  <HighestDaily>
    <Date>5/23/2016</Date>
    <Bill>$232.35</Bill>
  </HighestDaily>
  <LowestDaily>
    <Date>5/2/2016</Date>
    <Bill>$7.48</Bill>
  </LowestDaily>
  <HighestChange>
    <StartDate>5/23/2016</StartDate>
    <EndDate>5/24/2016</EndDate>
    <ChangeAmount>$223.25</ChangeAmount>
    <ChangePercent>96.09%</ChangePercent>
  </HighestChange>
</Summary>
<BillByDay>
  <DailyBill>
    <Day>5/1/2016</Day>
    <Cost>$25.28</Cost>
    <Credits>$12.29</Credits>
    <Bill>$12.99</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/2/2016</Day>
    <Cost>$18.53</Cost>
    <Credits>$11.05</Credits>
    <Bill>$7.48</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/3/2016</Day>
    <Cost>$18.95</Cost>
    <Credits>$10.79</Credits>
    <Bill>$8.16</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/4/2016</Day>
    <Cost>$18.69</Cost>
    <Credits>$10.46</Credits>
    <Bill>$8.23</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/5/2016</Day>
    <Cost>$17.78</Cost>
    <Credits>$5.40</Credits>
    <Bill>$12.37</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/6/2016</Day>
    <Cost>$17.74</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.74</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/7/2016</Day>
    <Cost>$15.98</Cost>
    <Credits>$0.00</Credits>
    <Bill>$15.98</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/8/2016</Day>
    <Cost>$17.34</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.34</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/9/2016</Day>
    <Cost>$17.11</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.11</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/10/2016</Day>
    <Cost>$16.43</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.43</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/11/2016</Day>
    <Cost>$16.47</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.47</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/12/2016</Day>
    <Cost>$16.53</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.53</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/13/2016</Day>
    <Cost>$17.69</Cost>
    <Credits>$0.00</Credits>
    <Bill>$17.69</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/14/2016</Day>
    <Cost>$16.85</Cost>
    <Credits>$0.00</Credits>
    <Bill>$16.85</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/15/2016</Day>
    <Cost>$18.65</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.65</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/16/2016</Day>
    <Cost>$18.87</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.87</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/17/2016</Day>
    <Cost>$18.17</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.17</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/18/2016</Day>
    <Cost>$18.00</Cost>
    <Credits>$0.00</Credits>
    <Bill>$18.00</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/19/2016</Day>
    <Cost>$19.10</Cost>
    <Credits>$0.00</Credits>
    <Bill>$19.10</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/20/2016</Day>
    <Cost>$21.00</Cost>
    <Credits>$0.00</Credits>
    <Bill>$21.00</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/21/2016</Day>
    <Cost>$26.66</Cost>
    <Credits>$0.00</Credits>
    <Bill>$26.66</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/22/2016</Day>
    <Cost>$28.96</Cost>
    <Credits>$0.00</Credits>
    <Bill>$28.96</Bill>
  </DailyBill>
    <DailyBill>
    <Day>5/23/2016</Day>
    <Cost>$232.35</Cost>
    <Credits>$0.00</Credits>
  <Bill>$232.35</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/24/2016</Day>
    <Cost>$9.10</Cost>
    <Credits>$0.00</Credits>
    <Bill>$9.10</Bill>
  </DailyBill>
  <DailyBill>
    <Day>5/31/2016</Day>
    <Cost>$60.59</Cost>
    <Credits>$0.00</Credits>
    <Bill>$60.59</Bill>
  </DailyBill>
</BillByDay>
<BillByAccount>
  <AccountBill>
    <Account>1234567789</Account>
    <MonthlyToDateBill>$9.82</MonthlyToDateBill>
    <MonthlyToDateCost>$9.82</MonthlyToDateCost>
    <MonthlyToDateCredits>$0.00</MonthlyToDateCredits>
  </AccountBill>
  <AccountBill>
    <Account>9876543210</Account>
    <MonthlyToDateBill>$2.00</MonthlyToDateBill>
    <MonthlyToDateCost>$2.00</MonthlyToDateCost>
    <MonthlyToDateCredits>$0.00</MonthlyToDateCredits>
  </AccountBill>
 </BillByAccount>  

JSON call:

{"Summary":
  {"MonthlyToDateCost":"$722.78",
   "MonthlyToDateCredit":"$50.00", 
   "MonthlyToDateBill":"$672.78", 
   "AverageDailyNetBill":"$25.51",
   "HighestCost":
      {"ServiceName":"EC2","Cost":"$527.06"},  
        "HighestDaily":{"Date":"5/23/2016","Bill":"$232.35"},
        "LowestDaily":{"Date":"5/2/2016","Bill":"$7.48"},
        "HighestChange":{"StartDate":"5/24/2016","EndDate":"5/23/2016","ChangeAmount":"$223.25","ChangePercent":"96.09%"}},
        "BillByDay":[
                    {"Day":"5/1/2016","Cost":"$25.28","Credits":"$12.29","Bill":"$12.99"},
                    {"Day":"5/2/2016","Cost":"$18.53","Credits":"$11.05","Bill":"$7.48"},
                    {"Day":"5/3/2016","Cost":"$18.95","Credits":"$10.79","Bill":"$8.16"},
                    {"Day":"5/4/2016","Cost":"$18.69","Credits":"$10.46","Bill":"$8.23"},
                    {"Day":"5/5/2016","Cost":"$17.78","Credits":"$5.40","Bill":"$12.37"},
                    {"Day":"5/6/2016","Cost":"$17.74","Credits":"$0.00","Bill":"$17.74"},
                    {"Day":"5/7/2016","Cost":"$15.98","Credits":"$0.00","Bill":"$15.98"},
                    {"Day":"5/8/2016","Cost":"$17.34","Credits":"$0.00","Bill":"$17.34"},
                    {"Day":"5/9/2016","Cost":"$17.11","Credits":"$0.00","Bill":"$17.11"},
                    {"Day":"5/10/2016","Cost":"$16.43","Credits":"$0.00","Bill":"$16.43"},
                    {"Day":"5/11/2016","Cost":"$16.47","Credits":"$0.00","Bill":"$16.47"},
                    {"Day":"5/12/2016","Cost":"$16.53","Credits":"$0.00","Bill":"$16.53"},
                    {"Day":"5/13/2016","Cost":"$17.69","Credits":"$0.00","Bill":"$17.69"},
                    {"Day":"5/14/2016","Cost":"$16.85","Credits":"$0.00","Bill":"$16.85"},
                    {"Day":"5/15/2016","Cost":"$18.65","Credits":"$0.00","Bill":"$18.65"},
                    {"Day":"5/16/2016","Cost":"$18.87","Credits":"$0.00","Bill":"$18.87"},
                    {"Day":"5/17/2016","Cost":"$18.17","Credits":"$0.00","Bill":"$18.17"},
                    {"Day":"5/18/2016","Cost":"$18.00","Credits":"$0.00","Bill":"$18.00"},
                    {"Day":"5/19/2016","Cost":"$19.10","Credits":"$0.00","Bill":"$19.10"},
                    {"Day":"5/20/2016","Cost":"$21.00","Credits":"$0.00","Bill":"$21.00"},
                    {"Day":"5/21/2016","Cost":"$26.66","Credits":"$0.00","Bill":"$26.66"},
                    {"Day":"5/22/2016","Cost":"$28.96","Credits":"$0.00","Bill":"$28.96"},
                    {"Day":"5/23/2016","Cost":"$232.35","Credits":"$0.00","Bill":"$232.35"},
                    {"Day":"5/24/2016","Cost":"$9.10","Credits":"$0.00","Bill":"$9.10"},
                    {"Day":"5/31/2016","Cost":"$60.59","Credits":"$0.00","Bill":"$60.59"}],
  "BillByAccount":[
                    {"Account":"1234567890 ","MonthlyToDateBill":"$9.82","MonthlyToDateCost":"$9.82","MonthlyToDateCredits":"$0.00"},
                    {"Account":"9876543210 ","MonthlyToDateBill":"$2.00","MonthlyToDateCost":"$2.00","MonthlyToDateCredits":"$0.00"}]}

CLOUDTRAIL CUSTOM METRICS

The API method “get_cloudtrail_custom_metrics” is used to export to CSV a list of AMIs and every instance launched. This is based on the Ec2AmiWorkload custom metric.

XML Call:

https://api.cloudcheckr.com/api/security.xml/get_cloudtrail_custom_metrics?access_key=[ACCESS KEY]

JSON Call:

https://api.cloudcheckr.com/api/security.json/get_cloudtrail_custom_metrics?access_key=[ACCESS KEY]

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • type (required) – Ec2AmiWorkload (Currnently the only acceptable value is Ec2AmiWorkload)
  • from (optional) – return results from after this date.
  • to (optional) – return results from before this date.
  • use_account (required for admin API key) – The specific account you wish to query.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

Note: If using an admin API key, use_account or use_cc_account_id is required

OUTPUT

This call will only export the results to a a compressed CSV file and it will contain the following data.(Note: If no results are returned it will generate a blank file)

 

 

AMI ID EC2 Instance ID Event Date Region AWS Account ID User Identity ARN IP Address User Agent
ami-f1f12345 i-1ab2a345 5/20/2016 15:47 US East (Northern Virginia) 123456789012 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.10 signin.amazonaws.com ami-f1f12345 i-1ab2a350 5/15/2016 10:47 US East (Northern Virginia) 123456789012 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.10 signin.amazonaws.com ami-f1f12345 i-1ab2a355 5/12/2016 5:47 US East (Northern Virginia) 123456789012 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.10 signin.amazonaws.com ami-f2f65432 i-1ab2a360 5/10/2016 1:47 US East (Northern Virginia) 012345678998 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.100 signin.amazonaws.com ami-f2f65432 i-1ab2a365 5/5/2016 12:47 US East (Northern Virginia) 012345678998 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.100 signin.amazonaws.com ami-f2f65432 i-1ab2a370 5/2/2016 23:47 US East (Northern Virginia) 012345678998 arn:aws:iam::123456789012:user/cloudcheckr 192.168.10.100 signin.amazonaws.com

CLOUDTRAIL GET ALERT RESULTS v2

The API method “get_cloudtrail_alert_results_v2” is used to pull the data for the CloudTrail Results report from CloudCheckr. This method is similar to the original API call for “get_cloudtrail_alert_results” except the v2 method also includes <RequestParams> in the response.

XML call:

https://api.cloudcheckr.com/api/alert.xml/get_cloudtrail_alert_results_v2?access_key=[access_key]&max_results=5

JSON call:

https://api.cloudcheckr.com/api/alert.json/get_cloudtrail_alert_results_v2?access_key=[access_key]&max_results=5

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – standard Access Key required for all API calls.
  • from (optional) – return report from this date. The date format is MM/DD/YYYY
  • to (optional) – return report to this date. The date format is MM/DD/YYYY
  • alert_name (optional) – the name of the alert
  • enabled (optional) – only return results for alerts that are enabled
  • max_results (optional) – the max number of results to return before paginating the results.
  • use_account (optional; required if using an Admin API key) – return report for this account.
  • use_cc_account_id (required when using Admin API Access Key) – The CloudCheckr ID of the account you are making the call for. The ID is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.

OUTPUT

XML Example:

<GetCloudTrailAlertResultsResponse 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <HasNext>true</HasNext>
    <NextToken>H4sIAAAAAAAEAK2QQQ</NextToken>
    <DateOfResults>2017-01-11T19:22:13</DateOfResults>
    <CloudTrailAlertResults>
        <CloudTrailAlertResult>
            <Created>2017-01-11T20:25:48</Created>
            <EventDate>2017-01-11T19:22:13</EventDate>
            <EventName>GetBucketLifecycle</EventName>
            <AccountId>215011123456</AccountId>
            <IdenityArn>arn:aws:iam::215011123456:user/CloudCheckr_jtest</IdenityArn>
            <IpAddress>54.164.64.123</IpAddress>
            <Service>AmazonS3</Service>
            <Region>US East (Northern Virginia)</Region>
            <ResponseType>Error</ResponseType>
            <AlertName>S3 Bucket access test</AlertName>
            <IsThresholdResult>false</IsThresholdResult>
            <IpRisk>false</IpRisk>
            <AlertStatus>Enabled</AlertStatus>
            <RequestParams>{"lifecycle":[""],"bucketName":"mtedones3"}</RequestParams>
        </CloudTrailAlertResult>
    </CloudTrailAlertResults>
</GetCloudTrailAlertResultsResponse>

JSON Example:

{
  "CloudTrailAlertResults": [
    {
      "Created": "2017-01-11T20:25:48",
      "EventDate": "2017-01-11T19:22:13",
      "EventName": "GetBucketLifecycle",
      "AccountId": "215011123456",
      "IdenityArn": "arn:aws:iam::215011123456:user/CloudCheckr_jtest",
      "IpAddress": "54.164.64.123",
      "Service": "AmazonS3",
      "Region": "US East (Northern Virginia)",
      "ResponseType": "Error",
      "AlertName": "S3 Bucket access test",
      "IsThresholdResult": false,
      "IpRisk": false,
      "AlertStatus": "Enabled",
      "RequestParams": "{\"lifecycle\":[\"\"],\"bucketName\":\"mtedones3\"}"
    }
  ],
  "DateOfResults": "2017-01-11T19:22:13",
  "HasNext": true,
  "NextToken": "H4sIAAAAAAAEAK2QQQ"
}

GET EC2 RESERVED INSTANCE REBALANCER EC2 INSTANCES_v2

The API method “get_ec2_reserved_instance_rebalancer_ec2_instances_v2” is used to pull a list of EC2 instances, updated hourly. Version 2 of this call adds the following properties to the output: PublicIpAddress, PrivateIpAddress, PrivateDnsName, PublicDnsName and Status.

XML call:

https://api.cloudcheckr.com/api/billing.xml/get_ec2_reserved_instance_rebalancer_ec2_instances_v2?access_key=[access_key]

JSON call:

https://api.cloudcheckr.com/api/billing.json/get_ec2_reserved_instance_rebalancer_ec2_instances_v2?access_key=[access_key]

INPUT PARAMETERS

This call accepts these parameters:

  • access_key (required) – Admin or Standard Access Key required for all API calls.
  • aws_account_Id (multi-account view only) – return statistics from these accounts.
  • use_account (optional) – return report for this account.
  • use_cc_account_id – the Id of the account you are making the call for. The Id is returned when using the method ‘account/add_accountv2′ to register the account in CloudCheckr.
  • use_aws_account_id (optional) – The ID of the AWS account in question.

OUTPUT

XML Example:

<GetEc2ReservedInstanceRebalancerEc2InstancesResponseV2 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Ec2ReservedInstanceRebalancerEc2Instances>
        <Ec2ReservedInstanceRebalancerEc2InstanceV2>
            <InstanceId>i-188dde99</InstanceId>
            <AwsAccountId>21501123456</AwsAccountId>
            <InstanceType>t1.micro</InstanceType>
            <Platform>Linux</Platform>
            <AvailabilityZone>us-east-1d</AvailabilityZone>
            <Region>us-east-1</Region>
            <MatchedReservedInstance>
                <MatchedReservedInstanceId>f69a841f-55ea-1234-985b-4c45521b0dac</MatchedReservedInstanceId>
                <AwsAccountId>21501123456</AwsAccountId>
                <Tenancy>Default</Tenancy>
                <Platform>Linux</Platform>
                <OfferingClass>Standard</OfferingClass>
                <InstanceType>t1.micro</InstanceType>
                <InstanceCount>1</InstanceCount>
            </MatchedReservedInstance>
            <PublicIpAddress>54.22.111.123</PublicIpAddress>
            <PrivateIpAddress>10.123.144.456</PrivateIpAddress>
            <PrivateDnsName>ip-10.123.144.456.ec2.internal</PrivateDnsName>
            <PublicDnsName>ec2-54.22.111.123.compute-1.amazonaws.com</PublicDnsName>
            <Status>running</Status>
        </Ec2ReservedInstanceRebalancerEc2InstanceV2>
    </Ec2ReservedInstanceRebalancerEc2Instances>
</GetEc2ReservedInstanceRebalancerEc2InstancesResponseV2>

JSON Example:

{
  "Ec2ReservedInstanceRebalancerEc2Instances": [
    {
      "PublicIpAddress": "54.22.111.123",
      "PrivateIpAddress": "10.123.144.456",
      "PrivateDnsName": "ip-10.123.144.456.ec2.internal",
      "PublicDnsName": "ec2-54.22.111.123.compute-1.amazonaws.com",
      "Status": "running",
      "InstanceId": "i-188dde99",
      "AwsAccountId": "21501123456",
      "InstanceType": "t1.micro",
      "Platform": "Linux",
      "AvailabilityZone": "us-east-1d",
      "Region": "us-east-1",
      "MatchedReservedInstance": {
        "MatchedReservedInstanceId": "f69a841f-55ea-1234-985b-4c45521b0dac",
        "AwsAccountId": "21501123456",
        "Tenancy": "Default",
        "Platform": "Linux",
        "OfferingClass": "Standard",
        "Scope": null,
        "AvailabilityZone": null,
        "InstanceType": "t1.micro",
        "InstanceCount": 1
      }
    }
  ]
}