Merge pull request #10658 from pilor/policy20190901

Microsoft.Authorization/Policy* api version 2019-09-01
This commit is contained in:
Yabo Hu 2019-12-05 10:19:48 +08:00 коммит произвёл GitHub
Родитель 7553dfd991 807ea1fcab
Коммит 0ded3e07f2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
49 изменённых файлов: 9633 добавлений и 52316 удалений

Просмотреть файл

@ -77,17 +77,17 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components
/// <summary>
/// The default policy definition API version.
/// </summary>
public static readonly string PolicyDefinitionApiVersion = "2019-06-01";
public static readonly string PolicyDefinitionApiVersion = "2019-09-01";
/// <summary>
/// The default policy set definition API version.
/// </summary>
public static readonly string PolicySetDefintionApiVersion = "2019-06-01";
public static readonly string PolicySetDefintionApiVersion = "2019-09-01";
/// <summary>
/// The default policy assignment API version.
/// </summary>
public static readonly string PolicyAssignmentApiVersion = "2019-06-01";
public static readonly string PolicyAssignmentApiVersion = "2019-09-01";
/// <summary>
/// The default providers API version.

Просмотреть файл

@ -51,5 +51,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy
/// </summary>
[JsonProperty(Required = Required.Default)]
public JObject Parameters { get; set; }
/// <summary>
/// The policy definition groups.
/// </summary>
[JsonProperty(Required = Required.Default)]
public JArray PolicyDefinitionGroups { get; set; }
}
}

Просмотреть файл

@ -94,7 +94,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
var listFilter = this.GetListFilter(this.Builtin, this.Custom);
PaginatedResponseHelper.ForEach(
getFirstPage: () => this.GetResources(),
getFirstPage: () => this.GetResources(listFilter),
getNextPage: nextLink => this.GetNextLink<JObject>(nextLink),
cancellationToken: this.CancellationToken,
action: resources => this.WriteObject(sendToPipeline: this.GetFilteredOutputObjects("PolicyDefinitionId", listFilter, resources), enumerateCollection: true));
@ -103,9 +103,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
/// <summary>
/// Queries the ARM cache and returns the cached resource that match the query specified.
/// </summary>
private async Task<ResponseWithContinuation<JObject[]>> GetResources()
/// <param name="policyTypeFilter">The policy type filter.</param>
private async Task<ResponseWithContinuation<JObject[]>> GetResources(ListFilter policyTypeFilter)
{
string resourceId = this.GetResourceId();
var odataFilter = policyTypeFilter != ListFilter.None ? string.Format(PolicyCmdletBase.PolicyTypeFilterFormat, policyTypeFilter.ToString()) : null;
var apiVersion = string.IsNullOrWhiteSpace(this.ApiVersion) ? Constants.PolicyDefinitionApiVersion : this.ApiVersion;
@ -150,7 +152,8 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
.ListObjectColleciton<JObject>(
resourceCollectionId: resourceId,
apiVersion: apiVersion,
cancellationToken: this.CancellationToken.Value)
cancellationToken: this.CancellationToken.Value,
odataQuery: odataFilter)
.ConfigureAwait(continueOnCapturedContext: false);
}
}

Просмотреть файл

@ -94,7 +94,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
var listFilter = this.GetListFilter(this.Builtin, this.Custom);
PaginatedResponseHelper.ForEach(
getFirstPage: () => this.GetResources(),
getFirstPage: () => this.GetResources(listFilter),
getNextPage: nextLink => this.GetNextLink<JObject>(nextLink),
cancellationToken: this.CancellationToken,
action: resources => this.WriteObject(sendToPipeline: this.GetFilteredOutputObjects("PolicySetDefinitionId", listFilter, resources), enumerateCollection: true));
@ -103,9 +103,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
/// <summary>
/// Queries the ARM cache and returns the cached resource that match the query specified.
/// </summary>
private async Task<ResponseWithContinuation<JObject[]>> GetResources()
/// <param name="policyTypeFilter">The policy type filter.</param>
private async Task<ResponseWithContinuation<JObject[]>> GetResources(ListFilter policyTypeFilter)
{
string resourceId = this.GetResourceId();
var odataFilter = policyTypeFilter != ListFilter.None ? string.Format(PolicyCmdletBase.PolicyTypeFilterFormat, policyTypeFilter.ToString()) : null;
var apiVersion = string.IsNullOrWhiteSpace(this.ApiVersion) ? Constants.PolicySetDefintionApiVersion : this.ApiVersion;
@ -146,12 +148,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
else
{
return await this
.GetResourcesClient()
.ListObjectColleciton<JObject>(
resourceCollectionId: resourceId,
apiVersion: apiVersion,
cancellationToken: this.CancellationToken.Value)
.ConfigureAwait(continueOnCapturedContext: false);
.GetResourcesClient()
.ListObjectColleciton<JObject>(
resourceCollectionId: resourceId,
apiVersion: apiVersion,
cancellationToken: this.CancellationToken.Value,
odataQuery: odataFilter)
.ConfigureAwait(continueOnCapturedContext: false);
}
}

Просмотреть файл

@ -200,7 +200,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
Description = this.Description ?? null,
Scope = this.Scope,
NotScopes = this.NotScope ?? null,
Metadata = this.Metadata == null ? null : JObject.Parse(this.GetObjectFromParameter(this.Metadata).ToString()),
Metadata = this.Metadata == null ? null : this.GetObjectFromParameter(this.Metadata, nameof(this.Metadata)),
EnforcementMode = EnforcementMode ?? PolicyAssignmentEnforcementMode.Default,
Parameters = this.GetParameters(this.PolicyParameter, this.PolicyParameterObject)
}

Просмотреть файл

@ -145,9 +145,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
Description = this.Description ?? null,
DisplayName = this.DisplayName ?? null,
PolicyRule = JObject.Parse(this.GetObjectFromParameter(this.Policy).ToString()),
Metadata = this.Metadata == null ? null : JObject.Parse(this.GetObjectFromParameter(this.Metadata).ToString()),
Parameters = this.Parameter == null ? null : JObject.Parse(this.GetObjectFromParameter(this.Parameter).ToString()),
PolicyRule = this.GetObjectFromParameter(this.Policy, nameof(this.Policy)),
Metadata = this.Metadata == null ? null : this.GetObjectFromParameter(this.Metadata, nameof(this.Metadata)),
Parameters = this.Parameter == null ? null : this.GetObjectFromParameter(this.Parameter, nameof(this.Parameter)),
Mode = string.IsNullOrEmpty(this.Mode) ? PolicyDefinitionMode.All : this.Mode
}
};

Просмотреть файл

@ -84,6 +84,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
[ValidateNotNullOrEmpty]
public Guid? SubscriptionId { get; set; }
/// <summary>
/// Gets or sets the policy definition groups parameter of the new policy set definition
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = PolicyHelpStrings.NewPolicySetDefinitionGroupDefinitionHelp)]
[ValidateNotNullOrEmpty]
public string GroupDefinition { get; set; }
/// <summary>
/// Executes the cmdlet.
/// </summary>
@ -140,9 +147,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
Description = this.Description ?? null,
DisplayName = this.DisplayName ?? null,
PolicyDefinitions = JArray.Parse(this.GetObjectFromParameter(this.PolicyDefinition).ToString()),
Metadata = this.Metadata == null ? null : JObject.Parse(this.GetObjectFromParameter(this.Metadata).ToString()),
Parameters = this.Parameter == null ? null : JObject.Parse(this.GetObjectFromParameter(this.Parameter).ToString())
PolicyDefinitions = this.GetArrayFromParameter(this.PolicyDefinition, nameof(this.PolicyDefinition)),
Metadata = this.Metadata == null ? null : this.GetObjectFromParameter(this.Metadata, nameof(this.Metadata)),
Parameters = this.Parameter == null ? null : this.GetObjectFromParameter(this.Parameter, nameof(this.Parameter)),
PolicyDefinitionGroups = this.GroupDefinition == null ? null : this.GetArrayFromParameter(this.GroupDefinition, nameof(this.GroupDefinition))
}
};

Просмотреть файл

@ -60,6 +60,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
protected const string PolicyParameterIdObjectParameterSet = "PolicyParameterIdObjectParameterSet";
protected const string PolicyParameterIdStringParameterSet = "PolicyParameterIdStringParameterSet";
/// <summary>
/// The policy type OData filter format
/// </summary>
protected const string PolicyTypeFilterFormat = "$filter=PolicyType eq '{0}'";
/// <summary>
/// Converts the resource object to specified resource type object.
/// </summary>
@ -121,19 +126,66 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
}
/// <summary>
/// Gets the JToken object from parameter
/// Gets a JObject from a parameter value
/// </summary>
protected JToken GetObjectFromParameter(string parameter)
/// <param name="parameter">The parameter value.</param>
/// <param name="parameterName">The name of the parameter.</param>
/// <returns></returns>
protected JObject GetObjectFromParameter(string parameter, string parameterName)
{
var result = this.GetTokenFromParameter(parameter) as JObject;
if (result == null)
{
throw new PSArgumentException(string.Format(ProjectResources.JsonObjectExpected, parameterName), parameterName);
}
return result;
}
/// <summary>
/// Gets a JArray from a parameter value
/// </summary>
/// <param name="parameter">The parameter value.</param>
/// <param name="parameterName">The name of the parameter.</param>
/// <returns></returns>
protected JArray GetArrayFromParameter(string parameter, string parameterName)
{
var result = this.GetTokenFromParameter(parameter) as JArray;
if (result == null)
{
throw new PSArgumentException(string.Format(ProjectResources.JsonArrayExpected, parameterName), parameterName);
}
return result;
}
/// <summary>
/// Gets the resource Id from the supplied PowerShell parameters.
/// </summary>
protected string MakePolicyAssignmentId(string scope, string resourceName)
{
return ResourceIdUtility.GetResourceId(
resourceId: scope,
extensionResourceType: Constants.MicrosoftAuthorizationPolicyAssignmentType,
extensionResourceName: resourceName);
}
/// <summary>
/// Gets the JToken from parameter
/// </summary>
/// <param name="parameter">The parameter to be parsed.</param>
private JToken GetTokenFromParameter(string parameter)
{
Uri outUri = null;
if (Uri.TryCreate(parameter, UriKind.Absolute, out outUri))
{
if(outUri.Scheme == Uri.UriSchemeFile)
if (outUri.Scheme == Uri.UriSchemeFile)
{
string filePath = this.TryResolvePath(parameter);
if(File.Exists(filePath))
if (File.Exists(filePath))
{
return JToken.FromObject(FileUtilities.DataStore.ReadFileAsText(filePath));
return JToken.Parse(FileUtilities.DataStore.ReadFileAsText(filePath));
}
else
{
@ -151,11 +203,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
else
{
string contents = GeneralUtilities.DownloadFile(outUri.AbsoluteUri);
if(string.IsNullOrEmpty(contents))
if (string.IsNullOrEmpty(contents))
{
throw new PSInvalidOperationException(string.Format(ProjectResources.InvalidUriContent, parameter));
}
return JToken.FromObject(contents);
return JToken.Parse(contents);
}
}
@ -163,19 +216,8 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
string path = this.TryResolvePath(parameter);
return File.Exists(path)
? JToken.FromObject(FileUtilities.DataStore.ReadFileAsText(path))
: JToken.FromObject(parameter);
}
/// <summary>
/// Gets the resource Id from the supplied PowerShell parameters.
/// </summary>
protected string MakePolicyAssignmentId(string scope, string resourceName)
{
return ResourceIdUtility.GetResourceId(
resourceId: scope,
extensionResourceType: Constants.MicrosoftAuthorizationPolicyAssignmentType,
extensionResourceName: resourceName);
? JToken.Parse(FileUtilities.DataStore.ReadFileAsText(path))
: JToken.Parse(parameter);
}
/// <summary>

Просмотреть файл

@ -99,8 +99,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Policy
public const string NewPolicySetDefinitionDisplayNameHelp = "The display name for the new policy set definition.";
public const string NewPolicySetDefinitionDescriptionHelp = "The description for the new policy set definition.";
public const string NewPolicySetDefinitionMetadataHelp = "The metadata for the new policy set definition. This can either be a path to a file name containing the metadata, or the metadata as a string.";
public const string NewPolicySetDefinitionPolicyDefinitionHelp = "The policy definition for the new policy set definition. This can either be a path to a file name containing the policy definitions, or the policy set definition as a string.";
public const string NewPolicySetDefinitionParametersHelp = "The parameters declaration for the new policy set definition. This can either be a path to a file name or uri containing the parameters declaration, or the parameters declaration as a string.";
public const string NewPolicySetDefinitionPolicyDefinitionHelp = "The policy definitions for the new policy set definition. This can either be a path to a file containing the policy definitions, or the policy set definition as a JSON string.";
public const string NewPolicySetDefinitionGroupDefinitionHelp = "The policy definition groups for the new policy set definition. This can either be a path to a file containing the groups, or the groups as a JSON string.";
public const string NewPolicySetDefinitionParametersHelp = "The parameters declaration for the new policy set definition. This can either be a path to a file or uri containing the parameters declaration, or the parameters declaration as a JSON string.";
public const string NewPolicySetDefinitionManagementGroupHelp = "The name of the management group of the new policy set definition.";
public const string NewPolicySetDefinitionSubscriptionIdHelp = "The subscription ID of the new policy set definition.";
public const string RemovePolicySetDefinitionNameHelp = "The policy set definition name to delete.";
@ -111,9 +112,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Policy
public const string SetPolicySetDefinitionIdHelp = "The fully qualified policy set definition ID to get, including the subscription or management group. e.g. /providers/Microsoft.Management/managementGroups/{managementGroup}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}.";
public const string SetPolicySetDefinitionDisplayNameHelp = "The display name of the updated policy set definition.";
public const string SetPolicySetDefinitionDescriptionHelp = "The description of the updated policy set definition.";
public const string SetPolicySetDefinitionPolicyDefinitionHelp = "The policy definitions of the updated policy set definition. This can either be a path to a file name containing the policy definitions, or the policy definitions as a string.";
public const string SetPolicySetDefinitionMetadataHelp = "The metadata of the updated policy set definition. This can either be a path to a file name containing the metadata, or the metadata as a string.";
public const string SetPolicySetDefinitionParameterHelp = "The parameters declaration of the updated policy set definition. This can either be a path to a file name or uri containing the parameters declaration, or the parameters declaration as a string.";
public const string SetPolicySetDefinitionPolicyDefinitionHelp = "The policy definitions of the updated policy set definition. This can either be a path to a file containing the policy definitions, or the policy definitions as a JSON string.";
public const string SetPolicySetDefinitionGroupDefinitionHelp = "The policy definition groups of the updated policy set definition. This can either be a path to a file containing the groups, or the groups as a JSON string.";
public const string SetPolicySetDefinitionMetadataHelp = "The metadata of the updated policy set definition. This can either be a path to a file containing the metadata, or the metadata as a JSON string.";
public const string SetPolicySetDefinitionParameterHelp = "The parameters declaration of the updated policy set definition. This can either be a path to a file or uri containing the parameters declaration, or the parameters declaration as a JSON string.";
public const string SetPolicySetDefinitionManagementGroupHelp = "The name of the management group of the policy set definition to update.";
public const string SetPolicySetDefinitionSubscriptionIdHelp = "The subscription ID of the policy set definition to update.";
}

Просмотреть файл

@ -161,7 +161,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
var resource = this.GetExistingResource(resourceId, apiVersion).Result.ToResource();
var metaDataJson = string.IsNullOrEmpty(this.Metadata) ? resource.Properties["metadata"]?.ToString() : GetObjectFromParameter(this.Metadata).ToString();
var metaDataJson = string.IsNullOrEmpty(this.Metadata) ? resource.Properties["metadata"]?.ToString() : this.GetObjectFromParameter(this.Metadata, nameof(this.Metadata)).ToString();
PolicyAssignmentEnforcementMode? existingMode = null;
if (Enum.TryParse(resource.Properties["enforcementMode"]?.ToString(), true, out PolicyAssignmentEnforcementMode tempMode))

Просмотреть файл

@ -141,9 +141,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
var resource = this.GetExistingResource(resourceId, apiVersion).Result.ToResource();
var policyRuleJson = string.IsNullOrEmpty(this.Policy) ? resource.Properties["policyRule"]?.ToString() : GetObjectFromParameter(this.Policy).ToString();
var metaDataJson = string.IsNullOrEmpty(this.Metadata) ? resource.Properties["metadata"]?.ToString() : GetObjectFromParameter(this.Metadata).ToString();
var parameterJson = string.IsNullOrEmpty(this.Parameter) ? resource.Properties["parameters"]?.ToString() : GetObjectFromParameter(this.Parameter).ToString();
var policyRuleJson = string.IsNullOrEmpty(this.Policy) ? resource.Properties["policyRule"]?.ToString() : this.GetObjectFromParameter(this.Policy, nameof(this.Policy)).ToString();
var metaDataJson = string.IsNullOrEmpty(this.Metadata) ? resource.Properties["metadata"]?.ToString() : this.GetObjectFromParameter(this.Metadata, nameof(this.Metadata)).ToString();
var parameterJson = string.IsNullOrEmpty(this.Parameter) ? resource.Properties["parameters"]?.ToString() : this.GetObjectFromParameter(this.Parameter, nameof(this.Parameter)).ToString();
var policyDefinitionObject = new PolicyDefinition
{

Просмотреть файл

@ -97,6 +97,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
[ValidateNotNullOrEmpty]
public Guid? SubscriptionId { get; set; }
/// <summary>
/// Gets or sets the policy definition groups parameter of the new policy set definition
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = PolicyHelpStrings.SetPolicySetDefinitionGroupDefinitionHelp)]
[ValidateNotNullOrEmpty]
public string GroupDefinition { get; set; }
/// <summary>
/// Executes the cmdlet.
/// </summary>
@ -138,8 +145,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
var resource = this.GetExistingResource(resourceId, apiVersion).Result.ToResource();
var metaDataJson = string.IsNullOrEmpty(this.Metadata) ? resource.Properties["metadata"]?.ToString() : GetObjectFromParameter(this.Metadata).ToString();
var parameterJson = string.IsNullOrEmpty(this.Parameter) ? resource.Properties["parameters"]?.ToString() : GetObjectFromParameter(this.Parameter).ToString();
var metaDataJson = string.IsNullOrEmpty(this.Metadata) ? resource.Properties["metadata"]?.ToString() : this.GetObjectFromParameter(this.Metadata, nameof(this.Metadata)).ToString();
var parameterJson = string.IsNullOrEmpty(this.Parameter) ? resource.Properties["parameters"]?.ToString() : this.GetObjectFromParameter(this.Parameter, nameof(this.Parameter)).ToString();
var groupsJson = string.IsNullOrEmpty(this.GroupDefinition) ? resource.Properties["policyDefinitionGroups"]?.ToString() : this.GetArrayFromParameter(this.GroupDefinition, nameof(this.GroupDefinition)).ToString();
var policySetDefinitionObject = new PolicySetDefinition
{
@ -148,27 +156,16 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
Description = this.Description ?? resource.Properties["description"]?.ToString(),
DisplayName = this.DisplayName ?? resource.Properties["displayName"]?.ToString(),
PolicyDefinitions = string.IsNullOrEmpty(this.PolicyDefinition) ? JArray.Parse(resource.Properties["policyDefinitions"].ToString()) : GetPolicyDefinitionsObject(),
PolicyDefinitions = string.IsNullOrEmpty(this.PolicyDefinition) ? resource.Properties["policyDefinitions"] as JArray : this.GetArrayFromParameter(this.PolicyDefinition, nameof(this.PolicyDefinition)),
Metadata = string.IsNullOrEmpty(metaDataJson) ? null : JObject.Parse(metaDataJson),
Parameters = string.IsNullOrEmpty(parameterJson) ? null : JObject.Parse(parameterJson)
Parameters = string.IsNullOrEmpty(parameterJson) ? null : JObject.Parse(parameterJson),
PolicyDefinitionGroups = string.IsNullOrEmpty(groupsJson) ? null : JArray.Parse(groupsJson)
}
};
return policySetDefinitionObject.ToJToken();
}
/// <summary>
/// Gets the policy definitions object
/// </summary>
private JArray GetPolicyDefinitionsObject()
{
string policyFilePath = this.TryResolvePath(this.PolicyDefinition);
return File.Exists(policyFilePath)
? JArray.Parse(FileUtilities.DataStore.ReadFileAsText(policyFilePath))
: JArray.Parse(this.PolicyDefinition);
}
/// <summary>
/// Gets the resource Id from the supplied PowerShell parameters.
/// </summary>

Просмотреть файл

@ -447,6 +447,24 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to The provided value for parameter &apos;{0}&apos; is not a valid JSON array.
/// </summary>
internal static string JsonArrayExpected {
get {
return ResourceManager.GetString("JsonArrayExpected", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The provided value for parameter &apos;{0}&apos; is not a valid JSON object.
/// </summary>
internal static string JsonObjectExpected {
get {
return ResourceManager.GetString("JsonObjectExpected", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Moving resource(s) ....
/// </summary>
@ -574,7 +592,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties {
}
/// <summary>
/// Looks up a localized string similar to cannot find any subscriptions under the current directory.
/// Looks up a localized string similar to No subscriptions can be found under current directory. Please login again using Connect-AzAccount..
/// </summary>
internal static string NoSubscriptionsUnderCurrentDirectory {
get {

Просмотреть файл

@ -423,6 +423,12 @@
<data name="InvalidFilePath" xml:space="preserve">
<value>The provided file {0} doesn't exist</value>
</data>
<data name="JsonObjectExpected" xml:space="preserve">
<value>The provided value for parameter '{0}' is not a valid JSON object</value>
</data>
<data name="JsonArrayExpected" xml:space="preserve">
<value>The provided value for parameter '{0}' is not a valid JSON array</value>
</data>
<data name="NoSubscriptionsUnderCurrentDirectory" xml:space="preserve">
<value>No subscriptions can be found under current directory. Please login again using Connect-AzAccount.</value>
</data>

Просмотреть файл

@ -0,0 +1,13 @@
{
"if": {
"field": "Microsoft.DataCatalog.Data/catalog/entity/type",
"equals": "foo"
},
"then": {
"effect": "ModifyClassifications",
"details": {
"classificationsToAdd": [ "invalid" ],
"classificationsToRemove": [ "valid" ]
}
}
}

Просмотреть файл

@ -1,9 +0,0 @@
{
"if": {
"field": "Microsoft.KeyVault.Data/vaults/certificates/keyProperties/keyType",
"equals": "RSA"
},
"then": {
"effect": "audit"
}
}

Просмотреть файл

@ -101,6 +101,13 @@ namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
TestRunner.RunTestScript("Test-PolicySetDefinitionCRUD");
}
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestPolicySetDefinitionCRUDWithGroups()
{
TestRunner.RunTestScript("Test-PolicySetDefinitionCRUDWithGroups");
}
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestPolicySetDefinitionCRUDAtManagementGroup()

Просмотреть файл

@ -12,7 +12,7 @@
# limitations under the License.
# ----------------------------------------------------------------------------------
$managementGroup = 'AzGovTest7'
$managementGroup = 'AzGovPerfTest'
$description = 'Unit test junk: sorry for littering. Please delete me!'
$updatedDescription = "Updated $description"
$metadataName = 'testName'
@ -222,34 +222,34 @@ function Test-PolicyDefinitionMode
# test policy with data plane mode
# make a policy definition with data plane mode, get it back and validate
$expected = New-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName -Policy "$TestOutputRoot\SampleKeyVaultDataPolicyDefinition.json" -Mode 'Microsoft.KeyVault.Data' -Description $description
$expected = New-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName -Policy "$TestOutputRoot\SampleDataCatalogDataPolicyDefinition.json" -Mode 'Microsoft.DataCatalog.Data' -Description $description
$actual = Get-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName
Assert-NotNull $actual
Assert-AreEqual $expected.Name $actual.Name
Assert-AreEqual $expected.PolicyDefinitionId $actual.PolicyDefinitionId
Assert-NotNull($actual.Properties.PolicyRule)
Assert-AreEqual 'Microsoft.KeyVault.Data' $actual.Properties.Mode
Assert-AreEqual 'Microsoft.KeyVault.Data' $expected.Properties.Mode
Assert-AreEqual 'Microsoft.DataCatalog.Data' $actual.Properties.Mode
Assert-AreEqual 'Microsoft.DataCatalog.Data' $expected.Properties.Mode
# update the same policy definition without touching mode, get it back and validate
$actual = Set-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName -DisplayName testDisplay -Description $updatedDescription -Policy "$TestOutputRoot\SampleKeyVaultDataPolicyDefinition.json" -Metadata $metadata
$actual = Set-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName -DisplayName testDisplay -Description $updatedDescription -Policy "$TestOutputRoot\SampleDataCatalogDataPolicyDefinition.json" -Metadata $metadata
$expected = Get-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName
Assert-AreEqual $expected.Properties.DisplayName $actual.Properties.DisplayName
Assert-AreEqual $expected.Properties.Description $actual.Properties.Description
Assert-NotNull($actual.Properties.Metadata)
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
Assert-AreEqual 'Microsoft.KeyVault.Data' $actual.Properties.Mode
Assert-AreEqual 'Microsoft.KeyVault.Data' $expected.Properties.Mode
Assert-AreEqual 'Microsoft.DataCatalog.Data' $actual.Properties.Mode
Assert-AreEqual 'Microsoft.DataCatalog.Data' $expected.Properties.Mode
# update the same policy definition explicitly providing the same mode, get it back and validate
$actual = Set-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName -DisplayName testDisplay -Mode 'Microsoft.KeyVault.Data' -Description $updatedDescription -Policy "$TestOutputRoot\SampleKeyVaultDataPolicyDefinition.json" -Metadata $metadata
$actual = Set-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName -DisplayName testDisplay -Mode 'Microsoft.DataCatalog.Data' -Description $updatedDescription -Policy "$TestOutputRoot\SampleDataCatalogDataPolicyDefinition.json" -Metadata $metadata
$expected = Get-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName
Assert-AreEqual $expected.Properties.DisplayName $actual.Properties.DisplayName
Assert-AreEqual $expected.Properties.Description $actual.Properties.Description
Assert-NotNull($actual.Properties.Metadata)
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
Assert-AreEqual 'Microsoft.KeyVault.Data' $actual.Properties.Mode
Assert-AreEqual 'Microsoft.KeyVault.Data' $expected.Properties.Mode
Assert-AreEqual 'Microsoft.DataCatalog.Data' $actual.Properties.Mode
Assert-AreEqual 'Microsoft.DataCatalog.Data' $expected.Properties.Mode
# clean up
$remove = Remove-AzPolicyDefinition -SubscriptionId $subscriptionId -Name $policyName -Force
@ -507,6 +507,7 @@ function Test-PolicySetDefinitionCRUD
Assert-AreEqual $expected.PolicySetDefinitionId $actual.PolicySetDefinitionId
Assert-NotNull($actual.Properties.PolicyDefinitions)
Assert-NotNull($actual.Properties.Metadata)
Assert-Null($actual.Properties.PolicyDefinitionGroups)
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
# update the policy set definition, get it back and validate
@ -515,6 +516,7 @@ function Test-PolicySetDefinitionCRUD
Assert-AreEqual $expected.Properties.DisplayName $actual.Properties.DisplayName
Assert-AreEqual $expected.Properties.Description $actual.Properties.Description
Assert-NotNull($actual.Properties.Metadata)
Assert-Null($actual.Properties.PolicyDefinitionGroups)
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
# get it from full listing and validate
@ -525,6 +527,7 @@ function Test-PolicySetDefinitionCRUD
Assert-AreEqual $expected.Properties.DisplayName $actual.Properties.DisplayName
Assert-AreEqual $expected.Properties.Description $actual.Properties.Description
Assert-NotNull($actual.Properties.Metadata)
Assert-Null($actual.Properties.PolicyDefinitionGroups)
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
# ensure that only custom set definitions are returned using the custom flag
@ -541,6 +544,61 @@ function Test-PolicySetDefinitionCRUD
Assert-AreEqual True $remove
}
<#
.SYNOPSIS
Tests Policy set definition CRUD operations on a policy set containing groups
#>
function Test-PolicySetDefinitionCRUDWithGroups
{
# setup
$policySetDefName = Get-ResourceName
$policyDefName = Get-ResourceName
# make a policy definition and policy set definition that references it, get the policy set definition back and validate
$policyDefinition = New-AzPolicyDefinition -Name $policyDefName -Policy "$TestOutputRoot\SamplePolicyDefinition.json" -Description $description
$policySet = "[{""policyDefinitionId"":""" + $policyDefinition.PolicyDefinitionId + """, 'groupNames': [ 'group2' ] }]"
$expected = New-AzPolicySetDefinition -Name $policySetDefName -PolicyDefinition $policySet -Description $description -Metadata $metadata -GroupDefinition "[{ 'name': 'group1' }, { 'name': 'group2' }]"
$actual = Get-AzPolicySetDefinition -Name $policySetDefName
Assert-AreEqual $expected.Name $actual.Name
Assert-AreEqual $expected.PolicySetDefinitionId $actual.PolicySetDefinitionId
Assert-NotNull($actual.Properties.PolicyDefinitions)
Assert-AreEqual "group2" $actual.Properties.PolicyDefinitions.GroupNames
Assert-NotNull($actual.Properties.Metadata)
Assert-AreEqual 2 @($expected.Properties.PolicyDefinitionGroups).Count
Assert-AreEqual 2 @($actual.Properties.PolicyDefinitionGroups).Count
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
# update the policy set definition, get it back and validate
$expected = Set-AzPolicySetDefinition -Name $policySetDefName -DisplayName testDisplay -Description $updatedDescription -GroupDefinition "[{ 'name': 'group2' }]"
$actual = Get-AzPolicySetDefinition -Name $policySetDefName
Assert-AreEqual $expected.Properties.DisplayName $actual.Properties.DisplayName
Assert-AreEqual $expected.Properties.Description $actual.Properties.Description
Assert-NotNull($actual.Properties.Metadata)
Assert-AreEqual "group2" $actual.Properties.PolicyDefinitions.GroupNames
Assert-AreEqual 1 @($expected.Properties.PolicyDefinitionGroups).Count
Assert-AreEqual 1 @($actual.Properties.PolicyDefinitionGroups).Count
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
# get it from full listing and validate
$actual = Get-AzPolicySetDefinition | ?{ $_.Name -eq $policySetDefName }
Assert-AreEqual $expected.Name $actual.Name
Assert-AreEqual $expected.PolicySetDefinitionId $actual.PolicySetDefinitionId
Assert-NotNull($actual.Properties.PolicyDefinitions)
Assert-AreEqual $expected.Properties.DisplayName $actual.Properties.DisplayName
Assert-AreEqual $expected.Properties.Description $actual.Properties.Description
Assert-NotNull($actual.Properties.Metadata)
Assert-AreEqual "group2" $actual.Properties.PolicyDefinitions.GroupNames
Assert-AreEqual 1 @($actual.Properties.PolicyDefinitionGroups).Count
Assert-AreEqual $metadataValue $actual.Properties.Metadata.$metadataName
# clean up
$remove = Remove-AzPolicySetDefinition -Name $policySetDefName -Force
Assert-AreEqual True $remove
$remove = Remove-AzPolicyDefinition -Name $policyDefName -Force
Assert-AreEqual True $remove
}
<#
.SYNOPSIS
Tests Policy definition creation with parameters
@ -946,24 +1004,18 @@ function Test-GetCmdletFilterParameter
$custom = Get-AzureRmPolicyDefinition -Custom
$custom | %{ Assert-AreEqual $_.Properties.PolicyType "Custom" }
$all = Get-AzureRmPolicyDefinition
Assert-AreEqual ($builtins.Count + $custom.Count) $all.Count
# policy set definitions
$builtins = Get-AzureRmPolicySetDefinition -Builtin
$builtins | %{ Assert-AreEqual $_.Properties.PolicyType "Builtin" }
$custom = Get-AzureRmPolicySetDefinition -Custom
$custom | %{ Assert-AreEqual $_.Properties.PolicyType "Custom" }
$all = Get-AzureRmPolicySetDefinition
Assert-AreEqual ($builtins.Count + $custom.Count) $all.Count
}
function Test-GetBuiltinsByName
{
# policy definitions
$builtins = Get-AzureRmPolicyDefinition -Builtin
$builtins = Get-AzureRmPolicyDefinition -Builtin | Select-Object -First 50
foreach ($builtin in $builtins)
{
$definition = Get-AzureRmPolicyDefinition -Name $builtin.Name
@ -971,7 +1023,7 @@ function Test-GetBuiltinsByName
}
# policy set definitions
$builtins = Get-AzureRmPolicySetDefinition -Builtin
$builtins = Get-AzureRmPolicySetDefinition -Builtin | Select-Object -First 50
foreach ($builtin in $builtins)
{
$setDefinition = Get-AzureRmPolicySetDefinition -Name $builtin.Name

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,14 +1,14 @@
{
"Entries": [
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/someName?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/someName?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"someName\",\r\n \"properties\": {\r\n \"policyRule\": {\r\n \"someThing\": \"someOtherThing\"\r\n },\r\n \"mode\": \"All\"\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -31,16 +31,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:36453c49-ff40-4911-a2b9-a6214c58f9a7"
"westus:7d824cf9-c6c4-4a63-8a14-e9ae8e323448"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1198"
],
"x-ms-correlation-request-id": [
"34b4bf7c-2711-4ccb-9f64-2d64423c7612"
"ad775807-a66a-4b1b-9273-757516d6724d"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T011104Z:34b4bf7c-2711-4ccb-9f64-2d64423c7612"
"WESTUS:20191202T224033Z:ad775807-a66a-4b1b-9273-757516d6724d"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -49,7 +49,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:11:04 GMT"
"Mon, 02 Dec 2019 22:40:33 GMT"
],
"Content-Length": [
"166"
@ -68,14 +68,14 @@
"StatusCode": 400
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/someName?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/someName?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"someName\",\r\n \"properties\": {\r\n \"policyRule\": {\r\n \"someThing\": \"someOtherThing\"\r\n },\r\n \"mode\": \"All\"\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"SubscriptionIdParameterSet"
@ -98,16 +98,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:8366bc47-7213-4023-9baa-cf8780c193ee"
"westus:4e55d41f-724a-4d68-a074-9b956cd6163f"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1198"
],
"x-ms-correlation-request-id": [
"1795bd1f-5094-4edc-804b-63f35a2b3e35"
"6d484c2c-d72e-48a1-af80-94094e87eb11"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T011105Z:1795bd1f-5094-4edc-804b-63f35a2b3e35"
"WESTUS:20191202T224033Z:6d484c2c-d72e-48a1-af80-94094e87eb11"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -116,7 +116,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:11:05 GMT"
"Mon, 02 Dec 2019 22:40:33 GMT"
],
"Content-Length": [
"166"
@ -135,14 +135,14 @@
"StatusCode": 400
},
{
"RequestUri": "/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policydefinitions/someName?api-version=2019-06-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFuYWdlbWVudC9tYW5hZ2VtZW50Z3JvdXBzL3NvbWVNYW5hZ2VtZW50R3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3BvbGljeWRlZmluaXRpb25zL3NvbWVOYW1lP2FwaS12ZXJzaW9uPTIwMTktMDYtMDE=",
"RequestUri": "/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policydefinitions/someName?api-version=2019-09-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFuYWdlbWVudC9tYW5hZ2VtZW50Z3JvdXBzL3NvbWVNYW5hZ2VtZW50R3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3BvbGljeWRlZmluaXRpb25zL3NvbWVOYW1lP2FwaS12ZXJzaW9uPTIwMTktMDktMDE=",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"someName\",\r\n \"properties\": {\r\n \"policyRule\": {\r\n \"someThing\": \"someOtherThing\"\r\n },\r\n \"mode\": \"All\"\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"ManagementGroupNameParameterSet"
@ -168,13 +168,13 @@
"gateway"
],
"x-ms-request-id": [
"5af0387e-076d-47ec-a063-f3d80dc53f8a"
"b5555198-85bb-4091-a0bd-7130bd7debef"
],
"x-ms-correlation-request-id": [
"5af0387e-076d-47ec-a063-f3d80dc53f8a"
"b5555198-85bb-4091-a0bd-7130bd7debef"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T011104Z:5af0387e-076d-47ec-a063-f3d80dc53f8a"
"WESTUS:20191202T224033Z:b5555198-85bb-4091-a0bd-7130bd7debef"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -183,7 +183,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:11:04 GMT"
"Mon, 02 Dec 2019 22:40:32 GMT"
],
"Connection": [
"close"
@ -201,12 +201,12 @@
"0"
]
},
"ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AuthorizationFailed\",\r\n \"message\": \"The client '4358bf84-f563-48b9-aea0-8107d5294bf6' with object id '4358bf84-f563-48b9-aea0-8107d5294bf6' does not have authorization to perform action 'Microsoft.Authorization/policydefinitions/write' over scope '/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policydefinitions/someName' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\r\n }\r\n}",
"ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AuthorizationFailed\",\r\n \"message\": \"The client '7140c269-e408-47a5-a626-a1d836b96883' with object id '7140c269-e408-47a5-a626-a1d836b96883' does not have authorization to perform action 'Microsoft.Authorization/policydefinitions/write' over scope '/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policydefinitions/someName' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\r\n }\r\n}",
"StatusCode": 403
}
],
"Names": {},
"Variables": {
"SubscriptionId": "0b40be06-04e8-4f70-abde-a502b2646fe8"
"SubscriptionId": "f67cc918-f64f-4c3f-aa24-a855465f9d41"
}
}

Просмотреть файл

@ -1,14 +1,14 @@
{
"Entries": [
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/someName?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/someName?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"someName\",\r\n \"properties\": {\r\n \"policyDefinitions\": [\r\n {\r\n \"someThing\": \"someOtherThing\"\r\n }\r\n ]\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -31,16 +31,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:51f51bdc-16a9-481b-b31e-aa2437348863"
"westus:97add2cf-b14f-4f3b-9053-24e3a5590558"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
],
"x-ms-correlation-request-id": [
"eaf5cf8c-6d7a-435e-90cc-92d718b8a83d"
"0c088f66-8f82-4384-8231-bfb27375f5ff"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T011413Z:eaf5cf8c-6d7a-435e-90cc-92d718b8a83d"
"WESTUS:20191202T224403Z:0c088f66-8f82-4384-8231-bfb27375f5ff"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -49,7 +49,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:14:13 GMT"
"Mon, 02 Dec 2019 22:44:03 GMT"
],
"Content-Length": [
"272"
@ -68,14 +68,14 @@
"StatusCode": 400
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/someName?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/someName?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9zb21lTmFtZT9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"someName\",\r\n \"properties\": {\r\n \"policyDefinitions\": [\r\n {\r\n \"someThing\": \"someOtherThing\"\r\n }\r\n ]\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"SubscriptionIdParameterSet"
@ -98,16 +98,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:8a0db915-a505-4a65-95bf-c31cf2c7c067"
"westus:56e6e414-8e4d-4b21-959d-1e41fb792044"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
"1198"
],
"x-ms-correlation-request-id": [
"41e33fb5-d166-4cc4-abca-301d4093e2d5"
"d2b287e5-0784-4803-b340-3d836d10d3e5"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T011414Z:41e33fb5-d166-4cc4-abca-301d4093e2d5"
"WESTUS:20191202T224404Z:d2b287e5-0784-4803-b340-3d836d10d3e5"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -116,7 +116,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:14:14 GMT"
"Mon, 02 Dec 2019 22:44:04 GMT"
],
"Content-Length": [
"272"
@ -135,14 +135,14 @@
"StatusCode": 400
},
{
"RequestUri": "/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policysetdefinitions/someName?api-version=2019-06-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFuYWdlbWVudC9tYW5hZ2VtZW50Z3JvdXBzL3NvbWVNYW5hZ2VtZW50R3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3BvbGljeXNldGRlZmluaXRpb25zL3NvbWVOYW1lP2FwaS12ZXJzaW9uPTIwMTktMDYtMDE=",
"RequestUri": "/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policysetdefinitions/someName?api-version=2019-09-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFuYWdlbWVudC9tYW5hZ2VtZW50Z3JvdXBzL3NvbWVNYW5hZ2VtZW50R3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3BvbGljeXNldGRlZmluaXRpb25zL3NvbWVOYW1lP2FwaS12ZXJzaW9uPTIwMTktMDktMDE=",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"someName\",\r\n \"properties\": {\r\n \"policyDefinitions\": [\r\n {\r\n \"someThing\": \"someOtherThing\"\r\n }\r\n ]\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"ManagementGroupNameParameterSet"
@ -168,13 +168,13 @@
"gateway"
],
"x-ms-request-id": [
"05f33352-d661-40f5-8a44-a2c4f242598c"
"0bde777c-6bb2-43ad-92ff-2912def8a258"
],
"x-ms-correlation-request-id": [
"05f33352-d661-40f5-8a44-a2c4f242598c"
"0bde777c-6bb2-43ad-92ff-2912def8a258"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T011413Z:05f33352-d661-40f5-8a44-a2c4f242598c"
"WESTUS:20191202T224404Z:0bde777c-6bb2-43ad-92ff-2912def8a258"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -183,7 +183,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:14:13 GMT"
"Mon, 02 Dec 2019 22:44:03 GMT"
],
"Connection": [
"close"
@ -201,12 +201,12 @@
"0"
]
},
"ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AuthorizationFailed\",\r\n \"message\": \"The client '4358bf84-f563-48b9-aea0-8107d5294bf6' with object id '4358bf84-f563-48b9-aea0-8107d5294bf6' does not have authorization to perform action 'Microsoft.Authorization/policysetdefinitions/write' over scope '/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policysetdefinitions/someName' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\r\n }\r\n}",
"ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AuthorizationFailed\",\r\n \"message\": \"The client '7140c269-e408-47a5-a626-a1d836b96883' with object id '7140c269-e408-47a5-a626-a1d836b96883' does not have authorization to perform action 'Microsoft.Authorization/policysetdefinitions/write' over scope '/providers/Microsoft.Management/managementgroups/someManagementGroup/providers/Microsoft.Authorization/policysetdefinitions/someName' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\r\n }\r\n}",
"StatusCode": 403
}
],
"Names": {},
"Variables": {
"SubscriptionId": "0b40be06-04e8-4f70-abde-a502b2646fe8"
"SubscriptionId": "f67cc918-f64f-4c3f-aa24-a855465f9d41"
}
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,14 +1,14 @@
{
"Entries": [
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"testPDWP\",\r\n \"properties\": {\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Deny\",\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n }\r\n }\r\n },\r\n \"mode\": \"All\"\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -31,16 +31,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:62559090-459b-45f8-980d-b0e619c897b5"
"westus:01f64a74-6a25-456c-b0f4-773896361c45"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
],
"x-ms-correlation-request-id": [
"9673ffb6-61f7-4836-91a6-dbc92a639ba3"
"7b180aa4-281d-4d5e-9806-c21a4bba697a"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T010935Z:9673ffb6-61f7-4836-91a6-dbc92a639ba3"
"WESTUS:20191202T223829Z:7b180aa4-281d-4d5e-9806-c21a4bba697a"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -49,7 +49,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:09:34 GMT"
"Mon, 02 Dec 2019 22:38:29 GMT"
],
"Content-Length": [
"960"
@ -64,18 +64,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:09:34.7155585Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T22:38:29.8046051Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"StatusCode": 201
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"testPDWP\",\r\n \"properties\": {\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"deny\"\r\n }\r\n },\r\n \"mode\": \"All\"\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -98,16 +98,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:c6f04953-8103-4dcc-a381-daa580454771"
"westus:df93c3fe-69f7-47ae-b8f1-fe6820a4ed99"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
],
"x-ms-correlation-request-id": [
"1dee9283-c28d-41cc-b7a7-e9a2e03c6e96"
"efe28a71-2703-42e6-87ef-c792b3822ece"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T010936Z:1dee9283-c28d-41cc-b7a7-e9a2e03c6e96"
"WESTUS:20191202T223831Z:efe28a71-2703-42e6-87ef-c792b3822ece"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -116,7 +116,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:09:35 GMT"
"Mon, 02 Dec 2019 22:38:30 GMT"
],
"Content-Length": [
"840"
@ -131,18 +131,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:09:35.9761565Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"defaultValue\": \"deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T22:38:30.7599555Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"defaultValue\": \"deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"StatusCode": 201
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -162,16 +162,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:4e670175-6f18-4b24-88b1-180d62c6ec86"
"westus:51036059-885b-42be-ba41-3fe0674e8d8d"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"11997"
"11995"
],
"x-ms-correlation-request-id": [
"260518e7-bfbf-4acb-946e-2b1cc2068a67"
"54796188-998a-49d5-8991-b9426379c01a"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T010935Z:260518e7-bfbf-4acb-946e-2b1cc2068a67"
"WESTUS:20191202T223830Z:54796188-998a-49d5-8991-b9426379c01a"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -180,7 +180,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:09:34 GMT"
"Mon, 02 Dec 2019 22:38:29 GMT"
],
"Content-Length": [
"960"
@ -195,18 +195,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:09:34.7155585Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T22:38:29.8046051Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -226,16 +226,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:84b955c3-d7dc-4ddd-a82f-256c45ff9f1a"
"westus:a3c30fa0-2147-4464-85ff-0e208f4a4ed8"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"11997"
"11994"
],
"x-ms-correlation-request-id": [
"9f909443-df4a-4a78-b886-f13a73b8c46e"
"e2c8c661-fde9-4980-91fc-e9237f429d4c"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T010936Z:9f909443-df4a-4a78-b886-f13a73b8c46e"
"WESTUS:20191202T223831Z:e2c8c661-fde9-4980-91fc-e9237f429d4c"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -244,7 +244,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:09:35 GMT"
"Mon, 02 Dec 2019 22:38:30 GMT"
],
"Content-Length": [
"840"
@ -259,18 +259,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:09:35.9761565Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"defaultValue\": \"deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T22:38:30.7599555Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"defaultValue\": \"deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "DELETE",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -290,16 +290,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:f7af1a54-944a-498c-af4f-3dda20822ad2"
"westus:de2412a2-5334-40a0-82a6-062fc2dab364"
],
"x-ms-ratelimit-remaining-subscription-deletes": [
"14998"
],
"x-ms-correlation-request-id": [
"1eb7bf42-c87f-47dd-8307-d351e164497b"
"646c4857-201d-4c78-aedd-d7989f9710a4"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T010935Z:1eb7bf42-c87f-47dd-8307-d351e164497b"
"WESTUS:20191202T223830Z:646c4857-201d-4c78-aedd-d7989f9710a4"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -308,7 +308,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:09:34 GMT"
"Mon, 02 Dec 2019 22:38:30 GMT"
],
"Content-Length": [
"960"
@ -323,18 +323,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:09:34.7155585Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T22:38:29.8046051Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA2LTAx",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/testPDWP?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy90ZXN0UERXUD9hcGktdmVyc2lvbj0yMDE5LTA5LTAx",
"RequestMethod": "DELETE",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -354,16 +354,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:baf39ee0-d589-4493-b73d-67fdaca00862"
"westus:4a670da4-19fe-4fa2-99b9-12d04ad0ecd0"
],
"x-ms-ratelimit-remaining-subscription-deletes": [
"14999"
],
"x-ms-correlation-request-id": [
"fdf7b33d-a41c-4a70-9739-37286a29a414"
"ae3a1aea-4cdf-4072-a8a1-7b5a704eef03"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T010936Z:fdf7b33d-a41c-4a70-9739-37286a29a414"
"WESTUS:20191202T223831Z:ae3a1aea-4cdf-4072-a8a1-7b5a704eef03"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -372,7 +372,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:09:36 GMT"
"Mon, 02 Dec 2019 22:38:30 GMT"
],
"Content-Length": [
"840"
@ -387,12 +387,12 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:09:35.9761565Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"defaultValue\": \"deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T22:38:30.7599555Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"defaultValue\": \"deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/testPDWP\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"testPDWP\"\r\n}",
"StatusCode": 200
}
],
"Names": {},
"Variables": {
"SubscriptionId": "0b40be06-04e8-4f70-abde-a502b2646fe8"
"SubscriptionId": "f67cc918-f64f-4c3f-aa24-a855465f9d41"
}
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,14 +1,14 @@
{
"Entries": [
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/ps4900?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9wczQ5MDA/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/ps3784?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9wczM3ODQ/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"ps4900\",\r\n \"properties\": {\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Deny\",\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n }\r\n }\r\n },\r\n \"mode\": \"All\"\r\n }\r\n}",
"RequestBody": "{\r\n \"name\": \"ps3784\",\r\n \"properties\": {\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Deny\",\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n }\r\n }\r\n },\r\n \"mode\": \"All\"\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -31,16 +31,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:569d5901-1a48-4a7a-8f8a-734e9abdef18"
"westus:c4829b32-cd28-4507-99b8-9c64d932ecfc"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
],
"x-ms-correlation-request-id": [
"de6b8008-7cb4-4acf-8911-24ef24b5f19e"
"cccc0858-39ea-46a4-93c7-4692ffde0753"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014057Z:de6b8008-7cb4-4acf-8911-24ef24b5f19e"
"WESTUS:20191202T231113Z:cccc0858-39ea-46a4-93c7-4692ffde0753"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -49,7 +49,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:40:56 GMT"
"Mon, 02 Dec 2019 23:11:13 GMT"
],
"Content-Length": [
"956"
@ -64,18 +64,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:57.6095845Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"ps4900\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:13.2503615Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"ps3784\"\r\n}",
"StatusCode": 201
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/ps3356?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczMzNTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/ps5321?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczUzMjE/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"ps3356\",\r\n \"properties\": {\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\"\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ],\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n }\r\n }\r\n}",
"RequestBody": "{\r\n \"name\": \"ps5321\",\r\n \"properties\": {\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\"\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ],\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n }\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -98,16 +98,16 @@
"no-cache"
],
"x-ms-request-id": [
"westus:8b7180a4-b0f6-4391-a181-196285926c06"
"westus:85e0f492-97cf-4fee-b7ed-1830b9af0759"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1198"
"1199"
],
"x-ms-correlation-request-id": [
"6cb24697-0ca0-4b59-a9f5-a79201fbf179"
"c363c917-d406-4f7a-9096-2b18fb5269b8"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014059Z:6cb24697-0ca0-4b59-a9f5-a79201fbf179"
"WESTUS:20191202T231117Z:c363c917-d406-4f7a-9096-2b18fb5269b8"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -116,10 +116,10 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:40:58 GMT"
"Mon, 02 Dec 2019 23:11:17 GMT"
],
"Content-Length": [
"956"
"957"
],
"Content-Type": [
"application/json; charset=utf-8"
@ -131,18 +131,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:59.1075157Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"5939657802016134673\",\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policySetDefinitions/ps3356\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps3356\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:17.7175985Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"14338864422268835039\",\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policySetDefinitions/ps5321\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps5321\"\r\n}",
"StatusCode": 201
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/ps3356?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczMzNTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/ps5321?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczUzMjE/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"name\": \"ps3356\",\r\n \"properties\": {\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\"\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ],\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n }\r\n }\r\n}",
"RequestBody": "{\r\n \"name\": \"ps5321\",\r\n \"properties\": {\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\"\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ],\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n }\r\n }\r\n}",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -168,16 +168,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:49fa6918-627f-4bc9-9858-52e3d31afd3e"
"westus:9276b74f-0804-4e6e-9754-6f273691617a"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1198"
"1199"
],
"x-ms-correlation-request-id": [
"3175afb6-8938-44f8-8880-038b6c26057d"
"cb564a0d-a57a-4f4f-83d7-c9d626b67e7c"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014100Z:3175afb6-8938-44f8-8880-038b6c26057d"
"WESTUS:20191202T231119Z:cb564a0d-a57a-4f4f-83d7-c9d626b67e7c"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -186,10 +186,10 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:40:59 GMT"
"Mon, 02 Dec 2019 23:11:18 GMT"
],
"Content-Length": [
"1040"
"1041"
],
"Content-Type": [
"application/json; charset=utf-8"
@ -201,18 +201,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\",\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:59.1075157Z\",\r\n \"updatedBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"updatedOn\": \"2019-10-31T01:41:00.0805415Z\"\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"5939657802016134673\",\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policySetDefinitions/ps3356\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps3356\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\",\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:17.7175985Z\",\r\n \"updatedBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"updatedOn\": \"2019-12-02T23:11:18.8203822Z\"\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"14338864422268835039\",\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policySetDefinitions/ps5321\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps5321\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/ps3356?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczMzNTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/ps5321?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczUzMjE/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -232,16 +232,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:c47f2e68-5df2-46f3-b989-911fea4aeaf8"
"westus:102c0315-b588-4e46-8a76-039484a45d48"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"11995"
"11986"
],
"x-ms-correlation-request-id": [
"05c8c85b-6c2a-4305-afe7-e2d2dddffbd7"
"1fe128d2-a659-4cc9-a9af-da5b1b239fb1"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014059Z:05c8c85b-6c2a-4305-afe7-e2d2dddffbd7"
"WESTUS:20191202T231118Z:1fe128d2-a659-4cc9-a9af-da5b1b239fb1"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -250,10 +250,10 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:40:58 GMT"
"Mon, 02 Dec 2019 23:11:17 GMT"
],
"Content-Length": [
"956"
"957"
],
"Content-Type": [
"application/json; charset=utf-8"
@ -265,18 +265,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:59.1075157Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"5939657802016134673\",\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policySetDefinitions/ps3356\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps3356\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:17.7175985Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"14338864422268835039\",\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policySetDefinitions/ps5321\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps5321\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/ps3356?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczMzNTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/ps5321?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczUzMjE/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -296,16 +296,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:4013e853-8241-42a3-80ee-d73f62f80c19"
"westus:1deea1ad-56c9-44a0-89b1-4f06808bdcb9"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"11990"
"11994"
],
"x-ms-correlation-request-id": [
"03450e90-40f7-410b-ba15-4197349fcc5d"
"1fee9be6-cb0d-4a5a-9945-2c5d144f97ff"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014059Z:03450e90-40f7-410b-ba15-4197349fcc5d"
"WESTUS:20191202T231118Z:1fee9be6-cb0d-4a5a-9945-2c5d144f97ff"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -314,10 +314,10 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:40:59 GMT"
"Mon, 02 Dec 2019 23:11:17 GMT"
],
"Content-Length": [
"956"
"957"
],
"Content-Type": [
"application/json; charset=utf-8"
@ -329,18 +329,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:59.1075157Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"5939657802016134673\",\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policySetDefinitions/ps3356\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps3356\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:17.7175985Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"14338864422268835039\",\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policySetDefinitions/ps5321\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps5321\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/ps3356?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczMzNTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/ps5321?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczUzMjE/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -360,16 +360,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:95fd6531-ea6e-4340-82d9-98cdf61af69f"
"westus:af2c24ae-5e3f-4a90-8716-e00acfa13777"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"11993"
"11997"
],
"x-ms-correlation-request-id": [
"885b5735-1a3e-45a7-bfca-f421cd19e27d"
"23aa9124-fded-4f22-b00a-a479ea002e8d"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014100Z:885b5735-1a3e-45a7-bfca-f421cd19e27d"
"WESTUS:20191202T231119Z:23aa9124-fded-4f22-b00a-a479ea002e8d"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -378,10 +378,10 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:40:59 GMT"
"Mon, 02 Dec 2019 23:11:18 GMT"
],
"Content-Length": [
"1040"
"1041"
],
"Content-Type": [
"application/json; charset=utf-8"
@ -393,18 +393,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\",\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:59.1075157Z\",\r\n \"updatedBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"updatedOn\": \"2019-10-31T01:41:00.0805415Z\"\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"5939657802016134673\",\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policySetDefinitions/ps3356\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps3356\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\",\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:17.7175985Z\",\r\n \"updatedBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"updatedOn\": \"2019-12-02T23:11:18.8203822Z\"\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"14338864422268835039\",\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policySetDefinitions/ps5321\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps5321\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policysetdefinitions/ps3356?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczMzNTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policysetdefinitions/ps5321?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lzZXRkZWZpbml0aW9ucy9wczUzMjE/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "DELETE",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -424,16 +424,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:48cd70cb-f370-4d70-9d70-d8af4108c70e"
"westus:ebc17634-30d7-4211-8e9d-7650ceb74bff"
],
"x-ms-ratelimit-remaining-subscription-deletes": [
"14998"
],
"x-ms-correlation-request-id": [
"a971f03d-88a3-4452-968e-d6d6d5762c6c"
"8f2814b3-5d1b-440b-b7e5-09306bb8fffe"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014100Z:a971f03d-88a3-4452-968e-d6d6d5762c6c"
"WESTUS:20191202T231119Z:8f2814b3-5d1b-440b-b7e5-09306bb8fffe"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -442,10 +442,10 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:41:00 GMT"
"Mon, 02 Dec 2019 23:11:19 GMT"
],
"Content-Length": [
"1040"
"1041"
],
"Content-Type": [
"application/json; charset=utf-8"
@ -457,18 +457,18 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\",\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:59.1075157Z\",\r\n \"updatedBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"updatedOn\": \"2019-10-31T01:41:00.0805415Z\"\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"5939657802016134673\",\r\n \"policyDefinitionId\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policySetDefinitions/ps3356\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps3356\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"description\": \"Updated Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"testName\": \"testValue\",\r\n \"newTestName\": \"newTestValue\",\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:17.7175985Z\",\r\n \"updatedBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"updatedOn\": \"2019-12-02T23:11:18.8203822Z\"\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"Array of allowed resource locations.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"Location Array\"\r\n }\r\n }\r\n },\r\n \"policyDefinitions\": [\r\n {\r\n \"policyDefinitionReferenceId\": \"14338864422268835039\",\r\n \"policyDefinitionId\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"value\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policySetDefinitions/ps5321\",\r\n \"type\": \"Microsoft.Authorization/policySetDefinitions\",\r\n \"name\": \"ps5321\"\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policydefinitions/ps4900?api-version=2019-06-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMGI0MGJlMDYtMDRlOC00ZjcwLWFiZGUtYTUwMmIyNjQ2ZmU4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9wczQ5MDA/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==",
"RequestUri": "/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policydefinitions/ps3784?api-version=2019-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjY3Y2M5MTgtZjY0Zi00YzNmLWFhMjQtYTg1NTQ2NWY5ZDQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wb2xpY3lkZWZpbml0aW9ucy9wczM3ODQ/YXBpLXZlcnNpb249MjAxOS0wOS0wMQ==",
"RequestMethod": "DELETE",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"AzurePowershell/v1.0.0",
"PSVersion/v6.1.0"
"PSVersion/v6.2.3"
],
"ParameterSetName": [
"NameParameterSet"
@ -488,16 +488,16 @@
"Accept-Encoding"
],
"x-ms-request-id": [
"westus:584d81ae-59bc-4a78-ab52-c2270c24480a"
"westus:ab2ab2c1-6310-45cd-821b-31590fb8f497"
],
"x-ms-ratelimit-remaining-subscription-deletes": [
"14999"
"14998"
],
"x-ms-correlation-request-id": [
"985685e7-a576-4519-8a85-faca259dedf0"
"b60301d9-ddbe-409c-b011-401608cd0907"
],
"x-ms-routing-request-id": [
"WESTUS:20191031T014101Z:985685e7-a576-4519-8a85-faca259dedf0"
"WESTUS:20191202T231120Z:b60301d9-ddbe-409c-b011-401608cd0907"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@ -506,7 +506,7 @@
"nosniff"
],
"Date": [
"Thu, 31 Oct 2019 01:41:01 GMT"
"Mon, 02 Dec 2019 23:11:19 GMT"
],
"Content-Length": [
"956"
@ -521,17 +521,17 @@
"0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"4358bf84-f563-48b9-aea0-8107d5294bf6\",\r\n \"createdOn\": \"2019-10-31T01:40:57.6095845Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/0b40be06-04e8-4f70-abde-a502b2646fe8/providers/Microsoft.Authorization/policyDefinitions/ps4900\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"ps4900\"\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"policyType\": \"Custom\",\r\n \"mode\": \"All\",\r\n \"description\": \"Unit test junk: sorry for littering. Please delete me!\",\r\n \"metadata\": {\r\n \"createdBy\": \"7140c269-e408-47a5-a626-a1d836b96883\",\r\n \"createdOn\": \"2019-12-02T23:11:13.2503615Z\",\r\n \"updatedBy\": null,\r\n \"updatedOn\": null\r\n },\r\n \"parameters\": {\r\n \"listOfAllowedLocations\": {\r\n \"type\": \"Array\",\r\n \"metadata\": {\r\n \"description\": \"An array of permitted locations for resources.\",\r\n \"strongType\": \"location\",\r\n \"displayName\": \"List of locations\"\r\n }\r\n },\r\n \"effectParam\": {\r\n \"type\": \"String\",\r\n \"metadata\": {\r\n \"description\": \"The effect of the policy\",\r\n \"displayName\": \"Policy Effect\"\r\n },\r\n \"allowedValues\": [\r\n \"Deny\",\r\n \"Disabled\"\r\n ],\r\n \"defaultValue\": \"Deny\"\r\n }\r\n },\r\n \"policyRule\": {\r\n \"if\": {\r\n \"not\": {\r\n \"field\": \"location\",\r\n \"in\": \"[parameters('listOfAllowedLocations')]\"\r\n }\r\n },\r\n \"then\": {\r\n \"effect\": \"[parameters('effectParam')]\"\r\n }\r\n }\r\n },\r\n \"id\": \"/subscriptions/f67cc918-f64f-4c3f-aa24-a855465f9d41/providers/Microsoft.Authorization/policyDefinitions/ps3784\",\r\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\r\n \"name\": \"ps3784\"\r\n}",
"StatusCode": 200
}
],
"Names": {
"Test-PolicySetDefinitionWithParameters": [
"ps4900",
"ps3356"
"ps3784",
"ps5321"
]
},
"Variables": {
"SubscriptionId": "0b40be06-04e8-4f70-abde-a502b2646fe8"
"SubscriptionId": "f67cc918-f64f-4c3f-aa24-a855465f9d41"
}
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -20,6 +20,7 @@
## Upcoming Release
* Update references in .psd1 to use relative path
* Fix an issue where template deployment fails to read a template parameter if its name conflicts with some built-in parameter name.
* Updated policy cmdlets to use new api version 2019-09-01 that introduces grouping support within policy set definitions.
## Version 1.8.0
- Updated policy cmdlets to use new api version 2019-06-01 that has new EnforcementMode property in policy assignment.

Просмотреть файл

@ -15,22 +15,24 @@ Creates a policy set definition.
### NameParameterSet (Default)
```
New-AzPolicySetDefinition -Name <String> [-DisplayName <String>] [-Description <String>] [-Metadata <String>]
-PolicyDefinition <String> [-Parameter <String>] [-ApiVersion <String>] [-Pre]
-PolicyDefinition <String> [-Parameter <String>] [-GroupDefinition <String>] [-ApiVersion <String>] [-Pre]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### ManagementGroupNameParameterSet
```
New-AzPolicySetDefinition -Name <String> [-DisplayName <String>] [-Description <String>] [-Metadata <String>]
-PolicyDefinition <String> [-Parameter <String>] -ManagementGroupName <String> [-ApiVersion <String>] [-Pre]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
-PolicyDefinition <String> [-Parameter <String>] -ManagementGroupName <String> [-GroupDefinition <String>]
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
### SubscriptionIdParameterSet
```
New-AzPolicySetDefinition -Name <String> [-DisplayName <String>] [-Description <String>] [-Metadata <String>]
-PolicyDefinition <String> [-Parameter <String>] -SubscriptionId <Guid> [-ApiVersion <String>] [-Pre]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
-PolicyDefinition <String> [-Parameter <String>] -SubscriptionId <Guid> [-GroupDefinition <String>]
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
@ -90,6 +92,27 @@ PS C:\> New-AzPolicySetDefinition -Name 'VMPolicySetDefinition' -PolicyDefinitio
This command creates a parameterized policy set definition named VMPolicySetDefinition that contains the policy definitions specified in C:\VMPolicy.json. Example content of the VMPolicy.json is provided above.
### Example 3: Create a policy set definition with policy definition groups
```
[
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/2a0e14a6-b0a6-4fab-991a-187a4f81c498",
"groupNames": [ "group1" ]
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/464dbb85-3d5f-4a1d-bb09-95a9b5dd19cf",
"groupNames": [ "group2" ]
}
]
```
```
$groupsJson = ConvertTo-Json @{ name = "group1" }, @{ name = "group2" }
PS C:\> New-AzPolicySetDefinition -Name 'VMPolicySetDefinition' -GroupDefinition $groupsJson -PolicyDefinition C:\VMPolicySet.json
```
This command creates a policy set definition named VMPolicySetDefinition with grouping of policy definitions specified in C:\VMPolicy.json. Example content of the VMPolicy.json is provided above.
## PARAMETERS
### -ApiVersion
@ -153,6 +176,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -GroupDefinition
The policy definition groups for the new policy set definition. This can either be a path to a file containing the groups, or the groups as a JSON string.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -ManagementGroupName
The name of the management group of the new policy set definition.
@ -169,7 +207,7 @@ Accept wildcard characters: False
```
### -Metadata
The metadata for policy set definition. This can either be a path to a file name containing the metadata, or the metadata as string
The metadata for policy set definition. This can either be a path to a file name containing the metadata, or the metadata as a JSON string.
```yaml
Type: System.String
@ -200,7 +238,7 @@ Accept wildcard characters: False
### -Parameter
The parameters declaration for policy set definition.
This can either be a path to a file name containing the parameters declaration, or the parameters declaration as string.
This can either be a path to a file name containing the parameters declaration, or the parameters declaration as a JSON string.
```yaml
Type: System.String
@ -215,7 +253,7 @@ Accept wildcard characters: False
```
### -PolicyDefinition
The policy definitions. This can either be a path to a file name containing the policy definitions, or the policy definitions as string.
The policy definitions. This can either be a path to a file name containing the policy definitions, or the policy definitions as a JSON string.
```yaml
Type: System.String

Просмотреть файл

@ -15,31 +15,33 @@ Modifies a policy set definition
### NameParameterSet (Default)
```
Set-AzPolicySetDefinition -Name <String> [-DisplayName <String>] [-Description <String>]
[-PolicyDefinition <String>] [-Metadata <String>] [-Parameter <String>] [-ApiVersion <String>] [-Pre]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-PolicyDefinition <String>] [-Metadata <String>] [-Parameter <String>] [-GroupDefinition <String>]
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
### ManagementGroupNameParameterSet
```
Set-AzPolicySetDefinition -Name <String> [-DisplayName <String>] [-Description <String>]
[-PolicyDefinition <String>] [-Metadata <String>] [-Parameter <String>] -ManagementGroupName <String>
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
[-GroupDefinition <String>] [-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
### SubscriptionIdParameterSet
```
Set-AzPolicySetDefinition -Name <String> [-DisplayName <String>] [-Description <String>]
[-PolicyDefinition <String>] [-Metadata <String>] [-Parameter <String>] -SubscriptionId <Guid>
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
[-GroupDefinition <String>] [-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
### IdParameterSet
```
Set-AzPolicySetDefinition -Id <String> [-DisplayName <String>] [-Description <String>]
[-PolicyDefinition <String>] [-Metadata <String>] [-Parameter <String>] [-ApiVersion <String>] [-Pre]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-PolicyDefinition <String>] [-Metadata <String>] [-Parameter <String>] [-GroupDefinition <String>]
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
@ -73,6 +75,21 @@ PolicySetDefinitionId : /subscriptions/11111111-1111-1111-1111-111111111111/prov
This command updates the metadata of a policy set definition named VMPolicySetDefinition to indicate its category is "Virtual Machine".
### Example 3: Update the groups of a policy set definition
```
PS C:\> Set-AzPolicySetDefinition -Name 'VMPolicySetDefinition' -GroupDefinition '[{ "name": "group1", "displayName": "Virtual Machine Security" }, { "name": "group2" }]'
```
This command updates the groups of a policy set definition named VMPolicySetDefinition.
### Example 4: Update the groups of a policy set definition using a hash table
```
$groupsJson = ConvertTo-Json @{ name = "group1", displayName = "Virtual Machine Security" }, @{ name = "group2" }
PS C:\> Set-AzPolicySetDefinition -Name 'VMPolicySetDefinition' -GroupDefinition $groupsJson
```
This command updates the groups of a policy set definition named VMPolicySetDefinition using a hash table to construct the groups.
## PARAMETERS
### -ApiVersion
@ -136,6 +153,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -GroupDefinition
The policy definition groups of the updated policy set definition. This can either be a path to a file containing the groups, or the groups as a JSON string.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Id
The fully qualified policy definition Id, including the subscription.
e.g.
@ -169,7 +201,7 @@ Accept wildcard characters: False
```
### -Metadata
The metadata of the updated policy set definition. This can either be a path to a file name containing the metadata, or the metadata as a string.
The metadata of the updated policy set definition. This can either be a path to a file name containing the metadata, or the metadata as a JSON string.
```yaml
Type: System.String
@ -199,7 +231,7 @@ Accept wildcard characters: False
```
### -Parameter
The parameters declaration of the updated policy set definition. This can either be a path to a file name or uri containing the parameters declaration, or the parameters declaration as a string.
The parameters declaration of the updated policy set definition. This can either be a path to a file name or uri containing the parameters declaration, or the parameters declaration as a JSON string.
```yaml
Type: System.String
@ -214,7 +246,7 @@ Accept wildcard characters: False
```
### -PolicyDefinition
The policy definitions. This can either be a path to a file name containing the policy definitions, or the policy definitions as string.
The policy definitions. This can either be a path to a file name containing the policy definitions, or the policy definitions as a JSON string.
```yaml
Type: System.String