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

oci.DataSafe.SetUserAssessmentBaselineManagement

Explore with Pulumi AI

This resource provides the Set User Assessment Baseline management resource in Oracle Cloud Infrastructure Data Safe service.

Sets the saved user assessment as the baseline in the compartment where the the specified assessment resides. The user assessment needs to be of type ‘SAVED’.

Example Usage

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

const testSetUserAssessmentBaselineManagement = new oci.datasafe.SetUserAssessmentBaselineManagement("test_set_user_assessment_baseline_management", {
    targetId: testTargetDatabase.id,
    compartmentId: comaprtmentId,
});
Copy
import pulumi
import pulumi_oci as oci

test_set_user_assessment_baseline_management = oci.data_safe.SetUserAssessmentBaselineManagement("test_set_user_assessment_baseline_management",
    target_id=test_target_database["id"],
    compartment_id=comaprtment_id)
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.NewSetUserAssessmentBaselineManagement(ctx, "test_set_user_assessment_baseline_management", &datasafe.SetUserAssessmentBaselineManagementArgs{
			TargetId:      pulumi.Any(testTargetDatabase.Id),
			CompartmentId: pulumi.Any(comaprtmentId),
		})
		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 testSetUserAssessmentBaselineManagement = new Oci.DataSafe.SetUserAssessmentBaselineManagement("test_set_user_assessment_baseline_management", new()
    {
        TargetId = testTargetDatabase.Id,
        CompartmentId = comaprtmentId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataSafe.SetUserAssessmentBaselineManagement;
import com.pulumi.oci.DataSafe.SetUserAssessmentBaselineManagementArgs;
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 testSetUserAssessmentBaselineManagement = new SetUserAssessmentBaselineManagement("testSetUserAssessmentBaselineManagement", SetUserAssessmentBaselineManagementArgs.builder()
            .targetId(testTargetDatabase.id())
            .compartmentId(comaprtmentId)
            .build());

    }
}
Copy
resources:
  testSetUserAssessmentBaselineManagement:
    type: oci:DataSafe:SetUserAssessmentBaselineManagement
    name: test_set_user_assessment_baseline_management
    properties:
      targetId: ${testTargetDatabase.id}
      compartmentId: ${comaprtmentId}
Copy

Create SetUserAssessmentBaselineManagement Resource

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

Constructor syntax

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

@overload
def SetUserAssessmentBaselineManagement(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        compartment_id: Optional[str] = None,
                                        target_id: Optional[str] = None)
func NewSetUserAssessmentBaselineManagement(ctx *Context, name string, args SetUserAssessmentBaselineManagementArgs, opts ...ResourceOption) (*SetUserAssessmentBaselineManagement, error)
public SetUserAssessmentBaselineManagement(string name, SetUserAssessmentBaselineManagementArgs args, CustomResourceOptions? opts = null)
public SetUserAssessmentBaselineManagement(String name, SetUserAssessmentBaselineManagementArgs args)
public SetUserAssessmentBaselineManagement(String name, SetUserAssessmentBaselineManagementArgs args, CustomResourceOptions options)
type: oci:DataSafe:SetUserAssessmentBaselineManagement
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. SetUserAssessmentBaselineManagementArgs
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. SetUserAssessmentBaselineManagementArgs
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. SetUserAssessmentBaselineManagementArgs
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. SetUserAssessmentBaselineManagementArgs
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. SetUserAssessmentBaselineManagementArgs
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 setUserAssessmentBaselineManagementResource = new Oci.DataSafe.SetUserAssessmentBaselineManagement("setUserAssessmentBaselineManagementResource", new()
{
    CompartmentId = "string",
    TargetId = "string",
});
Copy
example, err := DataSafe.NewSetUserAssessmentBaselineManagement(ctx, "setUserAssessmentBaselineManagementResource", &DataSafe.SetUserAssessmentBaselineManagementArgs{
	CompartmentId: pulumi.String("string"),
	TargetId:      pulumi.String("string"),
})
Copy
var setUserAssessmentBaselineManagementResource = new SetUserAssessmentBaselineManagement("setUserAssessmentBaselineManagementResource", SetUserAssessmentBaselineManagementArgs.builder()
    .compartmentId("string")
    .targetId("string")
    .build());
Copy
set_user_assessment_baseline_management_resource = oci.data_safe.SetUserAssessmentBaselineManagement("setUserAssessmentBaselineManagementResource",
    compartment_id="string",
    target_id="string")
Copy
const setUserAssessmentBaselineManagementResource = new oci.datasafe.SetUserAssessmentBaselineManagement("setUserAssessmentBaselineManagementResource", {
    compartmentId: "string",
    targetId: "string",
});
Copy
type: oci:DataSafe:SetUserAssessmentBaselineManagement
properties:
    compartmentId: string
    targetId: string
Copy

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

CompartmentId
This property is required.
Changes to this property will trigger replacement.
string

The compartment OCID of the target.

** 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

TargetId
This property is required.
Changes to this property will trigger replacement.
string
The target OCID for which UA needs to be set as baseline.
CompartmentId
This property is required.
Changes to this property will trigger replacement.
string

The compartment OCID of the target.

** 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

TargetId
This property is required.
Changes to this property will trigger replacement.
string
The target OCID for which UA needs to be set as baseline.
compartmentId
This property is required.
Changes to this property will trigger replacement.
String

The compartment OCID of the target.

** 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

targetId
This property is required.
Changes to this property will trigger replacement.
String
The target OCID for which UA needs to be set as baseline.
compartmentId
This property is required.
Changes to this property will trigger replacement.
string

The compartment OCID of the target.

** 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

targetId
This property is required.
Changes to this property will trigger replacement.
string
The target OCID for which UA needs to be set as baseline.
compartment_id
This property is required.
Changes to this property will trigger replacement.
str

The compartment OCID of the target.

** 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

target_id
This property is required.
Changes to this property will trigger replacement.
str
The target OCID for which UA needs to be set as baseline.
compartmentId
This property is required.
Changes to this property will trigger replacement.
String

The compartment OCID of the target.

** 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

targetId
This property is required.
Changes to this property will trigger replacement.
String
The target OCID for which UA needs to be set as baseline.

Outputs

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

AssessmentIds List<string>
Id string
The provider-assigned unique ID for this managed resource.
UserAssessmentId string
AssessmentIds []string
Id string
The provider-assigned unique ID for this managed resource.
UserAssessmentId string
assessmentIds List<String>
id String
The provider-assigned unique ID for this managed resource.
userAssessmentId String
assessmentIds string[]
id string
The provider-assigned unique ID for this managed resource.
userAssessmentId string
assessment_ids Sequence[str]
id str
The provider-assigned unique ID for this managed resource.
user_assessment_id str
assessmentIds List<String>
id String
The provider-assigned unique ID for this managed resource.
userAssessmentId String

Look up Existing SetUserAssessmentBaselineManagement Resource

Get an existing SetUserAssessmentBaselineManagement 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?: SetUserAssessmentBaselineManagementState, opts?: CustomResourceOptions): SetUserAssessmentBaselineManagement
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        assessment_ids: Optional[Sequence[str]] = None,
        compartment_id: Optional[str] = None,
        target_id: Optional[str] = None,
        user_assessment_id: Optional[str] = None) -> SetUserAssessmentBaselineManagement
func GetSetUserAssessmentBaselineManagement(ctx *Context, name string, id IDInput, state *SetUserAssessmentBaselineManagementState, opts ...ResourceOption) (*SetUserAssessmentBaselineManagement, error)
public static SetUserAssessmentBaselineManagement Get(string name, Input<string> id, SetUserAssessmentBaselineManagementState? state, CustomResourceOptions? opts = null)
public static SetUserAssessmentBaselineManagement get(String name, Output<String> id, SetUserAssessmentBaselineManagementState state, CustomResourceOptions options)
resources:  _:    type: oci:DataSafe:SetUserAssessmentBaselineManagement    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:
AssessmentIds Changes to this property will trigger replacement. List<string>
CompartmentId Changes to this property will trigger replacement. string

The compartment OCID of the target.

** 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

TargetId Changes to this property will trigger replacement. string
The target OCID for which UA needs to be set as baseline.
UserAssessmentId string
AssessmentIds Changes to this property will trigger replacement. []string
CompartmentId Changes to this property will trigger replacement. string

The compartment OCID of the target.

** 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

TargetId Changes to this property will trigger replacement. string
The target OCID for which UA needs to be set as baseline.
UserAssessmentId string
assessmentIds Changes to this property will trigger replacement. List<String>
compartmentId Changes to this property will trigger replacement. String

The compartment OCID of the target.

** 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

targetId Changes to this property will trigger replacement. String
The target OCID for which UA needs to be set as baseline.
userAssessmentId String
assessmentIds Changes to this property will trigger replacement. string[]
compartmentId Changes to this property will trigger replacement. string

The compartment OCID of the target.

** 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

targetId Changes to this property will trigger replacement. string
The target OCID for which UA needs to be set as baseline.
userAssessmentId string
assessment_ids Changes to this property will trigger replacement. Sequence[str]
compartment_id Changes to this property will trigger replacement. str

The compartment OCID of the target.

** 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

target_id Changes to this property will trigger replacement. str
The target OCID for which UA needs to be set as baseline.
user_assessment_id str
assessmentIds Changes to this property will trigger replacement. List<String>
compartmentId Changes to this property will trigger replacement. String

The compartment OCID of the target.

** 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

targetId Changes to this property will trigger replacement. String
The target OCID for which UA needs to be set as baseline.
userAssessmentId String

Import

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

$ pulumi import oci:DataSafe/setUserAssessmentBaselineManagement:SetUserAssessmentBaselineManagement test_set_user_assessment_baseline_management "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.