@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.
551 lines (550 loc) • 31.1 kB
JavaScript
"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.WorkspaceConnection = exports.OnlineEndpoint = exports.OnlineDeployment = exports.ModelVersion = exports.ModelContainer = exports.Job = exports.EnvironmentVersion = exports.EnvironmentContainer = exports.Datastore = exports.DataVersion = exports.DataContainer = exports.ComponentVersion = exports.ComponentContainer = exports.CodeVersion = exports.CodeContainer = exports.BatchEndpoint = exports.BatchDeployment = void 0;
const policy_1 = require("@pulumi/policy");
const compliance_policy_manager_1 = require("@pulumi/compliance-policy-manager");
const v20220201preview_1 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_2 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_3 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_4 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_5 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_6 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_7 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_8 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_9 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_10 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_11 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_12 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_13 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_14 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_15 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_16 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
const v20220201preview_17 = require("@pulumi/azure-native/machinelearningservices/v20220201preview");
var BatchDeployment;
(function (BatchDeployment) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.BatchDeployment).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
BatchDeployment.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-batchdeployment-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.BatchDeployment).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_1.BatchDeployment, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure BatchDeployment shouldn't use an unstable API (machinelearningservices.v20220201preview.BatchDeployment). A compatible replacement can be found at 'machinelearningservices.BatchDeployment'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(BatchDeployment || (BatchDeployment = {}));
exports.BatchDeployment = BatchDeployment;
var BatchEndpoint;
(function (BatchEndpoint) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.BatchEndpoint).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
BatchEndpoint.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-batchendpoint-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.BatchEndpoint).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_2.BatchEndpoint, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure BatchEndpoint shouldn't use an unstable API (machinelearningservices.v20220201preview.BatchEndpoint). A compatible replacement can be found at 'machinelearningservices.BatchEndpoint'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(BatchEndpoint || (BatchEndpoint = {}));
exports.BatchEndpoint = BatchEndpoint;
var CodeContainer;
(function (CodeContainer) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.CodeContainer).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
CodeContainer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-codecontainer-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.CodeContainer).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_3.CodeContainer, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure CodeContainer shouldn't use an unstable API (machinelearningservices.v20220201preview.CodeContainer). A compatible replacement can be found at 'machinelearningservices.CodeContainer'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(CodeContainer || (CodeContainer = {}));
exports.CodeContainer = CodeContainer;
var CodeVersion;
(function (CodeVersion) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.CodeVersion).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
CodeVersion.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-codeversion-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.CodeVersion).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_4.CodeVersion, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure CodeVersion shouldn't use an unstable API (machinelearningservices.v20220201preview.CodeVersion). A compatible replacement can be found at 'machinelearningservices.CodeVersion'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(CodeVersion || (CodeVersion = {}));
exports.CodeVersion = CodeVersion;
var ComponentContainer;
(function (ComponentContainer) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ComponentContainer).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ComponentContainer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-componentcontainer-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ComponentContainer).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_5.ComponentContainer, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ComponentContainer shouldn't use an unstable API (machinelearningservices.v20220201preview.ComponentContainer). A compatible replacement can be found at 'machinelearningservices.ComponentContainer'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ComponentContainer || (ComponentContainer = {}));
exports.ComponentContainer = ComponentContainer;
var ComponentVersion;
(function (ComponentVersion) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ComponentVersion).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ComponentVersion.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-componentversion-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ComponentVersion).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_6.ComponentVersion, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ComponentVersion shouldn't use an unstable API (machinelearningservices.v20220201preview.ComponentVersion). A compatible replacement can be found at 'machinelearningservices.ComponentVersion'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ComponentVersion || (ComponentVersion = {}));
exports.ComponentVersion = ComponentVersion;
var DataContainer;
(function (DataContainer) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.DataContainer).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
DataContainer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-datacontainer-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.DataContainer).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_7.DataContainer, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure DataContainer shouldn't use an unstable API (machinelearningservices.v20220201preview.DataContainer). A compatible replacement can be found at 'machinelearningservices.DataContainer'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(DataContainer || (DataContainer = {}));
exports.DataContainer = DataContainer;
var DataVersion;
(function (DataVersion) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.DataVersion).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
DataVersion.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-dataversion-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.DataVersion).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_8.DataVersion, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure DataVersion shouldn't use an unstable API (machinelearningservices.v20220201preview.DataVersion). A compatible replacement can be found at 'machinelearningservices.DataVersion'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(DataVersion || (DataVersion = {}));
exports.DataVersion = DataVersion;
var Datastore;
(function (Datastore) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.Datastore).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Datastore.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-datastore-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.Datastore).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_9.Datastore, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Datastore shouldn't use an unstable API (machinelearningservices.v20220201preview.Datastore). A compatible replacement can be found at 'machinelearningservices.Datastore'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Datastore || (Datastore = {}));
exports.Datastore = Datastore;
var EnvironmentContainer;
(function (EnvironmentContainer) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.EnvironmentContainer).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
EnvironmentContainer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-environmentcontainer-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.EnvironmentContainer).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_10.EnvironmentContainer, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure EnvironmentContainer shouldn't use an unstable API (machinelearningservices.v20220201preview.EnvironmentContainer). A compatible replacement can be found at 'machinelearningservices.EnvironmentContainer'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(EnvironmentContainer || (EnvironmentContainer = {}));
exports.EnvironmentContainer = EnvironmentContainer;
var EnvironmentVersion;
(function (EnvironmentVersion) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.EnvironmentVersion).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
EnvironmentVersion.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-environmentversion-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.EnvironmentVersion).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_11.EnvironmentVersion, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure EnvironmentVersion shouldn't use an unstable API (machinelearningservices.v20220201preview.EnvironmentVersion). A compatible replacement can be found at 'machinelearningservices.EnvironmentVersion'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(EnvironmentVersion || (EnvironmentVersion = {}));
exports.EnvironmentVersion = EnvironmentVersion;
var Job;
(function (Job) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.Job).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
Job.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-job-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.Job).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_12.Job, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure Job shouldn't use an unstable API (machinelearningservices.v20220201preview.Job). A compatible replacement can be found at 'machinelearningservices.Job'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(Job || (Job = {}));
exports.Job = Job;
var ModelContainer;
(function (ModelContainer) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ModelContainer).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ModelContainer.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-modelcontainer-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ModelContainer).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_13.ModelContainer, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ModelContainer shouldn't use an unstable API (machinelearningservices.v20220201preview.ModelContainer). A compatible replacement can be found at 'machinelearningservices.ModelContainer'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ModelContainer || (ModelContainer = {}));
exports.ModelContainer = ModelContainer;
var ModelVersion;
(function (ModelVersion) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ModelVersion).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
ModelVersion.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-modelversion-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.ModelVersion).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_14.ModelVersion, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure ModelVersion shouldn't use an unstable API (machinelearningservices.v20220201preview.ModelVersion). A compatible replacement can be found at 'machinelearningservices.ModelVersion'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(ModelVersion || (ModelVersion = {}));
exports.ModelVersion = ModelVersion;
var OnlineDeployment;
(function (OnlineDeployment) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.OnlineDeployment).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
OnlineDeployment.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-onlinedeployment-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.OnlineDeployment).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_15.OnlineDeployment, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure OnlineDeployment shouldn't use an unstable API (machinelearningservices.v20220201preview.OnlineDeployment). A compatible replacement can be found at 'machinelearningservices.OnlineDeployment'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(OnlineDeployment || (OnlineDeployment = {}));
exports.OnlineDeployment = OnlineDeployment;
var OnlineEndpoint;
(function (OnlineEndpoint) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.OnlineEndpoint).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
OnlineEndpoint.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-onlineendpoint-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.OnlineEndpoint).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_16.OnlineEndpoint, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure OnlineEndpoint shouldn't use an unstable API (machinelearningservices.v20220201preview.OnlineEndpoint). A compatible replacement can be found at 'machinelearningservices.OnlineEndpoint'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(OnlineEndpoint || (OnlineEndpoint = {}));
exports.OnlineEndpoint = OnlineEndpoint;
var WorkspaceConnection;
(function (WorkspaceConnection) {
/**
* Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.WorkspaceConnection).
*
* @severity medium
* @frameworks none
* @topics api, preview, unstable
* @link https://learn.microsoft.com/en-us/rest/api/azure/
*/
WorkspaceConnection.disallowPreviewResource = compliance_policy_manager_1.policyManager.registerPolicy({
resourceValidationPolicy: {
name: "azurenative-machinelearningservices-v20220201preview-workspaceconnection-disallow-preview-resource",
description: "Disallow the use of non-stable (Preview) Azure resouces (machinelearningservices.v20220201preview.WorkspaceConnection).",
configSchema: compliance_policy_manager_1.policyManager.policyConfigSchema,
enforcementLevel: "advisory",
validateResource: (0, policy_1.validateResourceOfType)(v20220201preview_17.WorkspaceConnection, (_, args, reportViolation) => {
if (!compliance_policy_manager_1.policyManager.shouldEvalPolicy(args)) {
return;
}
reportViolation("Azure WorkspaceConnection shouldn't use an unstable API (machinelearningservices.v20220201preview.WorkspaceConnection). A compatible replacement can be found at 'machinelearningservices.WorkspaceConnection'.");
}),
},
vendors: ["azure"],
services: ["machinelearningservices"],
severity: "medium",
topics: ["api", "unstable", "preview"],
});
})(WorkspaceConnection || (WorkspaceConnection = {}));
exports.WorkspaceConnection = WorkspaceConnection;