삭제

이 페이지에서 사용한 리소스 비용이 Google Cloud 계정에 청구되지 않도록 하려면 다음 단계를 수행합니다.

라이브 구성 삭제

라이브 구성 삭제. Video Stitcher API는 Ad Manager에서 라이브 스트림 이벤트를 보관처리합니다.

REST

요청 데이터를 사용하기 전에 다음을 바꿉니다.

  • PROJECT_NUMBER: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
  • LOCATION: 라이브 구성의 위치입니다. 지원되는 리전 중 하나를 사용합니다.
    위치 표시
    • us-central1
    • us-east1
    • us-west1
    • asia-east1
    • asia-south1
    • asia-southeast1
    • europe-west1
    • southamerica-east1
  • LIVE_CONFIG_ID: 라이브 구성의 사용자 정의 식별자입니다.

요청을 보내려면 다음 옵션 중 하나를 펼칩니다.

다음과 비슷한 JSON 응답이 표시됩니다.

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION/operations/OPERATION_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.common.OperationMetadata",
    "createTime": CREATE_TIME,
    "target": "projects/PROJECT_NUMBER/locations/LOCATION/liveConfigs/LIVE_CONFIG_ID",
    "verb": "delete",
    "cancelRequested": false,
    "apiVersion": "v1"
  },
  "done": false
}
이 명령어는 진행 상황 추적을 쿼리할 수 있는 장기 실행 작업(LRO)을 만듭니다.

C#

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용C# 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API C# API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


using Google.Cloud.Video.Stitcher.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public class DeleteLiveConfigSample
{
    public async Task DeleteLiveConfigAsync(
        string projectId, string location, string liveConfigId)
    {
        // Create the client.
        VideoStitcherServiceClient client = VideoStitcherServiceClient.Create();

        DeleteLiveConfigRequest request = new DeleteLiveConfigRequest
        {
            LiveConfigName = LiveConfigName.FromProjectLocationLiveConfig(projectId, location, liveConfigId)
        };

        // Make the request.
        Operation<Empty, OperationMetadata> response = await client.DeleteLiveConfigAsync(request);

        // Poll until the returned long-running operation is complete.
        await response.PollUntilCompletedAsync();
    }
}

Go

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Go 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Go API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

import (
	"context"
	"fmt"
	"io"

	stitcher "cloud.google.com/go/video/stitcher/apiv1"
	stitcherstreampb "cloud.google.com/go/video/stitcher/apiv1/stitcherpb"
)

// deleteLiveConfig deletes a previously-created live config.
func deleteLiveConfig(w io.Writer, projectID, liveConfigID string) error {
	// projectID := "my-project-id"
	// liveConfigID := "my-live-config-id"
	location := "us-central1"
	ctx := context.Background()
	client, err := stitcher.NewVideoStitcherClient(ctx)
	if err != nil {
		return fmt.Errorf("stitcher.NewVideoStitcherClient: %w", err)
	}
	defer client.Close()

	req := &stitcherstreampb.DeleteLiveConfigRequest{
		Name: fmt.Sprintf("projects/%s/locations/%s/liveConfigs/%s", projectID, location, liveConfigID),
	}
	// Deletes the live config.
	op, err := client.DeleteLiveConfig(ctx, req)
	if err != nil {
		return fmt.Errorf("client.DeleteLiveConfig: %w", err)
	}
	err = op.Wait(ctx)
	if err != nil {
		return err
	}

	fmt.Fprintf(w, "Deleted live config")
	return nil
}

Java

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Java 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Java API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


import com.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest;
import com.google.cloud.video.stitcher.v1.LiveConfigName;
import com.google.cloud.video.stitcher.v1.VideoStitcherServiceClient;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

public class DeleteLiveConfig {

  private static final int TIMEOUT_IN_MINUTES = 2;

  public static void main(String[] args) throws Exception {
    // TODO(developer): Replace these variables before running the sample.
    String projectId = "my-project-id";
    String location = "us-central1";
    String liveConfigId = "my-live-config-id";

    deleteLiveConfig(projectId, location, liveConfigId);
  }

  public static void deleteLiveConfig(String projectId, String location, String liveConfigId)
      throws IOException, ExecutionException, InterruptedException, TimeoutException {
    // Initialize client that will be used to send requests. This client only needs to be created
    // once, and can be reused for multiple requests. After completing all of your requests, call
    // the "close" method on the client to safely clean up any remaining background resources.
    VideoStitcherServiceClient videoStitcherServiceClient = VideoStitcherServiceClient.create();
    DeleteLiveConfigRequest deleteLiveConfigRequest =
        DeleteLiveConfigRequest.newBuilder()
            .setName(LiveConfigName.of(projectId, location, liveConfigId).toString())
            .build();

    videoStitcherServiceClient
        .deleteLiveConfigAsync(deleteLiveConfigRequest)
        .get(TIMEOUT_IN_MINUTES, TimeUnit.MINUTES);
    System.out.println("Deleted live config");
    videoStitcherServiceClient.close();
  }
}

Node.js

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Node.js 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Node.js API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// projectId = 'my-project-id';
// location = 'us-central1';
// liveConfigId = 'my-live-config-id';

// Imports the Video Stitcher library
const {VideoStitcherServiceClient} =
  require('@google-cloud/video-stitcher').v1;
// Instantiates a client
const stitcherClient = new VideoStitcherServiceClient();

async function deleteLiveConfig() {
  // Construct request
  const request = {
    name: stitcherClient.liveConfigPath(projectId, location, liveConfigId),
  };
  const [operation] = await stitcherClient.deleteLiveConfig(request);
  await operation.promise();
  console.log('Deleted live config');
}

deleteLiveConfig();

PHP

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용PHP 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API PHP API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

use Google\Cloud\Video\Stitcher\V1\Client\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest;

/**
 * Deletes a live config.
 *
 * @param string $callingProjectId     The project ID to run the API call under
 * @param string $location             The location of the live config
 * @param string $liveConfigId         The ID of the live config
 */
function delete_live_config(
    string $callingProjectId,
    string $location,
    string $liveConfigId
): void {
    // Instantiate a client.
    $stitcherClient = new VideoStitcherServiceClient();

    $formattedName = $stitcherClient->liveConfigName($callingProjectId, $location, $liveConfigId);
    $request = (new DeleteLiveConfigRequest())
        ->setName($formattedName);
    $operationResponse = $stitcherClient->deleteLiveConfig($request);
    $operationResponse->pollUntilComplete();
    if ($operationResponse->operationSucceeded()) {
        // Print status
        printf('Deleted live config %s' . PHP_EOL, $liveConfigId);
    } else {
        $error = $operationResponse->getError();
        // handleError($error)
    }
}

Python

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Python 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Python API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


import argparse

from google.cloud.video.stitcher_v1.services.video_stitcher_service import (
    VideoStitcherServiceClient,
)
from google.protobuf import empty_pb2 as empty

def delete_live_config(
    project_id: str, location: str, live_config_id: str
) -> empty.Empty:
    """Deletes a live config.
    Args:
        project_id: The GCP project ID.
        location: The location of the live config.
        live_config_id: The user-defined live config ID."""

    client = VideoStitcherServiceClient()

    name = f"projects/{project_id}/locations/{location}/liveConfigs/{live_config_id}"
    operation = client.delete_live_config(name=name)
    response = operation.result()
    print("Deleted live config")
    return response

Ruby

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Ruby 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Ruby API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

require "google/cloud/video/stitcher"

##
# Delete a live config
#
# @param project_id [String] Your Google Cloud project (e.g. "my-project")
# @param location [String] The location (e.g. "us-central1")
# @param live_config_id [String] Your live config name (e.g. "my-live-config")
#
def delete_live_config project_id:, location:, live_config_id:
  # Create a Video Stitcher client.
  client = Google::Cloud::Video::Stitcher.video_stitcher_service

  # Build the resource name of the live config.
  name = client.live_config_path project: project_id, location: location,
                                 live_config: live_config_id

  # Delete the live config.
  operation = client.delete_live_config name: name

  # The returned object is of type Gapic::Operation. You can use this
  # object to check the status of an operation, cancel it, or wait
  # for results. Here is how to block until completion:
  operation.wait_until_done!

  # Print a success message.
  puts "Deleted live config"
end

CDN 키 삭제

CDN 키가 등록된 경우 CDN 키를 삭제하세요. 등록한 CDN 키마다 이 작업을 수행해야 합니다.

Ad Manager 계정에서 리소스 삭제

작업이 완료되면 Google 담당자에게 연락하여 Ad Manager 계정에서 생성된 리소스를 삭제할 수 있습니다.

실시간 스트림에서 리소스 삭제

실시간 스트림을 만든 경우 실시간 스트림 리소스를 삭제해야 합니다. Live Stream API 빠른 시작삭제 섹션을 참조하세요.