Authorizes an Environment's access to a Collector's data. Continuum calls this operation with the Environment's Collector data-access role before it reads the Collector's inventory, so grant continuum:GetCollectorDataAccessAuthorization to that role and, for a Collector in another account, in the Collector's resource policy. The operation evaluates the action against the exact Collector ARN and the Collector's current resource policy using IAM and the caller's authenticated request context, with environmentArn as the continuum:EnvironmentArn condition key. A successful request returns HTTP 200 with no response members. If access is not granted, the operation returns AccessDeniedException without disclosing Collector existence, ownership, or the policy layer that denied access. The service does not reinterpret the policy using only an account ID.
Parameters:
-
account_id
(AwsAccountId)
–
The AWS account that owns the Collector.
-
collector_id
(CollectorId)
–
The unique identifier of the Collector.
-
environment_arn
(Optional[EnvironmentArn], default:
None
)
–
The full ARN of the Environment requesting the Collector's data. The Environment must be in the caller's account. Continuum supplies this value as the continuum:EnvironmentArn condition key.
Raises:
-
AccessDeniedException
–
The request is not authorized. Verify that your credentials and request signature are valid and that you have permission to perform this action.
-
InternalServerException
–
The request couldn't be processed because of an internal server issue. Try again later. If the problem persists, contact AWS Support.
-
ThrottlingException
–
The request was denied due to request throttling.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_continuum/_services/async_continuum.py
| async def get_collector_data_access_authorization(
self,
account_id: "capo_continuum.types.aws_account_id.AwsAccountId",
collector_id: "capo_continuum.types.collector_id.CollectorId",
*,
config_overrides: Optional[AsyncContinuumClientConfig] = None,
environment_arn: Optional[
"capo_continuum.types.environment_arn.EnvironmentArn"
] = None,
) -> "capo_continuum.types.get_collector_data_access_authorization_output.GetCollectorDataAccessAuthorizationOutput":
"""Authorizes an Environment's access to a Collector's data. Continuum calls this operation with the Environment's Collector data-access role before it reads the Collector's inventory, so grant continuum:GetCollectorDataAccessAuthorization to that role and, for a Collector in another account, in the Collector's resource policy. The operation evaluates the action against the exact Collector ARN and the Collector's current resource policy using IAM and the caller's authenticated request context, with environmentArn as the continuum:EnvironmentArn condition key. A successful request returns HTTP 200 with no response members. If access is not granted, the operation returns AccessDeniedException without disclosing Collector existence, ownership, or the policy layer that denied access. The service does not reinterpret the policy using only an account ID.
Args:
account_id: The AWS account that owns the Collector.
collector_id: The unique identifier of the Collector.
environment_arn: The full ARN of the Environment requesting the Collector's data. The Environment must be in the caller's account. Continuum supplies this value as the continuum:EnvironmentArn condition key.
Raises:
capo_continuum.errors.access_denied_exception.AccessDeniedException: The request is not authorized. Verify that your credentials and request signature are valid and that you have permission to perform this action.
capo_continuum.errors.internal_server_exception.InternalServerException: The request couldn't be processed because of an internal server issue. Try again later. If the problem persists, contact AWS Support.
capo_continuum.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
capo_continuum.errors.validation_exception.ValidationException
capo_continuum.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_continuum.types.get_collector_data_access_authorization_input.GetCollectorDataAccessAuthorizationInput]",
) -> AsyncOperationResponse[
"capo_continuum.types.get_collector_data_access_authorization_output.GetCollectorDataAccessAuthorizationOutput"
]:
import capo_continuum._operations.continuum_control_plane.get_collector_data_access_authorization
(
output,
http_response,
) = await capo_continuum._operations.continuum_control_plane.get_collector_data_access_authorization.async_get_collector_data_access_authorization(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetCollectorDataAccessAuthorization")
)
input_: capo_continuum.types.get_collector_data_access_authorization_input.GetCollectorDataAccessAuthorizationInput = {
"account_id": account_id,
"collector_id": collector_id,
}
if environment_arn is not None:
input_["environment_arn"] = environment_arn
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|