Skip to content

delete_channel_group

delete_channel_group(
    channel_group_name: ResourceName,
    *,
    config_overrides: Optional[MediaPackageV2ClientConfig] = None,
) -> DeleteChannelGroupResponse

Delete a channel group. You must delete the channel group's channels and origin endpoints before you can delete the channel group. If you delete a channel group, you'll lose access to the egress domain and will have to create a new channel group to replace it.

Parameters:

  • channel_group_name (ResourceName) –

    The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

Raises:

  • AccessDeniedException –

    Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. 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 Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.

  • ConflictException –

    Updating or deleting this resource can cause an inconsistent state.

  • InternalServerException –

    Indicates that an error from the service occurred while trying to process a request.

  • ThrottlingException –

    The request throughput limit was exceeded.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

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

Examples:

Deleting a Channel Group

>>> client.delete_channel_group(channel_group_name='exampleChannelGroup')
Source code in docs_src/capo_mediapackagev2/_services/media_package_v2.py
def delete_channel_group(
    self,
    channel_group_name: "capo_mediapackagev2.types.resource_name.ResourceName",
    *,
    config_overrides: Optional[MediaPackageV2ClientConfig] = None,
) -> "capo_mediapackagev2.types.delete_channel_group_response.DeleteChannelGroupResponse":
    """<p>Delete a channel group. You must delete the channel group's channels and origin endpoints before you can delete the channel group. If you delete a channel group, you'll lose access to the egress domain and will have to create a new channel group to replace it.</p>

    Args:
        channel_group_name: <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>

    Raises:
        capo_mediapackagev2.errors.access_denied_exception.AccessDeniedException: <p>Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. 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 Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.</p>
        capo_mediapackagev2.errors.conflict_exception.ConflictException: <p>Updating or deleting this resource can cause an inconsistent state.</p>
        capo_mediapackagev2.errors.internal_server_exception.InternalServerException: <p>Indicates that an error from the service occurred while trying to process a request.</p>
        capo_mediapackagev2.errors.throttling_exception.ThrottlingException: <p>The request throughput limit was exceeded.</p>
        capo_mediapackagev2.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service.</p>
        capo_mediapackagev2.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Deleting a Channel Group

        >>> client.delete_channel_group(channel_group_name='exampleChannelGroup')
    """

    def _handler(
        req: "OperationRequest[capo_mediapackagev2.types.delete_channel_group_request.DeleteChannelGroupRequest]",
    ) -> OperationResponse[
        "capo_mediapackagev2.types.delete_channel_group_response.DeleteChannelGroupResponse"
    ]:
        import capo_mediapackagev2._operations.mediapackagev2.delete_channel_group

        output, http_response = (
            capo_mediapackagev2._operations.mediapackagev2.delete_channel_group.delete_channel_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteChannelGroup")
    )
    input_: capo_mediapackagev2.types.delete_channel_group_request.DeleteChannelGroupRequest = {
        "channel_group_name": channel_group_name
    }

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