Skip to content

put_connector_telemetry_manifest

put_connector_telemetry_manifest(
    connector_identifier: ConnectorIdentifier,
    manifest: TelemetryManifest,
    *,
    config_overrides: Optional[ObservabilityAdminClientConfig] = None,
    expected_version: Optional[int] = None,
    client_token: Optional[ClientToken] = None,
) -> PutConnectorTelemetryManifestOutput

Creates or replaces the telemetry manifest of a connector. The telemetry manifest declares which resources in your cloud provider to collect telemetry from and which telemetry types to collect. To avoid overwriting changes made by another caller, specify ExpectedVersion.

Parameters:

  • connector_identifier (ConnectorIdentifier) –

    The connector. Specify one of the following:

    • The Amazon Resource Name (ARN) of the connector

    • The ID of the connector

  • manifest (TelemetryManifest) –

    The telemetry manifest.

  • expected_version (Optional[int], default: None ) –

    The version of the telemetry manifest that you expect to replace, as returned by GetConnectorTelemetryManifest. Omit this value when you create the first telemetry manifest. If the value doesn't match the current version, the request fails with a ConflictException.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the operation completes no more than one time. If you use an Amazon Web Services SDK, the SDK generates this value and reuses it on retries. If this token matches a previous request with the same telemetry manifest, the service returns the stored version without an error. If you use the same token with a different telemetry manifest, the service returns a ValidationException. This operation is idempotent when you use the same token and parameters.

Raises:

Source code in docs_src/capo_observabilityadmin/_services/observability_admin.py
def put_connector_telemetry_manifest(
    self,
    connector_identifier: "capo_observabilityadmin.types.connector_identifier.ConnectorIdentifier",
    manifest: "capo_observabilityadmin.types.telemetry_manifest.TelemetryManifest",
    *,
    config_overrides: Optional[ObservabilityAdminClientConfig] = None,
    expected_version: Optional[int] = None,
    client_token: Optional[
        "capo_observabilityadmin.types.client_token.ClientToken"
    ] = None,
) -> "capo_observabilityadmin.types.put_connector_telemetry_manifest_output.PutConnectorTelemetryManifestOutput":
    """<p>Creates or replaces the telemetry manifest of a connector. The telemetry manifest declares which resources in your cloud provider to collect telemetry from and which telemetry types to collect. To avoid overwriting changes made by another caller, specify <code>ExpectedVersion</code>.</p>

    Args:
        connector_identifier: <p>The connector. Specify one of the following:</p> <ul> <li> <p>The Amazon Resource Name (ARN) of the connector</p> </li> <li> <p>The ID of the connector</p> </li> </ul>
        manifest: <p>The telemetry manifest.</p>
        expected_version: <p>The version of the telemetry manifest that you expect to replace, as returned by <code>GetConnectorTelemetryManifest</code>. Omit this value when you create the first telemetry manifest. If the value doesn't match the current version, the request fails with a <code>ConflictException</code>.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the operation completes no more than one time. If you use an Amazon Web Services SDK, the SDK generates this value and reuses it on retries. If this token matches a previous request with the same telemetry manifest, the service returns the stored version without an error. If you use the same token with a different telemetry manifest, the service returns a <code>ValidationException</code>. This operation is idempotent when you use the same token and parameters.</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.resource_not_found_exception.ResourceNotFoundException: <p> The specified resource (such as a telemetry rule) could not be found. </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.put_connector_telemetry_manifest_input.PutConnectorTelemetryManifestInput]",
    ) -> OperationResponse[
        "capo_observabilityadmin.types.put_connector_telemetry_manifest_output.PutConnectorTelemetryManifestOutput"
    ]:
        import capo_observabilityadmin._operations.observability_admin.put_connector_telemetry_manifest

        output, http_response = (
            capo_observabilityadmin._operations.observability_admin.put_connector_telemetry_manifest.put_connector_telemetry_manifest(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_observabilityadmin.types.put_connector_telemetry_manifest_input.PutConnectorTelemetryManifestInput",
    ) -> dict[str, Any]:
        import capo_observabilityadmin.types.put_connector_telemetry_manifest_input

        return capo_observabilityadmin.types.put_connector_telemetry_manifest_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "PutConnectorTelemetryManifest", redact_input=_redact_input
        ),
    )
    input_: capo_observabilityadmin.types.put_connector_telemetry_manifest_input.PutConnectorTelemetryManifestInput = {
        "connector_identifier": connector_identifier,
        "manifest": manifest,
    }
    if expected_version is not None:
        input_["expected_version"] = expected_version
    if client_token is not None:
        input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output