Creates a dataset integration for the caller's account in the current region and returns its ARN.
To use this operation, you must have permission to access the dataset integration resources through the IAM role specified in the RoleArn parameter.
If a dataset integration already exists for the account, this operation fails with a ConflictException.
Parameters:
-
role_arn
(ResourceArn)
–
The Amazon Resource Name (ARN) of the IAM role that grants Amazon CloudWatch permission to access the resources needed for the dataset integration.
-
tags
(Optional[TagMapInput], default:
None
)
–
The key-value pairs to associate with the dataset integration resource for categorization and management purposes.
Raises:
Source code in docs_src/capo_observabilityadmin/_services/observability_admin.py
| def create_dataset_integration(
self,
role_arn: "capo_observabilityadmin.types.resource_arn.ResourceArn",
*,
config_overrides: Optional[ObservabilityAdminClientConfig] = None,
tags: Optional[
"capo_observabilityadmin.types.tag_map_input.TagMapInput"
] = None,
) -> "capo_observabilityadmin.types.create_dataset_integration_output.CreateDatasetIntegrationOutput":
"""<p>Creates a dataset integration for the caller's account in the current region and returns its ARN.</p> <p>To use this operation, you must have permission to access the dataset integration resources through the IAM role specified in the <code>RoleArn</code> parameter.</p> <p>If a dataset integration already exists for the account, this operation fails with a <code>ConflictException</code>.</p>
Args:
role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon CloudWatch permission to access the resources needed for the dataset integration.</p>
tags: <p>The key-value pairs to associate with the dataset integration resource for categorization and management purposes.</p>
Raises:
capo_observabilityadmin.errors.access_denied_exception.AccessDeniedException: <p> Indicates you don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access management for Amazon Web Services resources</a> in the IAM user guide. </p>
capo_observabilityadmin.errors.conflict_exception.ConflictException: <p> The requested operation conflicts with the current state of the specified resource or with another request. </p>
capo_observabilityadmin.errors.internal_server_exception.InternalServerException: <p> Indicates the request has failed to process because of an unknown server error, exception, or failure. </p>
capo_observabilityadmin.errors.too_many_requests_exception.TooManyRequestsException: <p> The request throughput limit was exceeded. </p>
capo_observabilityadmin.errors.validation_exception.ValidationException: <p> Indicates input validation failed. Check your request parameters and retry the request. </p>
capo_observabilityadmin.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_observabilityadmin.types.create_dataset_integration_input.CreateDatasetIntegrationInput]",
) -> OperationResponse[
"capo_observabilityadmin.types.create_dataset_integration_output.CreateDatasetIntegrationOutput"
]:
import capo_observabilityadmin._operations.observability_admin.create_dataset_integration
output, http_response = (
capo_observabilityadmin._operations.observability_admin.create_dataset_integration.create_dataset_integration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateDatasetIntegration")
)
input_: capo_observabilityadmin.types.create_dataset_integration_input.CreateDatasetIntegrationInput = {
"role_arn": role_arn
}
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
|