1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. UnsetSecurityAssessmentBaseline
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.DataSafe.UnsetSecurityAssessmentBaseline

Explore with Pulumi AI

This resource provides the Unset Security Assessment Baseline resource in Oracle Cloud Infrastructure Data Safe service.

Removes the baseline setting for the saved security assessment associated with the targetId passed via body. If no body or empty body is passed then the baseline settings of all the saved security assessments pertaining to the baseline assessment OCID provided in the path will be removed. Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testUnsetSecurityAssessmentBaseline = new oci.datasafe.UnsetSecurityAssessmentBaseline("test_unset_security_assessment_baseline", {
    securityAssessmentId: testSecurityAssessment.id,
    targetIds: unsetSecurityAssessmentBaselineTargetIds,
});
Copy
import pulumi
import pulumi_oci as oci

test_unset_security_assessment_baseline = oci.data_safe.UnsetSecurityAssessmentBaseline("test_unset_security_assessment_baseline",
    security_assessment_id=test_security_assessment["id"],
    target_ids=unset_security_assessment_baseline_target_ids)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/datasafe"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datasafe.NewUnsetSecurityAssessmentBaseline(ctx, "test_unset_security_assessment_baseline", &datasafe.UnsetSecurityAssessmentBaselineArgs{
			SecurityAssessmentId: pulumi.Any(testSecurityAssessment.Id),
			TargetIds:            pulumi.Any(unsetSecurityAssessmentBaselineTargetIds),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testUnsetSecurityAssessmentBaseline = new Oci.DataSafe.UnsetSecurityAssessmentBaseline("test_unset_security_assessment_baseline", new()
    {
        SecurityAssessmentId = testSecurityAssessment.Id,
        TargetIds = unsetSecurityAssessmentBaselineTargetIds,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataSafe.UnsetSecurityAssessmentBaseline;
import com.pulumi.oci.DataSafe.UnsetSecurityAssessmentBaselineArgs;
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 testUnsetSecurityAssessmentBaseline = new UnsetSecurityAssessmentBaseline("testUnsetSecurityAssessmentBaseline", UnsetSecurityAssessmentBaselineArgs.builder()
            .securityAssessmentId(testSecurityAssessment.id())
            .targetIds(unsetSecurityAssessmentBaselineTargetIds)
            .build());

    }
}
Copy
resources:
  testUnsetSecurityAssessmentBaseline:
    type: oci:DataSafe:UnsetSecurityAssessmentBaseline
    name: test_unset_security_assessment_baseline
    properties:
      securityAssessmentId: ${testSecurityAssessment.id}
      targetIds: ${unsetSecurityAssessmentBaselineTargetIds}
Copy

Create UnsetSecurityAssessmentBaseline Resource

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

Constructor syntax

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

@overload
def UnsetSecurityAssessmentBaseline(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    security_assessment_id: Optional[str] = None,
                                    target_ids: Optional[Sequence[str]] = None)
func NewUnsetSecurityAssessmentBaseline(ctx *Context, name string, args UnsetSecurityAssessmentBaselineArgs, opts ...ResourceOption) (*UnsetSecurityAssessmentBaseline, error)
public UnsetSecurityAssessmentBaseline(string name, UnsetSecurityAssessmentBaselineArgs args, CustomResourceOptions? opts = null)
public UnsetSecurityAssessmentBaseline(String name, UnsetSecurityAssessmentBaselineArgs args)
public UnsetSecurityAssessmentBaseline(String name, UnsetSecurityAssessmentBaselineArgs args, CustomResourceOptions options)
type: oci:DataSafe:UnsetSecurityAssessmentBaseline
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. UnsetSecurityAssessmentBaselineArgs
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. UnsetSecurityAssessmentBaselineArgs
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. UnsetSecurityAssessmentBaselineArgs
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. UnsetSecurityAssessmentBaselineArgs
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. UnsetSecurityAssessmentBaselineArgs
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 unsetSecurityAssessmentBaselineResource = new Oci.DataSafe.UnsetSecurityAssessmentBaseline("unsetSecurityAssessmentBaselineResource", new()
{
    SecurityAssessmentId = "string",
    TargetIds = new[]
    {
        "string",
    },
});
Copy
example, err := DataSafe.NewUnsetSecurityAssessmentBaseline(ctx, "unsetSecurityAssessmentBaselineResource", &DataSafe.UnsetSecurityAssessmentBaselineArgs{
	SecurityAssessmentId: pulumi.String("string"),
	TargetIds: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var unsetSecurityAssessmentBaselineResource = new UnsetSecurityAssessmentBaseline("unsetSecurityAssessmentBaselineResource", UnsetSecurityAssessmentBaselineArgs.builder()
    .securityAssessmentId("string")
    .targetIds("string")
    .build());
Copy
unset_security_assessment_baseline_resource = oci.data_safe.UnsetSecurityAssessmentBaseline("unsetSecurityAssessmentBaselineResource",
    security_assessment_id="string",
    target_ids=["string"])
Copy
const unsetSecurityAssessmentBaselineResource = new oci.datasafe.UnsetSecurityAssessmentBaseline("unsetSecurityAssessmentBaselineResource", {
    securityAssessmentId: "string",
    targetIds: ["string"],
});
Copy
type: oci:DataSafe:UnsetSecurityAssessmentBaseline
properties:
    securityAssessmentId: string
    targetIds:
        - string
Copy

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

SecurityAssessmentId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the security assessment.
TargetIds Changes to this property will trigger replacement. List<string>

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

SecurityAssessmentId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the security assessment.
TargetIds Changes to this property will trigger replacement. []string

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

securityAssessmentId
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the security assessment.
targetIds Changes to this property will trigger replacement. List<String>

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

securityAssessmentId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the security assessment.
targetIds Changes to this property will trigger replacement. string[]

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

security_assessment_id
This property is required.
Changes to this property will trigger replacement.
str
The OCID of the security assessment.
target_ids Changes to this property will trigger replacement. Sequence[str]

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

securityAssessmentId
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the security assessment.
targetIds Changes to this property will trigger replacement. List<String>

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Outputs

All input properties are implicitly available as output properties. Additionally, the UnsetSecurityAssessmentBaseline 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 UnsetSecurityAssessmentBaseline Resource

Get an existing UnsetSecurityAssessmentBaseline 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?: UnsetSecurityAssessmentBaselineState, opts?: CustomResourceOptions): UnsetSecurityAssessmentBaseline
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        security_assessment_id: Optional[str] = None,
        target_ids: Optional[Sequence[str]] = None) -> UnsetSecurityAssessmentBaseline
func GetUnsetSecurityAssessmentBaseline(ctx *Context, name string, id IDInput, state *UnsetSecurityAssessmentBaselineState, opts ...ResourceOption) (*UnsetSecurityAssessmentBaseline, error)
public static UnsetSecurityAssessmentBaseline Get(string name, Input<string> id, UnsetSecurityAssessmentBaselineState? state, CustomResourceOptions? opts = null)
public static UnsetSecurityAssessmentBaseline get(String name, Output<String> id, UnsetSecurityAssessmentBaselineState state, CustomResourceOptions options)
resources:  _:    type: oci:DataSafe:UnsetSecurityAssessmentBaseline    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:
SecurityAssessmentId Changes to this property will trigger replacement. string
The OCID of the security assessment.
TargetIds Changes to this property will trigger replacement. List<string>

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

SecurityAssessmentId Changes to this property will trigger replacement. string
The OCID of the security assessment.
TargetIds Changes to this property will trigger replacement. []string

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

securityAssessmentId Changes to this property will trigger replacement. String
The OCID of the security assessment.
targetIds Changes to this property will trigger replacement. List<String>

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

securityAssessmentId Changes to this property will trigger replacement. string
The OCID of the security assessment.
targetIds Changes to this property will trigger replacement. string[]

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

security_assessment_id Changes to this property will trigger replacement. str
The OCID of the security assessment.
target_ids Changes to this property will trigger replacement. Sequence[str]

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

securityAssessmentId Changes to this property will trigger replacement. String
The OCID of the security assessment.
targetIds Changes to this property will trigger replacement. List<String>

The list of database target OCIDs for which the user intends to unset the baseline.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Import

UnsetSecurityAssessmentBaseline can be imported using the id, e.g.

$ pulumi import oci:DataSafe/unsetSecurityAssessmentBaseline:UnsetSecurityAssessmentBaseline test_unset_security_assessment_baseline "id"
Copy

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

Package Details

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