public final class SharedAccessAuthorizationRule extends Object implements AuthorizationRule
Constructor and Description |
---|
SharedAccessAuthorizationRule(String keyName,
List<AccessRights> accessRights)
Creates an instance with the given key name and access rights.
|
SharedAccessAuthorizationRule(String keyName,
String primaryKey,
List<AccessRights> accessRights)
Creates an instance with the given key name, primary key, secondary key, and access rights.
|
SharedAccessAuthorizationRule(String keyName,
String primaryKey,
String secondaryKey,
List<AccessRights> accessRights)
Creates an instance with the given key name, primary key, secondary key, and access rights.
|
Modifier and Type | Method and Description |
---|---|
List<AccessRights> |
getAccessRights()
Gets the access rights for the rule.
|
String |
getClaimType()
Gets the claim type.
|
String |
getClaimValue()
Gets the claim value.
|
OffsetDateTime |
getCreatedAt()
Gets the date time this rule was created.
|
String |
getKeyName()
Gets the name of the authorization rule.
|
OffsetDateTime |
getModifiedAt()
Gets the date time this rule was last modified.
|
String |
getPrimaryKey()
Gets the primary key.
|
String |
getSecondaryKey()
Gets the secondary key.
|
SharedAccessAuthorizationRule |
setPrimaryKey(String primaryKey)
Sets the primary key.
|
SharedAccessAuthorizationRule |
setSecondaryKey(String secondaryKey)
Sets the secondary key.
|
public SharedAccessAuthorizationRule(String keyName, List<AccessRights> accessRights)
primary key
and
secondary key
is randomly generated.keyName
- The name of the rule.accessRights
- The access rights.NullPointerException
- if keyName
or accessRights
are null.IllegalArgumentException
- if keyName
are empty strings.public SharedAccessAuthorizationRule(String keyName, String primaryKey, List<AccessRights> accessRights)
secondary key
is randomly generated.keyName
- The name of the rule.primaryKey
- The primary key.accessRights
- The access rights.NullPointerException
- if keyName
, primaryKey
, or accessRights
are null.IllegalArgumentException
- if keyName
, primaryKey
are empty strings.public SharedAccessAuthorizationRule(String keyName, String primaryKey, String secondaryKey, List<AccessRights> accessRights)
keyName
- The name of the rule.primaryKey
- The primary key.secondaryKey
- The secondary key.accessRights
- The access rights.NullPointerException
- if keyName
, primaryKey
, secondaryKey
, or accessRights
are null.IllegalArgumentException
- if keyName
, primaryKey
, secondaryKey
are empty
strings.public List<AccessRights> getAccessRights()
getAccessRights
in interface AuthorizationRule
public String getClaimType()
getClaimType
in interface AuthorizationRule
public String getClaimValue()
getClaimValue
in interface AuthorizationRule
public OffsetDateTime getCreatedAt()
getCreatedAt
in interface AuthorizationRule
public String getKeyName()
getKeyName
in interface AuthorizationRule
public OffsetDateTime getModifiedAt()
getModifiedAt
in interface AuthorizationRule
public String getPrimaryKey()
getPrimaryKey
in interface AuthorizationRule
public SharedAccessAuthorizationRule setPrimaryKey(String primaryKey)
primaryKey
- The primary key to set.SharedAccessAuthorizationRule
object.NullPointerException
- if primaryKey
is null.IllegalArgumentException
- if primaryKey
is an empty string.public String getSecondaryKey()
getSecondaryKey
in interface AuthorizationRule
public SharedAccessAuthorizationRule setSecondaryKey(String secondaryKey)
secondaryKey
- The secondary key to set.SharedAccessAuthorizationRule
object.NullPointerException
- if secondary
is null.IllegalArgumentException
- if secondary
is an empty string.Copyright © 2021 Microsoft Corporation. All rights reserved.