UNPKG

@pulumi/azure-compliance-policies

Version:

This repository contains a growing set of Compliance Policies to validate your infrastructure using Pulumi's Crossguard Policy-as-Code framework.

117 lines (116 loc) 6.46 kB
"use strict"; // Copyright 2016-2024, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // ------------------------------- WARNING ------------------------------------- // This file was programmatically generated. Do not edit unless you know what // you're doing. // ------------------------------- WARNING ------------------------------------- Object.defineProperty(exports, "__esModule", { value: true }); exports.SpatialAnchorsAccount = exports.RemoteRenderingAccount = exports.ObjectAnchorsAccount = void 0; const policy_1 = require("@pulumi/policy"); const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager"); const v20210301preview_1 = require("@pulumi/azure-native/mixedreality/v20210301preview"); const v20210301preview_2 = require("@pulumi/azure-native/mixedreality/v20210301preview"); const v20210301preview_3 = require("@pulumi/azure-native/mixedreality/v20210301preview"); var ObjectAnchorsAccount; (function (ObjectAnchorsAccount) { /** * Disallow the use of non-stable (Preview) Azure resouces (mixedreality.v20210301preview.ObjectAnchorsAccount). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ ObjectAnchorsAccount.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-mixedreality-v20210301preview-objectanchorsaccount-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (mixedreality.v20210301preview.ObjectAnchorsAccount).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20210301preview_1.ObjectAnchorsAccount, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure ObjectAnchorsAccount shouldn't use an unstable API (mixedreality.v20210301preview.ObjectAnchorsAccount). A compatible replacement can be found at 'mixedreality.ObjectAnchorsAccount'."); }), }, vendors: ["azure"], services: ["mixedreality"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(ObjectAnchorsAccount || (ObjectAnchorsAccount = {})); exports.ObjectAnchorsAccount = ObjectAnchorsAccount; var RemoteRenderingAccount; (function (RemoteRenderingAccount) { /** * Disallow the use of non-stable (Preview) Azure resouces (mixedreality.v20210301preview.RemoteRenderingAccount). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ RemoteRenderingAccount.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-mixedreality-v20210301preview-remoterenderingaccount-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (mixedreality.v20210301preview.RemoteRenderingAccount).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20210301preview_2.RemoteRenderingAccount, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure RemoteRenderingAccount shouldn't use an unstable API (mixedreality.v20210301preview.RemoteRenderingAccount). A compatible replacement can be found at 'mixedreality.RemoteRenderingAccount'."); }), }, vendors: ["azure"], services: ["mixedreality"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(RemoteRenderingAccount || (RemoteRenderingAccount = {})); exports.RemoteRenderingAccount = RemoteRenderingAccount; var SpatialAnchorsAccount; (function (SpatialAnchorsAccount) { /** * Disallow the use of non-stable (Preview) Azure resouces (mixedreality.v20210301preview.SpatialAnchorsAccount). * * @severity medium * @frameworks none * @topics api, preview, unstable * @link https://learn.microsoft.com/en-us/rest/api/azure/ */ SpatialAnchorsAccount.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({ resourceValidationPolicy: { name: "azurenative-mixedreality-v20210301preview-spatialanchorsaccount-disallow-preview-resource", description: "Disallow the use of non-stable (Preview) Azure resouces (mixedreality.v20210301preview.SpatialAnchorsAccount).", configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema, enforcementLevel: "advisory", validateResource: (0, policy_1.validateResourceOfType)(v20210301preview_3.SpatialAnchorsAccount, (_, args, reportViolation) => { if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) { return; } reportViolation("Azure SpatialAnchorsAccount shouldn't use an unstable API (mixedreality.v20210301preview.SpatialAnchorsAccount). A compatible replacement can be found at 'mixedreality.SpatialAnchorsAccount'."); }), }, vendors: ["azure"], services: ["mixedreality"], severity: "medium", topics: ["api", "unstable", "preview"], }); })(SpatialAnchorsAccount || (SpatialAnchorsAccount = {})); exports.SpatialAnchorsAccount = SpatialAnchorsAccount;