Özel kaynak sağlayıcısını siler.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders/resourceProviders/{resourceProviderName}?api-version=2018-09-01-preview
URI Parametreleri
Name |
İçinde |
Gerekli |
Tür |
Description |
resourceGroupName
|
path |
True
|
string
|
Kaynak grubunun adı.
|
resourceProviderName
|
path |
True
|
string
|
Kaynak sağlayıcısının adı.
|
subscriptionId
|
path |
True
|
string
|
Azure abonelik kimliği. Bu GUID biçimli bir dizedir (ör. 000000000-0000-0000-0000-0000000000000)
|
api-version
|
query |
True
|
string
|
HTTP isteğiyle kullanılacak API sürümü.
|
Yanıtlar
Name |
Tür |
Description |
200 OK
|
|
Tamam kaynağı silindi
|
202 Accepted
|
|
Tamam kaynak silme işlemi kabul edildi.
|
204 No Content
|
|
Tamam kaynağı bulunamadı.
|
Other Status Codes
|
ErrorResponse
|
İşlemin neden başarısız olduğunu açıklayan hata yanıtı.
|
Güvenlik
azure_auth
Azure Active Directory OAuth2 Flow
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
Name |
Description |
user_impersonation
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
Delete a custom resource provider
Örnek isteği
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp?api-version=2018-09-01-preview
from azure.identity import DefaultAzureCredential
from azure.mgmt.customproviders import Customproviders
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-customproviders
# USAGE
python delete_a_custom_resource_provider.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 = Customproviders(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.custom_resource_provider.begin_delete(
resource_group_name="testRG",
resource_provider_name="newrp",
).result()
print(response)
# x-ms-original-file: specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/deleteCustomRP.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 armcustomproviders_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customproviders/armcustomproviders"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customproviders/resource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/deleteCustomRP.json
func ExampleCustomResourceProviderClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcustomproviders.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCustomResourceProviderClient().BeginDelete(ctx, "testRG", "newrp", 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
Tanımlar
ErrorDefinition
Hata tanımı.
Name |
Tür |
Description |
code
|
string
|
HTTP hata kodu için alt durum olarak hizmet veren hizmete özgü hata kodu.
|
details
|
ErrorDefinition[]
|
İç hata ayrıntıları.
|
message
|
string
|
Hatanın açıklaması.
|
ErrorResponse
Hata yanıtı.