btpsaasmanager

package
v0.0.44 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ServiceName = "SaaS Provisioning V1" // Label of service.
	EndpointsID = "saas-manager"         // ID to lookup a service endpoint with.
	ServiceID   = "saas-manager"         // ServiceID is a unique identifier of a specific service.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	//The ID returned by XSUAA after the app provider has performed a bind of the multitenant application
	//to a XSUAA service instance.
	AppId string `json:"appId,omitempty"`
	//The unique registration name of the deployed multitenant application as defined by the app developer.
	AppName string `json:"appName,omitempty"`
	//The application coordinates provided in metadata for customer-facing UIs.
	ApplicationCoordinates map[string]interface{} `json:"applicationCoordinates,omitempty"`
	//The authentication provider of the multitenant application.
	//XSUAA is the SAP Authorization and Trust Management service that defines scopes and permissions for users as tenants at the global account level.
	//IAS is Identity Authentication Service that defines scopes and permissions for users in zones (common data isolation systems across systems, SaaS tenants, and services).
	//Enum:
	//	[ XSUAA, IAS ]
	AuthenticationProvider string `json:"authenticationProvider,omitempty"`
	//The technical name of the category defined by the app developer to which the multitenant
	//application is grouped in customer-facing UIs.
	Category string `json:"category,omitempty"`
	//The display name of the category for customer-facing UIs.
	CategoryDisplayName string `json:"categoryDisplayName,omitempty"`
	//The commercial name of the deployed multitenant application as defined by the app developer.
	CommercialAppName string `json:"commercialAppName,omitempty"`
	//Whether the application was developed by a customer. If not, then the application
	//is developed by the cloud operator, such as SAP.
	CustomerDeveloped bool `json:"customerDeveloped,omitempty"`
	//The description of the multitenant application for customer-facing UIs.
	Description string `json:"description,omitempty"`
	//The display name of the application for customer-facing UIs.
	DisplayName string `json:"displayName,omitempty"`
	//Name of the formations solution associated with the multitenant application.
	FormationSolutionName string `json:"formationSolutionName,omitempty"`
	//ID of the associated global account.
	GlobalAccountId string `json:"globalAccountId,omitempty"`
	//The icon of the multitenant application for customer-facing UIs.
	IconBase64 string `json:"iconBase64,omitempty"`
	//The application's incident-tracking component provided in metadata for customer-facing UIs.
	IncidentTrackingComponent string `json:"incidentTrackingComponent,omitempty"`
	//The date the subscription was last modified. Dates and times are in UTC format.
	ModifiedDate int64 `json:"modifiedDate,omitempty"`
	//The date the subscription was created. Dates and times are in UTC format.
	CreatedDate int64 `json:"createdDate,omitempty"`
	//The plan name of the application to which the consumer has subscribed.
	PlanName string `json:"planName,omitempty"`
	//ID of the landscape-specific environment.
	PlatformEntityId string `json:"platformEntityId,omitempty"`
	//Total amount the subscribed subaccount is entitled to consume.
	Quota int32 `json:"quota,omitempty"`
	//The short description of the multitenant application for customer-facing UIs.
	ShortDescription string `json:"shortDescription,omitempty"`
	//The subscription state of the subaccount regarding the multitenant application.
	//Enum:
	//	[ IN_PROCESS, SUBSCRIBED, SUBSCRIBE_FAILED, UNSUBSCRIBE_FAILED, UPDATE_FAILED, NOT_SUBSCRIBED ]
	State string `json:"state,omitempty"`
	//The ID of the subaccount which is subscribed to the multitenant application.
	SubscribedSubAccountId string `json:"subscribedSubaccountId,omitempty"`
	//The ID of the tenant which is subscribed to a multitenant application.
	SubscribedTenantId string `json:"subscribedTenantId,omitempty"`

	SubscriptionError SubscriptionError `json:"subscriptionError,omitempty"`
	//Technical ID generated by XSUAA for a multitenant application when a consumer subscribes to the application.
	SubscriptionId string `json:"subscriptionId,omitempty"`
	//URL for app users to launch the subscribed application.
	SubscriptionUrl string `json:"subscriptionUrl,omitempty"`
	//Tenant ID of the application provider.
	TenantId string `json:"tenantId,omitempty"`
}

type ApplicationSubscription

type ApplicationSubscription struct {
	//Specifies the ability to use the service plan of the subscribed application. The actual amount has no bearing on
	//the maximum consumption limit of the application.
	Amount int64 `json:"amount,omitempty"`
	//The unique registration name of the deployed multitenant application, as defined by the app developer.
	AppName string `json:"appName,omitempty"`
	//The date and time the subscription was last modified. Dates and times are in UTC format.
	ChangedOn string `json:"changedOn,omitempty"`
	//A subscription code for the application.
	Code string `json:"code,omitempty"`
	//Tenant ID of the global account or subaccount of the consumer that has subscribed to the multitenant application.
	ConsumerTenantId string `json:"consumerTenantId,omitempty"`
	//The date and time the subscription was created. Dates and times are in UTC format.
	CreatedOn string `json:"createdOn,omitempty"`
	//Any reuse services used or required by a subscribed application and its services.
	Dependencies []Dependency `json:"dependencies,omitempty"`
	//Error description for the following statuses: SUBSCRIBE_FAILED, UNSUBSCRIBE_FAILED, UPDATE_FAILED.
	Error string `json:"error,omitempty"`
	//ID of the associated global account.
	GlobalAccountId string `json:"globalAccountId,omitempty"`
	//Whether the consumer tenant is active. This field is returned only if one of the following query parameters was
	//used during the API call: tenantId, subaccountId
	IsConsumerTenantActive bool `json:"isConsumerTenantActive,omitempty"`
	//The license type of the associated global account.
	LicenseType string `json:"licenseType,omitempty"`
	//The ID of the multitenant application that is registered to the SAP SaaS Provisioning registry.
	ServiceInstanceId string `json:"serviceInstanceId,omitempty"`
	//State of the subscriptions. Possible states: IN_PROCESS, SUBSCRIBED, SUBSCRIBE_FAILED, UPDATE_FAILED.
	State string `json:"state,omitempty"`
	//ID of the associated subaccount.
	SubAccountId string `json:"subaccountId,omitempty"`
	//Consumer Subdomain
	Subdomain string `json:"subdomain,omitempty"`
	//Application URL
	Url string `json:"url,omitempty"`
}

type Dependency

type Dependency struct {
	//The unique registration name of the linked dependency application.
	AppName string `json:"appName,omitempty"`
	//The list of relevant dependencies and their descriptions.
	Dependencies []interface{} `json:"dependencies,omitempty"`
	//In case there are errors during dependencies' assignments, the descriptions are shown here.
	Error string `json:"error,omitempty"`
	//The xsappname configured in the security descriptor file used to create the XSUAA instance.
	XSAppName string `json:"xsappname,omitempty"`
}

type ErrorJob

type ErrorJob struct {
	//Description of the error.
	Description string `json:"error,omitempty"`
	//The runtime exception for the error.
	Exception string `json:"exception,omitempty"`
	//The message associated with the current error.
	Message string `json:"message,omitempty"`
	//Path of the exception received from the server.
	Paths string `json:"paths,omitempty"`
	//Error status code.
	Status    int32     `json:"status,omitempty"`
	Timestamp Timestamp `json:"timestamp,omitempty"`
}

type GetApplicationRegistrationInput

type GetApplicationRegistrationInput struct {
}

GET /saas-manager/v1/application Get application registration details

type GetApplicationRegistrationOutput

type GetApplicationRegistrationOutput struct {
	//The ID of the multitenant application that is registered to the SAP SaaS Provisioning service registry.
	ServiceInstanceId string `json:"serviceInstanceId,omitempty"`
	//The unique ID of the Cloud Foundry org where the app provider has deployed and registered the
	//multitenant application.
	OrganizationGuid string `json:"organizationGuid,omitempty"`
	//The unique ID of the Cloud Foundry space where the app provider has deployed and registered the
	//multitenant application.
	SpaceGuid string `json:"spaceGuid,omitempty"`
	//The xsappname configured in the security descriptor file used to create the xsuaa service instance for the
	//multitenant application.
	XSAppName string `json:"xsappname,omitempty"`
	//The ID returned by an xsuaa service instance after the app provider has connected the multitenant
	//application to an xsuaa service instance.
	AppId string `json:"appId,omitempty"`
	//The unique registration name of the deployed multitenant application as defined by the app developer.
	AppName string `json:"appName,omitempty"`
	//The unique commercial registration name of the deployed multitenant application as defined by the app developer.
	CommercialAppName string `json:"commercialAppName,omitempty"`
	//Any callback URLs that the multitenant application exposes.
	AppUrls string `json:"appUrls,omitempty"`
	//The unique ID of the tenant that provides the multitenant application.
	ProviderTenantId string `json:"providerTenantId,omitempty"`
	//The plan used to register the multitenant application or reusable service.
	//- saasApplication: Registered entity is a multitenant application.
	//- saasService: Registered entity is a reuse service.
	AppType string `json:"appType,omitempty"`
	//The display name of the application for customer-facing UIs.
	DisplayName string `json:"displayName,omitempty"`
	//The description of the multitenant application for customer-facing UIs.
	Description string `json:"description,omitempty"`
	//The category to which the application is grouped in the Subscriptions page in the cockpit.
	//If left empty, it gets assigned to the default category.
	Category string `json:"category,omitempty"`
	//ID of the global account associated with the multitenant application.
	GlobalAccountId string `json:"globalAccountId,omitempty"`
	//Name of the formations solution associated with the multitenant application.
	FormationSolutionName string `json:"formationSolutionName,omitempty"`

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetApplicationSubscriptionsInput

type GetApplicationSubscriptionsInput struct {
	//Get subscriptions by associated global account ID.
	GlobalAccountId string `dest:"querystring" dest-name:"globalAccountId"`
	//Get subscriptions by state.
	//Available values : IN_PROCESS, SUBSCRIBED, SUBSCRIBE_FAILED, UNSUBSCRIBE_FAILED, UPDATE_FAILED, NOT_SUBSCRIBED
	State string `dest:"querystring" dest-name:"state"`
	//Get subscriptions by the associated subaccount ID.
	SubAccountId string `dest:"querystring" dest-name:"subaccountId"`
	//Get subscriptions by tenant ID.
	TenantId string `dest:"querystring" dest-name:"tenantId"`
}

GET /saas-manager/v1/application/subscriptions Get application subscriptions

type GetApplicationSubscriptionsOutput

type GetApplicationSubscriptionsOutput struct {
	Values []ApplicationSubscription `json:"values,omitempty"`

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetDetailsApplicationsInput

type GetDetailsApplicationsInput struct {
	AcceptLanguage string `dest:"header" dest-name:"Accept-Language"`

	//The name of the multitenant application to which a subaccount is entitled to subscribe.
	AppName string `dest:"uri" dest-name:"appName"`
	//The name of the subscription plan to the multitenant application.
	PlanName string `dest:"querystring" dest-name:"planName"`
}

GET /saas-manager/v1/applications/{appName} Get details of a multitenant application

type GetDetailsApplicationsOutput

type GetDetailsApplicationsOutput struct {
	Application

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetEntitledApplicationsInput

type GetEntitledApplicationsInput struct {
	AcceptLanguage string `dest:"header" dest-name:"Accept-Language"`
}

GET /saas-manager/v1/applications Get all entitled multitenant applications

type GetEntitledApplicationsOutput

type GetEntitledApplicationsOutput struct {
	//The response list of all the multitenant applications to which a specified subaccount is entitled to subscribe.
	Applications []Application `json:"applications,omitempty"`

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type GetErrorJobStatusInput

type GetErrorJobStatusInput struct {
	//The unique ID of a job for which to get information.
	JobUuid string `dest:"uri" dest-name:"jobUuid"`
}

GET /api/v2.0/jobs/{jobUuid} Get job errorStatusCode

type GetErrorJobStatusOutput

type GetErrorJobStatusOutput struct {
	//The service instance ID of the SAP SaaS Provisioning service (saas-registry) that the application is using.
	CreatedBy string `json:"description,omitempty"`
	//ID of the corresponding job.
	Id string `json:"id,omitempty"`

	//The current state of the corresponding job. Possible values:
	//CREATED: Job processing has created.
	//STARTED: Job processing has started.
	//SUCCEEDED: The job has completed.
	//FAILED: The job failed and did not complete.
	//RETRY: Subscription has timed out and job processing is pending a retry.
	//Enum:
	//	[ CREATED, STARTED, SUCCEEDED, FAILED, RETRY ]
	State string `json:"state,omitempty"`

	ErrorJob *ErrorJob `json:"error,omitempty"`

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

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 SaaSProvisioningV1

type SaaSProvisioningV1 struct {
	*service.Requester
}

func (*SaaSProvisioningV1) GetApplicationRegistration

func (*SaaSProvisioningV1) GetApplicationSubscriptions

func (*SaaSProvisioningV1) GetDetailsApplications

func (*SaaSProvisioningV1) GetEntitledApplications

func (*SaaSProvisioningV1) GetErrorJobStatus

func (*SaaSProvisioningV1) GetJobStatus

func (*SaaSProvisioningV1) SubscribeSubAccountTenantToApplication

func (c *SaaSProvisioningV1) SubscribeSubAccountTenantToApplication(ctx context.Context,
	input *SubscribeSubAccountTenantToApplicationInput) error

func (*SaaSProvisioningV1) SubscribeTenantToApplication

func (*SaaSProvisioningV1) SubscribeToApplication

func (*SaaSProvisioningV1) UnSubscribeFromApplication

func (c *SaaSProvisioningV1) UnSubscribeFromApplication(ctx context.Context,
	input *UnSubscribeFromApplicationInput) error

func (*SaaSProvisioningV1) UpdateSubscriptionDependencies

type SubscribeSubAccountTenantToApplicationInput

type SubscribeSubAccountTenantToApplicationInput struct {
	//Unique identifier of the current subscription job.
	Identifier string `dest:"uri" dest-name:"identifier"`

	//Additional details accompanying the subscription process. Relates mostly to the
	//cases when the subscription process status is FAILED.
	Message string `json:"message,omitempty"`
	//Status of the subscription job.
	//Enum:
	//	[ SUCCEEDED, FAILED ]
	Status string `json:"status,omitempty"`
	//The URL the multitenant application is exposing for a subscription.
	SubscriptionUrl string `json:"subscriptionUrl,omitempty"`
}

PUT /saas-manager/v1/subscription-callback/{identifier}/result Subscribe a subaccount tenant to an application

type SubscribeSubAccountTenantToApplicationOutput

type SubscribeSubAccountTenantToApplicationOutput struct {
	JobStatusId string `json:"jobStatusId"`

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type SubscribeTenantToApplicationInput

type SubscribeTenantToApplicationInput struct {
	//The ID of the tenant to subscribe.
	TenantId string `dest:"uri" dest-name:"tenantId"`
}

POST /saas-manager/v1/application/tenants/{tenantId}/subscriptions Subscribe tenant to an application

type SubscribeTenantToApplicationOutput

type SubscribeTenantToApplicationOutput struct {
	Location string `src:"header" src-name:"Location"`

	JobStatusId string `json:"jobStatusId"`

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type SubscribeToApplicationInput

type SubscribeToApplicationInput struct {
	//The name of the multitenant application to subscribe to.
	AppName string `dest:"uri" dest-name:"appName"`

	//The name of the subscription plan to a multitenant application
	PlanName string `json:"planName,omitempty"`
}

POST /saas-manager/v1/applications/{appName}/subscription Subscribe to an application from a subaccount

type SubscribeToApplicationOutput

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

type SubscriptionError

type SubscriptionError struct {
	//A response object that contains details about the error an app provider returns to the subscriber.
	//It contains the error code, a user-friendly, customer-oriented error message,
	//technical details about the error, and more.
	AppError string `json:"appError,omitempty"`
	//The message that describes the error that occurred during the subscription.
	ErrorMessage string `json:"errorMessage,omitempty"`
}

type Timestamp

type Timestamp struct {
	Date           int32 `json:"date,omitempty"`
	Day            int32 `json:"day,omitempty"`
	Hours          int32 `json:"hours,omitempty"`
	Minutes        int32 `json:"minutes,omitempty"`
	Month          int32 `json:"month,omitempty"`
	Nanos          int32 `json:"nanos,omitempty"`
	Seconds        int32 `json:"seconds,omitempty"`
	Time           int64 `json:"time,omitempty"`
	TimezoneOffset int32 `json:"timezoneOffset,omitempty"`
	Year           int32 `json:"year,omitempty"`
}

type UnSubscribeFromApplicationInput

type UnSubscribeFromApplicationInput struct {
	//The name of the multitenant application from which to unsubscribe the subaccount.
	AppName string `dest:"uri" dest-name:"appName"`
}

DELETE /saas-manager/v1/applications/{appName}/subscription Unsubscribe an application from a subaccount

type UnSubscribeFromApplicationOutput

type UnSubscribeFromApplicationOutput struct {
	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type UnSubscribeTenantFromApplicationInput

type UnSubscribeTenantFromApplicationInput struct {
	//The ID of the tenant to unsubscribe
	TenantId string `dest:"uri" dest-name:"tenantId"`
}

DELETE /saas-manager/v1/application/tenants/{tenantId}/subscriptions Unsubscribe tenant from an application

type UnSubscribeTenantFromApplicationOutput

type UnSubscribeTenantFromApplicationOutput struct {
	Location string `src:"header" src-name:"Location"`

	JobStatusId string `json:"jobStatusId"`

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

type UpdateSubscriptionDependenciesInput

type UpdateSubscriptionDependenciesInput struct {
	//The ID of the tenant for which to update dependencies
	TenantId string `dest:"uri" dest-name:"tenantId"`

	//Whether to skip updating the dependencies that haven’t changed.
	SkipUnchangedDependencies bool `dest:"querystring" dest-name:"skipUnchangedDependencies"`
	//Whether to skip updating dependencies. If set to true, updateApplicationURL must also be set to true.
	//This way, you can update the application URL without updating its dependencies.
	SkipUpdatingDependencies bool `dest:"querystring" dest-name:"skipUpdatingDependencies"`
	//Whether to update the application URL returned from the app callback. If set to true together with
	//skipUpdatingDependencies, the API call becomes synchronous.
	UpdateApplicationURL bool `dest:"querystring" dest-name:"updateApplicationURL"`

	//Send custom property values in the form of key-value pairs to dependent services (provider applications) during
	//the update to notify them about a change related to an existing subscription.
	UpdateApplicationDependencies map[string]interface{} `json:"appProviderCustomProperties"`
}

PATCH /saas-manager/v1/application/tenants/{tenantId}/subscriptions Update subscription dependencies

type UpdateSubscriptionDependenciesOutput

type UpdateSubscriptionDependenciesOutput struct {
	Location string `src:"header" src-name:"Location"`

	JobStatusId string `json:"jobStatusId"`

	//Error *types.Error `json:"error,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
	types.StatusAndBodyFromResponse
}

Jump to

Keyboard shortcuts

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