/// <summary>
 /// Details of the information protection policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query, can be subscription
 /// (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group
 /// (/providers/Microsoft.Management/managementGroups/mgName).
 /// </param>
 /// <param name='informationProtectionPolicyName'>
 /// Name of the information protection policy. Possible values include:
 /// 'effective', 'custom'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InformationProtectionPolicy> CreateOrUpdateAsync(this IInformationProtectionPoliciesOperations operations, string scope, string informationProtectionPolicyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, informationProtectionPolicyName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Details of the information protection policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query, can be subscription
 /// (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group
 /// (/providers/Microsoft.Management/managementGroups/mgName).
 /// </param>
 /// <param name='informationProtectionPolicyName'>
 /// Name of the information protection policy. Possible values include:
 /// 'effective', 'custom'
 /// </param>
 /// <param name='labels'>
 /// Dictionary of sensitivity labels.
 /// </param>
 /// <param name='informationTypes'>
 /// The sensitivity information types.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InformationProtectionPolicy> CreateOrUpdateAsync(this IInformationProtectionPoliciesOperations operations, string scope, string informationProtectionPolicyName, IDictionary <string, SensitivityLabel> labels = default(IDictionary <string, SensitivityLabel>), IDictionary <string, InformationType> informationTypes = default(IDictionary <string, InformationType>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, informationProtectionPolicyName, labels, informationTypes, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }