1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. SetSecurityAssessmentBaselineManagement
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DataSafe.SetSecurityAssessmentBaselineManagement

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This resource provides the Set Security Assessment Baseline management 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 testSetSecurityAssessmentBaselineManagement = new oci.datasafe.SetSecurityAssessmentBaselineManagement("test_set_security_assessment_baseline_management", {
        targetId: testTargetDatabase.id,
        compartmentId: comaprtmentId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_set_security_assessment_baseline_management = oci.data_safe.SetSecurityAssessmentBaselineManagement("test_set_security_assessment_baseline_management",
        target_id=test_target_database["id"],
        compartment_id=comaprtment_id)
    
    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.NewSetSecurityAssessmentBaselineManagement(ctx, "test_set_security_assessment_baseline_management", &DataSafe.SetSecurityAssessmentBaselineManagementArgs{
    			TargetId:      pulumi.Any(testTargetDatabase.Id),
    			CompartmentId: pulumi.Any(comaprtmentId),
    		})
    		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 testSetSecurityAssessmentBaselineManagement = new Oci.DataSafe.SetSecurityAssessmentBaselineManagement("test_set_security_assessment_baseline_management", new()
        {
            TargetId = testTargetDatabase.Id,
            CompartmentId = comaprtmentId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DataSafe.SetSecurityAssessmentBaselineManagement;
    import com.pulumi.oci.DataSafe.SetSecurityAssessmentBaselineManagementArgs;
    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 testSetSecurityAssessmentBaselineManagement = new SetSecurityAssessmentBaselineManagement("testSetSecurityAssessmentBaselineManagement", SetSecurityAssessmentBaselineManagementArgs.builder()
                .targetId(testTargetDatabase.id())
                .compartmentId(comaprtmentId)
                .build());
    
        }
    }
    
    resources:
      testSetSecurityAssessmentBaselineManagement:
        type: oci:DataSafe:SetSecurityAssessmentBaselineManagement
        name: test_set_security_assessment_baseline_management
        properties:
          targetId: ${testTargetDatabase.id}
          compartmentId: ${comaprtmentId}
    

    Create SetSecurityAssessmentBaselineManagement Resource

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

    Constructor syntax

    new SetSecurityAssessmentBaselineManagement(name: string, args: SetSecurityAssessmentBaselineManagementArgs, opts?: CustomResourceOptions);
    @overload
    def SetSecurityAssessmentBaselineManagement(resource_name: str,
                                                args: SetSecurityAssessmentBaselineManagementArgs,
                                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def SetSecurityAssessmentBaselineManagement(resource_name: str,
                                                opts: Optional[ResourceOptions] = None,
                                                compartment_id: Optional[str] = None,
                                                target_id: Optional[str] = None)
    func NewSetSecurityAssessmentBaselineManagement(ctx *Context, name string, args SetSecurityAssessmentBaselineManagementArgs, opts ...ResourceOption) (*SetSecurityAssessmentBaselineManagement, error)
    public SetSecurityAssessmentBaselineManagement(string name, SetSecurityAssessmentBaselineManagementArgs args, CustomResourceOptions? opts = null)
    public SetSecurityAssessmentBaselineManagement(String name, SetSecurityAssessmentBaselineManagementArgs args)
    public SetSecurityAssessmentBaselineManagement(String name, SetSecurityAssessmentBaselineManagementArgs args, CustomResourceOptions options)
    
    type: oci:DataSafe:SetSecurityAssessmentBaselineManagement
    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 SetSecurityAssessmentBaselineManagementArgs
    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 SetSecurityAssessmentBaselineManagementArgs
    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 SetSecurityAssessmentBaselineManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SetSecurityAssessmentBaselineManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SetSecurityAssessmentBaselineManagementArgs
    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 setSecurityAssessmentBaselineManagementResource = new Oci.DataSafe.SetSecurityAssessmentBaselineManagement("setSecurityAssessmentBaselineManagementResource", new()
    {
        CompartmentId = "string",
        TargetId = "string",
    });
    
    example, err := DataSafe.NewSetSecurityAssessmentBaselineManagement(ctx, "setSecurityAssessmentBaselineManagementResource", &DataSafe.SetSecurityAssessmentBaselineManagementArgs{
    	CompartmentId: pulumi.String("string"),
    	TargetId:      pulumi.String("string"),
    })
    
    var setSecurityAssessmentBaselineManagementResource = new SetSecurityAssessmentBaselineManagement("setSecurityAssessmentBaselineManagementResource", SetSecurityAssessmentBaselineManagementArgs.builder()
        .compartmentId("string")
        .targetId("string")
        .build());
    
    set_security_assessment_baseline_management_resource = oci.data_safe.SetSecurityAssessmentBaselineManagement("setSecurityAssessmentBaselineManagementResource",
        compartment_id="string",
        target_id="string")
    
    const setSecurityAssessmentBaselineManagementResource = new oci.datasafe.SetSecurityAssessmentBaselineManagement("setSecurityAssessmentBaselineManagementResource", {
        compartmentId: "string",
        targetId: "string",
    });
    
    type: oci:DataSafe:SetSecurityAssessmentBaselineManagement
    properties:
        compartmentId: string
        targetId: string
    

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

    CompartmentId 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 string
    The target OCID for which SA needs to be set as baseline.
    CompartmentId 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 string
    The target OCID for which SA needs to be set as baseline.
    compartmentId 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 String
    The target OCID for which SA needs to be set as baseline.
    compartmentId 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 string
    The target OCID for which SA needs to be set as baseline.
    compartment_id 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 str
    The target OCID for which SA needs to be set as baseline.
    compartmentId 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 String
    The target OCID for which SA needs to be set as baseline.

    Outputs

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

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

    Look up Existing SetSecurityAssessmentBaselineManagement Resource

    Get an existing SetSecurityAssessmentBaselineManagement 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?: SetSecurityAssessmentBaselineManagementState, opts?: CustomResourceOptions): SetSecurityAssessmentBaselineManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            assessment_ids: Optional[Sequence[str]] = None,
            compartment_id: Optional[str] = None,
            security_assessment_id: Optional[str] = None,
            target_id: Optional[str] = None) -> SetSecurityAssessmentBaselineManagement
    func GetSetSecurityAssessmentBaselineManagement(ctx *Context, name string, id IDInput, state *SetSecurityAssessmentBaselineManagementState, opts ...ResourceOption) (*SetSecurityAssessmentBaselineManagement, error)
    public static SetSecurityAssessmentBaselineManagement Get(string name, Input<string> id, SetSecurityAssessmentBaselineManagementState? state, CustomResourceOptions? opts = null)
    public static SetSecurityAssessmentBaselineManagement get(String name, Output<String> id, SetSecurityAssessmentBaselineManagementState 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>
    CompartmentId 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

    SecurityAssessmentId string
    TargetId string
    The target OCID for which SA needs to be set as baseline.
    AssessmentIds []string
    CompartmentId 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

    SecurityAssessmentId string
    TargetId string
    The target OCID for which SA needs to be set as baseline.
    assessmentIds List<String>
    compartmentId 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

    securityAssessmentId String
    targetId String
    The target OCID for which SA needs to be set as baseline.
    assessmentIds string[]
    compartmentId 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

    securityAssessmentId string
    targetId string
    The target OCID for which SA needs to be set as baseline.
    assessment_ids Sequence[str]
    compartment_id 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

    security_assessment_id str
    target_id str
    The target OCID for which SA needs to be set as baseline.
    assessmentIds List<String>
    compartmentId 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

    securityAssessmentId String
    targetId String
    The target OCID for which SA needs to be set as baseline.

    Import

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

    $ pulumi import oci:DataSafe/setSecurityAssessmentBaselineManagement:SetSecurityAssessmentBaselineManagement test_set_security_assessment_baseline_management "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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi