DELETE https://management.azure.com/subscriptions/c1be1141-a7c9-4aac-9608-3c2e2f1152c3/resourceGroups/contoso-Rgp/providers/Microsoft.Orbital/contactProfiles/CONTOSO-CP?api-version=2022-11-01
/**
* Samples for ContactProfiles Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileDelete.json
*/
/**
* Sample code: Delete Contact Profile.
*
* @param manager Entry point to OrbitalManager.
*/
public static void deleteContactProfile(com.azure.resourcemanager.orbital.OrbitalManager manager) {
manager.contactProfiles().delete("contoso-Rgp", "CONTOSO-CP", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.orbital import AzureOrbital
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-orbital
# USAGE
python contact_profile_delete.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AzureOrbital(
credential=DefaultAzureCredential(),
subscription_id="c1be1141-a7c9-4aac-9608-3c2e2f1152c3",
)
response = client.contact_profiles.begin_delete(
resource_group_name="contoso-Rgp",
contact_profile_name="CONTOSO-CP",
).result()
print(response)
# x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileDelete.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armorbital_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/orbital/armorbital/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileDelete.json
func ExampleContactProfilesClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armorbital.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewContactProfilesClient().BeginDelete(ctx, "contoso-Rgp", "CONTOSO-CP", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureOrbital } = require("@azure/arm-orbital");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a specified contact profile resource.
*
* @summary Deletes a specified contact profile resource.
* x-ms-original-file: specification/orbital/resource-manager/Microsoft.Orbital/stable/2022-11-01/examples/ContactProfileDelete.json
*/
async function deleteContactProfile() {
const subscriptionId =
process.env["ORBITAL_SUBSCRIPTION_ID"] || "c1be1141-a7c9-4aac-9608-3c2e2f1152c3";
const resourceGroupName = process.env["ORBITAL_RESOURCE_GROUP"] || "contoso-Rgp";
const contactProfileName = "CONTOSO-CP";
const credential = new DefaultAzureCredential();
const client = new AzureOrbital(credential, subscriptionId);
const result = await client.contactProfiles.beginDeleteAndWait(
resourceGroupName,
contactProfileName
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue