ECS / Client / update_capacity_provider

update_capacity_provider

ECS.Client.update_capacity_provider(**kwargs)

Modifies the parameters for a capacity provider.

These changes only apply to new Amazon ECS Managed Instances, or EC2 instances, not existing ones.

See also: AWS API Documentation

Request Syntax

response = client.update_capacity_provider(
    name='string',
    cluster='string',
    autoScalingGroupProvider={
        'managedScaling': {
            'status': 'ENABLED'|'DISABLED',
            'targetCapacity': 123,
            'minimumScalingStepSize': 123,
            'maximumScalingStepSize': 123,
            'instanceWarmupPeriod': 123
        },
        'managedTerminationProtection': 'ENABLED'|'DISABLED',
        'managedDraining': 'ENABLED'|'DISABLED'
    },
    managedInstancesProvider={
        'infrastructureRoleArn': 'string',
        'instanceLaunchTemplate': {
            'ec2InstanceProfileArn': 'string',
            'networkConfiguration': {
                'subnets': [
                    'string',
                ],
                'securityGroups': [
                    'string',
                ]
            },
            'storageConfiguration': {
                'storageSizeGiB': 123
            },
            'monitoring': 'BASIC'|'DETAILED',
            'instanceRequirements': {
                'vCpuCount': {
                    'min': 123,
                    'max': 123
                },
                'memoryMiB': {
                    'min': 123,
                    'max': 123
                },
                'cpuManufacturers': [
                    'intel'|'amd'|'amazon-web-services',
                ],
                'memoryGiBPerVCpu': {
                    'min': 123.0,
                    'max': 123.0
                },
                'excludedInstanceTypes': [
                    'string',
                ],
                'instanceGenerations': [
                    'current'|'previous',
                ],
                'spotMaxPricePercentageOverLowestPrice': 123,
                'onDemandMaxPricePercentageOverLowestPrice': 123,
                'bareMetal': 'included'|'required'|'excluded',
                'burstablePerformance': 'included'|'required'|'excluded',
                'requireHibernateSupport': True|False,
                'networkInterfaceCount': {
                    'min': 123,
                    'max': 123
                },
                'localStorage': 'included'|'required'|'excluded',
                'localStorageTypes': [
                    'hdd'|'ssd',
                ],
                'totalLocalStorageGB': {
                    'min': 123.0,
                    'max': 123.0
                },
                'baselineEbsBandwidthMbps': {
                    'min': 123,
                    'max': 123
                },
                'acceleratorTypes': [
                    'gpu'|'fpga'|'inference',
                ],
                'acceleratorCount': {
                    'min': 123,
                    'max': 123
                },
                'acceleratorManufacturers': [
                    'amazon-web-services'|'amd'|'nvidia'|'xilinx'|'habana',
                ],
                'acceleratorNames': [
                    'a100'|'inferentia'|'k520'|'k80'|'m60'|'radeon-pro-v520'|'t4'|'vu9p'|'v100'|'a10g'|'h100'|'t4g',
                ],
                'acceleratorTotalMemoryMiB': {
                    'min': 123,
                    'max': 123
                },
                'networkBandwidthGbps': {
                    'min': 123.0,
                    'max': 123.0
                },
                'allowedInstanceTypes': [
                    'string',
                ],
                'maxSpotPriceAsPercentageOfOptimalOnDemandPrice': 123
            }
        },
        'propagateTags': 'CAPACITY_PROVIDER'|'NONE'
    }
)
Parameters:
  • name (string) –

    [REQUIRED]

    The name of the capacity provider to update.

  • cluster (string) – The name of the cluster that contains the capacity provider to update. Managed instances capacity providers are cluster-scoped and can only be updated within their associated cluster.

  • autoScalingGroupProvider (dict) –

    An object that represent the parameters to update for the Auto Scaling group capacity provider.

    • managedScaling (dict) –

      The managed scaling settings for the Auto Scaling group capacity provider.

      • status (string) –

        Determines whether to use managed scaling for the capacity provider.

      • targetCapacity (integer) –

        The target capacity utilization as a percentage for the capacity provider. The specified value must be greater than 0 and less than or equal to 100. For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a targetCapacity of 90. The default value of 100 percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.

      • minimumScalingStepSize (integer) –

        The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter If this parameter is omitted, the default value of 1 is used.

        When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.

      • maximumScalingStepSize (integer) –

        The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. If this parameter is omitted, the default value of 10000 is used.

      • instanceWarmupPeriod (integer) –

        The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of 300 seconds is used.

    • managedTerminationProtection (string) –

      The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection.

      Warning

      When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn’t work.

      When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on. For more information, see Instance Protection in the Auto Scaling User Guide.

      When managed termination protection is off, your Amazon EC2 instances aren’t protected from termination when the Auto Scaling group scales in.

    • managedDraining (string) –

      The managed draining option for the Auto Scaling group capacity provider. When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider.

  • managedInstancesProvider (dict) –

    The updated configuration for the Amazon ECS Managed Instances provider. You can modify the infrastructure role, instance launch template, and tag propagation settings. Changes take effect for new instances launched after the update.

    • infrastructureRoleArn (string) – [REQUIRED]

      The updated Amazon Resource Name (ARN) of the infrastructure role. The new role must have the necessary permissions to manage instances and access required Amazon Web Services services.

      For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide.

    • instanceLaunchTemplate (dict) – [REQUIRED]

      The updated launch template configuration. Changes to the launch template affect new instances launched after the update, while existing instances continue to use their original configuration.

      • ec2InstanceProfileArn (string) –

        The updated Amazon Resource Name (ARN) of the instance profile. The new instance profile must have the necessary permissions for your tasks.

        For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide.

      • networkConfiguration (dict) –

        The updated network configuration for Amazon ECS Managed Instances. Changes to subnets and security groups affect new instances launched after the update.

        • subnets (list) –

          The list of subnet IDs where Amazon ECS can launch Amazon ECS Managed Instances. Instances are distributed across the specified subnets for high availability. All subnets must be in the same VPC.

          • (string) –

        • securityGroups (list) –

          The list of security group IDs to apply to Amazon ECS Managed Instances. These security groups control the network traffic allowed to and from the instances.

          • (string) –

      • storageConfiguration (dict) –

        The updated storage configuration for Amazon ECS Managed Instances. Changes to storage settings apply to new instances launched after the update.

        • storageSizeGiB (integer) –

          The size of the tasks volume.

      • monitoring (string) –

        CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.

      • instanceRequirements (dict) –

        The updated instance requirements for attribute-based instance type selection. Changes to instance requirements affect which instance types Amazon ECS selects for new instances.

        • vCpuCount (dict) – [REQUIRED]

          The minimum and maximum number of vCPUs for the instance types. Amazon ECS selects instance types that have vCPU counts within this range.

          • min (integer) – [REQUIRED]

            The minimum number of vCPUs. Instance types with fewer vCPUs than this value are excluded from selection.

          • max (integer) –

            The maximum number of vCPUs. Instance types with more vCPUs than this value are excluded from selection.

        • memoryMiB (dict) – [REQUIRED]

          The minimum and maximum amount of memory in mebibytes (MiB) for the instance types. Amazon ECS selects instance types that have memory within this range.

          • min (integer) – [REQUIRED]

            The minimum amount of memory in MiB. Instance types with less memory than this value are excluded from selection.

          • max (integer) –

            The maximum amount of memory in MiB. Instance types with more memory than this value are excluded from selection.

        • cpuManufacturers (list) –

          The CPU manufacturers to include or exclude. You can specify intel, amd, or amazon-web-services to control which CPU types are used for your workloads.

          • (string) –

        • memoryGiBPerVCpu (dict) –

          The minimum and maximum amount of memory per vCPU in gibibytes (GiB). This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.

          • min (float) –

            The minimum amount of memory per vCPU in GiB. Instance types with a lower memory-to-vCPU ratio are excluded from selection.

          • max (float) –

            The maximum amount of memory per vCPU in GiB. Instance types with a higher memory-to-vCPU ratio are excluded from selection.

        • excludedInstanceTypes (list) –

          The instance types to exclude from selection. Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.

          • (string) –

        • instanceGenerations (list) –

          The instance generations to include. You can specify current to use the latest generation instances, or previous to include previous generation instances for cost optimization.

          • (string) –

        • spotMaxPricePercentageOverLowestPrice (integer) –

          The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance. This helps control Spot instance costs while maintaining access to capacity.

        • onDemandMaxPricePercentageOverLowestPrice (integer) –

          The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

        • bareMetal (string) –

          Indicates whether to include bare metal instance types. Set to included to allow bare metal instances, excluded to exclude them, or required to use only bare metal instances.

        • burstablePerformance (string) –

          Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g). Set to included to allow burstable instances, excluded to exclude them, or required to use only burstable instances.

        • requireHibernateSupport (boolean) –

          Indicates whether the instance types must support hibernation. When set to true, only instance types that support hibernation are selected.

        • networkInterfaceCount (dict) –

          The minimum and maximum number of network interfaces for the instance types. This is useful for workloads that require multiple network interfaces.

          • min (integer) –

            The minimum number of network interfaces. Instance types that support fewer network interfaces are excluded from selection.

          • max (integer) –

            The maximum number of network interfaces. Instance types that support more network interfaces are excluded from selection.

        • localStorage (string) –

          Indicates whether to include instance types with local storage. Set to included to allow local storage, excluded to exclude it, or required to use only instances with local storage.

        • localStorageTypes (list) –

          The local storage types to include. You can specify hdd for hard disk drives, ssd for solid state drives, or both.

          • (string) –

        • totalLocalStorageGB (dict) –

          The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.

          • min (float) –

            The minimum total local storage in GB. Instance types with less local storage are excluded from selection.

          • max (float) –

            The maximum total local storage in GB. Instance types with more local storage are excluded from selection.

        • baselineEbsBandwidthMbps (dict) –

          The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps). This is important for workloads with high storage I/O requirements.

          • min (integer) –

            The minimum baseline Amazon EBS bandwidth in Mbps. Instance types with lower Amazon EBS bandwidth are excluded from selection.

          • max (integer) –

            The maximum baseline Amazon EBS bandwidth in Mbps. Instance types with higher Amazon EBS bandwidth are excluded from selection.

        • acceleratorTypes (list) –

          The accelerator types to include. You can specify gpu for graphics processing units, fpga for field programmable gate arrays, or inference for machine learning inference accelerators.

          • (string) –

        • acceleratorCount (dict) –

          The minimum and maximum number of accelerators for the instance types. This is used when you need instances with specific numbers of GPUs or other accelerators.

          • min (integer) –

            The minimum number of accelerators. Instance types with fewer accelerators are excluded from selection.

          • max (integer) –

            The maximum number of accelerators. Instance types with more accelerators are excluded from selection.

        • acceleratorManufacturers (list) –

          The accelerator manufacturers to include. You can specify nvidia, amd, amazon-web-services, or xilinx depending on your accelerator requirements.

          • (string) –

        • acceleratorNames (list) –

          The specific accelerator names to include. For example, you can specify a100, v100, k80, or other specific accelerator models.

          • (string) –

        • acceleratorTotalMemoryMiB (dict) –

          The minimum and maximum total accelerator memory in mebibytes (MiB). This is important for GPU workloads that require specific amounts of video memory.

          • min (integer) –

            The minimum total accelerator memory in MiB. Instance types with less accelerator memory are excluded from selection.

          • max (integer) –

            The maximum total accelerator memory in MiB. Instance types with more accelerator memory are excluded from selection.

        • networkBandwidthGbps (dict) –

          The minimum and maximum network bandwidth in gigabits per second (Gbps). This is crucial for network-intensive workloads that require high throughput.

          • min (float) –

            The minimum network bandwidth in Gbps. Instance types with lower network bandwidth are excluded from selection.

          • max (float) –

            The maximum network bandwidth in Gbps. Instance types with higher network bandwidth are excluded from selection.

        • allowedInstanceTypes (list) –

          The instance types to include in the selection. When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.

          • (string) –

        • maxSpotPriceAsPercentageOfOptimalOnDemandPrice (integer) –

          The maximum price for Spot instances as a percentage of the optimal On-Demand price. This provides more precise cost control for Spot instance selection.

    • propagateTags (string) –

      The updated tag propagation setting. When changed, this affects only new instances launched after the update.

Return type:

dict

Returns:

Response Syntax

{
    'capacityProvider': {
        'capacityProviderArn': 'string',
        'name': 'string',
        'cluster': 'string',
        'status': 'PROVISIONING'|'ACTIVE'|'DEPROVISIONING'|'INACTIVE',
        'autoScalingGroupProvider': {
            'autoScalingGroupArn': 'string',
            'managedScaling': {
                'status': 'ENABLED'|'DISABLED',
                'targetCapacity': 123,
                'minimumScalingStepSize': 123,
                'maximumScalingStepSize': 123,
                'instanceWarmupPeriod': 123
            },
            'managedTerminationProtection': 'ENABLED'|'DISABLED',
            'managedDraining': 'ENABLED'|'DISABLED'
        },
        'managedInstancesProvider': {
            'infrastructureRoleArn': 'string',
            'instanceLaunchTemplate': {
                'ec2InstanceProfileArn': 'string',
                'networkConfiguration': {
                    'subnets': [
                        'string',
                    ],
                    'securityGroups': [
                        'string',
                    ]
                },
                'storageConfiguration': {
                    'storageSizeGiB': 123
                },
                'monitoring': 'BASIC'|'DETAILED',
                'instanceRequirements': {
                    'vCpuCount': {
                        'min': 123,
                        'max': 123
                    },
                    'memoryMiB': {
                        'min': 123,
                        'max': 123
                    },
                    'cpuManufacturers': [
                        'intel'|'amd'|'amazon-web-services',
                    ],
                    'memoryGiBPerVCpu': {
                        'min': 123.0,
                        'max': 123.0
                    },
                    'excludedInstanceTypes': [
                        'string',
                    ],
                    'instanceGenerations': [
                        'current'|'previous',
                    ],
                    'spotMaxPricePercentageOverLowestPrice': 123,
                    'onDemandMaxPricePercentageOverLowestPrice': 123,
                    'bareMetal': 'included'|'required'|'excluded',
                    'burstablePerformance': 'included'|'required'|'excluded',
                    'requireHibernateSupport': True|False,
                    'networkInterfaceCount': {
                        'min': 123,
                        'max': 123
                    },
                    'localStorage': 'included'|'required'|'excluded',
                    'localStorageTypes': [
                        'hdd'|'ssd',
                    ],
                    'totalLocalStorageGB': {
                        'min': 123.0,
                        'max': 123.0
                    },
                    'baselineEbsBandwidthMbps': {
                        'min': 123,
                        'max': 123
                    },
                    'acceleratorTypes': [
                        'gpu'|'fpga'|'inference',
                    ],
                    'acceleratorCount': {
                        'min': 123,
                        'max': 123
                    },
                    'acceleratorManufacturers': [
                        'amazon-web-services'|'amd'|'nvidia'|'xilinx'|'habana',
                    ],
                    'acceleratorNames': [
                        'a100'|'inferentia'|'k520'|'k80'|'m60'|'radeon-pro-v520'|'t4'|'vu9p'|'v100'|'a10g'|'h100'|'t4g',
                    ],
                    'acceleratorTotalMemoryMiB': {
                        'min': 123,
                        'max': 123
                    },
                    'networkBandwidthGbps': {
                        'min': 123.0,
                        'max': 123.0
                    },
                    'allowedInstanceTypes': [
                        'string',
                    ],
                    'maxSpotPriceAsPercentageOfOptimalOnDemandPrice': 123
                }
            },
            'propagateTags': 'CAPACITY_PROVIDER'|'NONE'
        },
        'updateStatus': 'CREATE_IN_PROGRESS'|'CREATE_COMPLETE'|'CREATE_FAILED'|'DELETE_IN_PROGRESS'|'DELETE_COMPLETE'|'DELETE_FAILED'|'UPDATE_IN_PROGRESS'|'UPDATE_COMPLETE'|'UPDATE_FAILED',
        'updateStatusReason': 'string',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'type': 'EC2_AUTOSCALING'|'MANAGED_INSTANCES'|'FARGATE'|'FARGATE_SPOT'
    }
}

Response Structure

  • (dict) –

    • capacityProvider (dict) –

      Details about the capacity provider.

      • capacityProviderArn (string) –

        The Amazon Resource Name (ARN) that identifies the capacity provider.

      • name (string) –

        The name of the capacity provider.

      • cluster (string) –

        The cluster that this capacity provider is associated with. Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.

      • status (string) –

        The current status of the capacity provider. Only capacity providers in an ACTIVE state can be used in a cluster. When a capacity provider is successfully deleted, it has an INACTIVE status.

      • autoScalingGroupProvider (dict) –

        The Auto Scaling group settings for the capacity provider.

        • autoScalingGroupArn (string) –

          The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name.

        • managedScaling (dict) –

          The managed scaling settings for the Auto Scaling group capacity provider.

          • status (string) –

            Determines whether to use managed scaling for the capacity provider.

          • targetCapacity (integer) –

            The target capacity utilization as a percentage for the capacity provider. The specified value must be greater than 0 and less than or equal to 100. For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a targetCapacity of 90. The default value of 100 percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.

          • minimumScalingStepSize (integer) –

            The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter If this parameter is omitted, the default value of 1 is used.

            When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.

          • maximumScalingStepSize (integer) –

            The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. If this parameter is omitted, the default value of 10000 is used.

          • instanceWarmupPeriod (integer) –

            The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of 300 seconds is used.

        • managedTerminationProtection (string) –

          The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection. The default is off.

          Warning

          When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn’t work.

          When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see Instance Protection in the Auto Scaling User Guide.

          When managed termination protection is off, your Amazon EC2 instances aren’t protected from termination when the Auto Scaling group scales in.

        • managedDraining (string) –

          The managed draining option for the Auto Scaling group capacity provider. When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider.

      • managedInstancesProvider (dict) –

        The configuration for the Amazon ECS Managed Instances provider. This includes the infrastructure role, the launch template configuration, and tag propagation settings.

        • infrastructureRoleArn (string) –

          The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances. This role must include permissions for Amazon EC2 instance lifecycle management, networking, and any additional Amazon Web Services services required for your workloads.

          For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide.

        • instanceLaunchTemplate (dict) –

          The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances. This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used.

          For more information, see Store instance launch parameters in Amazon EC2 launch templates in the Amazon EC2 User Guide.

          • ec2InstanceProfileArn (string) –

            The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access Amazon Web Services services and resources.

            For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide.

          • networkConfiguration (dict) –

            The network configuration for Amazon ECS Managed Instances. This specifies the subnets and security groups that instances use for network connectivity.

            • subnets (list) –

              The list of subnet IDs where Amazon ECS can launch Amazon ECS Managed Instances. Instances are distributed across the specified subnets for high availability. All subnets must be in the same VPC.

              • (string) –

            • securityGroups (list) –

              The list of security group IDs to apply to Amazon ECS Managed Instances. These security groups control the network traffic allowed to and from the instances.

              • (string) –

          • storageConfiguration (dict) –

            The storage configuration for Amazon ECS Managed Instances. This defines the root volume size and type for the instances.

            • storageSizeGiB (integer) –

              The size of the tasks volume.

          • monitoring (string) –

            CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.

          • instanceRequirements (dict) –

            The instance requirements. You can specify:

            • The instance types

            • Instance requirements such as vCPU count, memory, network performance, and accelerator specifications

            Amazon ECS automatically selects the instances that match the specified criteria.

            • vCpuCount (dict) –

              The minimum and maximum number of vCPUs for the instance types. Amazon ECS selects instance types that have vCPU counts within this range.

              • min (integer) –

                The minimum number of vCPUs. Instance types with fewer vCPUs than this value are excluded from selection.

              • max (integer) –

                The maximum number of vCPUs. Instance types with more vCPUs than this value are excluded from selection.

            • memoryMiB (dict) –

              The minimum and maximum amount of memory in mebibytes (MiB) for the instance types. Amazon ECS selects instance types that have memory within this range.

              • min (integer) –

                The minimum amount of memory in MiB. Instance types with less memory than this value are excluded from selection.

              • max (integer) –

                The maximum amount of memory in MiB. Instance types with more memory than this value are excluded from selection.

            • cpuManufacturers (list) –

              The CPU manufacturers to include or exclude. You can specify intel, amd, or amazon-web-services to control which CPU types are used for your workloads.

              • (string) –

            • memoryGiBPerVCpu (dict) –

              The minimum and maximum amount of memory per vCPU in gibibytes (GiB). This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.

              • min (float) –

                The minimum amount of memory per vCPU in GiB. Instance types with a lower memory-to-vCPU ratio are excluded from selection.

              • max (float) –

                The maximum amount of memory per vCPU in GiB. Instance types with a higher memory-to-vCPU ratio are excluded from selection.

            • excludedInstanceTypes (list) –

              The instance types to exclude from selection. Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.

              • (string) –

            • instanceGenerations (list) –

              The instance generations to include. You can specify current to use the latest generation instances, or previous to include previous generation instances for cost optimization.

              • (string) –

            • spotMaxPricePercentageOverLowestPrice (integer) –

              The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance. This helps control Spot instance costs while maintaining access to capacity.

            • onDemandMaxPricePercentageOverLowestPrice (integer) –

              The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

            • bareMetal (string) –

              Indicates whether to include bare metal instance types. Set to included to allow bare metal instances, excluded to exclude them, or required to use only bare metal instances.

            • burstablePerformance (string) –

              Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g). Set to included to allow burstable instances, excluded to exclude them, or required to use only burstable instances.

            • requireHibernateSupport (boolean) –

              Indicates whether the instance types must support hibernation. When set to true, only instance types that support hibernation are selected.

            • networkInterfaceCount (dict) –

              The minimum and maximum number of network interfaces for the instance types. This is useful for workloads that require multiple network interfaces.

              • min (integer) –

                The minimum number of network interfaces. Instance types that support fewer network interfaces are excluded from selection.

              • max (integer) –

                The maximum number of network interfaces. Instance types that support more network interfaces are excluded from selection.

            • localStorage (string) –

              Indicates whether to include instance types with local storage. Set to included to allow local storage, excluded to exclude it, or required to use only instances with local storage.

            • localStorageTypes (list) –

              The local storage types to include. You can specify hdd for hard disk drives, ssd for solid state drives, or both.

              • (string) –

            • totalLocalStorageGB (dict) –

              The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.

              • min (float) –

                The minimum total local storage in GB. Instance types with less local storage are excluded from selection.

              • max (float) –

                The maximum total local storage in GB. Instance types with more local storage are excluded from selection.

            • baselineEbsBandwidthMbps (dict) –

              The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps). This is important for workloads with high storage I/O requirements.

              • min (integer) –

                The minimum baseline Amazon EBS bandwidth in Mbps. Instance types with lower Amazon EBS bandwidth are excluded from selection.

              • max (integer) –

                The maximum baseline Amazon EBS bandwidth in Mbps. Instance types with higher Amazon EBS bandwidth are excluded from selection.

            • acceleratorTypes (list) –

              The accelerator types to include. You can specify gpu for graphics processing units, fpga for field programmable gate arrays, or inference for machine learning inference accelerators.

              • (string) –

            • acceleratorCount (dict) –

              The minimum and maximum number of accelerators for the instance types. This is used when you need instances with specific numbers of GPUs or other accelerators.

              • min (integer) –

                The minimum number of accelerators. Instance types with fewer accelerators are excluded from selection.

              • max (integer) –

                The maximum number of accelerators. Instance types with more accelerators are excluded from selection.

            • acceleratorManufacturers (list) –

              The accelerator manufacturers to include. You can specify nvidia, amd, amazon-web-services, or xilinx depending on your accelerator requirements.

              • (string) –

            • acceleratorNames (list) –

              The specific accelerator names to include. For example, you can specify a100, v100, k80, or other specific accelerator models.

              • (string) –

            • acceleratorTotalMemoryMiB (dict) –

              The minimum and maximum total accelerator memory in mebibytes (MiB). This is important for GPU workloads that require specific amounts of video memory.

              • min (integer) –

                The minimum total accelerator memory in MiB. Instance types with less accelerator memory are excluded from selection.

              • max (integer) –

                The maximum total accelerator memory in MiB. Instance types with more accelerator memory are excluded from selection.

            • networkBandwidthGbps (dict) –

              The minimum and maximum network bandwidth in gigabits per second (Gbps). This is crucial for network-intensive workloads that require high throughput.

              • min (float) –

                The minimum network bandwidth in Gbps. Instance types with lower network bandwidth are excluded from selection.

              • max (float) –

                The maximum network bandwidth in Gbps. Instance types with higher network bandwidth are excluded from selection.

            • allowedInstanceTypes (list) –

              The instance types to include in the selection. When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.

              • (string) –

            • maxSpotPriceAsPercentageOfOptimalOnDemandPrice (integer) –

              The maximum price for Spot instances as a percentage of the optimal On-Demand price. This provides more precise cost control for Spot instance selection.

        • propagateTags (string) –

          Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances. This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.

      • updateStatus (string) –

        The update status of the capacity provider. The following are the possible states that is returned.

        DELETE_IN_PROGRESS

        The capacity provider is in the process of being deleted.

        DELETE_COMPLETE

        The capacity provider was successfully deleted and has an INACTIVE status.

        DELETE_FAILED

        The capacity provider can’t be deleted. The update status reason provides further details about why the delete failed.

      • updateStatusReason (string) –

        The update status reason. This provides further details about the update status for the capacity provider.

      • tags (list) –

        The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.

        The following basic restrictions apply to tags:

        • Maximum number of tags per resource - 50

        • For each resource, each tag key must be unique, and each tag key can have only one value.

        • Maximum key length - 128 Unicode characters in UTF-8

        • Maximum value length - 256 Unicode characters in UTF-8

        • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

        • Tag keys and values are case-sensitive.

        • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

        • (dict) –

          The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

          The following basic restrictions apply to tags:

          • Maximum number of tags per resource - 50

          • For each resource, each tag key must be unique, and each tag key can have only one value.

          • Maximum key length - 128 Unicode characters in UTF-8

          • Maximum value length - 256 Unicode characters in UTF-8

          • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

          • Tag keys and values are case-sensitive.

          • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

          • key (string) –

            One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

          • value (string) –

            The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

      • type (string) –

        The type of capacity provider. For Amazon ECS Managed Instances, this value is MANAGED_INSTANCES, indicating that Amazon ECS manages the underlying Amazon EC2 instances on your behalf.

Exceptions

  • ECS.Client.exceptions.ServerException

  • ECS.Client.exceptions.ClientException

  • ECS.Client.exceptions.InvalidParameterException

  • ECS.Client.exceptions.UnsupportedFeatureException

  • ECS.Client.exceptions.ClusterNotFoundException