1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. SetSecurityAssessmentBaseline
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.DataSafe.SetSecurityAssessmentBaseline

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 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("test_set_security_assessment_baseline", {
        securityAssessmentId: testSecurityAssessment.id,
        assessmentIds: setSecurityAssessmentBaselineAssessmentIds,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_set_security_assessment_baseline = oci.data_safe.SetSecurityAssessmentBaseline("test_set_security_assessment_baseline",
        security_assessment_id=test_security_assessment["id"],
        assessment_ids=set_security_assessment_baseline_assessment_ids)
    
    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.NewSetSecurityAssessmentBaseline(ctx, "test_set_security_assessment_baseline", &DataSafe.SetSecurityAssessmentBaselineArgs{
    			SecurityAssessmentId: pulumi.Any(testSecurityAssessment.Id),
    			AssessmentIds:        pulumi.Any(setSecurityAssessmentBaselineAssessmentIds),
    		})
    		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("test_set_security_assessment_baseline", new()
        {
            SecurityAssessmentId = testSecurityAssessment.Id,
            AssessmentIds = setSecurityAssessmentBaselineAssessmentIds,
        });
    
    });
    
    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(testSecurityAssessment.id())
                .assessmentIds(setSecurityAssessmentBaselineAssessmentIds)
                .build());
    
        }
    }
    
    resources:
      testSetSecurityAssessmentBaseline:
        type: oci:DataSafe:SetSecurityAssessmentBaseline
        name: test_set_security_assessment_baseline
        properties:
          securityAssessmentId: ${testSecurityAssessment.id}
          assessmentIds: ${setSecurityAssessmentBaselineAssessmentIds}
    

    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.

    Constructor 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 v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi