Share via


TenantPolicyDefinitionCollection.GetIfExists Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_GetBuiltIn
  • Default Api Version: 2021-06-01
  • Resource: TenantPolicyDefinitionResource
public virtual Azure.NullableResponse<Azure.ResourceManager.Resources.TenantPolicyDefinitionResource> GetIfExists (string policyDefinitionName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Resources.TenantPolicyDefinitionResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Resources.TenantPolicyDefinitionResource>
Public Overridable Function GetIfExists (policyDefinitionName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of TenantPolicyDefinitionResource)

Parameters

policyDefinitionName
String

The name of the built-in policy definition to get.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

policyDefinitionName is an empty string, and was expected to be non-empty.

policyDefinitionName is null.

Applies to