Create an App Runner observability configuration resource. App Runner requires this resource when you create or update App Runner services and you want to enable non-default observability features. You can share an observability configuration across multiple services.
Create multiple revisions of a configuration by calling this action multiple times using the same ObservabilityConfigurationName. The call returns incremental ObservabilityConfigurationRevision values. When you create a service and configure an observability configuration resource, the service uses the latest active revision of the observability configuration by default. You can optionally configure the service to use a specific revision.
The observability configuration resource is designed to configure multiple features (currently one feature, tracing). This action takes optional parameters that describe the configuration of these features (currently one parameter, TraceConfiguration). If you don't specify a feature parameter, App Runner doesn't enable the feature.
Parameters:
-
observability_configuration_name
(ObservabilityConfigurationName)
–
A name for the observability configuration. When you use it for the first time in an Amazon Web Services Region, App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration.
The name DefaultConfiguration is reserved. You can't use it to create a new observability configuration, and you can't create a revision of it.
When you want to use your own observability configuration for your App Runner service, create a configuration with a different name, and then provide it when you create or update your service.
-
trace_configuration
(Optional[TraceConfiguration], default:
None
)
–
The configuration of the tracing feature within this observability configuration. If you don't specify it, App Runner doesn't enable tracing.
-
tags
(Optional[TagList], default:
None
)
–
A list of metadata items that you can associate with your observability configuration resource. A tag is a key-value pair.
Raises:
Source code in docs_src/capo_apprunner/_services/async_app_runner.py
| async def create_observability_configuration(
self,
observability_configuration_name: "capo_apprunner.types.observability_configuration_name.ObservabilityConfigurationName",
*,
config_overrides: Optional[AsyncAppRunnerClientConfig] = None,
trace_configuration: Optional[
"capo_apprunner.types.trace_configuration.TraceConfiguration"
] = None,
tags: Optional["capo_apprunner.types.tag_list.TagList"] = None,
) -> "capo_apprunner.types.create_observability_configuration_response.CreateObservabilityConfigurationResponse":
"""<p>Create an App Runner observability configuration resource. App Runner requires this resource when you create or update App Runner services and you want to enable non-default observability features. You can share an observability configuration across multiple services.</p> <p>Create multiple revisions of a configuration by calling this action multiple times using the same <code>ObservabilityConfigurationName</code>. The call returns incremental <code>ObservabilityConfigurationRevision</code> values. When you create a service and configure an observability configuration resource, the service uses the latest active revision of the observability configuration by default. You can optionally configure the service to use a specific revision.</p> <p>The observability configuration resource is designed to configure multiple features (currently one feature, tracing). This action takes optional parameters that describe the configuration of these features (currently one parameter, <code>TraceConfiguration</code>). If you don't specify a feature parameter, App Runner doesn't enable the feature.</p>
Args:
observability_configuration_name: <p>A name for the observability configuration. When you use it for the first time in an Amazon Web Services Region, App Runner creates revision number <code>1</code> of this name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration.</p> <note> <p>The name <code>DefaultConfiguration</code> is reserved. You can't use it to create a new observability configuration, and you can't create a revision of it.</p> <p>When you want to use your own observability configuration for your App Runner service, <i>create a configuration with a different name</i>, and then provide it when you create or update your service.</p> </note>
trace_configuration: <p>The configuration of the tracing feature within this observability configuration. If you don't specify it, App Runner doesn't enable tracing.</p>
tags: <p>A list of metadata items that you can associate with your observability configuration resource. A tag is a key-value pair.</p>
Raises:
capo_apprunner.errors.internal_service_error_exception.InternalServiceErrorException: <p>An unexpected service exception occurred.</p>
capo_apprunner.errors.invalid_request_exception.InvalidRequestException: <p>One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.</p>
capo_apprunner.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>App Runner can't create this resource. You've reached your account quota for this resource type.</p> <p>For App Runner per-resource quotas, see <a href="https://docs.aws.amazon.com/general/latest/gr/apprunner.html">App Runner endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
capo_apprunner.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_apprunner.types.create_observability_configuration_request.CreateObservabilityConfigurationRequest]",
) -> AsyncOperationResponse[
"capo_apprunner.types.create_observability_configuration_response.CreateObservabilityConfigurationResponse"
]:
import capo_apprunner._operations.app_runner.create_observability_configuration
(
output,
http_response,
) = await capo_apprunner._operations.app_runner.create_observability_configuration.async_create_observability_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateObservabilityConfiguration")
)
input_: capo_apprunner.types.create_observability_configuration_request.CreateObservabilityConfigurationRequest = {
"observability_configuration_name": observability_configuration_name
}
if trace_configuration is not None:
input_["trace_configuration"] = trace_configuration
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|