1. Packages
  2. Dynatrace
  3. API Docs
  4. VulnerabilityCode
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

dynatrace.VulnerabilityCode

Explore with Pulumi AI

Create VulnerabilityCode Resource

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

Constructor syntax

new VulnerabilityCode(name: string, args: VulnerabilityCodeArgs, opts?: CustomResourceOptions);
@overload
def VulnerabilityCode(resource_name: str,
                      args: VulnerabilityCodeArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def VulnerabilityCode(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      enabled: Optional[bool] = None,
                      metadata: Optional[VulnerabilityCodeMetadataArgs] = None,
                      vulnerability_detection_control: Optional[VulnerabilityCodeVulnerabilityDetectionControlArgs] = None,
                      criteria: Optional[VulnerabilityCodeCriteriaArgs] = None,
                      insert_after: Optional[str] = None,
                      resource_attribute_conditions: Optional[VulnerabilityCodeResourceAttributeConditionsArgs] = None,
                      rule_name: Optional[str] = None)
func NewVulnerabilityCode(ctx *Context, name string, args VulnerabilityCodeArgs, opts ...ResourceOption) (*VulnerabilityCode, error)
public VulnerabilityCode(string name, VulnerabilityCodeArgs args, CustomResourceOptions? opts = null)
public VulnerabilityCode(String name, VulnerabilityCodeArgs args)
public VulnerabilityCode(String name, VulnerabilityCodeArgs args, CustomResourceOptions options)
type: dynatrace:VulnerabilityCode
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VulnerabilityCodeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VulnerabilityCodeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VulnerabilityCodeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VulnerabilityCodeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VulnerabilityCodeArgs
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 vulnerabilityCodeResource = new Dynatrace.VulnerabilityCode("vulnerabilityCodeResource", new()
{
    Enabled = false,
    Metadata = new Dynatrace.Inputs.VulnerabilityCodeMetadataArgs
    {
        Comment = "string",
    },
    VulnerabilityDetectionControl = new Dynatrace.Inputs.VulnerabilityCodeVulnerabilityDetectionControlArgs
    {
        MonitoringMode = "string",
    },
    InsertAfter = "string",
    ResourceAttributeConditions = new Dynatrace.Inputs.VulnerabilityCodeResourceAttributeConditionsArgs
    {
        ResourceAttributeConditions = new[]
        {
            new Dynatrace.Inputs.VulnerabilityCodeResourceAttributeConditionsResourceAttributeConditionArgs
            {
                Matcher = "string",
                ResourceAttributeKey = "string",
                ResourceAttributeValue = "string",
            },
        },
    },
    RuleName = "string",
});
Copy
example, err := dynatrace.NewVulnerabilityCode(ctx, "vulnerabilityCodeResource", &dynatrace.VulnerabilityCodeArgs{
	Enabled: pulumi.Bool(false),
	Metadata: &dynatrace.VulnerabilityCodeMetadataArgs{
		Comment: pulumi.String("string"),
	},
	VulnerabilityDetectionControl: &dynatrace.VulnerabilityCodeVulnerabilityDetectionControlArgs{
		MonitoringMode: pulumi.String("string"),
	},
	InsertAfter: pulumi.String("string"),
	ResourceAttributeConditions: &dynatrace.VulnerabilityCodeResourceAttributeConditionsArgs{
		ResourceAttributeConditions: dynatrace.VulnerabilityCodeResourceAttributeConditionsResourceAttributeConditionArray{
			&dynatrace.VulnerabilityCodeResourceAttributeConditionsResourceAttributeConditionArgs{
				Matcher:                pulumi.String("string"),
				ResourceAttributeKey:   pulumi.String("string"),
				ResourceAttributeValue: pulumi.String("string"),
			},
		},
	},
	RuleName: pulumi.String("string"),
})
Copy
var vulnerabilityCodeResource = new VulnerabilityCode("vulnerabilityCodeResource", VulnerabilityCodeArgs.builder()
    .enabled(false)
    .metadata(VulnerabilityCodeMetadataArgs.builder()
        .comment("string")
        .build())
    .vulnerabilityDetectionControl(VulnerabilityCodeVulnerabilityDetectionControlArgs.builder()
        .monitoringMode("string")
        .build())
    .insertAfter("string")
    .resourceAttributeConditions(VulnerabilityCodeResourceAttributeConditionsArgs.builder()
        .resourceAttributeConditions(VulnerabilityCodeResourceAttributeConditionsResourceAttributeConditionArgs.builder()
            .matcher("string")
            .resourceAttributeKey("string")
            .resourceAttributeValue("string")
            .build())
        .build())
    .ruleName("string")
    .build());
Copy
vulnerability_code_resource = dynatrace.VulnerabilityCode("vulnerabilityCodeResource",
    enabled=False,
    metadata={
        "comment": "string",
    },
    vulnerability_detection_control={
        "monitoring_mode": "string",
    },
    insert_after="string",
    resource_attribute_conditions={
        "resource_attribute_conditions": [{
            "matcher": "string",
            "resource_attribute_key": "string",
            "resource_attribute_value": "string",
        }],
    },
    rule_name="string")
Copy
const vulnerabilityCodeResource = new dynatrace.VulnerabilityCode("vulnerabilityCodeResource", {
    enabled: false,
    metadata: {
        comment: "string",
    },
    vulnerabilityDetectionControl: {
        monitoringMode: "string",
    },
    insertAfter: "string",
    resourceAttributeConditions: {
        resourceAttributeConditions: [{
            matcher: "string",
            resourceAttributeKey: "string",
            resourceAttributeValue: "string",
        }],
    },
    ruleName: "string",
});
Copy
type: dynatrace:VulnerabilityCode
properties:
    enabled: false
    insertAfter: string
    metadata:
        comment: string
    resourceAttributeConditions:
        resourceAttributeConditions:
            - matcher: string
              resourceAttributeKey: string
              resourceAttributeValue: string
    ruleName: string
    vulnerabilityDetectionControl:
        monitoringMode: string
Copy

VulnerabilityCode 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 VulnerabilityCode resource accepts the following input properties:

Enabled This property is required. bool
This setting is enabled (true) or disabled (false)
Metadata This property is required. Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeMetadata
Step 3: Leave comment (optional)
VulnerabilityDetectionControl This property is required. Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeVulnerabilityDetectionControl
Step 1: Select code-level vulnerability detection behavior
Criteria Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeCriteria
Define criteria

Deprecated: This field has been deprecated

InsertAfter string
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
ResourceAttributeConditions Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeResourceAttributeConditions
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
RuleName string
Rule name
Enabled This property is required. bool
This setting is enabled (true) or disabled (false)
Metadata This property is required. VulnerabilityCodeMetadataArgs
Step 3: Leave comment (optional)
VulnerabilityDetectionControl This property is required. VulnerabilityCodeVulnerabilityDetectionControlArgs
Step 1: Select code-level vulnerability detection behavior
Criteria VulnerabilityCodeCriteriaArgs
Define criteria

Deprecated: This field has been deprecated

InsertAfter string
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
ResourceAttributeConditions VulnerabilityCodeResourceAttributeConditionsArgs
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
RuleName string
Rule name
enabled This property is required. Boolean
This setting is enabled (true) or disabled (false)
metadata This property is required. VulnerabilityCodeMetadata
Step 3: Leave comment (optional)
vulnerabilityDetectionControl This property is required. VulnerabilityCodeVulnerabilityDetectionControl
Step 1: Select code-level vulnerability detection behavior
criteria VulnerabilityCodeCriteria
Define criteria

Deprecated: This field has been deprecated

insertAfter String
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
resourceAttributeConditions VulnerabilityCodeResourceAttributeConditions
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
ruleName String
Rule name
enabled This property is required. boolean
This setting is enabled (true) or disabled (false)
metadata This property is required. VulnerabilityCodeMetadata
Step 3: Leave comment (optional)
vulnerabilityDetectionControl This property is required. VulnerabilityCodeVulnerabilityDetectionControl
Step 1: Select code-level vulnerability detection behavior
criteria VulnerabilityCodeCriteria
Define criteria

Deprecated: This field has been deprecated

insertAfter string
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
resourceAttributeConditions VulnerabilityCodeResourceAttributeConditions
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
ruleName string
Rule name
enabled This property is required. bool
This setting is enabled (true) or disabled (false)
metadata This property is required. VulnerabilityCodeMetadataArgs
Step 3: Leave comment (optional)
vulnerability_detection_control This property is required. VulnerabilityCodeVulnerabilityDetectionControlArgs
Step 1: Select code-level vulnerability detection behavior
criteria VulnerabilityCodeCriteriaArgs
Define criteria

Deprecated: This field has been deprecated

insert_after str
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
resource_attribute_conditions VulnerabilityCodeResourceAttributeConditionsArgs
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
rule_name str
Rule name
enabled This property is required. Boolean
This setting is enabled (true) or disabled (false)
metadata This property is required. Property Map
Step 3: Leave comment (optional)
vulnerabilityDetectionControl This property is required. Property Map
Step 1: Select code-level vulnerability detection behavior
criteria Property Map
Define criteria

Deprecated: This field has been deprecated

insertAfter String
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
resourceAttributeConditions Property Map
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
ruleName String
Rule name

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing VulnerabilityCode Resource

Get an existing VulnerabilityCode resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VulnerabilityCodeState, opts?: CustomResourceOptions): VulnerabilityCode
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        criteria: Optional[VulnerabilityCodeCriteriaArgs] = None,
        enabled: Optional[bool] = None,
        insert_after: Optional[str] = None,
        metadata: Optional[VulnerabilityCodeMetadataArgs] = None,
        resource_attribute_conditions: Optional[VulnerabilityCodeResourceAttributeConditionsArgs] = None,
        rule_name: Optional[str] = None,
        vulnerability_detection_control: Optional[VulnerabilityCodeVulnerabilityDetectionControlArgs] = None) -> VulnerabilityCode
func GetVulnerabilityCode(ctx *Context, name string, id IDInput, state *VulnerabilityCodeState, opts ...ResourceOption) (*VulnerabilityCode, error)
public static VulnerabilityCode Get(string name, Input<string> id, VulnerabilityCodeState? state, CustomResourceOptions? opts = null)
public static VulnerabilityCode get(String name, Output<String> id, VulnerabilityCodeState state, CustomResourceOptions options)
resources:  _:    type: dynatrace:VulnerabilityCode    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Criteria Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeCriteria
Define criteria

Deprecated: This field has been deprecated

Enabled bool
This setting is enabled (true) or disabled (false)
InsertAfter string
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
Metadata Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeMetadata
Step 3: Leave comment (optional)
ResourceAttributeConditions Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeResourceAttributeConditions
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
RuleName string
Rule name
VulnerabilityDetectionControl Pulumiverse.Dynatrace.Inputs.VulnerabilityCodeVulnerabilityDetectionControl
Step 1: Select code-level vulnerability detection behavior
Criteria VulnerabilityCodeCriteriaArgs
Define criteria

Deprecated: This field has been deprecated

Enabled bool
This setting is enabled (true) or disabled (false)
InsertAfter string
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
Metadata VulnerabilityCodeMetadataArgs
Step 3: Leave comment (optional)
ResourceAttributeConditions VulnerabilityCodeResourceAttributeConditionsArgs
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
RuleName string
Rule name
VulnerabilityDetectionControl VulnerabilityCodeVulnerabilityDetectionControlArgs
Step 1: Select code-level vulnerability detection behavior
criteria VulnerabilityCodeCriteria
Define criteria

Deprecated: This field has been deprecated

enabled Boolean
This setting is enabled (true) or disabled (false)
insertAfter String
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
metadata VulnerabilityCodeMetadata
Step 3: Leave comment (optional)
resourceAttributeConditions VulnerabilityCodeResourceAttributeConditions
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
ruleName String
Rule name
vulnerabilityDetectionControl VulnerabilityCodeVulnerabilityDetectionControl
Step 1: Select code-level vulnerability detection behavior
criteria VulnerabilityCodeCriteria
Define criteria

Deprecated: This field has been deprecated

enabled boolean
This setting is enabled (true) or disabled (false)
insertAfter string
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
metadata VulnerabilityCodeMetadata
Step 3: Leave comment (optional)
resourceAttributeConditions VulnerabilityCodeResourceAttributeConditions
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
ruleName string
Rule name
vulnerabilityDetectionControl VulnerabilityCodeVulnerabilityDetectionControl
Step 1: Select code-level vulnerability detection behavior
criteria VulnerabilityCodeCriteriaArgs
Define criteria

Deprecated: This field has been deprecated

enabled bool
This setting is enabled (true) or disabled (false)
insert_after str
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
metadata VulnerabilityCodeMetadataArgs
Step 3: Leave comment (optional)
resource_attribute_conditions VulnerabilityCodeResourceAttributeConditionsArgs
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
rule_name str
Rule name
vulnerability_detection_control VulnerabilityCodeVulnerabilityDetectionControlArgs
Step 1: Select code-level vulnerability detection behavior
criteria Property Map
Define criteria

Deprecated: This field has been deprecated

enabled Boolean
This setting is enabled (true) or disabled (false)
insertAfter String
Because this resource allows for ordering you may specify the ID of the resource instance that comes before this instance regarding order. If not specified when creating the setting will be added to the end of the list. If not specified during update the order will remain untouched
metadata Property Map
Step 3: Leave comment (optional)
resourceAttributeConditions Property Map
If you add more than one condition, note that all conditions must be true simultaneously for the rule to apply.
ruleName String
Rule name
vulnerabilityDetectionControl Property Map
Step 1: Select code-level vulnerability detection behavior

Supporting Types

VulnerabilityCodeCriteria
, VulnerabilityCodeCriteriaArgs

ProcessGroup string
Process group
ProcessGroup string
Process group
processGroup String
Process group
processGroup string
Process group
process_group str
Process group
processGroup String
Process group

VulnerabilityCodeMetadata
, VulnerabilityCodeMetadataArgs

Comment This property is required. string
no documentation available
Comment This property is required. string
no documentation available
comment This property is required. String
no documentation available
comment This property is required. string
no documentation available
comment This property is required. str
no documentation available
comment This property is required. String
no documentation available

VulnerabilityCodeResourceAttributeConditions
, VulnerabilityCodeResourceAttributeConditionsArgs

VulnerabilityCodeResourceAttributeConditionsResourceAttributeCondition
, VulnerabilityCodeResourceAttributeConditionsResourceAttributeConditionArgs

Matcher This property is required. string
Possible Values: CONTAINS, DOES_NOT_CONTAIN, DOES_NOT_END_WITH, DOES_NOT_EXIST, DOES_NOT_START_WITH, ENDS_WITH, EQUALS, EXISTS, NOT_EQUALS, STARTS_WITH
ResourceAttributeKey This property is required. string
Resource attribute key
ResourceAttributeValue string
Resource attribute value
Matcher This property is required. string
Possible Values: CONTAINS, DOES_NOT_CONTAIN, DOES_NOT_END_WITH, DOES_NOT_EXIST, DOES_NOT_START_WITH, ENDS_WITH, EQUALS, EXISTS, NOT_EQUALS, STARTS_WITH
ResourceAttributeKey This property is required. string
Resource attribute key
ResourceAttributeValue string
Resource attribute value
matcher This property is required. String
Possible Values: CONTAINS, DOES_NOT_CONTAIN, DOES_NOT_END_WITH, DOES_NOT_EXIST, DOES_NOT_START_WITH, ENDS_WITH, EQUALS, EXISTS, NOT_EQUALS, STARTS_WITH
resourceAttributeKey This property is required. String
Resource attribute key
resourceAttributeValue String
Resource attribute value
matcher This property is required. string
Possible Values: CONTAINS, DOES_NOT_CONTAIN, DOES_NOT_END_WITH, DOES_NOT_EXIST, DOES_NOT_START_WITH, ENDS_WITH, EQUALS, EXISTS, NOT_EQUALS, STARTS_WITH
resourceAttributeKey This property is required. string
Resource attribute key
resourceAttributeValue string
Resource attribute value
matcher This property is required. str
Possible Values: CONTAINS, DOES_NOT_CONTAIN, DOES_NOT_END_WITH, DOES_NOT_EXIST, DOES_NOT_START_WITH, ENDS_WITH, EQUALS, EXISTS, NOT_EQUALS, STARTS_WITH
resource_attribute_key This property is required. str
Resource attribute key
resource_attribute_value str
Resource attribute value
matcher This property is required. String
Possible Values: CONTAINS, DOES_NOT_CONTAIN, DOES_NOT_END_WITH, DOES_NOT_EXIST, DOES_NOT_START_WITH, ENDS_WITH, EQUALS, EXISTS, NOT_EQUALS, STARTS_WITH
resourceAttributeKey This property is required. String
Resource attribute key
resourceAttributeValue String
Resource attribute value

VulnerabilityCodeVulnerabilityDetectionControl
, VulnerabilityCodeVulnerabilityDetectionControlArgs

MonitoringMode This property is required. string
Possible Values: MONITORING_OFF, MONITORING_ON
MonitoringMode This property is required. string
Possible Values: MONITORING_OFF, MONITORING_ON
monitoringMode This property is required. String
Possible Values: MONITORING_OFF, MONITORING_ON
monitoringMode This property is required. string
Possible Values: MONITORING_OFF, MONITORING_ON
monitoring_mode This property is required. str
Possible Values: MONITORING_OFF, MONITORING_ON
monitoringMode This property is required. String
Possible Values: MONITORING_OFF, MONITORING_ON

Package Details

Repository
dynatrace pulumiverse/pulumi-dynatrace
License
Apache-2.0
Notes
This Pulumi package is based on the dynatrace Terraform Provider.