Duration (Pacific Standard Time):
To (Pacific Standard Time):
  • None
User Action:
  • None

RoleEnvironment.GetLocalResource Method (String)


Retrieves a specified local storage resource.

Namespace:   Microsoft.WindowsAzure.ServiceRuntime
Assembly:  Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)

<SecurityPermissionAttribute(SecurityAction.Assert, UnmanagedCode := True)>
Public Shared Function GetLocalResource (
	localResourceName As String
) As LocalResource


Type: System.String

Type: System.String

The name of the local storage resource that is defined in the ServiceDefiniton.csdef file.

Return Value

Type: Microsoft.WindowsAzure.ServiceRuntime.LocalResource

Type: Microsoft.WindowsAzure.ServiceRuntime.LocalResource

An instance of LocalResource that represents the local storage resource.

Exception Condition

The local storage resource does not exist.

The following code example shows how to use this method to retrieve the local storage resource and write a text file to the resource:

No code example is currently available or this language may not be supported.
Return to top