AppProfile の削除
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
AppProfile を削除します。
コードサンプル
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],[],[[["\u003cp\u003eThis page provides instructions and code samples for deleting an AppProfile in Google Cloud Bigtable using C++ and PHP.\u003c/p\u003e\n"],["\u003cp\u003eThe code examples demonstrate how to use the \u003ccode\u003eBigtableInstanceAdminClient\u003c/code\u003e to delete a specified AppProfile by its ID within a given project and instance.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves setting up authentication via Application Default Credentials and installing the appropriate Bigtable client libraries.\u003c/p\u003e\n"],["\u003cp\u003eThe provided code snippets show how to construct and execute a \u003ccode\u003eDeleteAppProfileRequest\u003c/code\u003e, along with handling potential exceptions, such as a \u003ccode\u003eNOT_FOUND\u003c/code\u003e error, in PHP.\u003c/p\u003e\n"],["\u003cp\u003eUsers can refer to the Google Cloud sample browser for more code samples related to other Google Cloud products.\u003c/p\u003e\n"]]],[],null,["Delete an AppProfile.\n\nCode sample \n\nC++\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n namespace cbt = ::google::cloud::bigtable;\n namespace cbta = ::google::cloud::bigtable_admin;\n using ::google::cloud::Status;\n [](cbta::BigtableInstanceAdminClient instance_admin,\n std::string const& project_id, std::string const& instance_id,\n std::string const& profile_id, bool ignore_warnings) {\n std::string profile_name =\n cbt::AppProfileName(project_id, instance_id, profile_id);\n\n google::bigtable::admin::v2::DeleteAppProfileRequest req;\n req.set_name(profile_name);\n req.set_ignore_warnings(ignore_warnings);\n\n Status status = instance_admin.DeleteAppProfile(std::move(req));\n if (!status.ok()) throw std::runtime_error(status.message());\n std::cout \u003c\u003c \"Application Profile deleted\\n\";\n }\n\nPHP\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n use Google\\ApiCore\\ApiException;\n use Google\\Cloud\\Bigtable\\Admin\\V2\\Client\\BigtableInstanceAdminClient;\n use Google\\Cloud\\Bigtable\\Admin\\V2\\DeleteAppProfileRequest;\n\n /**\n * Delete an App Profile from a Bigtable instance.\n *\n * @param string $projectId The Google Cloud project ID\n * @param string $instanceId The ID of the Bigtable instance\n * @param string $appProfileId The ID of the App Profile to be deleted\n */\n function delete_app_profile(\n string $projectId,\n string $instanceId,\n string $appProfileId\n ): void {\n $instanceAdminClient = new BigtableInstanceAdminClient();\n $appProfileName = $instanceAdminClient-\u003eappProfileName($projectId, $instanceId, $appProfileId);\n $ignoreWarnings = true;\n\n printf('Deleting the App Profile: %s' . PHP_EOL, $appProfileId);\n\n try {\n // If $ignoreWarnings is set to false, Bigtable will warn you that all future requests using the AppProfile will fail\n $deleteAppProfileRequest = (new DeleteAppProfileRequest())\n -\u003esetName($appProfileName)\n -\u003esetIgnoreWarnings($ignoreWarnings);\n $instanceAdminClient-\u003edeleteAppProfile($deleteAppProfileRequest);\n printf('App Profile %s deleted.' . PHP_EOL, $appProfileId);\n } catch (ApiException $e) {\n if ($e-\u003egetStatus() === 'NOT_FOUND') {\n printf('App Profile %s does not exist.' . PHP_EOL, $appProfileId);\n return;\n }\n throw $e;\n }\n }\n\nWhat's next\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=bigtable)."]]