1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. SetUserAssessmentBaseline
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.DataSafe.SetUserAssessmentBaseline

Explore with Pulumi AI

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

Sets the saved user assessment as the baseline in the compartment where 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 testSetUserAssessmentBaseline = new oci.datasafe.SetUserAssessmentBaseline("test_set_user_assessment_baseline", {
    userAssessmentId: testUserAssessment.id,
    assessmentIds: setUserAssessmentBaselineAssessmentIds,
});
Copy
import pulumi
import pulumi_oci as oci

test_set_user_assessment_baseline = oci.data_safe.SetUserAssessmentBaseline("test_set_user_assessment_baseline",
    user_assessment_id=test_user_assessment["id"],
    assessment_ids=set_user_assessment_baseline_assessment_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.NewSetUserAssessmentBaseline(ctx, "test_set_user_assessment_baseline", &datasafe.SetUserAssessmentBaselineArgs{
			UserAssessmentId: pulumi.Any(testUserAssessment.Id),
			AssessmentIds:    pulumi.Any(setUserAssessmentBaselineAssessmentIds),
		})
		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 testSetUserAssessmentBaseline = new Oci.DataSafe.SetUserAssessmentBaseline("test_set_user_assessment_baseline", new()
    {
        UserAssessmentId = testUserAssessment.Id,
        AssessmentIds = setUserAssessmentBaselineAssessmentIds,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataSafe.SetUserAssessmentBaseline;
import com.pulumi.oci.DataSafe.SetUserAssessmentBaselineArgs;
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 testSetUserAssessmentBaseline = new SetUserAssessmentBaseline("testSetUserAssessmentBaseline", SetUserAssessmentBaselineArgs.builder()
            .userAssessmentId(testUserAssessment.id())
            .assessmentIds(setUserAssessmentBaselineAssessmentIds)
            .build());

    }
}
Copy
resources:
  testSetUserAssessmentBaseline:
    type: oci:DataSafe:SetUserAssessmentBaseline
    name: test_set_user_assessment_baseline
    properties:
      userAssessmentId: ${testUserAssessment.id}
      assessmentIds: ${setUserAssessmentBaselineAssessmentIds}
Copy

Create SetUserAssessmentBaseline Resource

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

Constructor syntax

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

@overload
def SetUserAssessmentBaseline(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              user_assessment_id: Optional[str] = None,
                              assessment_ids: Optional[Sequence[str]] = None)
func NewSetUserAssessmentBaseline(ctx *Context, name string, args SetUserAssessmentBaselineArgs, opts ...ResourceOption) (*SetUserAssessmentBaseline, error)
public SetUserAssessmentBaseline(string name, SetUserAssessmentBaselineArgs args, CustomResourceOptions? opts = null)
public SetUserAssessmentBaseline(String name, SetUserAssessmentBaselineArgs args)
public SetUserAssessmentBaseline(String name, SetUserAssessmentBaselineArgs args, CustomResourceOptions options)
type: oci:DataSafe:SetUserAssessmentBaseline
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. SetUserAssessmentBaselineArgs
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. SetUserAssessmentBaselineArgs
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. SetUserAssessmentBaselineArgs
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. SetUserAssessmentBaselineArgs
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. SetUserAssessmentBaselineArgs
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 setUserAssessmentBaselineResource = new Oci.DataSafe.SetUserAssessmentBaseline("setUserAssessmentBaselineResource", new()
{
    UserAssessmentId = "string",
    AssessmentIds = new[]
    {
        "string",
    },
});
Copy
example, err := DataSafe.NewSetUserAssessmentBaseline(ctx, "setUserAssessmentBaselineResource", &DataSafe.SetUserAssessmentBaselineArgs{
	UserAssessmentId: pulumi.String("string"),
	AssessmentIds: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var setUserAssessmentBaselineResource = new SetUserAssessmentBaseline("setUserAssessmentBaselineResource", SetUserAssessmentBaselineArgs.builder()
    .userAssessmentId("string")
    .assessmentIds("string")
    .build());
Copy
set_user_assessment_baseline_resource = oci.data_safe.SetUserAssessmentBaseline("setUserAssessmentBaselineResource",
    user_assessment_id="string",
    assessment_ids=["string"])
Copy
const setUserAssessmentBaselineResource = new oci.datasafe.SetUserAssessmentBaseline("setUserAssessmentBaselineResource", {
    userAssessmentId: "string",
    assessmentIds: ["string"],
});
Copy
type: oci:DataSafe:SetUserAssessmentBaseline
properties:
    assessmentIds:
        - string
    userAssessmentId: string
Copy

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

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

The OCID of the user assessment.

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

AssessmentIds Changes to this property will trigger replacement. List<string>
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
UserAssessmentId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the user assessment.

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

AssessmentIds Changes to this property will trigger replacement. []string
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
userAssessmentId
This property is required.
Changes to this property will trigger replacement.
String

The OCID of the user assessment.

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

assessmentIds Changes to this property will trigger replacement. List<String>
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
userAssessmentId
This property is required.
Changes to this property will trigger replacement.
string

The OCID of the user assessment.

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

assessmentIds Changes to this property will trigger replacement. string[]
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
user_assessment_id
This property is required.
Changes to this property will trigger replacement.
str

The OCID of the user assessment.

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

assessment_ids Changes to this property will trigger replacement. Sequence[str]
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
userAssessmentId
This property is required.
Changes to this property will trigger replacement.
String

The OCID of the user assessment.

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

assessmentIds Changes to this property will trigger replacement. List<String>
The list of OCIDs for the user assessments that need to be updated while setting the baseline.

Outputs

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

Get an existing SetUserAssessmentBaseline 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?: SetUserAssessmentBaselineState, opts?: CustomResourceOptions): SetUserAssessmentBaseline
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        assessment_ids: Optional[Sequence[str]] = None,
        user_assessment_id: Optional[str] = None) -> SetUserAssessmentBaseline
func GetSetUserAssessmentBaseline(ctx *Context, name string, id IDInput, state *SetUserAssessmentBaselineState, opts ...ResourceOption) (*SetUserAssessmentBaseline, error)
public static SetUserAssessmentBaseline Get(string name, Input<string> id, SetUserAssessmentBaselineState? state, CustomResourceOptions? opts = null)
public static SetUserAssessmentBaseline get(String name, Output<String> id, SetUserAssessmentBaselineState state, CustomResourceOptions options)
resources:  _:    type: oci:DataSafe:SetUserAssessmentBaseline    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>
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
UserAssessmentId Changes to this property will trigger replacement. string

The OCID of the user assessment.

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

AssessmentIds Changes to this property will trigger replacement. []string
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
UserAssessmentId Changes to this property will trigger replacement. string

The OCID of the user assessment.

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

assessmentIds Changes to this property will trigger replacement. List<String>
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
userAssessmentId Changes to this property will trigger replacement. String

The OCID of the user assessment.

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

assessmentIds Changes to this property will trigger replacement. string[]
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
userAssessmentId Changes to this property will trigger replacement. string

The OCID of the user assessment.

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

assessment_ids Changes to this property will trigger replacement. Sequence[str]
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
user_assessment_id Changes to this property will trigger replacement. str

The OCID of the user assessment.

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

assessmentIds Changes to this property will trigger replacement. List<String>
The list of OCIDs for the user assessments that need to be updated while setting the baseline.
userAssessmentId Changes to this property will trigger replacement. String

The OCID of the user assessment.

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

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

$ pulumi import oci:DataSafe/setUserAssessmentBaseline:SetUserAssessmentBaseline test_set_user_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.