{"id":3334,"library":"mypy-boto3-arc-zonal-shift","title":"mypy-boto3-arc-zonal-shift","description":"This library provides type annotations (stubs) for the `boto3` AWS ARC Zonal Shift service, allowing developers to leverage static type checking with `mypy`. It is part of the `mypy-boto3-builder` ecosystem, which generates type stubs for all `boto3` services. The package version 1.42.3 aligns with the `boto3` version, and new versions are released frequently to match `boto3` updates and `mypy-boto3-builder` improvements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","types","stubs","type-hinting","arc-zonal-shift"],"install":[{"cmd":"pip install mypy-boto3-arc-zonal-shift boto3 mypy","lang":"bash","label":"Install with boto3 and mypy"}],"dependencies":[{"reason":"Provides the runtime AWS SDK functionality that these stubs type-check. Required for execution.","package":"boto3","optional":false},{"reason":"The static type checker that utilizes these stubs. Required for type checking.","package":"mypy","optional":false}],"imports":[{"note":"This is the primary type hint for the ARC Zonal Shift service client obtained from boto3.client().","symbol":"ARCZonalShiftClient","correct":"from mypy_boto3_arc_zonal_shift import ARCZonalShiftClient"},{"note":"Imports type definitions for service responses, typically TypedDicts, for detailed type checking.","symbol":"GetManagedResourceResponseTypeDef","correct":"from mypy_boto3_arc_zonal_shift.type_defs import GetManagedResourceResponseTypeDef"},{"note":"Literal type for the service name, useful for strict type checking of service names passed to boto3.client().","symbol":"ARCZonalShiftServiceName","correct":"from mypy_boto3_arc_zonal_shift.literals import ARCZonalShiftServiceName"}],"quickstart":{"code":"import boto3\nimport os\nfrom mypy_boto3_arc_zonal_shift import ARCZonalShiftClient\nfrom mypy_boto3_arc_zonal_shift.type_defs import (\n    GetManagedResourceResponseTypeDef,\n    ListManagedResourcesResponseTypeDef,\n)\n\n# Initialize a typed client for the ARC Zonal Shift service\n# Ensure AWS credentials are configured (e.g., via AWS CLI, environment variables)\nclient: ARCZonalShiftClient = boto3.client(\"arc-zonal-shift\")\n\nprint(\"\\n--- Listing Managed Resources ---\")\ntry:\n    # Using type hints for the response object\n    response: ListManagedResourcesResponseTypeDef = client.list_managed_resources(\n        MaxResults=5  # Example optional parameter\n    )\n    if \"Items\" in response:\n        print(f\"Found {len(response['Items'])} managed resources:\")\n        for resource in response[\"Items\"]:\n            print(f\"  - ARN: {resource.get('ResourceArn')}, Name: {resource.get('ResourceName')}\")\n    else:\n        print(\"No managed resources found.\")\n\nexcept client.exceptions.AccessDeniedException as e:\n    print(f\"Error: Access denied. Please check your AWS credentials and permissions. {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\n\n# Example: Getting details for a specific managed resource (requires a valid ARN)\n# Replace with an actual ARN from your AWS environment if you want to test this part.\n# For a runnable example, we'll use a placeholder and warn the user.\nexample_resource_identifier = os.environ.get(\n    \"ARC_ZONAL_SHIFT_TEST_RESOURCE_ID\",\n    \"arn:aws:arc-zonal-shift:us-east-1:123456789012:resource/example-123\"\n)\n\nif \"example-123\" not in example_resource_identifier: # Avoid running with placeholder\n    print(f\"\\n--- Getting Details for Resource: {example_resource_identifier} ---\")\n    try:\n        resource_details: GetManagedResourceResponseTypeDef = client.get_managed_resource(\n            ResourceIdentifier=example_resource_identifier\n        )\n        print(f\"Details for {example_resource_identifier}: {resource_details}\")\n    except client.exceptions.ResourceNotFoundException:\n        print(f\"Resource '{example_resource_identifier}' not found.\")\n    except Exception as e:\n        print(f\"Error getting resource details: {e}\")\nelse:\n    print(f\"\\nSkipping 'Get Managed Resource' example. Set ARC_ZONAL_SHIFT_TEST_RESOURCE_ID environment variable with a valid ARN to run it.\")","lang":"python","description":"This quickstart demonstrates how to initialize a type-hinted `ARCZonalShiftClient` using `boto3` and perform a basic `list_managed_resources` call, applying the type stubs for improved code completion and static analysis. It also includes an example for `get_managed_resource`, noting the need for a valid ARN."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. If you must use Python 3.8, you will need to pin `mypy-boto3-arc-zonal-shift` to an older version (e.g., `<1.42.0`) or use an older `mypy-boto3-builder` if generating custom stubs.","message":"Python 3.8 support was removed for all `mypy-boto3` packages, including `mypy-boto3-arc-zonal-shift`, starting with `mypy-boto3-builder` version 8.12.0. The `requires_python` specifier is now `>=3.9`.","severity":"breaking","affected_versions":"mypy-boto3-arc-zonal-shift >= 1.42.0 (and other mypy-boto3 packages generated by builder 8.12.0+)"},{"fix":"If you encounter 'Name 'X' is not defined' or 'cannot find name 'X'' errors for TypeDefs after upgrading, consult the generated `type_defs.pyi` file within the package (e.g., `site-packages/mypy_boto3_arc_zonal_shift/type_defs.pyi`) for the updated names and adjust your imports/references accordingly.","message":"Some TypeDef names for method arguments and responses might have changed in `mypy-boto3-builder` version 8.9.0 to be shorter or to resolve naming conflicts. This can cause `mypy` errors if your code explicitly references these TypeDefs.","severity":"breaking","affected_versions":"mypy-boto3-arc-zonal-shift >= 1.39.0 (and other mypy-boto3 packages generated by builder 8.9.0+)"},{"fix":"Ensure `boto3` is included in your project's runtime dependencies (`pip install boto3`). The `mypy-boto3` package is a development/type-checking dependency.","message":"This package provides *type stubs only*. It does not replace the `boto3` library itself. `boto3` must be installed and available at runtime for your application to function. These stubs merely add type-checking capabilities for `boto3` interactions.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always refer to the official `boto3` documentation or `mypy_boto3_arc_zonal_shift.literals.ARCZonalShiftServiceName` for the correct service name. For this service, it is 'arc-zonal-shift'.","message":"AWS service names passed to `boto3.client()` (e.g., 'arc-zonal-shift') are case-sensitive and must exactly match the expected service identifier. Mismatches will lead to `UnknownServiceError` at runtime and may not be caught by `mypy` if not using literal types.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}