Show / Hide Table of Contents

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,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
AnalyticsWorkspace
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.OperationalInsights
Assembly: Pulumi.Azure.dll
Syntax
public class AnalyticsWorkspace : CustomResource

Constructors

View Source

AnalyticsWorkspace(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 Source

Location

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>
View Source

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>
View Source

PortalUrl

The Portal URL for the Log Analytics Workspace.

Declaration
public Output<string> PortalUrl { get; }
Property Value
Type Description
Output<System.String>
View Source

PrimarySharedKey

The Primary shared key for the Log Analytics Workspace.

Declaration
public Output<string> PrimarySharedKey { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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>
View Source

SecondarySharedKey

The Secondary shared key for the Log Analytics Workspace.

Declaration
public Output<string> SecondarySharedKey { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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>>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.