pub struct Applications {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

source§

impl Applications

source

pub async fn list( &self, q: &str, after: &str, limit: i64, filter: &str, expand: &str, include_non_deleted: bool ) -> Result<Response<Vec<Application>>, ClientError>

List Applications.

This function performs a GET to the /api/v1/apps endpoint.

Enumerates apps added to your organization with pagination. A subset of apps can be returned that match a supported filter expression or query.

Parameters:

  • q: &str
  • after: &str – Specifies the pagination cursor for the next page of apps.
  • limit: i64 – Specifies the number of results for a page.
  • filter: &str – Filters apps by status, user.id, group.id or credentials.signing.kid expression.
  • expand: &str – Traverses users link relationship and optionally embeds Application User resource.
  • include_non_deleted: bool
source

pub async fn list_all( &self, q: &str, filter: &str, expand: &str, include_non_deleted: bool ) -> Result<Response<Vec<Application>>, ClientError>

List Applications.

This function performs a GET to the /api/v1/apps endpoint.

As opposed to list, this function returns all the pages of the request at once.

Enumerates apps added to your organization with pagination. A subset of apps can be returned that match a supported filter expression or query.

source

pub async fn create( &self, activate: bool, body: &Application ) -> Result<Response<Application>, ClientError>

Add Application.

This function performs a POST to the /api/v1/apps endpoint.

Adds a new application to your Okta organization.

Parameters:

  • activate: bool – Executes activation lifecycle operation when creating the app.
  • okta_access_gateway_agent: &str
source

pub async fn get( &self, app_id: &str, expand: &str ) -> Result<Response<Application>, ClientError>

Get Application.

This function performs a GET to the /api/v1/apps/{appId} endpoint.

Fetches an application from your Okta organization by id.

Parameters:

  • app_id: &str
  • expand: &str
source

pub async fn update( &self, app_id: &str, body: &Application ) -> Result<Response<Application>, ClientError>

Update Application.

This function performs a PUT to the /api/v1/apps/{appId} endpoint.

Updates an application in your organization.

Parameters:

  • app_id: &str
source

pub async fn delete(&self, app_id: &str) -> Result<Response<()>, ClientError>

Delete Application.

This function performs a DELETE to the /api/v1/apps/{appId} endpoint.

Removes an inactive application.

Parameters:

  • app_id: &str
source

pub async fn list_csrs_fors( &self, app_id: &str ) -> Result<Response<Vec<Csr>>, ClientError>

List Certificate Signing Requests for Application.

This function performs a GET to the /api/v1/apps/{appId}/credentials/csrs endpoint.

Enumerates Certificate Signing Requests for an application

Parameters:

  • app_id: &str
source

pub async fn list_all_csrs_fors( &self, app_id: &str ) -> Result<Response<Vec<Csr>>, ClientError>

List Certificate Signing Requests for Application.

This function performs a GET to the /api/v1/apps/{appId}/credentials/csrs endpoint.

As opposed to list_csrs_for, this function returns all the pages of the request at once.

Enumerates Certificate Signing Requests for an application

source

pub async fn generate_csr_for( &self, app_id: &str, body: &CsrMetadata ) -> Result<Response<Csr>, ClientError>

Generate Certificate Signing Request for Application.

This function performs a POST to the /api/v1/apps/{appId}/credentials/csrs endpoint.

Generates a new key pair and returns the Certificate Signing Request for it.

Parameters:

  • app_id: &str
source

pub async fn get_csr_for( &self, app_id: &str, csr_id: &str ) -> Result<Response<Csr>, ClientError>

This function performs a GET to the /api/v1/apps/{appId}/credentials/csrs/{csrId} endpoint.

Parameters:

  • app_id: &str
  • csr_id: &str
source

pub async fn revoke_csr_from( &self, app_id: &str, csr_id: &str ) -> Result<Response<()>, ClientError>

This function performs a DELETE to the /api/v1/apps/{appId}/credentials/csrs/{csrId} endpoint.

Parameters:

  • app_id: &str
  • csr_id: &str
source

pub async fn post_app_credentials_csr_lifecycle_publish( &self, app_id: &str, csr_id: &str ) -> Result<Response<JsonWebKey>, ClientError>

This function performs a POST to the /api/v1/apps/{appId}/credentials/csrs/{csrId}/lifecycle/publish endpoint.

Parameters:

  • app_id: &str
  • csr_id: &str
source

pub async fn list_keys( &self, app_id: &str ) -> Result<Response<Vec<JsonWebKey>>, ClientError>

List Key Credentials for Application.

This function performs a GET to the /api/v1/apps/{appId}/credentials/keys endpoint.

Enumerates key credentials for an application

Parameters:

  • app_id: &str
source

pub async fn list_all_keys( &self, app_id: &str ) -> Result<Response<Vec<JsonWebKey>>, ClientError>

List Key Credentials for Application.

This function performs a GET to the /api/v1/apps/{appId}/credentials/keys endpoint.

As opposed to list_keys, this function returns all the pages of the request at once.

Enumerates key credentials for an application

source

pub async fn generate_key( &self, app_id: &str, validity_years: i64 ) -> Result<Response<JsonWebKey>, ClientError>

This function performs a POST to the /api/v1/apps/{appId}/credentials/keys/generate endpoint.

Generates a new X.509 certificate for an application key credential

Parameters:

  • app_id: &str
  • validity_years: i64
source

pub async fn get_key( &self, app_id: &str, key_id: &str ) -> Result<Response<JsonWebKey>, ClientError>

Get Key Credential for Application.

This function performs a GET to the /api/v1/apps/{appId}/credentials/keys/{keyId} endpoint.

Gets a specific application key credential by kid

Parameters:

  • app_id: &str
  • key_id: &str
source

pub async fn clone_key( &self, app_id: &str, key_id: &str, target_aid: &str ) -> Result<Response<JsonWebKey>, ClientError>

Clone Application Key Credential.

This function performs a POST to the /api/v1/apps/{appId}/credentials/keys/{keyId}/clone endpoint.

Clones a X.509 certificate for an application key credential from a source application to target application.

Parameters:

  • app_id: &str
  • key_id: &str
  • target_aid: &str – Unique key of the target Application.

This function performs a GET to the /api/v1/apps/{appId}/grants endpoint.

Lists all scope consent grants for the application

Parameters:

  • app_id: &str
  • expand: &str

This function performs a GET to the /api/v1/apps/{appId}/grants endpoint.

As opposed to list_scope_consent_grants, this function returns all the pages of the request at once.

Lists all scope consent grants for the application

This function performs a POST to the /api/v1/apps/{appId}/grants endpoint.

Grants consent for the application to request an OAuth 2.0 Okta scope

Parameters:

  • app_id: &str

This function performs a GET to the /api/v1/apps/{appId}/grants/{grantId} endpoint.

Fetches a single scope consent grant for the application

Parameters:

  • app_id: &str
  • grant_id: &str
  • expand: &str

This function performs a DELETE to the /api/v1/apps/{appId}/grants/{grantId} endpoint.

Revokes permission for the application to request the given scope

Parameters:

  • app_id: &str
  • grant_id: &str
source

pub async fn list_group_assignments( &self, app_id: &str, q: &str, after: &str, limit: i64, expand: &str ) -> Result<Response<Vec<ApplicationGroupAssignment>>, ClientError>

List Groups Assigned to Application.

This function performs a GET to the /api/v1/apps/{appId}/groups endpoint.

Enumerates group assignments for an application.

Parameters:

  • app_id: &str
  • q: &str
  • after: &str – Specifies the pagination cursor for the next page of assignments.
  • limit: i64 – Specifies the number of results for a page.
  • expand: &str
source

pub async fn list_all_group_assignments( &self, app_id: &str, q: &str, expand: &str ) -> Result<Response<Vec<ApplicationGroupAssignment>>, ClientError>

List Groups Assigned to Application.

This function performs a GET to the /api/v1/apps/{appId}/groups endpoint.

As opposed to list_group_assignments, this function returns all the pages of the request at once.

Enumerates group assignments for an application.

source

pub async fn get_group_assignment( &self, app_id: &str, group_id: &str, expand: &str ) -> Result<Response<ApplicationGroupAssignment>, ClientError>

Get Assigned Group for Application.

This function performs a GET to the /api/v1/apps/{appId}/groups/{groupId} endpoint.

Fetches an application group assignment

Parameters:

  • app_id: &str
  • group_id: &str
  • expand: &str
source

pub async fn create_group_assignment( &self, app_id: &str, group_id: &str, body: &ApplicationGroupAssignment ) -> Result<Response<ApplicationGroupAssignment>, ClientError>

Assign Group to Application.

This function performs a PUT to the /api/v1/apps/{appId}/groups/{groupId} endpoint.

Assigns a group to an application

Parameters:

  • app_id: &str
  • group_id: &str
source

pub async fn delete_group_assignment( &self, app_id: &str, group_id: &str ) -> Result<Response<()>, ClientError>

Remove Group from Application.

This function performs a DELETE to the /api/v1/apps/{appId}/groups/{groupId} endpoint.

Removes a group assignment from an application.

Parameters:

  • app_id: &str
  • group_id: &str
source

pub async fn activate(&self, app_id: &str) -> Result<Response<()>, ClientError>

Activate Application.

This function performs a POST to the /api/v1/apps/{appId}/lifecycle/activate endpoint.

Activates an inactive application.

Parameters:

  • app_id: &str
source

pub async fn deactivate( &self, app_id: &str ) -> Result<Response<()>, ClientError>

Deactivate Application.

This function performs a POST to the /api/v1/apps/{appId}/lifecycle/deactivate endpoint.

Deactivates an active application.

Parameters:

  • app_id: &str
source

pub async fn list_o_auth_2_tokens_fors( &self, app_id: &str, expand: &str, after: &str, limit: i64 ) -> Result<Response<Vec<OAuth2Token>>, ClientError>

This function performs a GET to the /api/v1/apps/{appId}/tokens endpoint.

Lists all tokens for the application

Parameters:

  • app_id: &str
  • expand: &str
  • after: &str
  • limit: i64
source

pub async fn list_all_o_auth_2_tokens_fors( &self, app_id: &str, expand: &str ) -> Result<Response<Vec<OAuth2Token>>, ClientError>

This function performs a GET to the /api/v1/apps/{appId}/tokens endpoint.

As opposed to list_o_auth_2_tokens_for, this function returns all the pages of the request at once.

Lists all tokens for the application

source

pub async fn revoke_o_auth_2_tokens_for( &self, app_id: &str ) -> Result<Response<()>, ClientError>

This function performs a DELETE to the /api/v1/apps/{appId}/tokens endpoint.

Revokes all tokens for the specified application

Parameters:

  • app_id: &str
source

pub async fn get_o_auth_2_token_for( &self, app_id: &str, token_id: &str, expand: &str ) -> Result<Response<OAuth2Token>, ClientError>

This function performs a GET to the /api/v1/apps/{appId}/tokens/{tokenId} endpoint.

Gets a token for the specified application

Parameters:

  • app_id: &str
  • token_id: &str
  • expand: &str
source

pub async fn revoke_o_auth_2_token_for( &self, app_id: &str, token_id: &str ) -> Result<Response<()>, ClientError>

This function performs a DELETE to the /api/v1/apps/{appId}/tokens/{tokenId} endpoint.

Revokes the specified token for the specified application

Parameters:

  • app_id: &str
  • token_id: &str
source

pub async fn list_users( &self, app_id: &str, q: &str, query_scope: &str, after: &str, limit: i64, filter: &str, expand: &str ) -> Result<Response<Vec<AppUser>>, ClientError>

List Users Assigned to Application.

This function performs a GET to the /api/v1/apps/{appId}/users endpoint.

Enumerates all assigned application users for an application.

Parameters:

  • app_id: &str
  • q: &str
  • query_scope: &str
  • after: &str – specifies the pagination cursor for the next page of assignments.
  • limit: i64 – specifies the number of results for a page.
  • filter: &str
  • expand: &str
source

pub async fn list_all_users( &self, app_id: &str, q: &str, query_scope: &str, filter: &str, expand: &str ) -> Result<Response<Vec<AppUser>>, ClientError>

List Users Assigned to Application.

This function performs a GET to the /api/v1/apps/{appId}/users endpoint.

As opposed to list_users, this function returns all the pages of the request at once.

Enumerates all assigned application users for an application.

source

pub async fn assign_user( &self, app_id: &str, body: &AppUser ) -> Result<Response<AppUser>, ClientError>

Assign User to Application for SSO & Provisioning.

This function performs a POST to the /api/v1/apps/{appId}/users endpoint.

Assigns an user to an application with credentials and an app-specific profile. Profile mappings defined for the application are first applied before applying any profile properties specified in the request.

Parameters:

  • app_id: &str
source

pub async fn get_user( &self, app_id: &str, user_id: &str, expand: &str ) -> Result<Response<AppUser>, ClientError>

Get Assigned User for Application.

This function performs a GET to the /api/v1/apps/{appId}/users/{userId} endpoint.

Fetches a specific user assignment for application by id.

Parameters:

  • app_id: &str
  • user_id: &str
  • expand: &str
source

pub async fn update_user( &self, app_id: &str, user_id: &str, body: &AppUser ) -> Result<Response<AppUser>, ClientError>

Update Application Profile for Assigned User.

This function performs a POST to the /api/v1/apps/{appId}/users/{userId} endpoint.

Updates a user’s profile for an application

Parameters:

  • app_id: &str
  • user_id: &str
source

pub async fn delete_user( &self, app_id: &str, user_id: &str, send_email: bool ) -> Result<Response<()>, ClientError>

Remove User from Application.

This function performs a DELETE to the /api/v1/apps/{appId}/users/{userId} endpoint.

Removes an assignment for a user from an application.

Parameters:

  • app_id: &str
  • user_id: &str
  • send_email: bool

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more