1. Packages
  2. Azure Native
  3. API Docs
  4. containerservice
  5. DeploymentSafeguard
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.7.1 published on Wednesday, Aug 13, 2025 by Pulumi

azure-native.containerservice.DeploymentSafeguard

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.7.1 published on Wednesday, Aug 13, 2025 by Pulumi

    Deployment Safeguards

    Uses Azure REST API version 2025-04-02-preview.

    Other available API versions: 2025-04-01, 2025-05-02-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native containerservice [ApiVersion]. See the version guide for details.

    Example Usage

    Creates a DeploymentSafeguards resource with a long running operation.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var deploymentSafeguard = new AzureNative.ContainerService.DeploymentSafeguard("deploymentSafeguard", new()
        {
            Level = AzureNative.ContainerService.DeploymentSafeguardsLevel.Warn,
            ResourceUri = "subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1",
        });
    
    });
    
    package main
    
    import (
    	containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := containerservice.NewDeploymentSafeguard(ctx, "deploymentSafeguard", &containerservice.DeploymentSafeguardArgs{
    			Level:       pulumi.String(containerservice.DeploymentSafeguardsLevelWarn),
    			ResourceUri: pulumi.String("subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.containerservice.DeploymentSafeguard;
    import com.pulumi.azurenative.containerservice.DeploymentSafeguardArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var deploymentSafeguard = new DeploymentSafeguard("deploymentSafeguard", DeploymentSafeguardArgs.builder()
                .level("Warn")
                .resourceUri("subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const deploymentSafeguard = new azure_native.containerservice.DeploymentSafeguard("deploymentSafeguard", {
        level: azure_native.containerservice.DeploymentSafeguardsLevel.Warn,
        resourceUri: "subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    deployment_safeguard = azure_native.containerservice.DeploymentSafeguard("deploymentSafeguard",
        level=azure_native.containerservice.DeploymentSafeguardsLevel.WARN,
        resource_uri="subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1")
    
    resources:
      deploymentSafeguard:
        type: azure-native:containerservice:DeploymentSafeguard
        properties:
          level: Warn
          resourceUri: subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1
    

    Create DeploymentSafeguard Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DeploymentSafeguard(name: string, args: DeploymentSafeguardArgs, opts?: CustomResourceOptions);
    @overload
    def DeploymentSafeguard(resource_name: str,
                            args: DeploymentSafeguardArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def DeploymentSafeguard(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            level: Optional[Union[str, DeploymentSafeguardsLevel]] = None,
                            resource_uri: Optional[str] = None,
                            excluded_namespaces: Optional[Sequence[str]] = None)
    func NewDeploymentSafeguard(ctx *Context, name string, args DeploymentSafeguardArgs, opts ...ResourceOption) (*DeploymentSafeguard, error)
    public DeploymentSafeguard(string name, DeploymentSafeguardArgs args, CustomResourceOptions? opts = null)
    public DeploymentSafeguard(String name, DeploymentSafeguardArgs args)
    public DeploymentSafeguard(String name, DeploymentSafeguardArgs args, CustomResourceOptions options)
    
    type: azure-native:containerservice:DeploymentSafeguard
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DeploymentSafeguardArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DeploymentSafeguardArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DeploymentSafeguardArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeploymentSafeguardArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeploymentSafeguardArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var deploymentSafeguardResource = new AzureNative.ContainerService.DeploymentSafeguard("deploymentSafeguardResource", new()
    {
        Level = "string",
        ResourceUri = "string",
        ExcludedNamespaces = new[]
        {
            "string",
        },
    });
    
    example, err := containerservice.NewDeploymentSafeguard(ctx, "deploymentSafeguardResource", &containerservice.DeploymentSafeguardArgs{
    	Level:       pulumi.String("string"),
    	ResourceUri: pulumi.String("string"),
    	ExcludedNamespaces: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var deploymentSafeguardResource = new DeploymentSafeguard("deploymentSafeguardResource", DeploymentSafeguardArgs.builder()
        .level("string")
        .resourceUri("string")
        .excludedNamespaces("string")
        .build());
    
    deployment_safeguard_resource = azure_native.containerservice.DeploymentSafeguard("deploymentSafeguardResource",
        level="string",
        resource_uri="string",
        excluded_namespaces=["string"])
    
    const deploymentSafeguardResource = new azure_native.containerservice.DeploymentSafeguard("deploymentSafeguardResource", {
        level: "string",
        resourceUri: "string",
        excludedNamespaces: ["string"],
    });
    
    type: azure-native:containerservice:DeploymentSafeguard
    properties:
        excludedNamespaces:
            - string
        level: string
        resourceUri: string
    

    DeploymentSafeguard Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DeploymentSafeguard resource accepts the following input properties:

    Level string | Pulumi.AzureNative.ContainerService.DeploymentSafeguardsLevel
    The deployment safeguards level. Possible values are Warn and Enforce
    ResourceUri string
    The fully qualified Azure Resource manager identifier of the resource.
    ExcludedNamespaces List<string>
    User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards
    Level string | DeploymentSafeguardsLevel
    The deployment safeguards level. Possible values are Warn and Enforce
    ResourceUri string
    The fully qualified Azure Resource manager identifier of the resource.
    ExcludedNamespaces []string
    User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards
    level String | DeploymentSafeguardsLevel
    The deployment safeguards level. Possible values are Warn and Enforce
    resourceUri String
    The fully qualified Azure Resource manager identifier of the resource.
    excludedNamespaces List<String>
    User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards
    level string | DeploymentSafeguardsLevel
    The deployment safeguards level. Possible values are Warn and Enforce
    resourceUri string
    The fully qualified Azure Resource manager identifier of the resource.
    excludedNamespaces string[]
    User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards
    level str | DeploymentSafeguardsLevel
    The deployment safeguards level. Possible values are Warn and Enforce
    resource_uri str
    The fully qualified Azure Resource manager identifier of the resource.
    excluded_namespaces Sequence[str]
    User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards
    level String | "Warn" | "Enforce"
    The deployment safeguards level. Possible values are Warn and Enforce
    resourceUri String
    The fully qualified Azure Resource manager identifier of the resource.
    excludedNamespaces List<String>
    User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DeploymentSafeguard resource produces the following output properties:

    AzureApiVersion string
    The Azure API version of the resource.
    ETag string
    If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    Provisioning State
    SystemData Pulumi.AzureNative.ContainerService.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    SystemExcludedNamespaces List<string>
    System defined list of namespaces excluded from Deployment Safeguards. These are determined by the underlying provider (such as AKS), and cannot be changed. Deployments in these namespaces will not be checked
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    AzureApiVersion string
    The Azure API version of the resource.
    ETag string
    If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    Provisioning State
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    SystemExcludedNamespaces []string
    System defined list of namespaces excluded from Deployment Safeguards. These are determined by the underlying provider (such as AKS), and cannot be changed. Deployments in these namespaces will not be checked
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    eTag String
    If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    Provisioning State
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    systemExcludedNamespaces List<String>
    System defined list of namespaces excluded from Deployment Safeguards. These are determined by the underlying provider (such as AKS), and cannot be changed. Deployments in these namespaces will not be checked
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion string
    The Azure API version of the resource.
    eTag string
    If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    provisioningState string
    Provisioning State
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    systemExcludedNamespaces string[]
    System defined list of namespaces excluded from Deployment Safeguards. These are determined by the underlying provider (such as AKS), and cannot be changed. Deployments in these namespaces will not be checked
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azure_api_version str
    The Azure API version of the resource.
    e_tag str
    If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    provisioning_state str
    Provisioning State
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    system_excluded_namespaces Sequence[str]
    System defined list of namespaces excluded from Deployment Safeguards. These are determined by the underlying provider (such as AKS), and cannot be changed. Deployments in these namespaces will not be checked
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    eTag String
    If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    Provisioning State
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    systemExcludedNamespaces List<String>
    System defined list of namespaces excluded from Deployment Safeguards. These are determined by the underlying provider (such as AKS), and cannot be changed. Deployments in these namespaces will not be checked
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    DeploymentSafeguardsLevel, DeploymentSafeguardsLevelArgs

    Warn
    WarnBest practice violations will only show warnings
    Enforce
    EnforceBest practice violations will be denied
    DeploymentSafeguardsLevelWarn
    WarnBest practice violations will only show warnings
    DeploymentSafeguardsLevelEnforce
    EnforceBest practice violations will be denied
    Warn
    WarnBest practice violations will only show warnings
    Enforce
    EnforceBest practice violations will be denied
    Warn
    WarnBest practice violations will only show warnings
    Enforce
    EnforceBest practice violations will be denied
    WARN
    WarnBest practice violations will only show warnings
    ENFORCE
    EnforceBest practice violations will be denied
    "Warn"
    WarnBest practice violations will only show warnings
    "Enforce"
    EnforceBest practice violations will be denied

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:containerservice:DeploymentSafeguard default /{resourceUri}/providers/Microsoft.ContainerService/deploymentSafeguards/default 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.7.1 published on Wednesday, Aug 13, 2025 by Pulumi