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

RoleEnvironment.GetLocalResource Method

Updated: December 6, 2013

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
J#

Parameters

localResourceName

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

An instance of LocalResource that represents the local storage resource.
Exception type Condition
RoleEnvironmentException

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms