# Managing Accounts and SLAs

# Managing Service Provider and Application Accounts

This section describes how service provider and application accounts are managed and provisioned:

- Summary of tasks Related to Accounts
- States of Accounts
- Account Properties
- Account References
- Reference: Attributes and Operations for ApplicationAccounts

See Reference: Attributes and Operations for ApplicationAccounts for information on finding the operations in the Administration Console and for the name of the MBean.

Prior to registering application accounts, service provider accounts must be created (see Service Provider Accounts) and application groups must be created (see Application Groups).

Prior to registering service provider accounts, service provider groups must be created: see Service Provider Groups.

## Summary of tasks Related to Accounts

### Application Accounts

To... | Use...
--- | ---
Get information about the number of application accounts | Operation: countApplicationAccounts
Add, remove and get information about an application account | Operation: addApplicationAccount Operation: removeApplicationAccount Operation: getApplicationAccount
List registered application accounts | Operation: listApplicationAccounts
Define additional properties for an application account | Operation: setApplicationAccountGroup Operation: setApplicationAccountProperties Operation: setApplicationAccountReference Operation: setApplicationAccountState

### Service Provider Accounts

To... | Use...
--- | ---
Get information about the number of service provider accounts | Operation: countServiceProviderAccounts
Add, remove and get information about a service provider account | Operation: addServiceProviderAccount Operation: removeServiceProviderAccount Operation: getServiceProviderAccount
List registered service provider accounts | Operation: listServiceProviderAccounts
Define additional properties for a service provider account | Operation: setServiceProviderAccountGroup Operation: setServiceProviderAccountProperties Operation: setServiceProviderAccountReference Operation: setServiceProviderAccountState

## States of Accounts

In order to provide an easy way to temporarily take an application out-of-service, service provider and application accounts have associated states. States are also used by the Oracle Communications Services Gatekeeper Partner Relationship Management module to enforce workflow management.

Accounts can be in either one of the following states:

Account state | An application belonging to the account...
--- | ---
ACTIVATED | is allowed to send requests to the application-facing interfaces exposed by Oracle Communications Services Gatekeeper.
DEACTIVATED | is not allowed to send requests to the application-facing interfaces exposed by Oracle Communications Services Gatekeeper.

State transition is provided using:

- Operation: setApplicationAccountState
- Operation: setServiceProviderAccountState

It is possible to filter on account state in all the following methods:

- Operation: countApplicationAccounts
- Operation: countServiceProviderAccounts
- Operation: listApplicationAccounts
- Operation: listServiceProviderAccounts

When an account is created using Operation: addApplicationAccount or Operation: addServiceProviderAccount, state is always ACTIVATED.

## Account Properties

An account can have a set of associated properties. These are generic key-value pairs.You cannot set these using the Administration Console, but you can use MBeans or the PRM Web Services.

The properties are displayed in the following operations:

- Operation: getApplicationInstance
- Operation: getApplicationAccount
- Operation: getApplicationGroup
- Operation: getServiceProviderAccount
- Operation: getServiceProviderGroup

## Account References

An account can have an associated reference. The reference is a form of alias or internal ID for the account. It is used to correlate the account with an operator-internal ID.

The properties are defined as parameters in the following operations:

- Operation: addApplicationInstance
- Operation: setApplicationInstanceReference
- Operation: setApplicationInstanceProperties
- Operation: addApplicationAccount
- Operation: setApplicationAccountReference
- Operation: addServiceProviderAccount
- Operation: setApplicationAccountReference

They are retrieved as part of the result of:

- Operation: getApplicationInstance
- Operation: getApplicationAccount
- Operation: getServiceProviderAccount

## Reference: Attributes and Operations for ApplicationAccounts

Managed object: Container ServicesAccountServiceApplicationAccounts

MBean: com.bea.wlcp.wlng.account.management.ApplicationAccountMBean

Below is a list of operations for configuration and maintenance:

- Operation: addApplicationAccount
- Operation: addServiceProviderAccount
- Operation: countApplicationAccounts
- Operation: countServiceProviderAccounts
- Operation: getApplicationAccount
- Operation: getServiceProviderAccount
- Operation: listApplicationAccounts
- Operation: listServiceProviderAccounts
- Operation: removeApplicationAccount
- Operation: removeServiceProviderAccount
- Operation: setApplicationAccountGroup
- Operation: setApplicationAccountProperties
- Operation: setApplicationAccountReference
- Operation: setApplicationAccountState
- Operation: setServiceProviderAccountGroup
- Operation: setServiceProviderAccountProperties
- Operation: setServiceProviderAccountReference
- Operation: setServiceProviderAccountState

#### Operation: addApplicationAccount

Scope: Domain

Adds an application account.

Signature:

    addApplicationAccount(Application Identifier: String, Service Provider Identifier: String, Application Group Identifier: String, Reference: String)

Table 4-1 addApplicationAccount
addApplicationAccount
Parameter | Description
--- | ---
Application Identifier | ID of the application account to add.
Service Provider Identifier | ID of the service provider account the application account shall belong to.
Application Group Identifier | ID of the application group the application account shall belong to.
Reference | See Account References.

#### Operation: addServiceProviderAccount

Scope: Domain

Adds a service provider account.

Signature:

    addServiceProviderAccount(Service Provider Identifier: String, Service Provider Group Identifier: String, Reference: String)

Table 4-2 addServiceProviderAccount
addServiceProviderAccount
Parameter | Description
--- | ---
Service Provider Identifier | ID of the service provider account to add.
Service Provider Group Identifier | ID of the service provider group the service provider account shall belong to.
Reference | See Account References.

#### Operation: countApplicationAccounts

Scope: Domain

Displays the number of registered application accounts. Can be filtered on any combination of:

- service provider account
- application group
- application account state.

Signature:

    countApplicationAccounts(serviceProviderIdentifier : String, applicationGroupIdentifier: String, state : String)

Table 4-3 countApplicationAccounts
countApplicationAccounts
Parameter | Description
--- | ---
ServiceProviderIdentifier | ID of the service provider account. Optional. Leave empty to match all.
ApplicationGroupIdentifier | ID of the application group. Optional. Leave empty to match all.
State | State of application account. See States of Accounts. Valid values: ACTIVATED DEACTIVATED Optional. Leave empty to match all.

#### Operation: countServiceProviderAccounts

Scope: Domain

Displays the number of registered service provider accounts. Can be filtered on any combination of:

- service provider group
- service provider account state.

Signature:

    countServiceProviderAccounts(serviceProviderGroupIdentifier : String, state :String)

Table 4-4 countServiceProviderAccounts
countServiceProviderAccounts
Parameter | Description
--- | ---
serviceProviderGroupIdentifier | ID of the service provider group. Optional. Leave empty to match all.
State | State of service provider account. See States of Accounts. Valid values: ACTIVATED DEACTIVATED Optional. Leave empty to match all.

#### Operation: getApplicationAccount

Scope: Domain

Gets information about an application account. Because the application account is not necessarily unique across service provider accounts, you must also specify the relevant service provider account

The information includes:

- Application account ID.
- ID of the service provider account to which the application account belongs.
- State, see States of Accounts.
- Reference, see Account References.
- Properties, see Account Properties.

Signature:

    getApplicationAccount(Application Identifier: String, Service Provider Identifier: String)

Table 4-5 getApplicationAccount
getApplicationAccount
Parameter | Description
--- | ---
Application Identifier | ID of the application account to get information about.
Service Provider Identifier | ID of the service provider account to which the application account belongs.

#### Operation: getServiceProviderAccount

Scope: Domain

Gets information about a service provider account.

The information includes:

- Service provider account ID.
- State, see States of Accounts.
- Reference, see Account References.
- Properties, see Account Properties.

Signature:

    getServiceProviderAccount(Service Provider Identifier: String)

Table 4-6 getServiceProviderAccount
getServiceProviderAccount
Parameter | Description
--- | ---
Service Provider Identifier | ID of the service provider account.

#### Operation: listApplicationAccounts

Scope: Domain

Displays a list of application accounts. Can be filtered on any combination of:

- service provider account.
- application group.
- state of application account.

The resultant list contains application account IDs.

Signature:

    listApplicationAccounts(ServiceProviderIdentifier: String, ApplicationGroupIdentifier : String, State: String, Offset: int, Size: int)

Table 4-7 listApplicationAccounts
listApplicationAccounts
Parameter | Description
--- | ---
ServiceProviderIdentifier | ID of the service provider account. Optional. Leave empty to match all.
ApplicationGroupIdentifier | Application group ID. Optional. Leave empty to match all.
State | State of application account, see States of Accounts Valid values: ACTIVATED DEACTIVATED Optional. Leave empty to match all.
Offset | Offset in the list. Starts with 0 (zero)
Size | Size of the list. For no restrictions on the size of the list, use 0 (zero).

#### Operation: listServiceProviderAccounts

Scope: Domain

Displays a list of service provider accounts. Can be filtered on any combination of:

- service provider group.
- state of service provider account.

The resultant list contains service provider account IDs.

Signature:

    listServiceProviderAccounts(ServiceProviderGroupIdentifier: String, State: String, Offset: int, Size: int)

Table 4-8 listServiceProviderAccounts
listServiceProviderAccounts
Parameter | Description
--- | ---
ServiceProviderGroupIdentifier | Service provider group ID. Optional. Leave empty to match all.
State | State of service provider account, see States of Accounts Valid values: ACTIVATED DEACTIVATED Optional. Leave empty to match all.
Offset | Offset in the list. Starts with 0 (zero)
Size | Size of the list. For no restrictions on the size of the list, use 0 (zero).

#### Operation: removeApplicationAccount

Scope: Domain

Removes an application account.

To be removed, the account must not have any associated application instances. The application account must also be in state DEACTIVATED.

Because the application account is not necessarily unique across service provider accounts, you must also specify the relevant service provider account.

Signature:

    removeApplicationAccount(Application Identifier: String,Service Provider Identifier: String)

Table 4-9 removeApplicationAccount
removeApplicationAccount
Parameter | Description
--- | ---
Application Identifier | ID of the application account to remove.
Service Provider Identifier | ID of the service provider account the application account belongs to.

#### Operation: removeServiceProviderAccount

Scope: Domain

Removes a service provider account.

To be removed, the service provider account must not have any associated application accounts. and must be in state DEACTIVATED.

Signature:

    removeServiceProviderAccount(Service Provider Identifier: String)

Table 4-10 removeServiceProviderAccount
removeServiceProviderAccount
Parameter | Description
--- | ---
Service Provider Identifier | ID of the service provider account to remove.

#### Operation: setApplicationAccountGroup

Sets the application account group for a particular application account/service provider account combination. Is also used to change to which group a combination belongs.

Signature:

    setApplicationAccountGroup(Application Identifier: String, Service Provider Identifier: String, Application Group Identifier: String)

Table 4-11 setApplicationAccountGroup
setApplicationAccountGroup
Parameter | Description
--- | ---
Application Identifier | ID of the application account to be assigned.
Service Provider Identifier | ID of the service provider account associated with the application account to be assigned.
Application Group Identifier | ID of the application group to which the combination is to be assigned.

#### Operation: setApplicationAccountProperties

Specifies properties for an application account/service provider account combination: see Account Properties.

Note: | Only applicable when accessing the MBean directly.

Signature:

    setApplicationAccountProperties(Application Identifier: String, Service Provider Identifier: String, Properties: Set<Map.Entry<String, String>>)

Table 4-12 setApplicationAccountProperties
setApplicationAccountProperties
Parameter | Description
--- | ---
Application Identifier | ID of the application account whose properties are being set.
Service Provider Identifier | ID of the service provider account to which the application account belongs.
Properties | See Account Properties.

#### Operation: setApplicationAccountReference

Specifies a reference for an application account/service provide account combinations: see Account References.

Signature:

    setApplicationAccountReference(Application Identifier: String, Service Provider Identifier: String, Reference: String)

Table 4-13 setApplicationAccountProperties
setApplicationAccountProperties
Parameter | Description
--- | ---
Application Identifier | ID of the application account whose reference is being set.
Service Provider Identifier | ID of the service provider account to which the application account belongs.
Reference | See Account References.

#### Operation: setApplicationAccountState

Performs a state transition for an application account/service provide account combination: see States of Accounts.

Signature:

    setApplicationAccountReference(Application Identifier: String, Service Provider Identifier: String, State: String)

Table 4-14 setApplicationAccountState
setApplicationAccountState
Parameter | Description
--- | ---
Application Identifier | ID of the application account whose state is to be changed.
Service Provider Identifier | ID of the service provider account to which the application account belongs.
State | See States of Accounts. One of: ACTIVATED DEACTIVATED

#### Operation: setServiceProviderAccountGroup

Specifies to which service provider group a certain service provider account belongs. Can be used as well to change the group assignment.

Signature:

    setServiceProviderAccountGroup(Service Provider Identifier: String, Service Provider Group Identifier: String)

Table 4-15 setServiceProviderAccountGroup
setServiceProviderAccountGroup
Parameter | Description
--- | ---
Service Provider Identifier | ID of the service provider account being assigned.
Service Provider Group Identifier | ID of the service provider group to which the account is being assigned.

#### Operation: setServiceProviderAccountProperties

Specifies properties for a service provider account: see Account Properties.

Note: | Only applicable when accessing the MBean directly.

Signature:

    setServiceProviderAccountProperties(Service Provider Identifier: String, Properties: Set<Map.Entry<String, String>>)

Table 4-16 setServiceProviderAccountProperties
setServiceProviderAccountProperties
Parameter | Description
--- | ---
Service Provider Identifier | ID of the service provider account whose properties are being set.
Properties | See Account Properties.

#### Operation: setServiceProviderAccountReference

Specifies a reference for a service provider account: see Account References.

Signature:

    setServiceProviderAccountReference(Service Provider Identifier: String, Reference: String)

Table 4-17 setServiceProviderAccountReference
setServiceProviderAccountReference
Parameter | Description
--- | ---
Service Provider Identifier | ID of the service provider account whose reference is being set.
Reference | See Account References.

#### Operation: setServiceProviderAccountState

Performs a state transition for a service provider account: see States of Accounts.

Signature:

    setServiceProviderAccountState(Service Provider Identifier: String, State: String)

Table 4-18 setServiceProviderAccountState
setServiceProviderAccountState
Parameter | Description
--- | ---
Service Provider Identifier | ID of the service provider account whose state is being changed.
State | See States of Accounts. One of: ACTIVATED DEACTIVATED