update_security_group_rule_descriptions_ingress
¶
update_security_group_rule_descriptions_ingress(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
group_id: Optional[SecurityGroupId] = None,
group_name: Optional[SecurityGroupName] = None,
ip_permissions: Optional[IpPermissionList] = None,
security_group_rule_descriptions: Optional[SecurityGroupRuleDescriptionList] = None,
) -> UpdateSecurityGroupRuleDescriptionsIngressResult
Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously. You can remove a description for a security group rule by omitting the description parameter in the request.
Parameters:
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
group_id(Optional[SecurityGroupId], default:None) –The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
-
group_name(Optional[SecurityGroupName], default:None) –[Default VPC] The name of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID.
-
ip_permissions(Optional[IpPermissionList], default:None) –The IP permissions for the security group rule. You must specify either IP permissions or a description.
-
security_group_rule_descriptions(Optional[SecurityGroupRuleDescriptionList], default:None) –The description for the ingress security group rules. You must specify either a description or IP permissions.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update an inbound security group rule description This example updates the description for the specified security group rule.
>>> client.update_security_group_rule_descriptions_ingress(group_id='sg-123abc12', ip_permissions=[{'IpProtocol': 'tcp', 'FromPort': 22, 'ToPort': 22, 'IpRanges': [{'CidrIp': '203.0.113.0/16', 'Description': 'SSH access from the LA office'}]}])
Source code in docs_src/capo_ec2/_services/ec2.py
60377 60378 60379 60380 60381 60382 60383 60384 60385 60386 60387 60388 60389 60390 60391 60392 60393 60394 60395 60396 60397 60398 60399 60400 60401 60402 60403 60404 60405 60406 60407 60408 60409 60410 60411 60412 60413 60414 60415 60416 60417 60418 60419 60420 60421 60422 60423 60424 60425 60426 60427 60428 60429 60430 60431 60432 60433 60434 60435 60436 60437 60438 60439 60440 60441 60442 60443 60444 60445 60446 60447 60448 60449 60450 | |