btpaccounts

package
v0.0.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2021 License: MPL-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServiceName = "Accounts Service V1" // Label of service.
	EndpointsID = "accounts"            // ID to lookup a service endpoint with.
	ServiceID   = "accounts"            // ServiceID is a unique identifier of a specific service.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsV1

type AccountsV1 struct {
	*service.Requester
}

func (*AccountsV1) CloneSubAccount

func (c *AccountsV1) CloneSubAccount(ctx context.Context, input *CloneSubAccountInput) (*CloneSubAccountOutput, error)

func (*AccountsV1) CreateDirectory

func (c *AccountsV1) CreateDirectory(ctx context.Context,
	input *CreateDirectoryInput) (*CreateDirectoryOutput, error)

func (*AccountsV1) CreateSubAccount

func (c *AccountsV1) CreateSubAccount(ctx context.Context, input *CreateSubAccountInput) (*CreateSubAccountOutput, error)

func (*AccountsV1) CreateSubAccountServiceManagementBinding

func (c *AccountsV1) CreateSubAccountServiceManagementBinding(ctx context.Context,
	input *CreateServiceManagementBindingInput) (*CreateServiceManagementBindingOutput, error)

func (*AccountsV1) DeleteDirectory

func (c *AccountsV1) DeleteDirectory(ctx context.Context,
	input *DeleteDirectoryInput) (*DeleteDirectoryOutput, error)

func (*AccountsV1) DeleteSubAccount

func (c *AccountsV1) DeleteSubAccount(ctx context.Context, input *DeleteSubAccountInput) (*DeleteSubAccountOutput, error)

func (*AccountsV1) DeleteSubAccountServiceManagementBinding

func (c *AccountsV1) DeleteSubAccountServiceManagementBinding(ctx context.Context,
	input *DeleteServiceManagementBindingInput) (*DeleteServiceManagementBindingOutput, error)

func (*AccountsV1) GetDirectory

func (c *AccountsV1) GetDirectory(ctx context.Context,
	input *GetDirectoryInput) (*GetDirectoryOutput, error)

func (*AccountsV1) GetGlobalAccount

func (c *AccountsV1) GetGlobalAccount(ctx context.Context, input *GetGlobalAccountInput) (*GlobalAccountOutput, error)

func (*AccountsV1) GetJobStatus

func (c *AccountsV1) GetJobStatus(ctx context.Context, input *GetJobStatusInput) (*GetJobStatusOutput, error)

func (*AccountsV1) GetSubAccount

func (c *AccountsV1) GetSubAccount(ctx context.Context, input *GetSubAccountInput) (*GetSubAccountOutput, error)

func (*AccountsV1) GetSubAccountCustomProperties

func (c *AccountsV1) GetSubAccountCustomProperties(ctx context.Context, input *GetCustomPropertiesInput) (*GetCustomPropertiesOutput, error)

func (*AccountsV1) GetSubAccountServiceManagementBinding

func (c *AccountsV1) GetSubAccountServiceManagementBinding(ctx context.Context,
	input *GetServiceManagementBindingInput) (*GetServiceManagementBindingOutput, error)

func (*AccountsV1) GetSubAccounts

func (c *AccountsV1) GetSubAccounts(ctx context.Context, input *GetSubAccountsInput) (*GetSubAccountsOutput, error)

func (*AccountsV1) MoveManySubAccounts

func (c *AccountsV1) MoveManySubAccounts(ctx context.Context, input *MoveManySubAccountsInput) (*MoveManySubAccountsOutput, error)

func (*AccountsV1) MoveSubAccount

func (c *AccountsV1) MoveSubAccount(ctx context.Context, input *MoveSubAccountInput) (*MoveSubAccountOutput, error)

func (*AccountsV1) UpdateDirectory

func (c *AccountsV1) UpdateDirectory(ctx context.Context,
	input *UpdateDirectoryInput) (*UpdateDirectoryOutput, error)

func (*AccountsV1) UpdateDirectoryFeatures added in v0.0.25

func (c *AccountsV1) UpdateDirectoryFeatures(ctx context.Context,
	input *UpdateDirectoryFeaturesInput) (*UpdateDirectoryFeaturesOutput, error)

func (*AccountsV1) UpdateGlobalAccount

func (c *AccountsV1) UpdateGlobalAccount(ctx context.Context, input *UpdateGlobalAccountInput) (*GlobalAccountOutput, error)

func (*AccountsV1) UpdateSubAccount

func (c *AccountsV1) UpdateSubAccount(ctx context.Context, input *UpdateSubAccountInput) (*UpdateSubAccountOutput, error)

type CloneSubAccountInput

type CloneSubAccountInput struct {
	SourceSubAccountGuid string `dest:"uri" dest-name:"sourceSubaccountGUID"`

	//Enables the subaccount to use beta services and applications. Not to be used in a production environment.
	//Cannot be reverted once set. Any use of beta functionality is at the customer's own risk, and SAP shall not be
	//liable for errors or damages caused by the use of beta features.
	BetaEnabled bool `json:"betaEnabled,omitempty"`

	//Clone configuration of the subaccount.
	CloneConfigurations []string `json:"cloneConfigurations,omitempty"`

	// Additional properties of the subaccount.
	CustomProperties []KeyValue `json:"customProperties,omitempty"`

	// A description of the subaccount for customer-facing UIs.
	Description string `json:"description,omitempty"`

	// The display name of the subaccount for customer-facing UIs.
	DisplayName string `json:"displayName,omitempty"`

	//The origin of the subaccount creation.
	//
	//REGION_SETUP: Created automatically as part of the region setup.
	//COCKPIT: Created in the cockpit.
	//Enum:
	//	[ REGION_SETUP, COCKPIT, MIGRATED_TO_CP_FOUNDATION_V2, DOMAINDB_SYNC ]
	Origin string `json:"origin,omitempty"`

	//The unique ID subaccount’s parent entity.
	ParentGuid string `json:"parentGUID,omitempty"`

	//The region in which the subaccount was created.
	Region string `json:"region,omitempty"`

	//Additional admins of the subaccount. Do not add yourself as you are assigned as a subaccount admin by default.
	//Enter as a valid JSON array containing the list of admin e-mails (as required by your identity provider).
	//To add admins to Neo subaccounts, use instead the SAP BTP cockpit or the APIs in the SDK for SAP BTP, Neo environment.
	//Example: ["admin1@example.com", "admin2@example.com"]
	SubaccountAdmins []string `json:"subaccountAdmins,omitempty"`

	//The subdomain that becomes part of the path used to access the authorization tenant of the subaccount.
	//Must be unique within the defined region. Use only letters (a-z), digits (0-9), and hyphens (not at start or end).
	//Maximum length is 63 characters. Cannot be changed after the subaccount has been created. Does not apply to Neo subaccounts.
	Subdomain string `json:"subdomain,omitempty"`

	//Whether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate
	//action when handling incidents that are related to mission-critical accounts in production systems.
	//Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos.
	//Applying this setting this does not modify the subaccount.
	//
	//NOT_USED_FOR_PRODUCTION: Subaccount is not used for production purposes.
	//USED_FOR_PRODUCTION: Subaccount is used for production purposes.
	//Enum:
	//	[ USED_FOR_PRODUCTION, NOT_USED_FOR_PRODUCTION ]
	UsedForProduction string `json:"usedForProduction,omitempty"`
}

POST /accounts/v1/subaccounts/clone/{sourceSubaccountGUID} Clone a Neo subaccount

type CloneSubAccountOutput added in v0.0.12

type CloneSubAccountOutput struct {
	SubAccount

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type CreateDirectoryInput

type CreateDirectoryInput struct {
	// Additional properties of the directory.
	CustomProperties []CustomProperties `json:"customProperties,omitempty"`

	// A description of the directory.
	Description string `json:"description,omitempty"`

	// Additional admins of the directory. Do not add yourself as you are assigned as a directory admin by default.
	// Use only with directories that are configured to manage their authorizations.
	//Example: ["admin1@example.com", "admin2@example.com"]
	DirectoryAdmins []string `json:"directoryAdmins,omitempty"`

	// The features to enable for the directory.
	//
	//DEFAULT: (Mandatory) All directories provide the following basic features:
	//	(1) Group and filter subaccounts for reports and filters,
	//	(2) monitor usage and costs on a directory level (costs only available for contracts that use
	//		the consumption-based commercial model), and
	//	(3) set custom properties and tags to the directory for identification and reporting purposes.
	//ENTITLEMENTS: (Optional) Enables the assignment of a quota for services and applications to the
	//	directory from the global account quota for distribution to the directory's subaccounts.
	//AUTHORIZATIONS: (Optional) Enables a custom identity provider and/or authorization management for the directory.
	//	For example, it allows certain users to manage directory entitlements. NOTE: You can only use this feature in combination with the ENTITLEMENTS feature.
	//IMPORTANT: Once a feature has been enabled for a directory, you cannot disable it. If you are not sure which
	//	features to enable, we recommend that you set only the default features, and then add features later on as they are needed.
	//
	//Examples:
	//	[DEFAULT]
	//	[DEFAULT,ENTITLEMENTS]
	//	[DEFAULT,ENTITLEMENTS,AUTHORIZATIONS]
	//Enum:
	//	[ DEFAULT, ENTITLEMENTS, AUTHORIZATIONS ]
	DirectoryFeatures []string `json:"directoryFeatures,omitempty"`

	// The display name of the directory.
	DisplayName string `json:"displayName,omitempty"`

	//Relevant only for directories that are enabled to manage their authorizations. The subdomain that becomes part
	//of the path used to access the authorization tenant of the directory. Must be unique in the defined region.
	//Use only letters (a-z), digits (0-9), and hyphens (not at start or end). Maximum length is 63 characters.
	//Cannot be changed after the directory has been created.
	Subdomain string `json:"subdomain,omitempty"`
}

POST /accounts/v1/directories Create a directory

type CreateDirectoryOutput

type CreateDirectoryOutput struct {
	Directory

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type CreateServiceManagementBindingInput

type CreateServiceManagementBindingInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`
}

POST /accounts/v1/subaccounts/{subaccountGUID}/serviceManagementBinding Create a Service Management binding

type CreateServiceManagementBindingOutput added in v0.0.12

type CreateServiceManagementBindingOutput struct {
	ServiceManagementBinding

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type CreateSubAccountInput

type CreateSubAccountInput struct {
	//Enables the subaccount to use beta services and applications. Not to be used in a production environment.
	//Cannot be reverted once set. Any use of beta functionality is at the customer's own risk, and SAP shall not be
	//liable for errors or damages caused by the use of beta features.
	BetaEnabled bool `json:"betaEnabled,omitempty"`

	// Additional properties of the subaccount.
	CustomProperties []KeyValue `json:"customProperties,omitempty"`

	// A description of the subaccount for customer-facing UIs.
	Description string `json:"description,omitempty"`

	// The display name of the subaccount for customer-facing UIs.
	DisplayName string `json:"displayName,omitempty"`

	//The origin of the subaccount creation.
	//
	//REGION_SETUP: Created automatically as part of the region setup.
	//COCKPIT: Created in the cockpit.
	//Enum:
	//	[ REGION_SETUP, COCKPIT, MIGRATED_TO_CP_FOUNDATION_V2, DOMAINDB_SYNC ]
	Origin string `json:"origin,omitempty"`

	//The unique ID subaccount’s parent entity.
	ParentGuid string `json:"parentGUID,omitempty"`

	//The region in which the subaccount was created.
	Region string `json:"region,omitempty"`

	//Additional admins of the subaccount. Do not add yourself as you are assigned as a subaccount admin by default.
	//Enter as a valid JSON array containing the list of admin e-mails (as required by your identity provider).
	//To add admins to Neo subaccounts, use instead the SAP BTP cockpit or the APIs in the SDK for SAP BTP, Neo environment.
	//Example: ["admin1@example.com", "admin2@example.com"]
	SubaccountAdmins []string `json:"subaccountAdmins,omitempty"`

	//The subdomain that becomes part of the path used to access the authorization tenant of the subaccount.
	//Must be unique within the defined region. Use only letters (a-z), digits (0-9), and hyphens (not at start or end).
	//Maximum length is 63 characters. Cannot be changed after the subaccount has been created. Does not apply to Neo subaccounts.
	Subdomain string `json:"subdomain,omitempty"`

	//Whether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate
	//action when handling incidents that are related to mission-critical accounts in production systems.
	//Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos.
	//Applying this setting this does not modify the subaccount.
	//
	//NOT_USED_FOR_PRODUCTION: Subaccount is not used for production purposes.
	//USED_FOR_PRODUCTION: Subaccount is used for production purposes.
	//Enum:
	//	[ USED_FOR_PRODUCTION, NOT_USED_FOR_PRODUCTION ]
	UsedForProduction string `json:"usedForProduction,omitempty"`
}

POST accounts/v1/subaccounts Create a subaccount

type CreateSubAccountOutput added in v0.0.12

type CreateSubAccountOutput struct {
	SubAccount

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type CustomProperties

type CustomProperties struct {
	KeyValue

	//The unique id for the corresponding entity.
	AccountGuid string `json:"accountGUID,omitempty"`
}

type DeleteDirectoryInput

type DeleteDirectoryInput struct {
	//The GUID of the directory to update.
	DirectoryGuid string `dest:"uri" dest-name:"directoryGUID"`

	//Whether to delete the directory even if it contains data. If not set to true,
	//the request fails when the directory contains data.
	ForceDelete bool `dest:"querystring" dest-name:"forceDelete"`
}

DELETE /accounts/v1/directories/{directoryGUID} Delete a directory

type DeleteDirectoryOutput

type DeleteDirectoryOutput struct {
	Directory

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type DeleteServiceManagementBindingInput

type DeleteServiceManagementBindingInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`
}

DELETE /accounts/v1/subaccounts/{subaccountGUID}/serviceManagementBinding Delete a Service Management binding

type DeleteServiceManagementBindingOutput

type DeleteServiceManagementBindingOutput struct {
	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type DeleteSubAccountInput

type DeleteSubAccountInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`
}

DELETE /accounts/v1/subaccounts/{subaccountGUID} Delete a subaccount

type DeleteSubAccountOutput added in v0.0.12

type DeleteSubAccountOutput struct {
	SubAccount

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type Directory

type Directory struct {
	// The response object containing information about the directories.
	Children []map[string]interface{} `json:"children,omitempty"`

	// The status of the customer contract and its associated root global account.
	//
	//ACTIVE: The customer contract and its associated global account is currently active.
	//PENDING_TERMINATION: A termination process has been triggered for a customer contract
	//	(the customer contract has expired, or a customer has given notification that they wish to
	//	terminate their contract), and the global account is currently in the validation period.
	//	The customer can still access their global account until the end of the validation period.
	//SUSPENDED: For enterprise accounts, specifies that the customer's global account is currently
	//	in the grace period of the termination process. Access to the global account by the customer is blocked.
	//	No data is deleted until the deletion date is reached at the end of the grace period.
	//	For trial accounts, specifies that the account is suspended, and the account owner
	//	has not yet extended the trial period.
	//Enum:
	//	[ ACTIVE, PENDING_TERMINATION, SUSPENDED ]
	ContractStatus string `json:"contractStatus,omitempty"`

	// Details of the user that created the directory.
	CreatedBy string `json:"createdBy,omitempty"`

	// The date the directory was created. Dates and times are in UTC format.
	CreatedDate times.JavaTime `json:"createdDate,omitempty"`

	// Custom properties assigned to the directory as key-value pairs.
	CustomProperties []CustomProperties `json:"customProperties,omitempty"`

	// A description of the directory.
	Description string `json:"description,omitempty"`

	// The features that are enabled for the directory. Valid values:
	//
	//DEFAULT: All directories have the following basic features enabled:
	//	(1) Group and filter subaccounts for reports and filters,
	//	(2) monitor usage and costs on a directory level (costs only available for contracts that use the
	//		consumption-based commercial model), and
	//	(3) set custom properties and tags to the directory for identification and reporting purposes.
	//ENTITLEMENTS: (Optional) Enables the assignment of a quota for services and applications
	//	to the directory from the global account quota for distribution to the directory's subaccounts.
	//AUTHORIZATIONS: (Optional) Enables a custom identity provider and/or authorization management for the directory.
	//	For example, it allows certain users to manage directory entitlements. You can only use this feature in
	//	combination with the ENTITLEMENTS feature.
	//
	//Examples:
	//	[DEFAULT]
	//	[DEFAULT,ENTITLEMENTS]
	//	[DEFAULT,ENTITLEMENTS,AUTHORIZATIONS]
	//Enum:
	//	[ DEFAULT, ENTITLEMENTS, AUTHORIZATIONS ]
	DirectoryFeatures []string `json:"directoryFeatures,omitempty"`

	// The display name of the directory.
	DisplayName string `json:"displayName,omitempty"`

	// The current state of the directory.
	//
	//STARTED: CRUD operation on an entity has started.
	//CREATING: Creating entity operation is in progress.
	//UPDATING: Updating entity operation is in progress.
	//MOVING: Moving entity operation is in progress.
	//PROCESSING: A series of operations related to the entity is in progress.
	//DELETING: Deleting entity operation is in progress.
	//OK: The CRUD operation or series of operations completed successfully.
	//PENDING REVIEW: The processing operation has been stopped for reviewing and can be restarted by the operator.
	//CANCELLED: The operation or processing was canceled by the operator.
	//CREATION_FAILED: The creation operation failed, and the entity was not created or was created but cannot be used.
	//UPDATE_FAILED: The update operation failed, and the entity was not updated.
	//PROCESSING_FAILED: The processing operations failed.
	//DELETION_FAILED: The delete operation failed, and the entity was not deleted.
	//MOVE_FAILED: Entity could not be moved to a different location.
	//MIGRATING: Migrating entity from NEO to CF.
	//Enum:
	//	[ STARTED, CREATING, UPDATING, MOVING, PROCESSING, DELETING, OK, PENDING_REVIEW, CANCELED, CREATION_FAILED,
	//	UPDATE_FAILED, UPDATE_ACCOUNT_TYPE_FAILED, UPDATE_DIRECTORY_TYPE_FAILED, PROCESSING_FAILED, DELETION_FAILED,
	//	MOVE_FAILED, MIGRATING, MIGRATION_FAILED, ROLLBACK_MIGRATION_PROCESSING, MIGRATED ]
	EntityState string `json:"entityState,omitempty"`

	// The unique ID of the directory.
	Guid       string     `json:"guid,omitempty"`
	LegalLinks LegalLinks `json:"legalLinks,omitempty"`

	// The date the directory was last modified. Dates and times are in UTC format.
	ModifiedDate times.JavaTime `json:"modifiedDate,omitempty"`

	// The GUID of the directory's parent entity. Typically this is the global account.
	ParentGuid string `json:"parentGuid,omitempty"`

	// Information about the state.
	StateMessage string `json:"stateMessage,omitempty"`

	// The subaccounts contained in the directory.
	SubAccounts []SubAccount `json:"subaccounts,omitempty"`

	// Relevant only for directories that are enabled to manage their authorizations. The subdomain that becomes part
	// of the path used to access the authorization tenant of the directory. Unique within the defined region.
	Subdomain string `json:"subdomain,omitempty"`
}

type GetCustomPropertiesInput

type GetCustomPropertiesInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`
}

GET /accounts/v1/subaccounts/{subaccountGUID}/customProperties Get custom properties for a subaccount

type GetCustomPropertiesOutput

type GetCustomPropertiesOutput struct {
	Value []CustomProperties `json:"value,omitempty"`

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetDirectoryCustomPropertiesInput added in v0.0.25

type GetDirectoryCustomPropertiesInput struct {
	//The GUID of the directory to update.
	DirectoryGuid string `dest:"uri" dest-name:"directoryGUID"`
}

GET /accounts/v1/directories/{directoryGUID}/customProperties Get directory custom properties

type GetDirectoryCustomPropertiesOutput added in v0.0.25

type GetDirectoryCustomPropertiesOutput struct {
	Value []CustomProperties `json:"value,omitempty"`

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetDirectoryInput

type GetDirectoryInput struct {
	//The GUID of the directory for which to get details.
	DirectoryGuid string `dest:"uri" dest-name:"directoryGUID"`

	// The range of authorizations for which to return information.
	//
	//any: Returns a directory for which the user has authorizations on any of the subaccounts
	//(for example, user is a subaccount admin) or Cloud Foundry roles (for example, user is a Cloud Foundry space manager).
	//(empty value): Returns a directory for which the user has explicit authorization.
	DerivedAuthorizations string `dest:"querystring" dest-name:"derivedAuthorizations"`

	//Whether to get the contents of the directory, for example the subaccounts it contains.
	Expand bool `dest:"querystring" dest-name:"expand"`
}

GET /accounts/v1/directories/{directoryGUID} Get a directory

type GetDirectoryOutput

type GetDirectoryOutput struct {
	Directory

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetGlobalAccountInput

type GetGlobalAccountInput struct {
	//The range of authorizations for which to return information.
	//
	//any: Returns a global account for which the user has authorizations on any of the accounts'
	//entities, such as its directories (for example, directory admin), subaccounts (for example, user is a subaccount admin)
	//or Cloud Foundry roles (for example, user is a Cloud Foundry space manager).
	//(empty value): Returns a global account for which the user has explicit authorization
	DerivedAuthorizations string `dest:"querystring" dest-name:"derivedAuthorizations"`

	//If true, returns the structure of the global account including all its children, such as subaccounts and directories,
	//in the account model. The structure content may vary from user to user and depends on users’ authorizations.
	Expand bool `dest:"querystring" dest-name:"expand"`
}

GET /accounts/v1/globalAccount Update a global account

type GetJobStatusInput

type GetJobStatusInput struct {
	//ID of the job for which to get status
	JobId string `dest:"uri" dest-name:"jobInstanceIdOrUniqueId"`
}

GET /jobs-management/v1/jobs/{jobInstanceIdOrUniqueId}/status Get available jobs

type GetJobStatusOutput

type GetJobStatusOutput struct {
	//A description of the exit status of a job when it ends.
	Description string `json:"description,omitempty"`

	//The current state of the job.
	//
	//IN_PROGRESS: The job is being executed.
	//COMPLETED: The job has completed.
	//FAILED: The job failed and did not complete. The job can be restarted.
	//Enum:
	//	[ IN_PROGRESS, COMPLETED, FAILED ]
	Status string `json:"status,omitempty"`

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetServiceManagementBindingInput

type GetServiceManagementBindingInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`
}

GET /accounts/v1/subaccounts/{subaccountGUID}/serviceManagementBinding Get a Service Management binding

type GetServiceManagementBindingOutput added in v0.0.12

type GetServiceManagementBindingOutput struct {
	ServiceManagementBinding

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetSubAccountInput

type GetSubAccountInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`

	//The range of authorizations for which to return information.
	//
	//any: Returns all global accounts for which the user has authorizations on any of the accounts' entities, such as
	//	its subaccounts (for example, user is a subaccount admin) or spaces (for example, user is a Cloud Foundry space manager).
	//(empty value): Returns all subaccounts for which the user has explicit authorization on the global account or directory.
	DerivedAuthorizations string `dest:"querystring" dest-name:"derivedAuthorizations"`
}

GET /accounts/v1/subaccounts/{subaccountGUID} Get a subaccount

type GetSubAccountOutput added in v0.0.12

type GetSubAccountOutput struct {
	SubAccount

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetSubAccountsInput

type GetSubAccountsInput struct {
	//The range of authorizations for which to return information.
	//
	//any: Returns all global accounts for which the user has authorizations on any of the accounts' entities,
	//such as its subaccounts (for example, user is a subaccount admin) or spaces (for example, user is a Cloud Foundry space manager).
	//(empty value): Returns all subaccounts for which the user has explicit authorization on the global account or directory.
	DerivedAuthorizations string `dest:"querystring" dest-name:"derivedAuthorizations"`

	//Returns only the subaccounts in a given directory. Provide the unique ID of the directory.
	DirectoryGuid string `dest:"querystring" dest-name:"directoryGUID"`
}

GET /accounts/v1/subaccounts Get all subaccounts

type GetSubAccountsOutput

type GetSubAccountsOutput struct {
	Value []SubAccount `json:"value,omitempty"`

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type GlobalAccountOutput

type GlobalAccountOutput struct {
	//The list of directories associated with the specified global account.
	Children []Directory `json:"children,omitempty"`

	//The type of the commercial contract that was signed.
	CommercialModel string `json:"commercialModel,omitempty"`

	//Whether the customer of the global account pays only for services that they actually use (consumption-based)
	//or pay for subscribed services at a fixed cost irrespective of consumption (subscription-based).
	//
	//TRUE: Consumption-based commercial model.
	//FALSE: Subscription-based commercial model.
	ConsumptionBased bool `json:"consumptionBased,omitempty"`

	//The status of the customer contract and its associated root global account.
	//
	//ACTIVE: The customer contract and its associated global account is currently active.
	//PENDING_TERMINATION: A termination process has been triggered for a customer contract (the customer contract
	//	has expired, or a customer has given notification that they wish to terminate their contract), and the
	//	global account is currently in the validation period. The customer can still access their global account
	//	until the end of the validation period.
	//SUSPENDED: For enterprise accounts, specifies that the customer's global account is currently in the grace period
	//	of the termination process. Access to the global account by the customer is blocked. No data is deleted until
	//	the deletion date is reached at the end of the grace period. For trial accounts, specifies that the account
	//	is suspended, and the account owner has not yet extended the trial period.
	//Enum:
	//	[ ACTIVE, PENDING_TERMINATION, SUSPENDED ]
	ContractStatus string `json:"contractStatus,omitempty"`

	//For internal accounts, the cost center that is associated with the global account owner.
	//A cost center represents a set of users belonging to the same business unit and is charged for
	//the creation and usage of the global account.
	CostCenter string `json:"costCenter,omitempty"`

	//The date the global account was created. Dates and times are in UTC format.
	CreatedDate times.JavaTime `json:"createdDate,omitempty"`

	//The ID of the customer as registered in the CRM system.
	CrmCustomerId string `json:"crmCustomerId,omitempty"`

	//The ID of the customer tenant as registered in the CRM system.
	CrmTenantId string `json:"crmTenantId,omitempty"`

	//Contains information about the additional properties related to a specified global account.
	CustomProperties []CustomProperties `json:"customProperties,omitempty"`

	//A description of the global account.
	Description string `json:"description,omitempty"`

	//The display name of the global account.
	DisplayName string `json:"displayName,omitempty"`

	//The current state of the global account.
	//
	//STARTED: CRUD operation on an entity has started.
	//CREATING: Creating entity operation is in progress.
	//UPDATING: Updating entity operation is in progress.
	//MOVING: Moving entity operation is in progress.
	//PROCESSING: A series of operations related to the entity is in progress.
	//DELETING: Deleting entity operation is in progress.
	//OK: The CRUD operation or series of operations completed successfully.
	//PENDING REVIEW: The processing operation has been stopped for reviewing and can be restarted by the operator.
	//CANCELLED: The operation or processing was canceled by the operator.
	//CREATION_FAILED: The creation operation failed, and the entity was not created or was created but cannot be used.
	//UPDATE_FAILED: The update operation failed, and the entity was not updated.
	//PROCESSING_FAILED: The processing operations failed.
	//DELETION_FAILED: The delete operation failed, and the entity was not deleted.
	//MOVE_FAILED: Entity could not be moved to a different location.
	//MIGRATING: Migrating entity from NEO to CF.
	//Enum:
	//	[ STARTED, CREATING, UPDATING, MOVING, PROCESSING, DELETING, OK, PENDING_REVIEW, CANCELED, CREATION_FAILED,
	//	UPDATE_FAILED, UPDATE_ACCOUNT_TYPE_FAILED, UPDATE_DIRECTORY_TYPE_FAILED, PROCESSING_FAILED, DELETION_FAILED,
	//	MOVE_FAILED, MIGRATING, MIGRATION_FAILED, ROLLBACK_MIGRATION_PROCESSING, MIGRATED ]
	EntityState string `json:"entityState,omitempty"`

	//The planned date that the global account expires. This is the same date as the Contract End Date,
	//unless a manual adjustment has been made to the actual expiration date of the global account.
	//Typically, this property is automatically populated only when a formal termination order is received from the CRM system.
	//From a customer perspective, this date marks the start of the grace period, which is typically 30 days before the actual deletion of the account.
	ExpiryDate times.JavaTime `json:"expiryDate,omitempty"`

	//The geographic locations from where the global account can be accessed.
	//
	//STANDARD: The global account can be accessed from any geographic location.
	//EU_ACCESS: The global account can be accessed only within locations in the EU.
	//Enum:
	//	[ STANDARD, EU_ACCESS ]
	GeoAccess string `json:"geoAccess,omitempty"`

	//The unique ID of the global account.
	Guid string `json:"guid,omitempty"`

	// Legal Description
	LegalLinks LegalLinks `json:"legalLinks,omitempty"`

	//The type of license for the global account. The license type affects the scope of functions of the account.
	//
	//DEVELOPER: For internal developer global accounts on Staging or Canary landscapes.
	//CUSTOMER: For customer global accounts.
	//PARTNER: For partner global accounts.
	//INTERNAL_DEV: For internal global accounts on the Dev landscape.
	//INTERNAL_PROD: For internal global accounts on the Live landscape.
	//TRIAL: For customer trial accounts.
	//Enum:
	//	[ DEVELOPER, CUSTOMER, PARTNER, INTERNAL_DEV, INTERNAL_PROD, SYSTEM, TRIAL, SAPDEV, SAPPROD ]
	LicenseType string `json:"licenseType,omitempty"`

	//The date the global account was last modified. Dates and times are in UTC format.
	ModifiedDate times.JavaTime `json:"modifiedDate,omitempty"`

	//The origin of the account.
	//
	//ORDER: Created by the Order Processing API or Submit Order wizard.
	//OPERATOR: Created by the Global Account wizard.
	//REGION_SETUP: Created automatically as part of the region setup.
	//Enum:
	//	[ ORDER, OPERATOR, REGION_SETUP, MIGRATED_TO_CP_FOUNDATION_V2 ]
	Origin string `json:"origin,omitempty"`

	//The GUID of the global account's parent entity. Typically this is the global account.
	ParentGuid string `json:"parentGuid,omitempty"`

	//The Type of the global account's parent entity.
	//
	//Enum:
	//	[ ROOT, GLOBAL_ACCOUNT, PROJECT, GROUP, FOLDER ]
	ParentType string `json:"parentType,omitempty"`

	// The date that an expired contract was renewed. Dates and times are in UTC format.
	RenewalDate times.JavaTime `json:"renewalDate,omitempty"`

	// For internal accounts, the service for which the global account was created.
	ServiceId string `json:"serviceId,omitempty"`

	//Information about the state.
	StateMessage string `json:"stateMessage,omitempty"`

	//The subaccounts contained in the global account.
	Subaccounts []SubAccount `json:"subaccounts,omitempty"`

	//Relevant only for entities that require authorization (e.g. global account). The subdomain that becomes part of
	//the path used to access the authorization tenant of the global account. Unique within the defined region.
	Subdomain string `json:"subdomain,omitempty"`

	//Specifies the current stage of the termination notifications sequence.
	//
	//PENDING_FIRST_NOTIFICATION: A notification has not yet been sent to the global account owner informing them of
	//	the expired contract or termination request.
	//FIRST_NOTIFICATION_PROCESSED: A first notification has been sent to the global account owner informing them of
	//	the expired contract, and the termination date when the global account will be closed.
	//SECOND_NOTIFICATION_PROCESSED: A follow-up notification has been sent to the global account owner.
	//Your mail server must be configured so that termination notifications can be sent by the Core Commercialization Foundation service.
	//
	//Enum:
	//	[ PENDING_FIRST_NOTIFICATION, FIRST_NOTIFICATION_PROCESSED, SECOND_NOTIFICATION_PROCESSED ]
	TerminationNotificationStatus string `json:"terminationNotificationStatus,omitempty"`

	//For internal accounts, the intended purpose of the global account. Possible purposes:
	//
	//Development: For development of a service.
	//Testing: For testing development.
	//Demo: For creating demos.
	//Production: For delivering a service in a production landscape.
	UseFor string `json:"useFor,omitempty"`

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type KeyValue

type KeyValue struct {
	//A name for the custom property.
	Key string `json:"key,omitempty"`
	//A value for the corresponding key.
	Value string `json:"value,omitempty"`
}
type LegalLinks struct {
	Privacy string `json:"privacy,omitempty"`
}

type MoveManySubAccountsInput

type MoveManySubAccountsInput struct {
	//Details of which subaccounts to move and where to move them to. All subaccounts must be moved to the same location.
	SubAccountsToMove []MoveSubAccountsRequestPayload `json:"subaccountsToMoveCollection,omitempty"`
}

type MoveManySubAccountsOutput added in v0.0.12

type MoveManySubAccountsOutput struct {
	SubAccount

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type MoveSubAccountInput

type MoveSubAccountInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`

	//The GUID of the new location of the subaccount. To move to a directory, enter the GUID of the directory.
	//To move out of a directory to the root global account, enter the GUID of the global account.
	TargetAccountGuid string `json:"targetAccountGUID,omitempty"`
}

POST /accounts/v1/subaccounts/{subaccountGUID}/move Move a subaccount

type MoveSubAccountOutput added in v0.0.12

type MoveSubAccountOutput struct {
	SubAccount

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type MoveSubAccountsRequestPayload

type MoveSubAccountsRequestPayload struct {
	//The GUID of the current location of the subaccounts. If empty, then GUID of root global account is used.
	SourceGuid string `json:"sourceGuid,omitempty"`

	//GUIDs of the subaccounts to move.
	SubaccountGuids []string `json:"subaccountGuids,omitempty"`

	//The GUID of the new location of the subaccounts. To move to a directory, enter the GUID of the directory.
	//To move out of a directory to the root global account, enter the GUID of the global account.
	TargetGuid string `json:"targetGuid,omitempty"`
}

type ServiceManagementBinding added in v0.0.12

type ServiceManagementBinding struct {
	//A public identifier of the app.
	ClientId string `json:"clientid,omitempty"`

	//Secret known only to the app and the authorization server.
	ClientSecret string `json:"clientsecret,omitempty"`

	//The URL of Service Management APIs to access with the obtained token.
	SMUrl string `json:"sm_url,omitempty"`

	//The URL to authentication server to get a token to authenticate with Service Management using the obtained client ID and secret.
	Url string `json:"url,omitempty"`

	//The name of the xsapp used to get the access token.
	XsAppName string `json:"xsappname,omitempty"`
}

OAuth 2.0 Client Credentials Grant Type to obtain an access token to use the Service Management APIs in a subaccount context.

type SubAccount

type SubAccount struct {
	//Whether the subaccount can use beta services and applications.
	BetaEnabled bool `json:"betaEnabled,omitempty"`

	//Details of the user that created the subaccount.
	CreatedBy string `json:"createdBy,omitempty"`

	//The date the subaccount was created. Dates and times are in UTC format.
	CreatedDate times.JavaTime `json:"createdDate,omitempty"`

	//The custom properties assigned to the subaccount.
	CustomProperties []CustomProperties `json:"customProperties,omitempty"`

	//A description of the subaccount for customer-facing UIs.
	Description string `json:"description,omitempty"`

	//A descriptive name of the subaccount for customer-facing UIs.
	DisplayName string `json:"displayName,omitempty"`

	//The unique ID of the subaccount's global account.
	GlobalAccountGuid string `json:"globalAccountGUID,omitempty"`

	//Unique ID of the subaccount.
	Guid string `json:"guid,omitempty"`

	//The date the subaccount was last modified. Dates and times are in UTC format.
	ModifiedDate times.JavaTime `json:"modifiedDate,omitempty"`

	//The features of parent entity of the subaccount.
	//
	//Enum:
	//	[ DEFAULT, ENTITLEMENTS, AUTHORIZATIONS, CRM ]
	ParentFeatures []string `json:"parentFeatures,omitempty"`

	//The GUID of the subaccount’s parent entity. If the subaccount is located directly in the global account
	//	(not in a directory), then this is the GUID of the global account.
	ParentGuid string `json:"parentGUID,omitempty"`

	//The region in which the subaccount was created.
	Region string `json:"region,omitempty"`

	//The current state of the subaccount.
	//
	//Enum:
	//	[ STARTED, CREATING, UPDATING, MOVING, PROCESSING, DELETING, OK, PENDING_REVIEW, CANCELED, CREATION_FAILED,
	//	UPDATE_FAILED, UPDATE_ACCOUNT_TYPE_FAILED, UPDATE_DIRECTORY_TYPE_FAILED, PROCESSING_FAILED, DELETION_FAILED,
	//	MOVE_FAILED, MIGRATING, MIGRATION_FAILED, ROLLBACK_MIGRATION_PROCESSING, MIGRATED ]
	State string `json:"state,omitempty"`

	//Information about the state of the subaccount.
	StateMessage string `json:"stateMessage,omitempty"`

	//The subdomain that becomes part of the path used to access the authorization tenant of the subaccount.
	//Must be unique within the defined region. Use only letters (a-z), digits (0-9), and hyphens (not at the start or end).
	//Maximum length is 63 characters. Cannot be changed after the subaccount has been created.
	Subdomain string `json:"subdomain,omitempty"`

	//Whether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate
	// action when handling incidents that are related to mission-critical accounts in production systems.
	// Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos.
	// Applying this setting this does not modify the subaccount.
	//
	//UNSET: Global account or subaccount admin has not set the production-relevancy flag. Default value.
	//NOT_USED_FOR_PRODUCTION: Subaccount is not used for production purposes.
	//USED_FOR_PRODUCTION: Subaccount is used for production purposes.
	//Enum:
	//	[ UNSET, USED_FOR_PRODUCTION, NOT_USED_FOR_PRODUCTION ]
	UsedForProduction string `json:"usedForProduction,omitempty"`

	//The zoneId of the subaccount.
	ZoneId string `json:"zoneId,omitempty"`
}

type UpdateDirectoryFeaturesInput added in v0.0.25

type UpdateDirectoryFeaturesInput struct {
	//The GUID of the directory to update.
	DirectoryGuid string `dest:"uri" dest-name:"directoryGUID"`

	//Additional admins of the directory. Do not add yourself as you are assigned as a directory admin by default.
	//Use only with directories that are configured to manage their authorizations.
	//Example: ["admin1@example.com", "admin2@example.com"]
	DirectoryAdmins []string `json:"directoryAdmins,omitempty"`

	//The features to enable for the directory.
	//
	//ENTITLEMENTS: (Optional) Enables the assignment of a quota for services and applications to the directory
	//	from the global account quota for distribution to the directory's subaccounts.
	//AUTHORIZATIONS: (Optional) Enables a custom identity provider and/or authorization management for the directory.
	//	For example, it allows certain users to manage directory entitlements. NOTE: You can only use this feature in
	//	combination with the ENTITLEMENTS feature.
	//IMPORTANT: Once a feature has been enabled for a directory, you cannot disable it. If you are not sure which
	//	features to enable, we recommend that you set only the default features, and then add features later on as they are needed.
	//
	//Examples:
	//	[DEFAULT]
	//	[DEFAULT,ENTITLEMENTS]
	//	[DEFAULT,ENTITLEMENTS,AUTHORIZATIONS]
	//Enum:
	//	[ ENTITLEMENTS, AUTHORIZATIONS ]
	DirectoryFeatures []string `json:"directoryFeatures,omitempty"`

	//Relevant only for directories that are enabled to manage their authorizations. The subdomain that becomes
	//part of the path used to access the authorization tenant of the directory. Must be unique within the defined region.
	//Use only letters (a-z), digits (0-9), and hyphens (not at start or end). Maximum length is 63 characters.
	//Cannot be changed after the directory has been created.
	Subdomain string `json:"subdomain,omitempty"`
}

PATCH /accounts/v1/directories/{directoryGUID}/changeDirectoryFeatures Add features to a directory

type UpdateDirectoryFeaturesOutput added in v0.0.25

type UpdateDirectoryFeaturesOutput struct {
	Directory

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type UpdateDirectoryInput

type UpdateDirectoryInput struct {
	//The GUID of the directory to update.
	DirectoryGuid string `dest:"uri" dest-name:"directoryGUID"`

	//Additional Properties of the directory.
	CustomProperties []CustomProperties `json:"customProperties,omitempty"`

	//The description of the directory for the customer-facing UIs.
	Description string `json:"description,omitempty"`

	//The new descriptive name of the directory.
	DisplayName string `json:"displayName,omitempty"`
}

PATCH /accounts/v1/directories/{directoryGUID} Update a directory

type UpdateDirectoryOutput

type UpdateDirectoryOutput struct {
	Directory

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type UpdateGlobalAccountInput

type UpdateGlobalAccountInput struct {
	//A new display of the global account.
	Description string `json:"description,omitempty"`

	//The new descriptive name of the global account.
	DisplayName string `json:"displayName,omitempty"`
}

PATCH /accounts/v1/globalAccount Update a global account

type UpdateSubAccountInput

type UpdateSubAccountInput struct {
	//The GUID of the subaccount for which to get details.
	SubAccountGuid string `dest:"uri" dest-name:"subaccountGUID"`

	//Enables the subaccount to use beta services and applications. Not to be used in a production environment.
	//Cannot be reverted once set. Any use of beta functionality is at the customer's own risk, and SAP shall not be
	//liable for errors or damages caused by the use of beta features.
	BetaEnabled bool `json:"betaEnabled,omitempty"`

	//Additional Properties of the subaccount.
	CustomProperties  []UpdateSubAccountProperties `json:"customProperties,omitempty"`
	Description       string                       `json:"description,omitempty"`
	DisplayName       string                       `json:"displayName,omitempty"`
	UsedForProduction string                       `json:"usedForProduction,omitempty"`
}

PATCH /accounts/v1/subaccounts/{subaccountGUID} Update a subaccount

type UpdateSubAccountOutput added in v0.0.12

type UpdateSubAccountOutput struct {
	SubAccount

	Error *types.Error `json:"error,omitempty"`
	types.StatusAndBodyFromResponse
}

type UpdateSubAccountProperties

type UpdateSubAccountProperties struct {
	KeyValue

	//Whether to delete a property according to the provided key.
	Delete bool `json:"delete,omitempty"`
}

Custom properties as key-value pairs to assign, update, and remove from the subaccount.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL