셀프 서비스 정책 삭제
이 문서에서는 셀프 서비스 정책을 업데이트하는 방법을 설명합니다.
전제 조건
- 자격 증명(파트너 센터 인증에서 설명). 이 시나리오에서는 Application+User 자격 증명으로 인증을 지원합니다.
C#
셀프 서비스 정책을 삭제하려면 다음을 수행합니다.
엔터티 식별자를 사용하여 IAggregatePartner.SelfServePolicies.ById 메서드를 호출하여 정책에 대한 작업에 대한 인터페이스를 검색합니다.
Delete 또는 DeleteAsync 메서드를 호출하여 셀프 서비스 정책을 삭제합니다.
// IAggregatePartner partnerOperations;
string policyId;
// All the operations executed on this partner operation instance will share the same correlation Id but will differ in request Id
IPartner scopedPartnerOperations = partnerOperations.With(RequestContextFactory.Instance.Create(Guid.NewGuid()));
// deletes the self-serve policies
partnerOperations.SelfServePolicies.ById(policyId).Delete();
예제는 다음을 참조하세요.
- 샘플: 콘솔 테스트 앱
- 프로젝트: PartnerSDK.FeatureSamples
- 클래스: DeleteSelfServePolicies.cs
REST 요청
요청 구문
메서드 | 요청 URI |
---|---|
DELETE | {baseURL}/v1/SelfServePolicy/{id} HTTP/1.1 |
URI 매개 변수
다음 경로 매개 변수를 사용하여 지정된 제품을 가져옵니다.
입력 | 종류 | 필수 | 설명 |
---|---|---|---|
SelfServePolicy-id | string | 예 | 셀프 서비스 정책을 식별하는 문자열입니다. |
요청 헤더
- 요청 ID 및 상관 관계 ID가 필요합니다.
- 자세한 내용은 파트너 센터 REST 헤더를 참조하세요.
Request body
없음.
요청 예제
DELETE https://api.partnercenter.microsoft.com/v1/SelfServePolicy/634f6379-ad54-449b-9821-564f737158ab_0431a72c-7d8a-4393-b25e-ef63f5efb415 HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 94e4e214-6b06-4fb7-96d1-94d559f9b47f
MS-CorrelationId: ab993325-1605-4cf4-bac4-fb584142a31b
X-Locale: en-US
Host: api.partnercenter.microsoft.com
Content-Length: 789
Connection: Keep-Alive
REST 응답
응답 성공 및 오류 코드
각 응답에는 성공 또는 실패와 추가 디버깅 정보를 나타내는 HTTP 상태 코드가 함께 제공됩니다. 네트워크 추적 도구를 사용하여 이 코드, 오류 유형 및 추가 매개 변수를 읽을 수 있습니다. 전체 목록은 파트너 센터 REST 오류 코드를 참조하세요.
응답 예제
HTTP/1.1 204 deleted
MS-CorrelationId: ab993325-1605-4cf4-bac4-fb584142a31b
MS-RequestId: 94e4e214-6b06-4fb7-96d1-94d559f9b47f
Date: Tue, 14 Feb 2017 20:06:02 GMT
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기