1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. SetSecurityAssessmentBaseline
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.DataSafe.SetSecurityAssessmentBaseline

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

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

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSetSecurityAssessmentBaseline = new oci.datasafe.SetSecurityAssessmentBaseline("testSetSecurityAssessmentBaseline", {
        securityAssessmentId: oci_data_safe_security_assessment.test_security_assessment.id,
        assessmentIds: _var.set_security_assessment_baseline_assessment_ids,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_set_security_assessment_baseline = oci.data_safe.SetSecurityAssessmentBaseline("testSetSecurityAssessmentBaseline",
        security_assessment_id=oci_data_safe_security_assessment["test_security_assessment"]["id"],
        assessment_ids=var["set_security_assessment_baseline_assessment_ids"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DataSafe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DataSafe.NewSetSecurityAssessmentBaseline(ctx, "testSetSecurityAssessmentBaseline", &DataSafe.SetSecurityAssessmentBaselineArgs{
    			SecurityAssessmentId: pulumi.Any(oci_data_safe_security_assessment.Test_security_assessment.Id),
    			AssessmentIds:        pulumi.Any(_var.Set_security_assessment_baseline_assessment_ids),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testSetSecurityAssessmentBaseline = new Oci.DataSafe.SetSecurityAssessmentBaseline("testSetSecurityAssessmentBaseline", new()
        {
            SecurityAssessmentId = oci_data_safe_security_assessment.Test_security_assessment.Id,
            AssessmentIds = @var.Set_security_assessment_baseline_assessment_ids,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DataSafe.SetSecurityAssessmentBaseline;
    import com.pulumi.oci.DataSafe.SetSecurityAssessmentBaselineArgs;
    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 testSetSecurityAssessmentBaseline = new SetSecurityAssessmentBaseline("testSetSecurityAssessmentBaseline", SetSecurityAssessmentBaselineArgs.builder()        
                .securityAssessmentId(oci_data_safe_security_assessment.test_security_assessment().id())
                .assessmentIds(var_.set_security_assessment_baseline_assessment_ids())
                .build());
    
        }
    }
    
    resources:
      testSetSecurityAssessmentBaseline:
        type: oci:DataSafe:SetSecurityAssessmentBaseline
        properties:
          #Required
          securityAssessmentId: ${oci_data_safe_security_assessment.test_security_assessment.id}
          #Optional
          assessmentIds: ${var.set_security_assessment_baseline_assessment_ids}
    

    Create SetSecurityAssessmentBaseline Resource

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

    Constructor syntax

    new SetSecurityAssessmentBaseline(name: string, args: SetSecurityAssessmentBaselineArgs, opts?: CustomResourceOptions);
    @overload
    def SetSecurityAssessmentBaseline(resource_name: str,
                                      args: SetSecurityAssessmentBaselineArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SetSecurityAssessmentBaseline(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      security_assessment_id: Optional[str] = None,
                                      assessment_ids: Optional[Sequence[str]] = None)
    func NewSetSecurityAssessmentBaseline(ctx *Context, name string, args SetSecurityAssessmentBaselineArgs, opts ...ResourceOption) (*SetSecurityAssessmentBaseline, error)
    public SetSecurityAssessmentBaseline(string name, SetSecurityAssessmentBaselineArgs args, CustomResourceOptions? opts = null)
    public SetSecurityAssessmentBaseline(String name, SetSecurityAssessmentBaselineArgs args)
    public SetSecurityAssessmentBaseline(String name, SetSecurityAssessmentBaselineArgs args, CustomResourceOptions options)
    
    type: oci:DataSafe:SetSecurityAssessmentBaseline
    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 SetSecurityAssessmentBaselineArgs
    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 SetSecurityAssessmentBaselineArgs
    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 SetSecurityAssessmentBaselineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SetSecurityAssessmentBaselineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SetSecurityAssessmentBaselineArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var setSecurityAssessmentBaselineResource = new Oci.DataSafe.SetSecurityAssessmentBaseline("setSecurityAssessmentBaselineResource", new()
    {
        SecurityAssessmentId = "string",
        AssessmentIds = new[]
        {
            "string",
        },
    });
    
    example, err := DataSafe.NewSetSecurityAssessmentBaseline(ctx, "setSecurityAssessmentBaselineResource", &DataSafe.SetSecurityAssessmentBaselineArgs{
    	SecurityAssessmentId: pulumi.String("string"),
    	AssessmentIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var setSecurityAssessmentBaselineResource = new SetSecurityAssessmentBaseline("setSecurityAssessmentBaselineResource", SetSecurityAssessmentBaselineArgs.builder()        
        .securityAssessmentId("string")
        .assessmentIds("string")
        .build());
    
    set_security_assessment_baseline_resource = oci.data_safe.SetSecurityAssessmentBaseline("setSecurityAssessmentBaselineResource",
        security_assessment_id="string",
        assessment_ids=["string"])
    
    const setSecurityAssessmentBaselineResource = new oci.datasafe.SetSecurityAssessmentBaseline("setSecurityAssessmentBaselineResource", {
        securityAssessmentId: "string",
        assessmentIds: ["string"],
    });
    
    type: oci:DataSafe:SetSecurityAssessmentBaseline
    properties:
        assessmentIds:
            - string
        securityAssessmentId: string
    

    SetSecurityAssessmentBaseline Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SetSecurityAssessmentBaseline resource accepts the following input properties:

    SecurityAssessmentId string

    The OCID of the security 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 List<string>
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    SecurityAssessmentId string

    The OCID of the security 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 []string
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    securityAssessmentId String

    The OCID of the security 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 List<String>
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    securityAssessmentId string

    The OCID of the security 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 string[]
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    security_assessment_id str

    The OCID of the security 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 Sequence[str]
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    securityAssessmentId String

    The OCID of the security 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 List<String>
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.

    Outputs

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

    Get an existing SetSecurityAssessmentBaseline 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?: SetSecurityAssessmentBaselineState, opts?: CustomResourceOptions): SetSecurityAssessmentBaseline
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            assessment_ids: Optional[Sequence[str]] = None,
            security_assessment_id: Optional[str] = None) -> SetSecurityAssessmentBaseline
    func GetSetSecurityAssessmentBaseline(ctx *Context, name string, id IDInput, state *SetSecurityAssessmentBaselineState, opts ...ResourceOption) (*SetSecurityAssessmentBaseline, error)
    public static SetSecurityAssessmentBaseline Get(string name, Input<string> id, SetSecurityAssessmentBaselineState? state, CustomResourceOptions? opts = null)
    public static SetSecurityAssessmentBaseline get(String name, Output<String> id, SetSecurityAssessmentBaselineState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 List<string>
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    SecurityAssessmentId string

    The OCID of the security 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 []string
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    SecurityAssessmentId string

    The OCID of the security 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 List<String>
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    securityAssessmentId String

    The OCID of the security 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 string[]
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    securityAssessmentId string

    The OCID of the security 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 Sequence[str]
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    security_assessment_id str

    The OCID of the security 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 List<String>
    The list of OCIDs for the security assessments that need to be updated while setting the baseline.
    securityAssessmentId String

    The OCID of the security 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

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

    $ pulumi import oci:DataSafe/setSecurityAssessmentBaseline:SetSecurityAssessmentBaseline test_set_security_assessment_baseline "id"
    

    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.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi