{"id":3560,"library":"mypy-boto3-bcm-recommended-actions","title":"Type Annotations for AWS Billing and Cost Management Recommended Actions (Boto3)","description":"This library provides comprehensive type annotations (stubs) for the `boto3` client of the AWS Billing and Cost Management Recommended Actions service, enabling static type checking with tools like MyPy. It is part of the `mypy-boto3` project, which generates stubs for all AWS services. The current version is `1.42.9`, and the project has a frequent release cadence, often aligning with `boto3` updates and new AWS service features.","status":"active","version":"1.42.9","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","Boto3","Type Hinting","MyPy","Billing","Cost Management"],"install":[{"cmd":"pip install boto3 mypy-boto3-bcm-recommended-actions","lang":"bash","label":"Install `boto3` and stubs"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself must be installed for runtime functionality.","package":"boto3","optional":false},{"reason":"Required for full type hint compatibility on Python versions older than 3.9, though often handled automatically by pip.","package":"typing-extensions","optional":true}],"imports":[{"note":"The client type hint comes from the mypy-boto3 stub package, not directly from boto3.","wrong":"from boto3.client import BillingAndCostManagementRecommendedActions","symbol":"BillingAndCostManagementRecommendedActionsClient","correct":"from mypy_boto3_bcm_recommended_actions.client import BillingAndCostManagementRecommendedActionsClient"},{"symbol":"Client","correct":"from mypy_boto3_bcm_recommended_actions.client import BillingAndCostManagementRecommendedActionsClient"},{"symbol":"ServiceResource","correct":"from mypy_boto3_bcm_recommended_actions.service_resource import BillingAndCostManagementRecommendedActionsServiceResource"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_bcm_recommended_actions.client import BillingAndCostManagementRecommendedActionsClient\n\n# For demonstration, typically use AWS credentials configured externally\n# via environment variables, ~/.aws/credentials, etc.\n# This example assumes you have valid AWS credentials configured.\n\ntry:\n    session = boto3.Session(region_name=\"us-east-1\")\n    client: BillingAndCostManagementRecommendedActionsClient = session.client(\n        \"billing-cost-management-recommended-actions\"\n    )\n\n    # Example: List resource budgeting recommendations (actual API call might vary)\n    # Note: This service's API details might not have common public list operations\n    # The example is illustrative for type checking.\n    # Consult AWS BCM Recommended Actions documentation for actual operations.\n    print(\"Attempting a dummy client call for type checking demonstration...\")\n    # The BCM Recommended Actions service typically works with specific actions/recommendations.\n    # A simple call might not exist for generic 'list'.\n    # Let's simulate a call that would be type-checked if it existed.\n    # For real use, replace with an actual API method like 'get_recommendations'.\n    # response = client.get_recommendations(RecommendationType='SOME_TYPE') # Example\n    # print(response)\n    print(\"Client successfully initialized with type hints.\")\n    print(f\"Client type: {type(client)}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure 'boto3' is installed and AWS credentials are configured.\")","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` client for the Billing and Cost Management Recommended Actions service and annotate it with the `mypy-boto3` provided type, enabling static analysis of API calls."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher.","message":"Python 3.8 is no longer supported starting with `mypy-boto3-builder` version 8.12.0. All generated stub packages (including this one) now require Python 3.9 or newer.","severity":"breaking","affected_versions":">=8.12.0 (builder), corresponding stub package versions"},{"fix":"Review and update custom TypeDef aliases or direct usages to match the new naming conventions if you were relying on the old patterns.","message":"TypeDef naming conventions changed in builder version 8.9.0. TypeDefs for packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). Conflicting TypeDef `Extra` postfixes were also moved.","severity":"breaking","affected_versions":">=8.9.0 (builder), corresponding stub package versions"},{"fix":"Ensure `pip install boto3 mypy-boto3-bcm-recommended-actions` is run.","message":"This package provides *only* type annotations. You must have `boto3` installed alongside `mypy-boto3-bcm-recommended-actions` for your code to run.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Regularly update both `boto3` and its corresponding `mypy-boto3` stub packages. Consider using `pip-tools` or similar to manage dependencies.","message":"To ensure correct type checking, the version of `mypy-boto3-bcm-recommended-actions` should ideally match or be very close to your installed `boto3` version. Significant mismatches can lead to incorrect type hints or missing attributes.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always refer to the official `boto3` documentation or `mypy-boto3` examples for the correct service name string for `session.client()`.","message":"The service name used in `boto3.client('SERVICE_NAME')` might differ slightly from the package name. For this service, use `billing-cost-management-recommended-actions` for the client initialization.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.42.9':61 'action':10,31 'align':71 'annot':2,17 'aw':4,25,55,77,80 'bill':5,26,85 'boto3':11,21,48,73,81 'cadenc':69 'check':36 'client':22 'comprehens':15 'cost':7,28,86 'current':58 'enabl':33 'featur':79 'frequent':67 'generat':51 'hint':83 'librari':13 'like':39 'manag':8,29,87 'mypi':40,47,84 'mypy-boto3':46 'new':76 'often':70 'part':43 'project':49,64 'provid':14 'recommend':9,30 'releas':68 'servic':32,56,78 'static':34 'stub':18,52 'tool':38 'type':1,16,35,82 'updat':74 'version':59","created_at":"2026-04-11T17:34:49.123995+00:00","updated_at":"2026-04-16T16:47:28.926365+00:00","problems":{"verify_error":"error: Failed to parse: `boto3 mypy-boto3-bcm-recommended-actions`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `m`\nboto3 mypy-boto3-bcm-recommended-actions\n      ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.61","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_bcm_recommended_actions/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-bcm-recommended-actions/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-05","install_tag":null}}