azure-native.containerservice.DeploymentSafeguard
Explore with Pulumi AI
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.
Azure Native. Container Service. Deployment Safeguards Level - The deployment safeguards level. Possible values are Warn and Enforce
- Resource
Uri string - The fully qualified Azure Resource manager identifier of the resource.
- Excluded
Namespaces 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 | Deployment
Safeguards Level - The deployment safeguards level. Possible values are Warn and Enforce
- Resource
Uri string - The fully qualified Azure Resource manager identifier of the resource.
- Excluded
Namespaces []string - User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards
- level
String | Deployment
Safeguards Level - The deployment safeguards level. Possible values are Warn and Enforce
- resource
Uri String - The fully qualified Azure Resource manager identifier of the resource.
- excluded
Namespaces 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 | Deployment
Safeguards Level - The deployment safeguards level. Possible values are Warn and Enforce
- resource
Uri string - The fully qualified Azure Resource manager identifier of the resource.
- excluded
Namespaces string[] - User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards
- level
str | Deployment
Safeguards Level - 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
- resource
Uri String - The fully qualified Azure Resource manager identifier of the resource.
- excluded
Namespaces 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:
- Azure
Api stringVersion - 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
- Provisioning
State string - Provisioning State
- System
Data Pulumi.Azure Native. Container Service. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- System
Excluded List<string>Namespaces - 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 stringVersion - 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
- Provisioning
State string - Provisioning State
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- System
Excluded []stringNamespaces - 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 StringVersion - The Azure API version of the resource.
- e
Tag 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
- provisioning
State String - Provisioning State
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- system
Excluded List<String>Namespaces - 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 stringVersion - The Azure API version of the resource.
- e
Tag 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
- provisioning
State string - Provisioning State
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- system
Excluded string[]Namespaces - 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_ strversion - 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 SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- system_
excluded_ Sequence[str]namespaces - 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"
- azure
Api StringVersion - The Azure API version of the resource.
- e
Tag 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
- provisioning
State String - Provisioning State
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- system
Excluded List<String>Namespaces - 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
- Deployment
Safeguards Level Warn - WarnBest practice violations will only show warnings
- Deployment
Safeguards Level 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
- "Warn"
- WarnBest practice violations will only show warnings
- "Enforce"
- EnforceBest practice violations will be denied
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - 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