azure-native.operationalinsights.LinkedStorageAccount
Explore with Pulumi AI
Linked storage accounts top level resource container. API Version: 2020-08-01.
Example Usage
LinkedStorageAccountsCreate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var linkedStorageAccount = new AzureNative.OperationalInsights.LinkedStorageAccount("linkedStorageAccount", new()
{
DataSourceType = "CustomLogs",
ResourceGroupName = "mms-eus",
StorageAccountIds = new[]
{
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA",
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB",
},
WorkspaceName = "testLinkStorageAccountsWS",
});
});
package main
import (
operationalinsights "github.com/pulumi/pulumi-azure-native-sdk/operationalinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := operationalinsights.NewLinkedStorageAccount(ctx, "linkedStorageAccount", &operationalinsights.LinkedStorageAccountArgs{
DataSourceType: pulumi.String("CustomLogs"),
ResourceGroupName: pulumi.String("mms-eus"),
StorageAccountIds: pulumi.StringArray{
pulumi.String("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA"),
pulumi.String("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB"),
},
WorkspaceName: pulumi.String("testLinkStorageAccountsWS"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.operationalinsights.LinkedStorageAccount;
import com.pulumi.azurenative.operationalinsights.LinkedStorageAccountArgs;
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 linkedStorageAccount = new LinkedStorageAccount("linkedStorageAccount", LinkedStorageAccountArgs.builder()
.dataSourceType("CustomLogs")
.resourceGroupName("mms-eus")
.storageAccountIds(
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA",
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB")
.workspaceName("testLinkStorageAccountsWS")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
linked_storage_account = azure_native.operationalinsights.LinkedStorageAccount("linkedStorageAccount",
data_source_type="CustomLogs",
resource_group_name="mms-eus",
storage_account_ids=[
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA",
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB",
],
workspace_name="testLinkStorageAccountsWS")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const linkedStorageAccount = new azure_native.operationalinsights.LinkedStorageAccount("linkedStorageAccount", {
dataSourceType: "CustomLogs",
resourceGroupName: "mms-eus",
storageAccountIds: [
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA",
"/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB",
],
workspaceName: "testLinkStorageAccountsWS",
});
resources:
linkedStorageAccount:
type: azure-native:operationalinsights:LinkedStorageAccount
properties:
dataSourceType: CustomLogs
resourceGroupName: mms-eus
storageAccountIds:
- /subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA
- /subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB
workspaceName: testLinkStorageAccountsWS
Create LinkedStorageAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LinkedStorageAccount(name: string, args: LinkedStorageAccountArgs, opts?: CustomResourceOptions);
@overload
def LinkedStorageAccount(resource_name: str,
args: LinkedStorageAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LinkedStorageAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
workspace_name: Optional[str] = None,
data_source_type: Optional[str] = None,
storage_account_ids: Optional[Sequence[str]] = None)
func NewLinkedStorageAccount(ctx *Context, name string, args LinkedStorageAccountArgs, opts ...ResourceOption) (*LinkedStorageAccount, error)
public LinkedStorageAccount(string name, LinkedStorageAccountArgs args, CustomResourceOptions? opts = null)
public LinkedStorageAccount(String name, LinkedStorageAccountArgs args)
public LinkedStorageAccount(String name, LinkedStorageAccountArgs args, CustomResourceOptions options)
type: azure-native:operationalinsights:LinkedStorageAccount
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 LinkedStorageAccountArgs
- 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 LinkedStorageAccountArgs
- 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 LinkedStorageAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LinkedStorageAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LinkedStorageAccountArgs
- 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 linkedStorageAccountResource = new AzureNative.Operationalinsights.LinkedStorageAccount("linkedStorageAccountResource", new()
{
ResourceGroupName = "string",
WorkspaceName = "string",
DataSourceType = "string",
StorageAccountIds = new[]
{
"string",
},
});
example, err := operationalinsights.NewLinkedStorageAccount(ctx, "linkedStorageAccountResource", &operationalinsights.LinkedStorageAccountArgs{
ResourceGroupName: "string",
WorkspaceName: "string",
DataSourceType: "string",
StorageAccountIds: []string{
"string",
},
})
var linkedStorageAccountResource = new LinkedStorageAccount("linkedStorageAccountResource", LinkedStorageAccountArgs.builder()
.resourceGroupName("string")
.workspaceName("string")
.dataSourceType("string")
.storageAccountIds("string")
.build());
linked_storage_account_resource = azure_native.operationalinsights.LinkedStorageAccount("linkedStorageAccountResource",
resource_group_name=string,
workspace_name=string,
data_source_type=string,
storage_account_ids=[string])
const linkedStorageAccountResource = new azure_native.operationalinsights.LinkedStorageAccount("linkedStorageAccountResource", {
resourceGroupName: "string",
workspaceName: "string",
dataSourceType: "string",
storageAccountIds: ["string"],
});
type: azure-native:operationalinsights:LinkedStorageAccount
properties:
dataSourceType: string
resourceGroupName: string
storageAccountIds:
- string
workspaceName: string
LinkedStorageAccount 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 LinkedStorageAccount resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Workspace
Name string - The name of the workspace.
- Data
Source stringType - Linked storage accounts type.
- Storage
Account List<string>Ids - Linked storage accounts resources ids.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Workspace
Name string - The name of the workspace.
- Data
Source stringType - Linked storage accounts type.
- Storage
Account []stringIds - Linked storage accounts resources ids.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- workspace
Name String - The name of the workspace.
- data
Source StringType - Linked storage accounts type.
- storage
Account List<String>Ids - Linked storage accounts resources ids.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- workspace
Name string - The name of the workspace.
- data
Source stringType - Linked storage accounts type.
- storage
Account string[]Ids - Linked storage accounts resources ids.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- workspace_
name str - The name of the workspace.
- data_
source_ strtype - Linked storage accounts type.
- storage_
account_ Sequence[str]ids - Linked storage accounts resources ids.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- workspace
Name String - The name of the workspace.
- data
Source StringType - Linked storage accounts type.
- storage
Account List<String>Ids - Linked storage accounts resources ids.
Outputs
All input properties are implicitly available as output properties. Additionally, the LinkedStorageAccount resource produces the following output properties:
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:operationalinsights:LinkedStorageAccount CustomLogs /subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testLinkStorageAccountsWS/linkedStorageAccounts/CustomLogs
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0