Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use GetGroupConfiguration to check the status of the update.
Minimum permissions
To run this command, you must have the following permissions:
Parameters:
-
group
(Optional[GroupString], default:
None
)
–
The name or Amazon resource name (ARN) of the resource group with the configuration that you want to update.
-
configuration
(Optional[GroupConfigurationList], default:
None
)
–
The new configuration to associate with the specified group. A configuration associates the resource group with an Amazon Web Services service and specifies how the service can interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements.
For information about the syntax of a service configuration, see Service configurations for Resource Groups.
A resource group can contain either a Configuration or a ResourceQuery, but not both.
Raises:
Source code in docs_src/capo_resource_groups/_services/async_resource_groups.py
| async def put_group_configuration(
self,
*,
config_overrides: Optional[AsyncResourceGroupsClientConfig] = None,
group: Optional["capo_resource_groups.types.group_string.GroupString"] = None,
configuration: Optional[
"capo_resource_groups.types.group_configuration_list.GroupConfigurationList"
] = None,
) -> "capo_resource_groups.types.put_group_configuration_output.PutGroupConfigurationOutput":
"""<p>Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use <a>GetGroupConfiguration</a> to check the status of the update.</p> <p> <b>Minimum permissions</b> </p> <p>To run this command, you must have the following permissions:</p> <ul> <li> <p> <code>resource-groups:PutGroupConfiguration</code> </p> </li> </ul>
Args:
group: <p>The name or Amazon resource name (ARN) of the resource group with the configuration that you want to update.</p>
configuration: <p>The new configuration to associate with the specified group. A configuration associates the resource group with an Amazon Web Services service and specifies how the service can interact with the resources in the group. A configuration is an array of <a>GroupConfigurationItem</a> elements.</p> <p>For information about the syntax of a service configuration, see <a href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service configurations for Resource Groups</a>.</p> <note> <p>A resource group can contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but not both.</p> </note>
Raises:
capo_resource_groups.errors.bad_request_exception.BadRequestException: <p>The request includes one or more parameters that violate validation rules.</p>
capo_resource_groups.errors.forbidden_exception.ForbiddenException: <p>The caller isn't authorized to make the request. Check permissions.</p>
capo_resource_groups.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal error occurred while processing the request. Try again later.</p>
capo_resource_groups.errors.method_not_allowed_exception.MethodNotAllowedException: <p>The request uses an HTTP method that isn't allowed for the specified resource.</p>
capo_resource_groups.errors.not_found_exception.NotFoundException: <p>One or more of the specified resources don't exist.</p>
capo_resource_groups.errors.too_many_requests_exception.TooManyRequestsException: <p>You've exceeded throttling limits by making too many requests in a period of time.</p>
capo_resource_groups.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_resource_groups.types.put_group_configuration_input.PutGroupConfigurationInput]",
) -> AsyncOperationResponse[
"capo_resource_groups.types.put_group_configuration_output.PutGroupConfigurationOutput"
]:
import capo_resource_groups._operations.ardi.put_group_configuration
(
output,
http_response,
) = await capo_resource_groups._operations.ardi.put_group_configuration.async_put_group_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutGroupConfiguration")
)
input_: capo_resource_groups.types.put_group_configuration_input.PutGroupConfigurationInput = {}
if group is not None:
input_["group"] = group
if configuration is not None:
input_["configuration"] = configuration
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|