Skip to content

register_patch_baseline_for_patch_group

register_patch_baseline_for_patch_group(
    baseline_id: BaselineId,
    patch_group: PatchGroup,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> RegisterPatchBaselineForPatchGroupResult

Registers a patch baseline for a patch group.

Parameters:

  • baseline_id (BaselineId) –

    The ID of the patch baseline to register with the patch group.

  • patch_group (PatchGroup) –

    The name of the patch group to be registered with the patch baseline.

Raises:

  • AlreadyExistsException –

    Error returned if an attempt is made to register a patch group with a patch baseline that is already registered with a different patch baseline.

  • DoesNotExistException –

    Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.

    For information about resource quotas in Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

  • InternalServerError –

    An error occurred on the server side.

  • InvalidResourceId –

    The resource ID isn't valid. Verify that you entered the correct ID and try again.

  • ResourceLimitExceededException –

    Error returned when the caller has exceeded the default resource quotas. For example, too many maintenance windows or patch baselines have been created.

    For information about resource quotas in Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/ssm.py
def register_patch_baseline_for_patch_group(
    self,
    baseline_id: "capo_ssm.types.baseline_id.BaselineId",
    patch_group: "capo_ssm.types.patch_group.PatchGroup",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.register_patch_baseline_for_patch_group_result.RegisterPatchBaselineForPatchGroupResult":
    """<p>Registers a patch baseline for a patch group.</p>

    Args:
        baseline_id: <p>The ID of the patch baseline to register with the patch group.</p>
        patch_group: <p>The name of the patch group to be registered with the patch baseline.</p>

    Raises:
        capo_ssm.errors.already_exists_exception.AlreadyExistsException: <p>Error returned if an attempt is made to register a patch group with a patch baseline that is already registered with a different patch baseline.</p>
        capo_ssm.errors.does_not_exist_exception.DoesNotExistException: <p>Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.</p> <p>For information about resource quotas in Amazon Web Services Systems Manager, see <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm">Systems Manager service quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_resource_id.InvalidResourceId: <p>The resource ID isn't valid. Verify that you entered the correct ID and try again.</p>
        capo_ssm.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>Error returned when the caller has exceeded the default resource quotas. For example, too many maintenance windows or patch baselines have been created.</p> <p>For information about resource quotas in Systems Manager, see <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm">Systems Manager service quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.register_patch_baseline_for_patch_group_request.RegisterPatchBaselineForPatchGroupRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.register_patch_baseline_for_patch_group_result.RegisterPatchBaselineForPatchGroupResult"
    ]:
        import capo_ssm._operations.amazon_ssm.register_patch_baseline_for_patch_group

        output, http_response = (
            capo_ssm._operations.amazon_ssm.register_patch_baseline_for_patch_group.register_patch_baseline_for_patch_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterPatchBaselineForPatchGroup")
    )
    input_: capo_ssm.types.register_patch_baseline_for_patch_group_request.RegisterPatchBaselineForPatchGroupRequest = {
        "baseline_id": baseline_id,
        "patch_group": patch_group,
    }

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