1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LogAnalytics
  5. LogAnalyticsEntityAssociationsAdd
Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi
oci logo
Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLogAnalyticsEntityAssociationsAdd = new oci.loganalytics.LogAnalyticsEntityAssociationsAdd("test_log_analytics_entity_associations_add", {
        associationEntities: logAnalyticsEntityAssociationsAddAssociationEntities,
        logAnalyticsEntityId: testLogAnalyticsEntity.id,
        namespace: logAnalyticsEntityAssociationsAddNamespace,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_log_analytics_entity_associations_add = oci.loganalytics.LogAnalyticsEntityAssociationsAdd("test_log_analytics_entity_associations_add",
        association_entities=log_analytics_entity_associations_add_association_entities,
        log_analytics_entity_id=test_log_analytics_entity["id"],
        namespace=log_analytics_entity_associations_add_namespace)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/loganalytics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := loganalytics.NewLogAnalyticsEntityAssociationsAdd(ctx, "test_log_analytics_entity_associations_add", &loganalytics.LogAnalyticsEntityAssociationsAddArgs{
    			AssociationEntities:  pulumi.Any(logAnalyticsEntityAssociationsAddAssociationEntities),
    			LogAnalyticsEntityId: pulumi.Any(testLogAnalyticsEntity.Id),
    			Namespace:            pulumi.Any(logAnalyticsEntityAssociationsAddNamespace),
    		})
    		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 testLogAnalyticsEntityAssociationsAdd = new Oci.LogAnalytics.LogAnalyticsEntityAssociationsAdd("test_log_analytics_entity_associations_add", new()
        {
            AssociationEntities = logAnalyticsEntityAssociationsAddAssociationEntities,
            LogAnalyticsEntityId = testLogAnalyticsEntity.Id,
            Namespace = logAnalyticsEntityAssociationsAddNamespace,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.LogAnalytics.LogAnalyticsEntityAssociationsAdd;
    import com.pulumi.oci.LogAnalytics.LogAnalyticsEntityAssociationsAddArgs;
    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 testLogAnalyticsEntityAssociationsAdd = new LogAnalyticsEntityAssociationsAdd("testLogAnalyticsEntityAssociationsAdd", LogAnalyticsEntityAssociationsAddArgs.builder()
                .associationEntities(logAnalyticsEntityAssociationsAddAssociationEntities)
                .logAnalyticsEntityId(testLogAnalyticsEntity.id())
                .namespace(logAnalyticsEntityAssociationsAddNamespace)
                .build());
    
        }
    }
    
    resources:
      testLogAnalyticsEntityAssociationsAdd:
        type: oci:LogAnalytics:LogAnalyticsEntityAssociationsAdd
        name: test_log_analytics_entity_associations_add
        properties:
          associationEntities: ${logAnalyticsEntityAssociationsAddAssociationEntities}
          logAnalyticsEntityId: ${testLogAnalyticsEntity.id}
          namespace: ${logAnalyticsEntityAssociationsAddNamespace}
    

    Create LogAnalyticsEntityAssociationsAdd Resource

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

    Constructor syntax

    new LogAnalyticsEntityAssociationsAdd(name: string, args: LogAnalyticsEntityAssociationsAddArgs, opts?: CustomResourceOptions);
    @overload
    def LogAnalyticsEntityAssociationsAdd(resource_name: str,
                                          args: LogAnalyticsEntityAssociationsAddArgs,
                                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogAnalyticsEntityAssociationsAdd(resource_name: str,
                                          opts: Optional[ResourceOptions] = None,
                                          association_entities: Optional[Sequence[str]] = None,
                                          log_analytics_entity_id: Optional[str] = None,
                                          namespace: Optional[str] = None)
    func NewLogAnalyticsEntityAssociationsAdd(ctx *Context, name string, args LogAnalyticsEntityAssociationsAddArgs, opts ...ResourceOption) (*LogAnalyticsEntityAssociationsAdd, error)
    public LogAnalyticsEntityAssociationsAdd(string name, LogAnalyticsEntityAssociationsAddArgs args, CustomResourceOptions? opts = null)
    public LogAnalyticsEntityAssociationsAdd(String name, LogAnalyticsEntityAssociationsAddArgs args)
    public LogAnalyticsEntityAssociationsAdd(String name, LogAnalyticsEntityAssociationsAddArgs args, CustomResourceOptions options)
    
    type: oci:LogAnalytics:LogAnalyticsEntityAssociationsAdd
    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 LogAnalyticsEntityAssociationsAddArgs
    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 LogAnalyticsEntityAssociationsAddArgs
    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 LogAnalyticsEntityAssociationsAddArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogAnalyticsEntityAssociationsAddArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogAnalyticsEntityAssociationsAddArgs
    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 logAnalyticsEntityAssociationsAddResource = new Oci.LogAnalytics.LogAnalyticsEntityAssociationsAdd("logAnalyticsEntityAssociationsAddResource", new()
    {
        AssociationEntities = new[]
        {
            "string",
        },
        LogAnalyticsEntityId = "string",
        Namespace = "string",
    });
    
    example, err := loganalytics.NewLogAnalyticsEntityAssociationsAdd(ctx, "logAnalyticsEntityAssociationsAddResource", &loganalytics.LogAnalyticsEntityAssociationsAddArgs{
    	AssociationEntities: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LogAnalyticsEntityId: pulumi.String("string"),
    	Namespace:            pulumi.String("string"),
    })
    
    var logAnalyticsEntityAssociationsAddResource = new LogAnalyticsEntityAssociationsAdd("logAnalyticsEntityAssociationsAddResource", LogAnalyticsEntityAssociationsAddArgs.builder()
        .associationEntities("string")
        .logAnalyticsEntityId("string")
        .namespace("string")
        .build());
    
    log_analytics_entity_associations_add_resource = oci.loganalytics.LogAnalyticsEntityAssociationsAdd("logAnalyticsEntityAssociationsAddResource",
        association_entities=["string"],
        log_analytics_entity_id="string",
        namespace="string")
    
    const logAnalyticsEntityAssociationsAddResource = new oci.loganalytics.LogAnalyticsEntityAssociationsAdd("logAnalyticsEntityAssociationsAddResource", {
        associationEntities: ["string"],
        logAnalyticsEntityId: "string",
        namespace: "string",
    });
    
    type: oci:LogAnalytics:LogAnalyticsEntityAssociationsAdd
    properties:
        associationEntities:
            - string
        logAnalyticsEntityId: string
        namespace: string
    

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

    AssociationEntities List<string>
    Destination entities OCIDs with which associations are to be added.
    LogAnalyticsEntityId string
    The Log analytics entity OCID.
    Namespace string

    The Log Analytics namespace used for the request.

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

    AssociationEntities []string
    Destination entities OCIDs with which associations are to be added.
    LogAnalyticsEntityId string
    The Log analytics entity OCID.
    Namespace string

    The Log Analytics namespace used for the request.

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

    associationEntities List<String>
    Destination entities OCIDs with which associations are to be added.
    logAnalyticsEntityId String
    The Log analytics entity OCID.
    namespace String

    The Log Analytics namespace used for the request.

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

    associationEntities string[]
    Destination entities OCIDs with which associations are to be added.
    logAnalyticsEntityId string
    The Log analytics entity OCID.
    namespace string

    The Log Analytics namespace used for the request.

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

    association_entities Sequence[str]
    Destination entities OCIDs with which associations are to be added.
    log_analytics_entity_id str
    The Log analytics entity OCID.
    namespace str

    The Log Analytics namespace used for the request.

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

    associationEntities List<String>
    Destination entities OCIDs with which associations are to be added.
    logAnalyticsEntityId String
    The Log analytics entity OCID.
    namespace String

    The Log Analytics namespace used for the request.

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

    Get an existing LogAnalyticsEntityAssociationsAdd 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?: LogAnalyticsEntityAssociationsAddState, opts?: CustomResourceOptions): LogAnalyticsEntityAssociationsAdd
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            association_entities: Optional[Sequence[str]] = None,
            log_analytics_entity_id: Optional[str] = None,
            namespace: Optional[str] = None) -> LogAnalyticsEntityAssociationsAdd
    func GetLogAnalyticsEntityAssociationsAdd(ctx *Context, name string, id IDInput, state *LogAnalyticsEntityAssociationsAddState, opts ...ResourceOption) (*LogAnalyticsEntityAssociationsAdd, error)
    public static LogAnalyticsEntityAssociationsAdd Get(string name, Input<string> id, LogAnalyticsEntityAssociationsAddState? state, CustomResourceOptions? opts = null)
    public static LogAnalyticsEntityAssociationsAdd get(String name, Output<String> id, LogAnalyticsEntityAssociationsAddState state, CustomResourceOptions options)
    resources:  _:    type: oci:LogAnalytics:LogAnalyticsEntityAssociationsAdd    get:      id: ${id}
    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:
    AssociationEntities List<string>
    Destination entities OCIDs with which associations are to be added.
    LogAnalyticsEntityId string
    The Log analytics entity OCID.
    Namespace string

    The Log Analytics namespace used for the request.

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

    AssociationEntities []string
    Destination entities OCIDs with which associations are to be added.
    LogAnalyticsEntityId string
    The Log analytics entity OCID.
    Namespace string

    The Log Analytics namespace used for the request.

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

    associationEntities List<String>
    Destination entities OCIDs with which associations are to be added.
    logAnalyticsEntityId String
    The Log analytics entity OCID.
    namespace String

    The Log Analytics namespace used for the request.

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

    associationEntities string[]
    Destination entities OCIDs with which associations are to be added.
    logAnalyticsEntityId string
    The Log analytics entity OCID.
    namespace string

    The Log Analytics namespace used for the request.

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

    association_entities Sequence[str]
    Destination entities OCIDs with which associations are to be added.
    log_analytics_entity_id str
    The Log analytics entity OCID.
    namespace str

    The Log Analytics namespace used for the request.

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

    associationEntities List<String>
    Destination entities OCIDs with which associations are to be added.
    logAnalyticsEntityId String
    The Log analytics entity OCID.
    namespace String

    The Log Analytics namespace used for the request.

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

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

    $ pulumi import oci:LogAnalytics/logAnalyticsEntityAssociationsAdd:LogAnalyticsEntityAssociationsAdd test_log_analytics_entity_associations_add "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 v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate