update_gateway
¶
update_gateway(
gateway: String,
*,
config_overrides: Optional[ECSClientConfig] = 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.
>>> client.update_gateway(gateway='my-gateway', configuration={'hostSharedAlb': {'maxAlbCount': 20, 'httpDesync': 'strictest'}})
Source code in docs_src/capo_ecs/_services/ecs.py
4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 | |