StorageDataShareAccessPolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.StorageDataShareAccessPolicy

Implements

public final class StorageDataShareAccessPolicy
implements JsonSerializable<StorageDataShareAccessPolicy>

Policy that specify the permission allowed to a managed identity.

Constructor Summary

Constructor Description
StorageDataShareAccessPolicy()

Creates an instance of StorageDataShareAccessPolicy class.

Method Summary

Modifier and Type Method and Description
static StorageDataShareAccessPolicy fromJson(JsonReader jsonReader)

Reads an instance of StorageDataShareAccessPolicy from the JsonReader.

StorageDataShareAccessPolicyPermission permission()

Get the permission property: Allowed permissions.

String principalId()

Get the principalId property: The AAD principal ID of the Managed Identity.

String tenantId()

Get the tenantId property: The AAD tenant ID of the Managed Identity.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

StorageDataShareAccessPolicy withPermission(StorageDataShareAccessPolicyPermission permission)

Set the permission property: Allowed permissions.

StorageDataShareAccessPolicy withPrincipalId(String principalId)

Set the principalId property: The AAD principal ID of the Managed Identity.

StorageDataShareAccessPolicy withTenantId(String tenantId)

Set the tenantId property: The AAD tenant ID of the Managed Identity.

Methods inherited from java.lang.Object

Constructor Details

StorageDataShareAccessPolicy

public StorageDataShareAccessPolicy()

Creates an instance of StorageDataShareAccessPolicy class.

Method Details

fromJson

public static StorageDataShareAccessPolicy fromJson(JsonReader jsonReader)

Reads an instance of StorageDataShareAccessPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of StorageDataShareAccessPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

permission

public StorageDataShareAccessPolicyPermission permission()

Get the permission property: Allowed permissions. Currently, only supported value is Read.

Returns:

the permission value.

principalId

public String principalId()

Get the principalId property: The AAD principal ID of the Managed Identity.

Returns:

the principalId value.

tenantId

public String tenantId()

Get the tenantId property: The AAD tenant ID of the Managed Identity.

Returns:

the tenantId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withPermission

public StorageDataShareAccessPolicy withPermission(StorageDataShareAccessPolicyPermission permission)

Set the permission property: Allowed permissions. Currently, only supported value is Read.

Parameters:

permission - the permission value to set.

Returns:

the StorageDataShareAccessPolicy object itself.

withPrincipalId

public StorageDataShareAccessPolicy withPrincipalId(String principalId)

Set the principalId property: The AAD principal ID of the Managed Identity.

Parameters:

principalId - the principalId value to set.

Returns:

the StorageDataShareAccessPolicy object itself.

withTenantId

public StorageDataShareAccessPolicy withTenantId(String tenantId)

Set the tenantId property: The AAD tenant ID of the Managed Identity.

Parameters:

tenantId - the tenantId value to set.

Returns:

the StorageDataShareAccessPolicy object itself.

Applies to