Class AnalyticsWorkspace
Manages a Log Analytics (formally Operational Insights) Workspace.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "East US",
});
var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", new Azure.OperationalInsights.AnalyticsWorkspaceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = "PerGB2018",
RetentionInDays = 30,
});
}
}
Inherited Members
Namespace: Pulumi.Azure.OperationalInsights
Assembly: Pulumi.Azure.dll
Syntax
public class AnalyticsWorkspace : CustomResource
Constructors
View SourceAnalyticsWorkspace(String, AnalyticsWorkspaceArgs, CustomResourceOptions)
Create a AnalyticsWorkspace resource with the given unique name, arguments, and options.
Declaration
public AnalyticsWorkspace(string name, AnalyticsWorkspaceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AnalyticsWorkspaceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceLocation
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Declaration
public Output<string> Location { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
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.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PortalUrl
The Portal URL for the Log Analytics Workspace.
Declaration
public Output<string> PortalUrl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrimarySharedKey
The Primary shared key for the Log Analytics Workspace.
Declaration
public Output<string> PrimarySharedKey { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RetentionInDays
The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
Declaration
public Output<int> RetentionInDays { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
SecondarySharedKey
The Secondary shared key for the Log Analytics Workspace.
Declaration
public Output<string> SecondarySharedKey { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Sku
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).
Declaration
public Output<string> Sku { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
WorkspaceId
The Workspace (or Customer) ID for the Log Analytics Workspace.
Declaration
public Output<string> WorkspaceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AnalyticsWorkspaceState, CustomResourceOptions)
Get an existing AnalyticsWorkspace resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AnalyticsWorkspace Get(string name, Input<string> id, AnalyticsWorkspaceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AnalyticsWorkspaceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AnalyticsWorkspace |