update_cluster_settings
async
¶
update_cluster_settings(
cluster: String,
settings: ClusterSettings,
*,
config_overrides: Optional[AsyncECSClientConfig] = None,
) -> UpdateClusterSettingsResponse
Modifies the settings to use for a cluster.
Parameters:
-
cluster(String) –The name of the cluster to modify the settings for.
-
settings(ClusterSettings) –The setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsightsvalue set with PutAccountSetting or PutAccountSettingDefault.Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.
Raises:
-
AccessDeniedException–You don't have authorization to perform the requested action.
-
ClientException–These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
-
ClusterNotFoundException–The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
-
InvalidParameterException–The specified parameter isn't valid. Review the available parameters for the API request.
For more information about service event errors, see Amazon ECS service event messages.
-
ServerException–These errors are usually caused by a server issue.
-
UpdateInProgressException–There's already a current Amazon ECS container agent update in progress on the container instance that's specified. If the container agent becomes disconnected while it's in a transitional stage, such as
PENDINGorSTAGING, the update process can get stuck in that state. However, when the agent reconnects, it resumes where it stopped previously. -
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update a cluster's settings This example enables CloudWatch Container Insights for the default cluster.
>>> await client.update_cluster_settings(cluster='default', settings=[{'name': 'containerInsights', 'value': 'enabled'}])
Source code in docs_src/capo_ecs/_services/async_ecs.py
1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 | |