Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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");
}