DeleteLexiconOR와 함께 사용할 수 있습니다. AWS SDK CLI - AWS SDK코드 예제

AWS 문서 AWS SDK SDK 예제 GitHub 리포지토리에 더 많은 예제가 있습니다.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

DeleteLexiconOR와 함께 사용할 수 있습니다. AWS SDK CLI

다음 코드 예제는 DeleteLexicon의 사용 방법을 보여 줍니다.

.NET
AWS SDK for .NET
참고

더 많은 정보가 있습니다 GitHub. AWS 코드 예시 리포지토리에서 전체 예시를 찾고 설정 및 실행하는 방법을 배워보세요.

using System; using System.Threading.Tasks; using Amazon.Polly; using Amazon.Polly.Model; /// <summary> /// Deletes an existing Amazon Polly lexicon using the AWS SDK for .NET. /// </summary> public class DeleteLexicon { public static async Task Main() { string lexiconName = "SampleLexicon"; var client = new AmazonPollyClient(); var success = await DeletePollyLexiconAsync(client, lexiconName); if (success) { Console.WriteLine($"Successfully deleted {lexiconName}."); } else { Console.WriteLine($"Could not delete {lexiconName}."); } } /// <summary> /// Deletes the named Amazon Polly lexicon. /// </summary> /// <param name="client">The initialized Amazon Polly client object.</param> /// <param name="lexiconName">The name of the Amazon Polly lexicon to /// delete.</param> /// <returns>A Boolean value indicating the success of the operation.</returns> public static async Task<bool> DeletePollyLexiconAsync( AmazonPollyClient client, string lexiconName) { var deleteLexiconRequest = new DeleteLexiconRequest() { Name = lexiconName, }; var response = await client.DeleteLexiconAsync(deleteLexiconRequest); return response.HttpStatusCode == System.Net.HttpStatusCode.OK; } }
CLI
AWS CLI

어휘를 삭제하는 방법

다음 delete-lexicon 예시에서는 지정된 어휘를 삭제합니다.

aws polly delete-lexicon \ --name w3c

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon Polly 개발자 안내서의 DeleteLexicon 작업 사용을 참조하십시오.

  • 자세한 API 내용은 AWS CLI 명령 DeleteLexicon참조를 참조하십시오.