1. Packages
  2. Azure Native
  3. API Docs
  4. operationalinsights
  5. LinkedStorageAccount
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

azure-native.operationalinsights.LinkedStorageAccount

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Linked storage accounts top level resource container. Azure REST API version: 2020-08-01. Prior API version in Azure Native 1.x: 2020-08-01.

    Other available API versions: 2023-09-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/v2"
    	"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: pulumi.String("string"),
    	WorkspaceName:     pulumi.String("string"),
    	DataSourceType:    pulumi.String("string"),
    	StorageAccountIds: pulumi.StringArray{
    		pulumi.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:

    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    WorkspaceName string
    The name of the workspace.
    DataSourceType string
    Linked storage accounts type.
    StorageAccountIds List<string>
    Linked storage accounts resources ids.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    WorkspaceName string
    The name of the workspace.
    DataSourceType string
    Linked storage accounts type.
    StorageAccountIds []string
    Linked storage accounts resources ids.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    workspaceName String
    The name of the workspace.
    dataSourceType String
    Linked storage accounts type.
    storageAccountIds List<String>
    Linked storage accounts resources ids.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    workspaceName string
    The name of the workspace.
    dataSourceType string
    Linked storage accounts type.
    storageAccountIds string[]
    Linked storage accounts resources ids.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    workspace_name str
    The name of the workspace.
    data_source_type str
    Linked storage accounts type.
    storage_account_ids Sequence[str]
    Linked storage accounts resources ids.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    workspaceName String
    The name of the workspace.
    dataSourceType String
    Linked storage accounts type.
    storageAccountIds List<String>
    Linked storage accounts resources ids.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LinkedStorageAccount resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:operationalinsights:LinkedStorageAccount CustomLogs /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi