oci.DataSafe.SetSecurityAssessmentBaselineManagement
Explore with Pulumi AI
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:
- Compartment
Id 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
- Target
Id string - The target OCID for which SA needs to be set as baseline.
- Compartment
Id 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
- Target
Id string - The target OCID for which SA needs to be set as baseline.
- compartment
Id 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
- target
Id String - The target OCID for which SA needs to be set as baseline.
- compartment
Id 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
- target
Id 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.
- compartment
Id 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
- target
Id 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:
- Assessment
Ids List<string> - Id string
- The provider-assigned unique ID for this managed resource.
- Security
Assessment stringId
- Assessment
Ids []string - Id string
- The provider-assigned unique ID for this managed resource.
- Security
Assessment stringId
- assessment
Ids List<String> - id String
- The provider-assigned unique ID for this managed resource.
- security
Assessment StringId
- assessment
Ids string[] - id string
- The provider-assigned unique ID for this managed resource.
- security
Assessment stringId
- assessment_
ids Sequence[str] - id str
- The provider-assigned unique ID for this managed resource.
- security_
assessment_ strid
- assessment
Ids List<String> - id String
- The provider-assigned unique ID for this managed resource.
- security
Assessment StringId
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.
- Assessment
Ids List<string> - Compartment
Id 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
- Security
Assessment stringId - Target
Id string - The target OCID for which SA needs to be set as baseline.
- Assessment
Ids []string - Compartment
Id 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
- Security
Assessment stringId - Target
Id string - The target OCID for which SA needs to be set as baseline.
- assessment
Ids List<String> - compartment
Id 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
- security
Assessment StringId - target
Id String - The target OCID for which SA needs to be set as baseline.
- assessment
Ids string[] - compartment
Id 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
- security
Assessment stringId - target
Id 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_ strid - target_
id str - The target OCID for which SA needs to be set as baseline.
- assessment
Ids List<String> - compartment
Id 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
- security
Assessment StringId - target
Id 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.