Class EnterpriseManagement
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.BaseService
-
- com.ibm.cloud.platform_services.enterprise_management.v1.EnterpriseManagement
-
public class EnterpriseManagement extends com.ibm.cloud.sdk.core.service.BaseService
The Enterprise Management API enables you to create and manage an enterprise, account groups, and accounts within the enterprise. API Version: 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_SERVICE_NAME
Default service name used when configuring the `EnterpriseManagement` client.static java.lang.String
DEFAULT_SERVICE_URL
Default service endpoint URL.
-
Constructor Summary
Constructors Constructor Description EnterpriseManagement(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `EnterpriseManagement` client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.ibm.cloud.sdk.core.http.ServiceCall<CreateAccountResponse>
createAccount(CreateAccountOptions createAccountOptions)
Create a new account in an enterprise.com.ibm.cloud.sdk.core.http.ServiceCall<CreateAccountGroupResponse>
createAccountGroup(CreateAccountGroupOptions createAccountGroupOptions)
Create an account group.com.ibm.cloud.sdk.core.http.ServiceCall<CreateEnterpriseResponse>
createEnterprise(CreateEnterpriseOptions createEnterpriseOptions)
Create an enterprise.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
deleteAccount(DeleteAccountOptions deleteAccountOptions)
Remove an account from its enterprise.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
deleteAccountGroup(DeleteAccountGroupOptions deleteAccountGroupOptions)
Delete an account group from the enterprise.com.ibm.cloud.sdk.core.http.ServiceCall<Account>
getAccount(GetAccountOptions getAccountOptions)
Get account by ID.com.ibm.cloud.sdk.core.http.ServiceCall<AccountGroup>
getAccountGroup(GetAccountGroupOptions getAccountGroupOptions)
Get account group by ID.com.ibm.cloud.sdk.core.http.ServiceCall<Enterprise>
getEnterprise(GetEnterpriseOptions getEnterpriseOptions)
Get enterprise by ID.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
importAccountToEnterprise(ImportAccountToEnterpriseOptions importAccountToEnterpriseOptions)
Import an account into an enterprise.com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountGroupsResponse>
listAccountGroups()
List account groups.com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountGroupsResponse>
listAccountGroups(ListAccountGroupsOptions listAccountGroupsOptions)
List account groups.com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountsResponse>
listAccounts()
List accounts.com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountsResponse>
listAccounts(ListAccountsOptions listAccountsOptions)
List accounts.com.ibm.cloud.sdk.core.http.ServiceCall<ListEnterprisesResponse>
listEnterprises()
List enterprises.com.ibm.cloud.sdk.core.http.ServiceCall<ListEnterprisesResponse>
listEnterprises(ListEnterprisesOptions listEnterprisesOptions)
List enterprises.static EnterpriseManagement
newInstance()
Class method which constructs an instance of the `EnterpriseManagement` client.static EnterpriseManagement
newInstance(java.lang.String serviceName)
Class method which constructs an instance of the `EnterpriseManagement` client.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
updateAccount(UpdateAccountOptions updateAccountOptions)
Move an account within the enterprise.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
updateAccountGroup(UpdateAccountGroupOptions updateAccountGroupOptions)
Update an account group.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
updateEnterprise(UpdateEnterpriseOptions updateEnterpriseOptions)
Update an enterprise.-
Methods inherited from class com.ibm.cloud.sdk.core.service.BaseService
configureClient, configureService, constructServiceUrl, constructServiceURL, disableRetries, enableGzipCompression, enableRetries, getAuthenticator, getClient, getDefaultHeaders, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
-
-
-
-
Field Detail
-
DEFAULT_SERVICE_NAME
public static final java.lang.String DEFAULT_SERVICE_NAME
Default service name used when configuring the `EnterpriseManagement` client.- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_URL
public static final java.lang.String DEFAULT_SERVICE_URL
Default service endpoint URL.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EnterpriseManagement
public EnterpriseManagement(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `EnterpriseManagement` client. The specified service name and authenticator are used to configure the client instance.- Parameters:
serviceName
- the service name to be used when configuring the client instanceauthenticator
- theAuthenticator
instance to be configured for this client
-
-
Method Detail
-
newInstance
public static EnterpriseManagement newInstance()
Class method which constructs an instance of the `EnterpriseManagement` client. The default service name is used to configure the client instance.- Returns:
- an instance of the `EnterpriseManagement` client using external configuration
-
newInstance
public static EnterpriseManagement newInstance(java.lang.String serviceName)
Class method which constructs an instance of the `EnterpriseManagement` client. The specified service name is used to configure the client instance.- Parameters:
serviceName
- the service name to be used when configuring the client instance- Returns:
- an instance of the `EnterpriseManagement` client using external configuration
-
createEnterprise
public com.ibm.cloud.sdk.core.http.ServiceCall<CreateEnterpriseResponse> createEnterprise(CreateEnterpriseOptions createEnterpriseOptions)
Create an enterprise. Create a new enterprise, which you can use to centrally manage multiple accounts. To create an enterprise, you must have an active Subscription account. <br/><br/>The API creates an enterprise entity, which is the root of the enterprise hierarchy. It also creates a new enterprise account that is used to manage the enterprise. All subscriptions, support entitlements, credits, and discounts from the source subscription account are migrated to the enterprise account, and the source account becomes a child account in the hierarchy. The user that you assign as the enterprise primary contact is also assigned as the owner of the enterprise account.- Parameters:
createEnterpriseOptions
- theCreateEnterpriseOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCreateEnterpriseResponse
-
listEnterprises
public com.ibm.cloud.sdk.core.http.ServiceCall<ListEnterprisesResponse> listEnterprises(ListEnterprisesOptions listEnterprisesOptions)
List enterprises. Retrieve all enterprises for a given ID by passing the IDs on query parameters. If no ID is passed, the enterprises for which the calling identity is the primary contact are returned. You can use pagination parameters to filter the results. <br/><br/>This method ensures that only the enterprises that the user has access to are returned. Access can be controlled either through a policy on a specific enterprise, or account-level platform services access roles, such as Administrator, Editor, Operator, or Viewer. When you call the method with the `enterprise_account_id` or `account_id` query parameter, the account ID in the token is compared with that in the query parameter. If these account IDs match, authentication isn't performed and the enterprise information is returned. If the account IDs don't match, authentication is performed and only then is the enterprise information returned in the response.- Parameters:
listEnterprisesOptions
- theListEnterprisesOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListEnterprisesResponse
-
listEnterprises
public com.ibm.cloud.sdk.core.http.ServiceCall<ListEnterprisesResponse> listEnterprises()
List enterprises. Retrieve all enterprises for a given ID by passing the IDs on query parameters. If no ID is passed, the enterprises for which the calling identity is the primary contact are returned. You can use pagination parameters to filter the results. <br/><br/>This method ensures that only the enterprises that the user has access to are returned. Access can be controlled either through a policy on a specific enterprise, or account-level platform services access roles, such as Administrator, Editor, Operator, or Viewer. When you call the method with the `enterprise_account_id` or `account_id` query parameter, the account ID in the token is compared with that in the query parameter. If these account IDs match, authentication isn't performed and the enterprise information is returned. If the account IDs don't match, authentication is performed and only then is the enterprise information returned in the response.- Returns:
- a
ServiceCall
with a result of typeListEnterprisesResponse
-
getEnterprise
public com.ibm.cloud.sdk.core.http.ServiceCall<Enterprise> getEnterprise(GetEnterpriseOptions getEnterpriseOptions)
Get enterprise by ID. Retrieve an enterprise by the `enterprise_id` parameter. All data related to the enterprise is returned only if the caller has access to retrieve the enterprise.- Parameters:
getEnterpriseOptions
- theGetEnterpriseOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeEnterprise
-
updateEnterprise
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> updateEnterprise(UpdateEnterpriseOptions updateEnterpriseOptions)
Update an enterprise. Update the name, domain, or IAM ID of the primary contact for an existing enterprise. The new primary contact must already be a user in the enterprise account.- Parameters:
updateEnterpriseOptions
- theUpdateEnterpriseOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
importAccountToEnterprise
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> importAccountToEnterprise(ImportAccountToEnterpriseOptions importAccountToEnterpriseOptions)
Import an account into an enterprise. Import an existing stand-alone account into an enterprise. The existing account can be any type: trial (`TRIAL`), Lite (`STANDARD`), Pay-As-You-Go (`PAYG`), or Subscription (`SUBSCRIPTION`). In the case of a `SUBSCRIPTION` account, the credits, promotional offers, and discounts are migrated to the billing unit of the enterprise. For a billable account (`PAYG` or `SUBSCRIPTION`), the country and currency code of the existing account and the billing unit of the enterprise must match. The API returns a `202` response and performs asynchronous operations to import the account into the enterprise. <br/></br>For more information about impacts to the account, see [Adding accounts to an enterprise](https://{DomainName}/docs/account?topic=account-enterprise-add).- Parameters:
importAccountToEnterpriseOptions
- theImportAccountToEnterpriseOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
createAccount
public com.ibm.cloud.sdk.core.http.ServiceCall<CreateAccountResponse> createAccount(CreateAccountOptions createAccountOptions)
Create a new account in an enterprise. Create a new account as a part of an existing enterprise. The API creates an account entity under the parent that is specified in the payload of the request. The request also takes in the name and the owner of this new account. The owner must have a valid IBMid that's registered with IBM Cloud, but they don't need to be a user in the enterprise account.- Parameters:
createAccountOptions
- theCreateAccountOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCreateAccountResponse
-
listAccounts
public com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountsResponse> listAccounts(ListAccountsOptions listAccountsOptions)
List accounts. Retrieve all accounts based on the values that are passed in the query parameters. If no query parameter is passed, all of the accounts in the enterprise for which the calling identity has access are returned. <br/><br/>You can use pagination parameters to filter the results. The `limit` field can be used to limit the number of results that are displayed for this method.<br/><br/>This method ensures that only the accounts that the user has access to are returned. Access can be controlled either through a policy on a specific account, or account-level platform services access roles, such as Administrator, Editor, Operator, or Viewer. When you call the method with the `enterprise_id`, `account_group_id` or `parent` query parameter, all of the accounts that are immediate children of this entity are returned. Authentication is performed on all the accounts before they are returned to the user to ensure that only those accounts are returned to which the calling identity has access to.- Parameters:
listAccountsOptions
- theListAccountsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListAccountsResponse
-
listAccounts
public com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountsResponse> listAccounts()
List accounts. Retrieve all accounts based on the values that are passed in the query parameters. If no query parameter is passed, all of the accounts in the enterprise for which the calling identity has access are returned. <br/><br/>You can use pagination parameters to filter the results. The `limit` field can be used to limit the number of results that are displayed for this method.<br/><br/>This method ensures that only the accounts that the user has access to are returned. Access can be controlled either through a policy on a specific account, or account-level platform services access roles, such as Administrator, Editor, Operator, or Viewer. When you call the method with the `enterprise_id`, `account_group_id` or `parent` query parameter, all of the accounts that are immediate children of this entity are returned. Authentication is performed on all the accounts before they are returned to the user to ensure that only those accounts are returned to which the calling identity has access to.- Returns:
- a
ServiceCall
with a result of typeListAccountsResponse
-
getAccount
public com.ibm.cloud.sdk.core.http.ServiceCall<Account> getAccount(GetAccountOptions getAccountOptions)
Get account by ID. Retrieve an account by the `account_id` parameter. All data related to the account is returned only if the caller has access to retrieve the account.- Parameters:
getAccountOptions
- theGetAccountOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeAccount
-
updateAccount
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> updateAccount(UpdateAccountOptions updateAccountOptions)
Move an account within the enterprise. Move an account to a different parent within the same enterprise.- Parameters:
updateAccountOptions
- theUpdateAccountOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
deleteAccount
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteAccount(DeleteAccountOptions deleteAccountOptions)
Remove an account from its enterprise. Remove an account from the enterprise its currently in. After an account is removed, it will be canceled and cannot be reactivated.- Parameters:
deleteAccountOptions
- theDeleteAccountOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
createAccountGroup
public com.ibm.cloud.sdk.core.http.ServiceCall<CreateAccountGroupResponse> createAccountGroup(CreateAccountGroupOptions createAccountGroupOptions)
Create an account group. Create a new account group, which can be used to group together multiple accounts. To create an account group, you must have an existing enterprise. The API creates an account group entity under the parent that is specified in the payload of the request. The request also takes in the name and the primary contact of this new account group.- Parameters:
createAccountGroupOptions
- theCreateAccountGroupOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCreateAccountGroupResponse
-
listAccountGroups
public com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountGroupsResponse> listAccountGroups(ListAccountGroupsOptions listAccountGroupsOptions)
List account groups. Retrieve all account groups based on the values that are passed in the query parameters. If no query parameter is passed, all of the account groups in the enterprise for which the calling identity has access are returned. <br/><br/>You can use pagination parameters to filter the results. The `limit` field can be used to limit the number of results that are displayed for this method.<br/><br/>This method ensures that only the account groups that the user has access to are returned. Access can be controlled either through a policy on a specific account group, or account-level platform services access roles, such as Administrator, Editor, Operator, or Viewer. When you call the method with the `enterprise_id`, `parent_account_group_id` or `parent` query parameter, all of the account groups that are immediate children of this entity are returned. Authentication is performed on all account groups before they are returned to the user to ensure that only those account groups are returned to which the calling identity has access.- Parameters:
listAccountGroupsOptions
- theListAccountGroupsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListAccountGroupsResponse
-
listAccountGroups
public com.ibm.cloud.sdk.core.http.ServiceCall<ListAccountGroupsResponse> listAccountGroups()
List account groups. Retrieve all account groups based on the values that are passed in the query parameters. If no query parameter is passed, all of the account groups in the enterprise for which the calling identity has access are returned. <br/><br/>You can use pagination parameters to filter the results. The `limit` field can be used to limit the number of results that are displayed for this method.<br/><br/>This method ensures that only the account groups that the user has access to are returned. Access can be controlled either through a policy on a specific account group, or account-level platform services access roles, such as Administrator, Editor, Operator, or Viewer. When you call the method with the `enterprise_id`, `parent_account_group_id` or `parent` query parameter, all of the account groups that are immediate children of this entity are returned. Authentication is performed on all account groups before they are returned to the user to ensure that only those account groups are returned to which the calling identity has access.- Returns:
- a
ServiceCall
with a result of typeListAccountGroupsResponse
-
getAccountGroup
public com.ibm.cloud.sdk.core.http.ServiceCall<AccountGroup> getAccountGroup(GetAccountGroupOptions getAccountGroupOptions)
Get account group by ID. Retrieve an account by the `account_group_id` parameter. All data related to the account group is returned only if the caller has access to retrieve the account group.- Parameters:
getAccountGroupOptions
- theGetAccountGroupOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeAccountGroup
-
updateAccountGroup
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> updateAccountGroup(UpdateAccountGroupOptions updateAccountGroupOptions)
Update an account group. Update the name or IAM ID of the primary contact for an existing account group. The new primary contact must already be a user in the enterprise account.- Parameters:
updateAccountGroupOptions
- theUpdateAccountGroupOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
deleteAccountGroup
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteAccountGroup(DeleteAccountGroupOptions deleteAccountGroupOptions)
Delete an account group from the enterprise. Delete an existing account group from the enterprise. You can't delete an account group that has child account groups, the delete request will fail. This API doesn't perform a recursive delete on the child account groups, it only deletes the current account group.- Parameters:
deleteAccountGroupOptions
- theDeleteAccountGroupOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
-