Module operationalinsights
@pulumi/azure > operationalinsights
Index ▹
class AnalyticsSolution
extends CustomResource
Manages a Log Analytics (formally Operational Insights) Solution.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as random from "@pulumi/random";
const testResourceGroup = new azure.core.ResourceGroup("test", {
location: "westeurope",
});
const workspace = new random.RandomId("workspace", {
byteLength: 8,
keepers: {
// Generate a new id each time we switch to a new resource group
group_name: testResourceGroup.name,
},
});
const testAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("test", {
location: testResourceGroup.location,
resourceGroupName: testResourceGroup.name,
sku: "PerGB2018",
});
const testAnalyticsSolution = new azure.operationalinsights.AnalyticsSolution("test", {
location: testResourceGroup.location,
plan: {
product: "OMSGallery/ContainerInsights",
publisher: "Microsoft",
},
resourceGroupName: testResourceGroup.name,
solutionName: "ContainerInsights",
workspaceName: testAnalyticsWorkspace.name,
workspaceResourceId: testAnalyticsWorkspace.id,
});
constructor
new AnalyticsSolution(name: string, args: AnalyticsSolutionArgs, opts?: pulumi.CustomResourceOptions)
Create a AnalyticsSolution resource with the given unique name, arguments, and options.
name
The unique name of the resource.args
The arguments to use to populate this resource's properties.opts
A bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AnalyticsSolutionState, opts?: pulumi.CustomResourceOptions): AnalyticsSolution
Get an existing AnalyticsSolution resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
method isInstance
static isInstance(obj: any): boolean
Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property location
public location: pulumi.Output<string>;
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property plan
public plan: pulumi.Output<{ name: string; product: string; promotionCode: string; publisher: string; }>;
A plan
block as documented below.
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;
The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and it’s related workspace can only exist in the same resource group.
property solutionName
public solutionName: pulumi.Output<string>;
Specifies the name of the solution to be deployed. See here for options.Changing this forces a new resource to be created.
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property workspaceName
public workspaceName: pulumi.Output<string>;
The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
property workspaceResourceId
public workspaceResourceId: pulumi.Output<string>;
The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
class AnalyticsWorkspace
extends CustomResource
Manages a Log Analytics (formally Operational Insights) Workspace.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const testResourceGroup = new azure.core.ResourceGroup("test", {
location: "East US",
});
const testAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("test", {
location: testResourceGroup.location,
resourceGroupName: testResourceGroup.name,
retentionInDays: 30,
sku: "PerGB2018",
});
constructor
new AnalyticsWorkspace(name: string, args: AnalyticsWorkspaceArgs, opts?: pulumi.CustomResourceOptions)
Create a AnalyticsWorkspace resource with the given unique name, arguments, and options.
name
The unique name of the resource.args
The arguments to use to populate this resource's properties.opts
A bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AnalyticsWorkspaceState, opts?: pulumi.CustomResourceOptions): AnalyticsWorkspace
Get an existing AnalyticsWorkspace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
method isInstance
static isInstance(obj: any): boolean
Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property location
public location: pulumi.Output<string>;
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
public name: pulumi.Output<string>;
Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or ‘-‘. The ‘-‘ shouldn’t be the first or the last symbol. Changing this forces a new resource to be created.
property portalUrl
public portalUrl: pulumi.Output<string>;
The Portal URL for the Log Analytics Workspace.
property primarySharedKey
public primarySharedKey: pulumi.Output<string>;
The Primary shared key for the Log Analytics Workspace.
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;
The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
property retentionInDays
public retentionInDays: pulumi.Output<number>;
The workspace data retention in days. Possible values range between 30 and 730.
property secondarySharedKey
public secondarySharedKey: pulumi.Output<string>;
The Secondary shared key for the Log Analytics Workspace.
property sku
public sku: pulumi.Output<string>;
Specifies the Sku of the Log Analytics Workspace. Possible values are Free
, PerNode
, Premium
, Standard
, Standalone
, Unlimited
, and PerGB2018
(new Sku as of 2018-04-03
).
property tags
public tags: pulumi.Output<{[key: string]: any}>;
A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property workspaceId
public workspaceId: pulumi.Output<string>;
The Workspace (or Customer) ID for the Log Analytics Workspace.
class AnalyticsWorkspaceLinkedService
extends CustomResource
Links a Log Analytics (formally Operational Insights) Workspace to another resource. The (currently) only linkable service is an Azure Automation Account.
NOTE: This resource has been deprecated in favour of the
azurerm_log_analytics_linked_service
resource and will be removed in the next major version of the AzureRM Provider. The new resource shares the same fields as this one, and information on migrating across can be found in this guide.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const testResourceGroup = new azure.core.ResourceGroup("test", {
location: "West Europe",
});
const testAccount = new azure.automation.Account("test", {
location: testResourceGroup.location,
resourceGroupName: testResourceGroup.name,
sku: {
name: "Basic",
},
tags: {
environment: "development",
},
});
const testAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("test", {
location: testResourceGroup.location,
resourceGroupName: testResourceGroup.name,
retentionInDays: 30,
sku: "PerGB2018",
});
const testAnalyticsWorkspaceLinkedService = new azure.operationalinsights.AnalyticsWorkspaceLinkedService("test", {
resourceGroupName: testResourceGroup.name,
resourceId: testAccount.id,
workspaceName: testAnalyticsWorkspace.name,
});
constructor
new AnalyticsWorkspaceLinkedService(name: string, args: AnalyticsWorkspaceLinkedServiceArgs, opts?: pulumi.CustomResourceOptions)
Create a AnalyticsWorkspaceLinkedService resource with the given unique name, arguments, and options.
name
The unique name of the resource.args
The arguments to use to populate this resource's properties.opts
A bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AnalyticsWorkspaceLinkedServiceState, opts?: pulumi.CustomResourceOptions): AnalyticsWorkspaceLinkedService
Get an existing AnalyticsWorkspaceLinkedService resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
method isInstance
static isInstance(obj: any): boolean
Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property linkedServiceName
public linkedServiceName: pulumi.Output<string | undefined>;
Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name
. Currently it defaults to and only supports automation
as a value. Changing this forces a new resource to be created.
property linkedServiceProperties
public linkedServiceProperties: pulumi.Output<{ resourceId: string; }[]>;
A linked_service_properties
block as defined below.
property name
public name: pulumi.Output<string>;
The automatically generated name of the Linked Service. This cannot be specified. The format is always <workspace_name>/<linked_service_name>
e.g. workspace1/Automation
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;
The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
property resourceId
public resourceId: pulumi.Output<string>;
The resource id of the resource that will be linked to the workspace. This field has been deprecated in favour of the top-level resource_id
field and will be removed in v2.0 of the AzureRM Provider.
property tags
public tags: pulumi.Output<{[key: string]: any}>;
A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property workspaceName
public workspaceName: pulumi.Output<string>;
Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.
function getAnalyticsWorkspace
getAnalyticsWorkspace(args: GetAnalyticsWorkspaceArgs, opts?: pulumi.InvokeOptions): Promise<GetAnalyticsWorkspaceResult>
Use this data source to access information about an existing Log Analytics (formally Operational Insights) Workspace.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const test = pulumi.output(azure.operationalinsights.getAnalyticsWorkspace({
name: "acctest-01",
resourceGroupName: "acctest",
}));
export const logAnalyticsWorkspaceId = test.apply(test => test.workspaceId);
interface AnalyticsSolutionArgs
The set of arguments for constructing a AnalyticsSolution resource.
property location
location: pulumi.Input<string>;
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property plan
plan: pulumi.Input<{ name: pulumi.Input<string>; product: pulumi.Input<string>; promotionCode: pulumi.Input<string>; publisher: pulumi.Input<string>; }>;
A plan
block as documented below.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;
The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and it’s related workspace can only exist in the same resource group.
property solutionName
solutionName: pulumi.Input<string>;
Specifies the name of the solution to be deployed. See here for options.Changing this forces a new resource to be created.
property workspaceName
workspaceName: pulumi.Input<string>;
The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
property workspaceResourceId
workspaceResourceId: pulumi.Input<string>;
The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
interface AnalyticsSolutionState
Input properties used for looking up and filtering AnalyticsSolution resources.
property location
location?: pulumi.Input<string>;
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property plan
plan?: pulumi.Input<{ name: pulumi.Input<string>; product: pulumi.Input<string>; promotionCode: pulumi.Input<string>; publisher: pulumi.Input<string>; }>;
A plan
block as documented below.
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;
The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and it’s related workspace can only exist in the same resource group.
property solutionName
solutionName?: pulumi.Input<string>;
Specifies the name of the solution to be deployed. See here for options.Changing this forces a new resource to be created.
property workspaceName
workspaceName?: pulumi.Input<string>;
The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
property workspaceResourceId
workspaceResourceId?: pulumi.Input<string>;
The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
interface AnalyticsWorkspaceArgs
The set of arguments for constructing a AnalyticsWorkspace resource.
property location
location: pulumi.Input<string>;
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;
Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or ‘-‘. The ‘-‘ shouldn’t be the first or the last symbol. Changing this forces a new resource to be created.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;
The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
property retentionInDays
retentionInDays?: pulumi.Input<number>;
The workspace data retention in days. Possible values range between 30 and 730.
property sku
sku: pulumi.Input<string>;
Specifies the Sku of the Log Analytics Workspace. Possible values are Free
, PerNode
, Premium
, Standard
, Standalone
, Unlimited
, and PerGB2018
(new Sku as of 2018-04-03
).
property tags
tags?: pulumi.Input<{[key: string]: any}>;
A mapping of tags to assign to the resource.
interface AnalyticsWorkspaceLinkedServiceArgs
The set of arguments for constructing a AnalyticsWorkspaceLinkedService resource.
property linkedServiceName
linkedServiceName?: pulumi.Input<string>;
Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name
. Currently it defaults to and only supports automation
as a value. Changing this forces a new resource to be created.
property linkedServiceProperties
linkedServiceProperties?: pulumi.Input<pulumi.Input<{ resourceId: pulumi.Input<string>; }>[]>;
A linked_service_properties
block as defined below.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;
The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
property resourceId
resourceId?: pulumi.Input<string>;
The resource id of the resource that will be linked to the workspace. This field has been deprecated in favour of the top-level resource_id
field and will be removed in v2.0 of the AzureRM Provider.
property tags
tags?: pulumi.Input<{[key: string]: any}>;
A mapping of tags to assign to the resource.
property workspaceName
workspaceName: pulumi.Input<string>;
Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.
interface AnalyticsWorkspaceLinkedServiceState
Input properties used for looking up and filtering AnalyticsWorkspaceLinkedService resources.
property linkedServiceName
linkedServiceName?: pulumi.Input<string>;
Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name
. Currently it defaults to and only supports automation
as a value. Changing this forces a new resource to be created.
property linkedServiceProperties
linkedServiceProperties?: pulumi.Input<pulumi.Input<{ resourceId: pulumi.Input<string>; }>[]>;
A linked_service_properties
block as defined below.
property name
name?: pulumi.Input<string>;
The automatically generated name of the Linked Service. This cannot be specified. The format is always <workspace_name>/<linked_service_name>
e.g. workspace1/Automation
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;
The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
property resourceId
resourceId?: pulumi.Input<string>;
The resource id of the resource that will be linked to the workspace. This field has been deprecated in favour of the top-level resource_id
field and will be removed in v2.0 of the AzureRM Provider.
property tags
tags?: pulumi.Input<{[key: string]: any}>;
A mapping of tags to assign to the resource.
property workspaceName
workspaceName?: pulumi.Input<string>;
Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.
interface AnalyticsWorkspaceState
Input properties used for looking up and filtering AnalyticsWorkspace resources.
property location
location?: pulumi.Input<string>;
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;
Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or ‘-‘. The ‘-‘ shouldn’t be the first or the last symbol. Changing this forces a new resource to be created.
property portalUrl
portalUrl?: pulumi.Input<string>;
The Portal URL for the Log Analytics Workspace.
property primarySharedKey
primarySharedKey?: pulumi.Input<string>;
The Primary shared key for the Log Analytics Workspace.
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;
The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
property retentionInDays
retentionInDays?: pulumi.Input<number>;
The workspace data retention in days. Possible values range between 30 and 730.
property secondarySharedKey
secondarySharedKey?: pulumi.Input<string>;
The Secondary shared key for the Log Analytics Workspace.
property sku
sku?: pulumi.Input<string>;
Specifies the Sku of the Log Analytics Workspace. Possible values are Free
, PerNode
, Premium
, Standard
, Standalone
, Unlimited
, and PerGB2018
(new Sku as of 2018-04-03
).
property tags
tags?: pulumi.Input<{[key: string]: any}>;
A mapping of tags to assign to the resource.
property workspaceId
workspaceId?: pulumi.Input<string>;
The Workspace (or Customer) ID for the Log Analytics Workspace.
interface GetAnalyticsWorkspaceArgs
A collection of arguments for invoking getAnalyticsWorkspace.
property name
name: string;
Specifies the name of the Log Analytics Workspace.
property resourceGroupName
resourceGroupName: string;
The name of the resource group in which the Log Analytics workspace is located in.
interface GetAnalyticsWorkspaceResult
A collection of values returned by getAnalyticsWorkspace.
property id
id: string;
id is the provider-assigned unique ID for this managed resource.
property location
location: string;
property portalUrl
portalUrl: string;
The Portal URL for the Log Analytics Workspace.
property primarySharedKey
primarySharedKey: string;
The Primary shared key for the Log Analytics Workspace.
property retentionInDays
retentionInDays: number;
The workspace data retention in days.
property secondarySharedKey
secondarySharedKey: string;
The Secondary shared key for the Log Analytics Workspace.
property sku
sku: string;
The Sku of the Log Analytics Workspace.
property tags
property workspaceId
workspaceId: string;
The Workspace (or Customer) ID for the Log Analytics Workspace.