update_gateway
async
¶
update_gateway(
gateway: String,
*,
config_overrides: Optional[AsyncECSClientConfig] = None,
infrastructure_role_arn: Optional[String] = None,
deletion_protection: Optional[BoxedBoolean] = None,
configuration: Optional[UpdateGatewayConfiguration] = None,
propagate_tags: Optional[PropagateGatewayTags] = None,
) -> UpdateGatewayResponse
Modifies the configuration of a gateway. You can change only the properties that can be applied without interrupting traffic, and the configuration variant that you provide must match the gateway's type. UpdateGateway is an asynchronous operation: the changes are applied to each load balancer the gateway manages, and the gateway reports a status of UPDATE_IN_PROGRESS until the update completes. If Amazon ECS can't update one or more resources, it makes a best effort to update the rest and the gateway status changes to UPDATE_FAILED. Use DescribeGateway to inspect the gateway's statusReason and failures list, which gives the ARN of each load balancer that was not updated and the operation, error code, and message for each failure.
If you specify infrastructureRoleArn, you must have the iam:PassRole permission for that role.
Parameters:
-
gateway(String) –The name or Amazon Resource Name (ARN) of the gateway to update.
-
infrastructure_role_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) of the IAM role that the gateway assumes to manage infrastructure on your behalf.
-
deletion_protection(Optional[BoxedBoolean], default:None) –Specifies whether to enable deletion protection for the gateway. When enabled, the gateway can't be deleted.
-
configuration(Optional[UpdateGatewayConfiguration], default:None) –The updated type-specific configuration for the gateway. The configuration variant must match the gateway's existing type, and only mutable fields can be changed.
-
propagate_tags(Optional[PropagateGatewayTags], default:None) –Specifies whether to propagate the tags from the gateway to the infrastructure that the gateway manages. If you don't specify a value, the gateway's existing setting is unchanged.
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.
-
GatewayNotFoundException–The specified gateway wasn't found. Check that the gateway name or ARN is correct and that the gateway exists in your account and Region.
-
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.
-
UnsupportedFeatureException–The specified task isn't supported in this Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update a gateway This example raises the maximum number of Application Load Balancers that the gateway named my-gateway manages, and changes the desync mitigation mode to strictest.
>>> await client.update_gateway(gateway='my-gateway', configuration={'hostSharedAlb': {'maxAlbCount': 20, 'httpDesync': 'strictest'}})
Source code in docs_src/capo_ecs/_services/async_ecs.py
4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 | |