diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py index 2b67537e736067..bd02a46f2ef3e1 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py @@ -105,8 +105,8 @@ description: - The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. - - For CONNECTION mode, either maxConnections or maxConnectionsPerInstance - must be set. + - For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance + or maxConnectionsPerEndpoint, as appropriate for group type, must be set. required: false max_connections_per_instance: description: @@ -116,12 +116,21 @@ - For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. required: false + max_connections_per_endpoint: + description: + - The max number of simultaneous connections that a single backend network + endpoint can handle. This is used to calculate the capacity of the group. + Can be used in either CONNECTION or UTILIZATION balancing modes. + - For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint + must be set. + required: false + version_added: 2.9 max_rate: description: - The max requests per second (RPS) of the group. - Can be used with either RATE or UTILIZATION balancing modes, but required - if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be - set. + if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance + or maxRatePerEndpoint, as appropriate for group type, must be set. required: false max_rate_per_instance: description: @@ -130,6 +139,14 @@ balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. required: false + max_rate_per_endpoint: + description: + - The max requests per second (RPS) that a single backend network endpoint + can handle. This is used to calculate the capacity of the group. Can be + used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint + must be set. + required: false + version_added: 2.9 max_utilization: description: - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization @@ -389,8 +406,8 @@ description: - The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. - - For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must - be set. + - For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance + or maxConnectionsPerEndpoint, as appropriate for group type, must be set. returned: success type: int maxConnectionsPerInstance: @@ -402,12 +419,21 @@ be set. returned: success type: int + maxConnectionsPerEndpoint: + description: + - The max number of simultaneous connections that a single backend network endpoint + can handle. This is used to calculate the capacity of the group. Can be used + in either CONNECTION or UTILIZATION balancing modes. + - For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must + be set. + returned: success + type: int maxRate: description: - The max requests per second (RPS) of the group. - Can be used with either RATE or UTILIZATION balancing modes, but required - if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be - set. + if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or + maxRatePerEndpoint, as appropriate for group type, must be set. returned: success type: int maxRatePerInstance: @@ -418,6 +444,14 @@ set. returned: success type: str + maxRatePerEndpoint: + description: + - The max requests per second (RPS) that a single backend network endpoint can + handle. This is used to calculate the capacity of the group. Can be used in + either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint + must be set. + returned: success + type: str maxUtilization: description: - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization @@ -636,8 +670,10 @@ def main(): group=dict(type='str'), max_connections=dict(type='int'), max_connections_per_instance=dict(type='int'), + max_connections_per_endpoint=dict(type='int'), max_rate=dict(type='int'), max_rate_per_instance=dict(type='str'), + max_rate_per_endpoint=dict(type='str'), max_utilization=dict(default=0.8, type='str'), ), ), @@ -903,8 +939,10 @@ def _request_for_item(self, item): u'group': item.get('group'), u'maxConnections': item.get('max_connections'), u'maxConnectionsPerInstance': item.get('max_connections_per_instance'), + u'maxConnectionsPerEndpoint': item.get('max_connections_per_endpoint'), u'maxRate': item.get('max_rate'), u'maxRatePerInstance': item.get('max_rate_per_instance'), + u'maxRatePerEndpoint': item.get('max_rate_per_endpoint'), u'maxUtilization': item.get('max_utilization'), } ) @@ -918,8 +956,10 @@ def _response_from_item(self, item): u'group': item.get(u'group'), u'maxConnections': item.get(u'maxConnections'), u'maxConnectionsPerInstance': item.get(u'maxConnectionsPerInstance'), + u'maxConnectionsPerEndpoint': item.get(u'maxConnectionsPerEndpoint'), u'maxRate': item.get(u'maxRate'), u'maxRatePerInstance': item.get(u'maxRatePerInstance'), + u'maxRatePerEndpoint': item.get(u'maxRatePerEndpoint'), u'maxUtilization': item.get(u'maxUtilization'), } ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py index a6fb0d6b0c2b1b..4602cdf0590b6d 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py @@ -123,8 +123,8 @@ description: - The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. - - For CONNECTION mode, either maxConnections or maxConnectionsPerInstance - must be set. + - For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance + or maxConnectionsPerEndpoint, as appropriate for group type, must be set. returned: success type: int maxConnectionsPerInstance: @@ -136,12 +136,21 @@ must be set. returned: success type: int + maxConnectionsPerEndpoint: + description: + - The max number of simultaneous connections that a single backend network + endpoint can handle. This is used to calculate the capacity of the group. + Can be used in either CONNECTION or UTILIZATION balancing modes. + - For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint + must be set. + returned: success + type: int maxRate: description: - The max requests per second (RPS) of the group. - Can be used with either RATE or UTILIZATION balancing modes, but required - if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must - be set. + if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance + or maxRatePerEndpoint, as appropriate for group type, must be set. returned: success type: int maxRatePerInstance: @@ -152,6 +161,14 @@ be set. returned: success type: str + maxRatePerEndpoint: + description: + - The max requests per second (RPS) that a single backend network endpoint + can handle. This is used to calculate the capacity of the group. Can be + used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint + must be set. + returned: success + type: str maxUtilization: description: - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization