全部产品
Search
文档中心

ApsaraVideo Live:FAQ tentang menonaktifkan stream ingest

更新时间:Nov 22, 2025

Kapan harus menonaktifkan stream ingest

Anda dapat menonaktifkan stream ingest di ApsaraVideo Live untuk memenuhi persyaratan keamanan. Fitur ini berguna dalam skenario seperti ketika URL ingest terautentikasi terekspos, aliran berbahaya didorong ke URL tersebut, atau bisnis Anda mengharuskan Anda memblokir URL ingest.

Cara menonaktifkan stream ingest

  • Nonaktifkan stream ingest di konsol ApsaraVideo Live

    • Temukan dan nonaktifkan URL ingest aktif

      Setelah aliran berhasil diingest, buka halaman Streams di konsol ApsaraVideo Live. Pilih nama domain, klik Search, lalu klik Disable untuk aliran yang sedang berlangsung.

      002

    • Temukan dan nonaktifkan URL ingest historis

      Setelah ingest aliran berakhir, buka halaman Streams di konsol ApsaraVideo Live. Klik tab Historical Streams, pilih nama domain, lalu klik Search. Temukan aliran tersebut dan klik Disable.

  • Nonaktifkan stream ingest menggunakan SDK

    API ApsaraVideo Live didasarkan pada Alibaba Cloud OpenAPI. SDK bertindak sebagai pembungkus untuk melakukan panggilan OpenAPI. Untuk mengunduh SDK sisi server, lihat Server-side SDK. Untuk informasi selengkapnya tentang cara menggunakan SDK, lihat petunjuk SDK.

    Sebagai contoh, untuk menggunakan SDK Java, Anda dapat menggunakan Maven untuk mengelola dependensi proyek dan menambahkan dependensi berikut ke file pom.xml:

    <dependency>
      <groupId>com.aliyun</groupId>
      <artifactId>alibabacloud-live20161101</artifactId>
      <version>2.0.0</version>
    </dependency>
    Catatan

    Nomor versi SDK hanya sebagai referensi. Untuk mendapatkan versi terbaru, lihat Server-side SDK.

    Alur utama kode contoh adalah sebagai berikut:

    1. Inisialisasi objek Client.

      SDK menggunakan objek AsyncClient untuk memanggil operasi OpenAPI.

    2. Inisialisasi kelas Request.

      SDK menyediakan kelas Request dan Response untuk setiap operasi API. Untuk informasi selengkapnya tentang parameter permintaan untuk operasi Forbid Stream Ingest, lihat API Forbid Stream Ingest.

    3. Kirim permintaan dan ambil hasilnya.

    Kode contoh:

    // This file is auto-generated, don't edit it. Thanks.
    package demo;
    
    import com.aliyun.auth.credentials.Credential;
    import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
    import com.aliyun.core.http.HttpClient;
    import com.aliyun.core.http.HttpMethod;
    import com.aliyun.core.http.ProxyOptions;
    import com.aliyun.httpcomponent.httpclient.ApacheAsyncHttpClientBuilder;
    import com.aliyun.sdk.service.live20161101.models.*;
    import com.aliyun.sdk.service.live20161101.*;
    import com.google.gson.Gson;
    import darabonba.core.RequestConfiguration;
    import darabonba.core.client.ClientOverrideConfiguration;
    import darabonba.core.utils.CommonUtil;
    import darabonba.core.TeaPair;
    
    //import javax.net.ssl.KeyManager;
    //import javax.net.ssl.X509TrustManager;
    import java.net.InetSocketAddress;
    import java.time.Duration;
    import java.util.*;
    import java.util.concurrent.CompletableFuture;
    import java.io.*;
    
    public class ForbidLiveStream {
        public static void main(String[] args) throws Exception {
    
            // HttpClient Configuration
            /*HttpClient httpClient = new ApacheAsyncHttpClientBuilder()
                    .connectionTimeout(Duration.ofSeconds(10)) // Set the connection timeout time, the default is 10 seconds
                    .responseTimeout(Duration.ofSeconds(10)) // Set the response timeout time, the default is 20 seconds
                    .maxConnections(128) // Set the connection pool size
                    .maxIdleTimeOut(Duration.ofSeconds(50)) // Set the connection pool timeout, the default is 30 seconds
                    // Configure the proxy
                    .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("<YOUR-PROXY-HOSTNAME>", 9001))
                            .setCredentials("<YOUR-PROXY-USERNAME>", "<YOUR-PROXY-PASSWORD>"))
                    // If it is an https connection, you need to configure the certificate, or ignore the certificate(.ignoreSSL(true))
                    .x509TrustManagers(new X509TrustManager[]{})
                    .keyManagers(new KeyManager[]{})
                    .ignoreSSL(false)
                    .build();*/
    
            // Configure Credentials authentication information, including ak, secret, token
            StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
                    // Please ensure that the environment variables ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set.
                    .accessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
                    .accessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"))
                    //.securityToken(System.getenv("ALIBABA_CLOUD_SECURITY_TOKEN")) // use STS token
                    .build());
    
            // Configure the Client
            AsyncClient client = AsyncClient.builder()
                    .region("<Your ReginId>") // Region ID
                    //.httpClient(httpClient) // Use the configured HttpClient, otherwise use the default HttpClient (Apache HttpClient)
                    .credentialsProvider(provider)
                    //.serviceConfiguration(Configuration.create()) // Service-level configuration
                    // Client-level configuration rewrite, can set Endpoint, Http request parameters, etc.
                    .overrideConfiguration(
                            ClientOverrideConfiguration.create()
                                      // For the endpoint, see https://api.aliyun.com/product/live
                                    .setEndpointOverride("live.aliyuncs.com")
                            //.setConnectTimeout(Duration.ofSeconds(30))
                    )
                    .build();
    
            // Parameter settings for API request
            ForbidLiveStreamRequest forbidLiveStreamRequest = ForbidLiveStreamRequest.builder()
                    .regionId("<Your ReginId>")
                    .domainName("<Your DomainName>")
                    .appName("<Your AppName>")
                    .streamName("<Your StreamName>")
                    // Request-level configuration rewrite, can set Http request parameters, etc.
                    // .requestConfiguration(RequestConfiguration.create().setHttpHeaders(new HttpHeaders()))
                    .build();
    
            // Asynchronously get the return value of the API request
            CompletableFuture<ForbidLiveStreamResponse> response = client.forbidLiveStream(forbidLiveStreamRequest);
            // Synchronously get the return value of the API request
            ForbidLiveStreamResponse resp = response.get();
            System.out.println(new Gson().toJson(resp));
            // Asynchronous processing of return values
            /*response.thenAccept(resp -> {
                System.out.println(new Gson().toJson(resp));
            }).exceptionally(throwable -> { // Handling exceptions
                System.out.println(throwable.getMessage());
                return null;
            });*/
    
            // Finally, close the client
            client.close();
        }
    
    }

Cara melihat blacklist stream ingest

  • Lihat blacklist stream ingest di konsol ApsaraVideo Live

    Setelah Anda menonaktifkan stream ingest, buka halaman Streams di konsol ApsaraVideo Live. Pilih nama domain, klik tab Disabled Streams, lalu klik Search untuk melihat aliran langsung yang dinonaktifkan.

  • Ambil blacklist stream ingest menggunakan SDK

    API ApsaraVideo Live didasarkan pada Alibaba Cloud OpenAPI. SDK bertindak sebagai pembungkus untuk melakukan panggilan OpenAPI. Untuk mengunduh SDK sisi server, lihat Server-side SDK. Untuk informasi selengkapnya tentang cara menggunakan SDK, lihat petunjuk SDK.

    <dependency>
      <groupId>com.aliyun</groupId>
      <artifactId>alibabacloud-live20161101</artifactId>
      <version>2.0.0</version>
    </dependency>
    Catatan

    Nomor versi SDK hanya sebagai referensi. Untuk mendapatkan versi terbaru, lihat Server-side SDK.

    Alur utama kode contoh adalah sebagai berikut:

    1. Inisialisasi objek Client.

      SDK menggunakan objek AsyncClient untuk memanggil operasi OpenAPI.

    2. Inisialisasi kelas Request.

      SDK menyediakan kelas Request dan Response untuk setiap operasi. Untuk informasi selengkapnya tentang parameter permintaan untuk mengkueri blacklist URL ingest, lihat API Query Stream Ingest Blacklist.

    3. Kirim permintaan dan ambil hasilnya.

    Kode contoh:

    // This file is auto-generated, don't edit it. Thanks.
    package demo;
    
    import com.aliyun.auth.credentials.Credential;
    import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
    import com.aliyun.core.http.HttpClient;
    import com.aliyun.core.http.HttpMethod;
    import com.aliyun.core.http.ProxyOptions;
    import com.aliyun.httpcomponent.httpclient.ApacheAsyncHttpClientBuilder;
    import com.aliyun.sdk.service.live20161101.models.*;
    import com.aliyun.sdk.service.live20161101.*;
    import com.google.gson.Gson;
    import darabonba.core.RequestConfiguration;
    import darabonba.core.client.ClientOverrideConfiguration;
    import darabonba.core.utils.CommonUtil;
    import darabonba.core.TeaPair;
    
    //import javax.net.ssl.KeyManager;
    //import javax.net.ssl.X509TrustManager;
    import java.net.InetSocketAddress;
    import java.time.Duration;
    import java.util.*;
    import java.util.concurrent.CompletableFuture;
    import java.io.*;
    
    public class DescribeLiveStreamsBlockList {
        public static void main(String[] args) throws Exception {
    
            // HttpClient Configuration
            /*HttpClient httpClient = new ApacheAsyncHttpClientBuilder()
                    .connectionTimeout(Duration.ofSeconds(10)) // Set the connection timeout time, the default is 10 seconds
                    .responseTimeout(Duration.ofSeconds(10)) // Set the response timeout time, the default is 20 seconds
                    .maxConnections(128) // Set the connection pool size
                    .maxIdleTimeOut(Duration.ofSeconds(50)) // Set the connection pool timeout, the default is 30 seconds
                    // Configure the proxy
                    .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("<YOUR-PROXY-HOSTNAME>", 9001))
                            .setCredentials("<YOUR-PROXY-USERNAME>", "<YOUR-PROXY-PASSWORD>"))
                    // If it is an https connection, you need to configure the certificate, or ignore the certificate(.ignoreSSL(true))
                    .x509TrustManagers(new X509TrustManager[]{})
                    .keyManagers(new KeyManager[]{})
                    .ignoreSSL(false)
                    .build();*/
    
            // Configure Credentials authentication information, including ak, secret, token
            StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
                    // Please ensure that the environment variables ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set.
                    .accessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
                    .accessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"))
                    //.securityToken(System.getenv("ALIBABA_CLOUD_SECURITY_TOKEN")) // use STS token
                    .build());
    
            // Configure the Client
            AsyncClient client = AsyncClient.builder()
                    .region("<Your ReginId>") // Region ID
                    //.httpClient(httpClient) // Use the configured HttpClient, otherwise use the default HttpClient (Apache HttpClient)
                    .credentialsProvider(provider)
                    //.serviceConfiguration(Configuration.create()) // Service-level configuration
                    // Client-level configuration rewrite, can set Endpoint, Http request parameters, etc.
                    .overrideConfiguration(
                            ClientOverrideConfiguration.create()
                                      // For the endpoint, see https://api.aliyun.com/product/live
                                    .setEndpointOverride("live.aliyuncs.com")
                            //.setConnectTimeout(Duration.ofSeconds(30))
                    )
                    .build();
    
            // Parameter settings for API request
            DescribeLiveStreamsBlockListRequest describeLiveStreamsBlockListRequest = DescribeLiveStreamsBlockListRequest.builder()
                    .domainName("<Your DomainName>")
                    // Request-level configuration rewrite, can set Http request parameters, etc.
                    // .requestConfiguration(RequestConfiguration.create().setHttpHeaders(new HttpHeaders()))
                    .build();
    
            // Asynchronously get the return value of the API request
            CompletableFuture<DescribeLiveStreamsBlockListResponse> response = client.describeLiveStreamsBlockList(describeLiveStreamsBlockListRequest);
            // Synchronously get the return value of the API request
            DescribeLiveStreamsBlockListResponse resp = response.get();
            System.out.println(new Gson().toJson(resp));
            // Asynchronous processing of return values
            /*response.thenAccept(resp -> {
                System.out.println(new Gson().toJson(resp));
            }).exceptionally(throwable -> { // Handling exceptions
                System.out.println(throwable.getMessage());
                return null;
            });*/
    
            // Finally, close the client
            client.close();
        }
    
    }

Cara melanjutkan URL stream ingest yang masuk blacklist

  • Resume a stream in the ApsaraVideo Live console

    Setelah aliran dinonaktifkan, buka halaman Streams di konsol ApsaraVideo Live, pilih nama domain, klik tab Disabled Streams, lalu klik Enable.

  • Pemulihan SDK

    API ApsaraVideo Live didasarkan pada Alibaba Cloud OpenAPI. SDK bertindak sebagai pembungkus untuk melakukan panggilan OpenAPI. Untuk mengunduh SDK sisi server, lihat Server-side SDK. Untuk informasi selengkapnya tentang cara menggunakan SDK, lihat petunjuk SDK.

    Sebagai contoh, untuk menggunakan SDK Java, Anda dapat menggunakan Maven untuk mengelola dependensi proyek dan menambahkan dependensi berikut ke file pom.xml:

    <dependency>
      <groupId>com.aliyun</groupId>
      <artifactId>alibabacloud-live20161101</artifactId>
      <version>2.0.0</version>
    </dependency>
    Catatan

    Nomor versi SDK hanya sebagai referensi. Untuk mendapatkan versi terbaru, lihat Server-side SDK.

    Alur utama kode contoh adalah sebagai berikut:

    1. Inisialisasi objek Client.

      SDK menggunakan objek AsyncClient untuk memanggil operasi OpenAPI.

    2. Inisialisasi kelas Request.

      SDK menyediakan kelas Request dan kelas Response untuk setiap operasi API. Untuk informasi selengkapnya tentang parameter permintaan untuk melanjutkan stream ingest, lihat API Resume Live Stream Ingest.

    3. Kirim permintaan dan ambil hasilnya.

    Kode contoh:

    // This file is auto-generated, don't edit it. Thanks.
    package demo;
    
    import com.aliyun.auth.credentials.Credential;
    import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
    import com.aliyun.core.http.HttpClient;
    import com.aliyun.core.http.HttpMethod;
    import com.aliyun.core.http.ProxyOptions;
    import com.aliyun.httpcomponent.httpclient.ApacheAsyncHttpClientBuilder;
    import com.aliyun.sdk.service.live20161101.models.*;
    import com.aliyun.sdk.service.live20161101.*;
    import com.google.gson.Gson;
    import darabonba.core.RequestConfiguration;
    import darabonba.core.client.ClientOverrideConfiguration;
    import darabonba.core.utils.CommonUtil;
    import darabonba.core.TeaPair;
    
    //import javax.net.ssl.KeyManager;
    //import javax.net.ssl.X509TrustManager;
    import java.net.InetSocketAddress;
    import java.time.Duration;
    import java.util.*;
    import java.util.concurrent.CompletableFuture;
    import java.io.*;
    
    public class ResumeLiveStream {
        public static void main(String[] args) throws Exception {
    
            // HttpClient Configuration
            /*HttpClient httpClient = new ApacheAsyncHttpClientBuilder()
                    .connectionTimeout(Duration.ofSeconds(10)) // Set the connection timeout time, the default is 10 seconds
                    .responseTimeout(Duration.ofSeconds(10)) // Set the response timeout time, the default is 20 seconds
                    .maxConnections(128) // Set the connection pool size
                    .maxIdleTimeOut(Duration.ofSeconds(50)) // Set the connection pool timeout, the default is 30 seconds
                    // Configure the proxy
                    .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("<YOUR-PROXY-HOSTNAME>", 9001))
                            .setCredentials("<YOUR-PROXY-USERNAME>", "<YOUR-PROXY-PASSWORD>"))
                    // If it is an https connection, you need to configure the certificate, or ignore the certificate(.ignoreSSL(true))
                    .x509TrustManagers(new X509TrustManager[]{})
                    .keyManagers(new KeyManager[]{})
                    .ignoreSSL(false)
                    .build();*/
    
            // Configure Credentials authentication information, including ak, secret, token
            StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
                    // Please ensure that the environment variables ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set.
                    .accessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
                    .accessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"))
                    //.securityToken(System.getenv("ALIBABA_CLOUD_SECURITY_TOKEN")) // use STS token
                    .build());
    
            // Configure the Client
            AsyncClient client = AsyncClient.builder()
                    .region("<Your RegionId>") // Region ID
                    //.httpClient(httpClient) // Use the configured HttpClient, otherwise use the default HttpClient (Apache HttpClient)
                    .credentialsProvider(provider)
                    //.serviceConfiguration(Configuration.create()) // Service-level configuration
                    // Client-level configuration rewrite, can set Endpoint, Http request parameters, etc.
                    .overrideConfiguration(
                            ClientOverrideConfiguration.create()
                                      // For the endpoint, see https://api.aliyun.com/product/live
                                    .setEndpointOverride("live.aliyuncs.com")
                            //.setConnectTimeout(Duration.ofSeconds(30))
                    )
                    .build();
    
            // Parameter settings for API request
            ResumeLiveStreamRequest resumeLiveStreamRequest = ResumeLiveStreamRequest.builder()
                    .domainName("<Your DomainName>")
                    .liveStreamType("<Your LiveStreamType>")
                    .appName("<Your AppName>")
                    .streamName("<Your StreamName>")
                    // Request-level configuration rewrite, can set Http request parameters, etc.
                    // .requestConfiguration(RequestConfiguration.create().setHttpHeaders(new HttpHeaders()))
                    .build();
    
            // Asynchronously get the return value of the API request
            CompletableFuture<ResumeLiveStreamResponse> response = client.resumeLiveStream(resumeLiveStreamRequest);
            // Synchronously get the return value of the API request
            ResumeLiveStreamResponse resp = response.get();
            System.out.println(new Gson().toJson(resp));
            // Asynchronous processing of return values
            /*response.thenAccept(resp -> {
                System.out.println(new Gson().toJson(resp));
            }).exceptionally(throwable -> { // Handling exceptions
                System.out.println(throwable.getMessage());
                return null;
            });*/
    
            // Finally, close the client
            client.close();
        }
    
    }