1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Audit
  5. Configuration
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Audit.Configuration

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This resource provides the Configuration resource in Oracle Cloud Infrastructure Audit service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testConfiguration = new oci.audit.Configuration("test_configuration", {
        compartmentId: tenancyOcid,
        retentionPeriodDays: configurationRetentionPeriodDays,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_configuration = oci.audit.Configuration("test_configuration",
        compartment_id=tenancy_ocid,
        retention_period_days=configuration_retention_period_days)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Audit"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Audit.NewConfiguration(ctx, "test_configuration", &Audit.ConfigurationArgs{
    			CompartmentId:       pulumi.Any(tenancyOcid),
    			RetentionPeriodDays: pulumi.Any(configurationRetentionPeriodDays),
    		})
    		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 testConfiguration = new Oci.Audit.Configuration("test_configuration", new()
        {
            CompartmentId = tenancyOcid,
            RetentionPeriodDays = configurationRetentionPeriodDays,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Audit.Configuration;
    import com.pulumi.oci.Audit.ConfigurationArgs;
    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 testConfiguration = new Configuration("testConfiguration", ConfigurationArgs.builder()
                .compartmentId(tenancyOcid)
                .retentionPeriodDays(configurationRetentionPeriodDays)
                .build());
    
        }
    }
    
    resources:
      testConfiguration:
        type: oci:Audit:Configuration
        name: test_configuration
        properties:
          compartmentId: ${tenancyOcid}
          retentionPeriodDays: ${configurationRetentionPeriodDays}
    

    Create Configuration Resource

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

    Constructor syntax

    new Configuration(name: string, args: ConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def Configuration(resource_name: str,
                      args: ConfigurationArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def Configuration(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      compartment_id: Optional[str] = None,
                      retention_period_days: Optional[int] = None)
    func NewConfiguration(ctx *Context, name string, args ConfigurationArgs, opts ...ResourceOption) (*Configuration, error)
    public Configuration(string name, ConfigurationArgs args, CustomResourceOptions? opts = null)
    public Configuration(String name, ConfigurationArgs args)
    public Configuration(String name, ConfigurationArgs args, CustomResourceOptions options)
    
    type: oci:Audit:Configuration
    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 ConfigurationArgs
    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 ConfigurationArgs
    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 ConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConfigurationArgs
    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 configurationResource = new Oci.Audit.Configuration("configurationResource", new()
    {
        CompartmentId = "string",
        RetentionPeriodDays = 0,
    });
    
    example, err := Audit.NewConfiguration(ctx, "configurationResource", &Audit.ConfigurationArgs{
    	CompartmentId:       pulumi.String("string"),
    	RetentionPeriodDays: pulumi.Int(0),
    })
    
    var configurationResource = new Configuration("configurationResource", ConfigurationArgs.builder()
        .compartmentId("string")
        .retentionPeriodDays(0)
        .build());
    
    configuration_resource = oci.audit.Configuration("configurationResource",
        compartment_id="string",
        retention_period_days=0)
    
    const configurationResource = new oci.audit.Configuration("configurationResource", {
        compartmentId: "string",
        retentionPeriodDays: 0,
    });
    
    type: oci:Audit:Configuration
    properties:
        compartmentId: string
        retentionPeriodDays: 0
    

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

    CompartmentId string
    ID of the root compartment (tenancy)
    RetentionPeriodDays int

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    CompartmentId string
    ID of the root compartment (tenancy)
    RetentionPeriodDays int

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartmentId String
    ID of the root compartment (tenancy)
    retentionPeriodDays Integer

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartmentId string
    ID of the root compartment (tenancy)
    retentionPeriodDays number

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartment_id str
    ID of the root compartment (tenancy)
    retention_period_days int

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartmentId String
    ID of the root compartment (tenancy)
    retentionPeriodDays Number

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    Outputs

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

    Get an existing Configuration 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?: ConfigurationState, opts?: CustomResourceOptions): Configuration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            retention_period_days: Optional[int] = None) -> Configuration
    func GetConfiguration(ctx *Context, name string, id IDInput, state *ConfigurationState, opts ...ResourceOption) (*Configuration, error)
    public static Configuration Get(string name, Input<string> id, ConfigurationState? state, CustomResourceOptions? opts = null)
    public static Configuration get(String name, Output<String> id, ConfigurationState 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:
    CompartmentId string
    ID of the root compartment (tenancy)
    RetentionPeriodDays int

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    CompartmentId string
    ID of the root compartment (tenancy)
    RetentionPeriodDays int

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartmentId String
    ID of the root compartment (tenancy)
    retentionPeriodDays Integer

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartmentId string
    ID of the root compartment (tenancy)
    retentionPeriodDays number

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartment_id str
    ID of the root compartment (tenancy)
    retention_period_days int

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    compartmentId String
    ID of the root compartment (tenancy)
    retentionPeriodDays Number

    (Updatable) The retention period setting, specified in days. The minimum is 90, the maximum 365. Example: 90

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

    Import is not supported for this resource.

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi