API version:
Show / Hide Table of Contents

Class Resource

Represents a resource in the Okta API.

Inheritance
System.Object
Resource
AcsEndpoint
ActivateFactorRequest
ApiError
ApiErrorCause
AppAndInstanceConditionEvaluatorAppOrInstance
AppAndInstancePolicyRuleCondition
AppInstancePolicyRuleCondition
Application
ApplicationAccessibility
ApplicationCredentials
ApplicationCredentialsOAuthClient
ApplicationCredentialsSigning
ApplicationCredentialsUsernameTemplate
ApplicationGroupAssignment
ApplicationLicensing
ApplicationSettings
ApplicationSettingsApplication
ApplicationSettingsNotes
ApplicationSettingsNotifications
ApplicationSettingsNotificationsVpn
ApplicationSettingsNotificationsVpnNetwork
ApplicationVisibility
ApplicationVisibilityHide
AppLink
AppUser
AppUserCredentials
AppUserPasswordCredential
AssignRoleRequest
AuthenticationProvider
AuthorizationServer
AuthorizationServerCredentials
AuthorizationServerCredentialsSigningConfig
AuthorizationServerPolicy
AuthorizationServerPolicyRule
AuthorizationServerPolicyRuleActions
AuthorizationServerPolicyRuleConditions
AutoLoginApplicationSettingsSignOn
BeforeScheduledActionPolicyRuleCondition
CallUserFactorProfile
CatalogApplication
ChangePasswordRequest
ClientPolicyCondition
ContextPolicyRuleCondition
CreateSessionRequest
CreateUserRequest
Csr
CsrMetadata
CsrMetadataSubject
CsrMetadataSubjectAltNames
CustomHotpUserFactorProfile
DevicePolicyRuleCondition
DevicePolicyRuleConditionPlatform
DNSRecord
Domain
DomainCertificate
DomainCertificateMetadata
DomainListResponse
Duration
EmailUserFactorProfile
EventHook
EventHookChannel
EventHookChannelConfig
EventHookChannelConfigAuthScheme
EventHookChannelConfigHeader
EventSubscriptions
Feature
FeatureStage
ForgotPasswordResponse
GrantTypePolicyRuleCondition
Group
GroupCondition
GroupPolicyRuleCondition
GroupProfile
GroupRule
GroupRuleAction
GroupRuleConditions
GroupRuleExpression
GroupRuleGroupAssignment
GroupRuleGroupCondition
GroupRulePeopleCondition
GroupRuleUserCondition
HardwareUserFactorProfile
IdentityProvider
IdentityProviderApplicationUser
IdentityProviderCredentials
IdentityProviderCredentialsClient
IdentityProviderCredentialsSigning
IdentityProviderCredentialsTrust
IdentityProviderPolicyRuleCondition
InactivityPolicyRuleCondition
InlineHook
InlineHookChannel
InlineHookChannelConfig
InlineHookChannelConfigAuthScheme
InlineHookChannelConfigHeaders
InlineHookPayload
InlineHookResponse
InlineHookResponseCommands
InlineHookResponseCommandValue
IonField
IonForm
JsonWebKey
JwkUse
LifecycleExpirationPolicyRuleCondition
LinkedObject
LinkedObjectDetails
LogActor
LogAuthenticationContext
LogClientInfo
LogDebugContext
LogEvent
LogGeographicalContext
LogGeolocation
LogIpAddress
LogIssuer
LogOutcome
LogRequest
LogSecurityContext
LogTarget
LogTransaction
LogUserAgent
MDMEnrollmentPolicyRuleCondition
NetworkZone
NetworkZoneAddress
NetworkZoneLocation
OAuth2Actor
OAuth2Claim
OAuth2ClaimConditions
OAuth2Client
OAuth2RefreshToken
OAuth2Scope
OAuth2ScopeConsentGrant
OAuth2ScopesMediationPolicyRuleCondition
OAuth2Token
OAuthApiError
OktaSignOnPolicyRuleSignonActions
OktaSignOnPolicyRuleSignonSessionActions
OpenIdConnectApplicationIdpInitiatedLogin
OpenIdConnectApplicationSettingsClient
OpenIdConnectApplicationSettingsClientKeys
OpenIdConnectApplicationSettingsRefreshToken
PasswordCredential
PasswordCredentialHash
PasswordCredentialHook
PasswordDictionary
PasswordDictionaryCommon
PasswordExpirationPolicyRuleCondition
PasswordPolicyAuthenticationProviderCondition
PasswordPolicyDelegationSettings
PasswordPolicyDelegationSettingsOptions
PasswordPolicyPasswordSettings
PasswordPolicyPasswordSettingsAge
PasswordPolicyPasswordSettingsComplexity
PasswordPolicyPasswordSettingsLockout
PasswordPolicyRecoveryEmail
PasswordPolicyRecoveryEmailProperties
PasswordPolicyRecoveryEmailRecoveryToken
PasswordPolicyRecoveryFactors
PasswordPolicyRecoveryFactorSettings
PasswordPolicyRecoveryQuestion
PasswordPolicyRecoveryQuestionComplexity
PasswordPolicyRecoveryQuestionProperties
PasswordPolicyRecoverySettings
PasswordPolicyRuleAction
PasswordPolicySettings
PlatformConditionEvaluatorPlatform
PlatformConditionEvaluatorPlatformOperatingSystem
PlatformConditionEvaluatorPlatformOperatingSystemVersion
PlatformPolicyRuleCondition
Policy
PolicyAccountLink
PolicyAccountLinkFilter
PolicyAccountLinkFilterGroups
PolicyNetworkCondition
PolicyPeopleCondition
PolicyRule
PolicyRuleActions
PolicyRuleActionsEnroll
PolicyRuleAuthContextCondition
PolicyRuleConditions
PolicySubject
PolicyUserNameTemplate
ProfileMapping
ProfileMappingProperty
ProfileMappingSource
Protocol
ProtocolAlgorithms
ProtocolAlgorithmType
ProtocolAlgorithmTypeSignature
ProtocolEndpoint
ProtocolEndpoints
ProtocolRelayState
ProtocolSettings
Provisioning
ProvisioningConditions
ProvisioningDeprovisionedCondition
ProvisioningGroups
ProvisioningSuspendedCondition
PushUserFactorProfile
RecoveryQuestionCredential
ResetPasswordToken
ResponseLinks
RiskPolicyRuleCondition
RiskScorePolicyRuleCondition
Role
SamlApplicationSettingsSignOn
SamlAttributeStatement
ScheduledUserLifecycleAction
Scope
SecurityQuestion
SecurityQuestionUserFactorProfile
Session
SessionIdentityProvider
SignOnInlineHook
SingleLogout
SmsTemplate
SmsTemplateTranslations
SmsUserFactorProfile
SocialAuthToken
SpCertificate
TempPassword
ThreatInsightConfiguration
TokenAuthorizationServerPolicyRuleAction
TokenAuthorizationServerPolicyRuleActionInlineHook
TokenUserFactorProfile
TotpUserFactorProfile
TrustedOrigin
U2fUserFactorProfile
User
UserActivationToken
UserCondition
UserCredentials
UserFactor
UserIdentifierConditionEvaluatorPattern
UserIdentifierPolicyRuleCondition
UserIdentityProviderLinkRequest
UserLifecycleAttributePolicyRuleCondition
UserPolicyRuleCondition
UserProfile
UserSchema
UserSchemaAttribute
UserSchemaAttributeEnum
UserSchemaAttributeItems
UserSchemaAttributeMaster
UserSchemaAttributeMasterPriority
UserSchemaAttributePermission
UserSchemaBase
UserSchemaBaseProperties
UserSchemaDefinitions
UserSchemaProperties
UserSchemaPropertiesProfile
UserSchemaPropertiesProfileItem
UserSchemaPublic
UserStatusPolicyRuleCondition
UserType
VerifyFactorRequest
VerifyUserFactorResponse
WebAuthnUserFactorProfile
WebUserFactorProfile
Implements
IResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public class Resource : IResource

Constructors

Resource()

Initializes a new instance of the Resource class.

Declaration
public Resource()

Properties

Item[String]

Gets or sets a resource property by name.

Declaration
public object this[string name] { get; set; }
Parameters
Type Name Description
System.String name

The property name.

Property Value
Type Description
System.Object

The property value, ornull.

Methods

GetArrayProperty<T>(String)

Gets a list or array property from the resource by name.

Declaration
public IList<T> GetArrayProperty<T>(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
System.Collections.Generic.IList<T>

A System.Collections.Generic.IList<T> that can be enumerated to obtain the property items.

Type Parameters
Name Description
T

The type of items contained in the list or array.

GetBooleanProperty(String)

Gets a System.Boolean property from the resource by name.

Declaration
protected bool? GetBooleanProperty(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
System.Nullable<System.Boolean>

The property value as a System.Boolean, or null.

Exceptions
Type Condition
System.FormatException

The value is not equal to the value of the System.Boolean.TrueString or System.Boolean.FalseString field.

GetClient()

Gets the IOktaClient that created this resource.

Declaration
protected IOktaClient GetClient()
Returns
Type Description
IOktaClient

The IOktaClient that created this resource.

GetData()

Gets the underlying data backing this resource.

Declaration
public IDictionary<string, object> GetData()
Returns
Type Description
System.Collections.Generic.IDictionary<System.String, System.Object>

The data backing this resource.

GetDateTimeProperty(String)

Gets a datetime property from the resource by name.

Declaration
protected DateTimeOffset? GetDateTimeProperty(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
System.Nullable<System.DateTimeOffset>

The property value as a System.DateTimeOffset, or null.

Exceptions
Type Condition
System.ArgumentException

The offset is greater than 14 hours or less than -14 hours.

System.FormatException

The value does not contain a valid string representation of a date and time, or the value contains the string representation of an offset value without a date or time.

GetDoubleProperty(String)

Gets a System.Double property from the resource by name.

Declaration
protected double? GetDoubleProperty(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
System.Nullable<System.Double>

The property value as a System.Double, or null.

Exceptions
Type Condition
System.FormatException

The value is not in the correct format.

System.OverflowException

The value represents a number less than System.Double.MinValue or greater than System.Double.MaxValue.

GetEnumProperty<TEnum>(String)

Gets a string enum property from the resource by name.

Declaration
protected TEnum GetEnumProperty<TEnum>(string name)
    where TEnum : StringEnum
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
TEnum

The property value wrapped in the specified enum type, or null.

Type Parameters
Name Description
TEnum

The enum type.

Exceptions
Type Condition
OktaException

The enum type could not be created.

GetIntegerProperty(String)

Gets an System.Int32 property from the resource by name.

Declaration
protected int? GetIntegerProperty(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
System.Nullable<System.Int32>

The property value as an System.Int32, or null.

Exceptions
Type Condition
System.FormatException

The value is not in the correct format.

System.OverflowException

The value represents a number less than System.Int32.MinValue or greater than System.Int32.MaxValue.

GetLongProperty(String)

Gets a System.Int64 property from the resource by name.

Declaration
protected long? GetLongProperty(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
System.Nullable<System.Int64>

The property value as a System.Int64, or null.

Exceptions
Type Condition
System.FormatException

The value is not in the correct format.

System.OverflowException

The value represents a number less than System.Int64.MinValue or greater than System.Int64.MaxValue.

GetProperty<T>(String)

Gets a resource property by name.

Declaration
public T GetProperty<T>(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
T

The strongly-typed property value, or null.

Type Parameters
Name Description
T

The property type.

Remarks

In derived classes, use the more specific methods such as GetStringProperty(String) and GetIntegerProperty(String) instead.

GetResourceProperty<T>(String)

Gets an embedded resource property by name.

Declaration
protected T GetResourceProperty<T>(string name)
    where T : Resource, new()
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
T

The embedded resource, or null.

Type Parameters
Name Description
T

The type of the embedded resource.

GetStringProperty(String)

Gets a System.String property from the resource by name.

Declaration
protected string GetStringProperty(string name)
Parameters
Type Name Description
System.String name

The property name.

Returns
Type Description
System.String

The property value as a System.String, or null.

SetProperty(String, Object)

Sets a resource property by name

Declaration
public void SetProperty(string name, object value)
Parameters
Type Name Description
System.String name

The property name

System.Object value

The property value

Implements

IResource
Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.