How to use the @azure/arm-cognitiveservices.Accounts function in @azure/arm-cognitiveservices

To help you get started, we’ve selected a few @azure/arm-cognitiveservices examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure-Samples / cognitive-services-quickstart-code / javascript / azure_management_service / create_delete_resource.js View on Github external
async function quickstart() {
	const credentials = await msRestNodeAuth.loginWithServicePrincipalSecret (service_principal_application_id, service_principal_secret, tenant_id);
	const client = new Arm.CognitiveServicesManagementClient (credentials, subscription_id);
	// Note Azure resources are also sometimes referred to as accounts.
	const accounts_client = new Arm.Accounts (client);
	const resource_skus_client = new Arm.ResourceSkus (client);
	// 

	// 
	// Uncomment this to list all available resource kinds, SKUs, and locations for your Azure account.
	list_available_kinds_skus_locations (resource_skus_client);

	// Create a resource with kind Text Translation, SKU F0 (free tier), location global.
	await create_resource (accounts_client, "test_resource", "TextTranslation", "F0", "Global");

	// Uncomment this to list all resources for your Azure account.
	list_resources (accounts_client);

	// Delete the resource.
	delete_resource (accounts_client, "test_resource");
}

@azure/arm-cognitiveservices

A generated SDK for CognitiveServicesManagementClient.

MIT
Latest version published 1 year ago

Package Health Score

79 / 100
Full package analysis