## com.baidubce.services.lss
Class LssClient

    java.lang.Object
      com.baidubce.AbstractBceClient
          com.baidubce.services.lss.LssClient

    public class LssClient

extends AbstractBceClient

Client for accessing Live Streaming Service. All service calls made using this client are blocking, and will not return until the service call completes.

Field Summary

Fields inherited from class com.baidubce.AbstractBceClient
`config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX`

Constructor Summary
`LssClient()` Constructs a new Lss client.
`LssClient(BceClientConfiguration clientConfiguration)` Constructs a new client using the client configuration.

Method Summary
`CreatePresetResponse` `createForwardOnlyPreset(String name, String description, Hls hls, Rtmp rtmp, LiveThumbnail thumbnail, Watermarks watermarks)` Create a live preset which contains parameters needed in the live stream service, and in forward only mode, in which the input stream's resolution ratio and code rate will be kept unchanged.
`CreateNotificationResponse` `createNotification(CreateNotificationRequest request)` Create a live notification in the live stream service.
`CreateNotificationResponse` `createNotification(String name, String endpoint)` Create a live notification in the live stream service.
`CreatePresetResponse` `createPreset(CreatePresetRequest request)` Create a live preset which contains parameters needed in the live stream service.
`CreatePresetResponse` `createPreset(String name, String description, Audio audio, Video video, Hls hls, Rtmp rtmp, LiveThumbnail thumbnail, Watermarks watermarks)` Create a live preset which contains parameters needed in the live stream service, and not in forward only mode, so that the input stream will be transcoded according to audio and video parameters.
`CreateSessionResponse` `createSession(CreateSessionRequest request)` Create a live session in the live stream service.
`CreateSessionResponse` `createSession(String description, String preset, String notification, String securityPolicy, LivePublishInfo publish)` Create a live session in the live stream service.
`DeleteNotificationResponse` `deleteNotification(DeleteNotificationRequest request)` Delete your live notification by live notification name.
`DeleteNotificationResponse` `deleteNotification(String name)` Delete your live notification by live notification name.
`DeletePresetResponse` `deletePreset(DeletePresetRequest request)` Delete your live presets by live preset name.
`DeletePresetResponse` `deletePreset(String name)` Delete your live presets by live preset name.
`DeleteSessionResponse` `deleteSession(DeleteSessionRequest request)` Delete your live session by live session id.
`DeleteSessionResponse` `deleteSession(String sessionId)` Delete your live session by live session id.
`GetNotificationResponse` `getNotification(GetNotificationRequest request)` Get your live notification by live notification name.
`GetNotificationResponse` `getNotification(String name)` Get your live notification by live notification name.
`GetPresetResponse` `getPreset(GetPresetRequest request)` Get your live preset by live preset name.
`GetPresetResponse` `getPreset(String name)` Get your live preset by live preset name.
`GetSecurityPolicyResponse` `getSecurityPolicy(GetSecurityPolicyRequest request)` Get your live security policy by live security policy name.
`GetSecurityPolicyResponse` `getSecurityPolicy(String name)` Get your live security policy by live security policy name.
`GetSessionResponse` `getSession(GetSessionRequest request)` Get your live session by live session id.
`GetSessionResponse` `getSession(String sessionId)` Get your live session by live session id.
`ListNotificationsResponse` `listNotifications()` List all your live notifications.
`ListPresetsResponse` `listPresets()` List all your live presets.
`ListSecurityPoliciesResponse` `listSecurityPolicies()` List all your live security policys.
`ListSessionsResponse` `listSessions()` List all your live sessions.
`ListSessionsResponse` `listSessions(ListSessionsRequest request)` List all your live sessions.
`ListSessionsResponse` `listSessions(String status)` List all your live sessions with given status.
`PauseSessionResponse` `pauseSession(PauseSessionRequest request)` Pause your live session by live session id.
`PauseSessionResponse` `pauseSession(String sessionId)` Pause your live session by live session id.
`RefreshSessionResponse` `refreshSession(RefreshSessionRequest request)` Refresh your live session by live session id.
`RefreshSessionResponse` `refreshSession(String sessionId)` Refresh your live session by live session id.
`ResumeSessionResponse` `resumeSession(ResumeSessionRequest request)` Resume your live session by live session id.
`ResumeSessionResponse` `resumeSession(String sessionId)` Resume your live session by live session id.
`StartPullSessionResponse` `startPullSession(StartPullSessionRequest request)` Start your pulling live session by live session id.
`StartPullSessionResponse` `startPullSession(String sessionId)` Start your pulling live session by live session id.
`UpdateSecurityPolicyResponse` `updateSecurityPolicy(String name, Auth auth, AntiLeech antiLeech, Encryption encryption)` Update your live security policy by live security policy name.
`UpdateSecurityPolicyResponse` `updateSecurityPolicy(UpdateSecurityPolicyRequest request)` Update your live security policy by live security policy name.

Methods inherited from class com.baidubce.AbstractBceClient
`getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LssClient

    public LssClient()

  Constructs a new Lss client.

### LssClient

    public LssClient(BceClientConfiguration clientConfiguration)

  Constructs a new client using the client configuration.

  Parameters:
    `clientConfiguration` - The client configuration options controlling how this client connects to Lss services (e.g. proxy settings, retry counts, etc).

Method Detail

### createPreset

    public CreatePresetResponse createPreset(CreatePresetRequest request)

  Create a live preset which contains parameters needed in the live stream service.

  Parameters:
    `request` - The request object containing all options for creating presets.

### createPreset

    public CreatePresetResponse createPreset(String name,
                                             String description,
                                             Audio audio,
                                             Video video,
                                             Hls hls,
                                             Rtmp rtmp,
                                             LiveThumbnail thumbnail,
                                             Watermarks watermarks)

  Create a live preset which contains parameters needed in the live stream service, and not in forward only mode, so that the input stream will be transcoded according to audio and video parameters.

  Parameters:
    `name` - The name of the new live preset.
    `description` - The description of the new live preset
    `audio` - Specify the audio parameters of live stream.
    `video` - Specify the video parameters of live stream.
    `hls` - Specify the hls parameters of live stream.
    `rtmp` - Specify the rtmp parameters of live stream.
    `thumbnail` - Specify the thumbnail parameters of live stream.
    `watermarks` - Specify the watermarks parameters of live stream.

### createForwardOnlyPreset

    public CreatePresetResponse createForwardOnlyPreset(String name,
                                                        String description,
                                                        Hls hls,
                                                        Rtmp rtmp,
                                                        LiveThumbnail thumbnail,
                                                        Watermarks watermarks)

  Create a live preset which contains parameters needed in the live stream service, and in forward only mode, in which the input stream's resolution ratio and code rate will be kept unchanged.

  Parameters:
    `name` - The name of the new live preset.
    `description` - The description of the new live preset
    `hls` - Specify the hls parameters of live stream.
    `rtmp` - Specify the rtmp parameters of live stream.
    `thumbnail` - Specify the thumbnail parameters of live stream.
    `watermarks` - Specify the watermarks parameters of live stream.

### listPresets

    public ListPresetsResponse listPresets()

  List all your live presets.

  Returns:
    The list of all your live presets

### getPreset

    public GetPresetResponse getPreset(String name)

  Get your live preset by live preset name.

  Parameters:
    `name` - Live preset name.
  Returns:
    Your live preset

### getPreset

    public GetPresetResponse getPreset(GetPresetRequest request)

  Get your live preset by live preset name.

  Parameters:
    `request` - The request object containing all parameters for getting live preset.
  Returns:
    Your live preset

### deletePreset

    public DeletePresetResponse deletePreset(String name)

  Delete your live presets by live preset name.

  Parameters:
    `name` - Live preset name.

### deletePreset

    public DeletePresetResponse deletePreset(DeletePresetRequest request)

  Delete your live presets by live preset name.

  Parameters:
    `request` - The request object containing all parameters for deleting live preset.

### createSession

    public CreateSessionResponse createSession(String description,
                                               String preset,
                                               String notification,
                                               String securityPolicy,
                                               LivePublishInfo publish)

  Create a live session in the live stream service.

  Parameters:
    `description` - The description of the new live session.
    `preset` - The name of the new live session.
    `notification` - The notification of the new live session.
    `securityPolicy` - The security policy of the new live session.
    `publish` - Specify the LivePublishInfo of live session.

### createSession

    public CreateSessionResponse createSession(CreateSessionRequest request)

  Create a live session in the live stream service.

  Parameters:
    `request` - The request object containing all options for creating live session.

### listSessions

    public ListSessionsResponse listSessions()

  List all your live sessions.

  Returns:
    The list of all your live sessions.

### listSessions

    public ListSessionsResponse listSessions(String status)

  List all your live sessions with given status.

  Parameters:
    `status` - Live session status.
  Returns:
    The list of all your live sessions.

### listSessions

    public ListSessionsResponse listSessions(ListSessionsRequest request)

  List all your live sessions.

  Parameters:
    `request` - The request object containing all parameters for listing live sessions.
  Returns:
    The list of all your live sessions.

### getSession

    public GetSessionResponse getSession(String sessionId)

  Get your live session by live session id.

  Parameters:
    `sessionId` - Live session id.
  Returns:
    Your live session.

### getSession

    public GetSessionResponse getSession(GetSessionRequest request)

  Get your live session by live session id.

  Parameters:
    `request` - The request object containing all parameters for getting live session.
  Returns:
    Your live session.

### deleteSession

    public DeleteSessionResponse deleteSession(String sessionId)

  Delete your live session by live session id.

  Parameters:
    `sessionId` - Live session id.

### deleteSession

    public DeleteSessionResponse deleteSession(DeleteSessionRequest request)

  Delete your live session by live session id.

  Parameters:
    `request` - The request object containing all parameters for deleting live session.

### pauseSession

    public PauseSessionResponse pauseSession(String sessionId)

  Pause your live session by live session id.

  Parameters:
    `sessionId` - Live session id.

### pauseSession

    public PauseSessionResponse pauseSession(PauseSessionRequest request)

  Pause your live session by live session id.

  Parameters:
    `request` - The request object containing all parameters for pausing live session.

### resumeSession

    public ResumeSessionResponse resumeSession(String sessionId)

  Resume your live session by live session id.

  Parameters:
    `sessionId` - Live session id.

### resumeSession

    public ResumeSessionResponse resumeSession(ResumeSessionRequest request)

  Resume your live session by live session id.

  Parameters:
    `request` - The request object containing all parameters for resuming live session.

### refreshSession

    public RefreshSessionResponse refreshSession(String sessionId)

  Refresh your live session by live session id.

  Parameters:
    `sessionId` - Live session id.

### refreshSession

    public RefreshSessionResponse refreshSession(RefreshSessionRequest request)

  Refresh your live session by live session id.

  Parameters:
    `request` - The request object containing all parameters for refreshing live session.

### startPullSession

    public StartPullSessionResponse startPullSession(String sessionId)

  Start your pulling live session by live session id.

  Parameters:
    `sessionId` - Live session id.

### startPullSession

    public StartPullSessionResponse startPullSession(StartPullSessionRequest request)

  Start your pulling live session by live session id.

  Parameters:
    `request` - The request object containing all parameters for starting pulling live session.

### listNotifications

    public ListNotificationsResponse listNotifications()

  List all your live notifications.

  Returns:
    The list of all your live notifications

### deleteNotification

    public DeleteNotificationResponse deleteNotification(String name)

  Delete your live notification by live notification name.

  Parameters:
    `name` - Live notification name.

### deleteNotification

    public DeleteNotificationResponse deleteNotification(DeleteNotificationRequest request)

  Delete your live notification by live notification name.

  Parameters:
    `request` - The request object containing all parameters for deleting live notification.

### getNotification

    public GetNotificationResponse getNotification(String name)

  Get your live notification by live notification name.

  Parameters:
    `name` - Live notification name.
  Returns:
    Your live notification.

### getNotification

    public GetNotificationResponse getNotification(GetNotificationRequest request)

  Get your live notification by live notification name.

  Parameters:
    `request` - The request object containing all parameters for getting live notification.
  Returns:
    Your live notification.

### createNotification

    public CreateNotificationResponse createNotification(String name,
                                                         String endpoint)

  Create a live notification in the live stream service.

  Parameters:
    `name` - The name of notification.
    `endpoint` - The address to receive notification message.

### createNotification

    public CreateNotificationResponse createNotification(CreateNotificationRequest request)

  Create a live notification in the live stream service.

  Parameters:
    `request` - The request object containing all options for creating live notification.

### listSecurityPolicies

    public ListSecurityPoliciesResponse listSecurityPolicies()

  List all your live security policys.

  Returns:
    The list of all your live security policys

### getSecurityPolicy

    public GetSecurityPolicyResponse getSecurityPolicy(String name)

  Get your live security policy by live security policy name.

  Parameters:
    `name` - Live security policy name.
  Returns:
    Your live security policy.

### getSecurityPolicy

    public GetSecurityPolicyResponse getSecurityPolicy(GetSecurityPolicyRequest request)

  Get your live security policy by live security policy name.

  Parameters:
    `request` - The request object containing all parameters for getting live security policy.
  Returns:
    Your live security policy.

### updateSecurityPolicy

    public UpdateSecurityPolicyResponse updateSecurityPolicy(String name,
                                                             Auth auth,
                                                             AntiLeech antiLeech,
                                                             Encryption encryption)

  Update your live security policy by live security policy name.

  Parameters:
    `name` - Live security policy name.
    `auth` - Configuration for authentication.
    `antiLeech` - Configuration for anti-leech.
    `encryption` - Configuration for encryption.

### updateSecurityPolicy

    public UpdateSecurityPolicyResponse updateSecurityPolicy(UpdateSecurityPolicyRequest request)

  Update your live security policy by live security policy name.

  Parameters:
    `request` - The request object containing all parameters for updating live security policy.

Copyright © 2016. All rights reserved.