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
1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 | |