Authorizes the aggregator account and region to collect data from the source account and region.
Tags are added at creation and cannot be updated with this operation
PutAggregationAuthorization is an idempotent API. Subsequent requests won’t create a duplicate resource if one was already created. If a following request has different tags values, Config will ignore these differences and treat it as an idempotent request of the previous. In this case, tags will not be updated, even if they are different.
Use TagResource and UntagResource to update tags after creation.
Parameters:
-
authorized_account_id
(AccountId)
–
The 12-digit account ID of the account authorized to aggregate data.
-
authorized_aws_region
(AwsRegion)
–
The region authorized to collect aggregated data.
-
tags
(Optional[TagsList], default:
None
)
–
Raises:
Source code in docs_src/capo_config_service/_services/config_service.py
| def put_aggregation_authorization(
self,
authorized_account_id: "capo_config_service.types.account_id.AccountId",
authorized_aws_region: "capo_config_service.types.aws_region.AwsRegion",
*,
config_overrides: Optional[ConfigServiceClientConfig] = None,
tags: Optional["capo_config_service.types.tags_list.TagsList"] = None,
) -> "capo_config_service.types.put_aggregation_authorization_response.PutAggregationAuthorizationResponse":
"""<p>Authorizes the aggregator account and region to collect data from the source account and region. </p> <note> <p> <b>Tags are added at creation and cannot be updated with this operation</b> </p> <p> <code>PutAggregationAuthorization</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if one was already created. If a following request has different <code>tags</code> values, Config will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>tags</code> will not be updated, even if they are different.</p> <p>Use <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_TagResource.html">TagResource</a> and <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_UntagResource.html">UntagResource</a> to update tags after creation.</p> </note>
Args:
authorized_account_id: <p>The 12-digit account ID of the account authorized to aggregate data.</p>
authorized_aws_region: <p>The region authorized to collect aggregated data.</p>
tags: <p>An array of tag object.</p>
Raises:
capo_config_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.</p>
capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_config_service.types.put_aggregation_authorization_request.PutAggregationAuthorizationRequest]",
) -> OperationResponse[
"capo_config_service.types.put_aggregation_authorization_response.PutAggregationAuthorizationResponse"
]:
import capo_config_service._operations.starling_dove_service.put_aggregation_authorization
output, http_response = (
capo_config_service._operations.starling_dove_service.put_aggregation_authorization.put_aggregation_authorization(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutAggregationAuthorization")
)
input_: capo_config_service.types.put_aggregation_authorization_request.PutAggregationAuthorizationRequest = {
"authorized_account_id": authorized_account_id,
"authorized_aws_region": authorized_aws_region,
}
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|