btpevents

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceName = "Events Service V1" // Label of service.
	EndpointsID = "events"            // ID to lookup a service endpoint with.
	ServiceID   = "cloud-management"  // ServiceID is a unique identifier of a specific service.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	//The ID of the event.
	Id int64 `json:"id,omitempty"`

	//The time the action triggered the event.
	//The format is Unix epoch time in milliseconds.
	ActionTime times.JavaTime `json:"actionTime,omitempty"`

	//The time when the event record was created.
	//The format is Unix epoch time in milliseconds.
	CreationTime times.JavaTime `json:"creationTime,omitempty"`

	//JSON object that contains description and details about the requested events.
	Details map[string]interface{} `json:"details,omitempty"`

	//The ID of the entity associated with the event.
	EntityId string `json:"entityId,omitempty"`

	//The type of entity associated with the event.
	EntityType string `json:"entityType,omitempty"`

	//The service that reported the event.
	EventOrigin string `json:"eventOrigin,omitempty"`

	//The type of the event that was triggered.
	//There are two groups of event types: Local Events and Central Events group.
	//Only event types that belong to one of the groups are returned as the result of a single API call.
	//The event types group you get depends on the scope you used to access the API.
	//The examples of some of the events for each of the groups:
	//
	//Central Events group: GlobalAccount_Update, AccountDirectory_Creation, AccountDirectory_Update, AccountDirectory_Update_Type,
	//	AccountDirectory_Deletion, Subaccount_Creation, Subaccount_Deletion, Subaccount_Update, Subaccount_Move, AccountDirectoryTenant_Creation,
	//	AccountDirectoryTenant_Deletion, GlobalAccountEntitlements_Update, EntityEntitlements_Update, EntityEntitlements_Move
	//
	//Local Events group: SubaccountAppSubscription_Creation, SubaccountAppSubscription_Deletion, SubaccountAppSubscription_Update,
	//	AppRegistration_Creation, AppRegistration_Deletion, AppRegistration_Update, SubaccountTenant_Creation, SubaccountTenant_Update,
	//	SubaccountTenant_Deletion, EnvironmentInstance_Creation, EnvironmentInstance_Deletion, EnvironmentInstances_Deletion
	EventType string `json:"eventType,omitempty"`

	//The unique ID of the global account associated with the event.
	GlobalAccountGuid string `json:"globalAccountGUID,omitempty"`
}

type EventsV1

type EventsV1 struct {
	*service.Requester
}

func New

func (*EventsV1) GetEvents

func (c *EventsV1) GetEvents(ctx context.Context, input *GetEventsInput) (*GetEventsOutput, error)

func (*EventsV1) GetEventsTypes

func (c *EventsV1) GetEventsTypes(ctx context.Context) (*GetEventsTypesOutput, error)

func (*EventsV1) GetJobStatus

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

type GetEventsInput

type GetEventsInput struct {
	//The ID of the event.
	Id []int `dest:"querystring" dest-name:"id"`

	//The ID of the entity associated with the event.
	EntityId string `dest:"querystring" dest-name:"entityId"`

	//The type of entity associated with the event.
	//For example: Subaccount, Directory, Tenant.
	EntityType []string `dest:"querystring" dest-name:"entityType"`

	//The type of the event that was triggered.
	//There are two groups of event types, Central Events and Local Events group.
	//The group you get depends on the scopes granted to you after you authorized to use the API.
	//You can query any event listed in the group that is relevant for your scope.
	//The examples of some event types in each of the groups:
	//
	//Central Events group: GlobalAccount_Update, AccountDirectory_Creation, AccountDirectory_Update,
	//	AccountDirectory_Update_Type, AccountDirectory_Deletion, Subaccount_Creation, Subaccount_Deletion,
	//	Subaccount_Update, Subaccount_Move, AccountDirectoryTenant_Creation, AccountDirectoryTenant_Deletion,
	//	GlobalAccountEntitlements_Update, EntityEntitlements_Update, EntityEntitlements_Move
	//
	//Local Events group: SubaccountAppSubscription_Creation, SubaccountAppSubscription_Deletion, SubaccountAppSubscription_Update,
	//	AppRegistration_Creation, AppRegistration_Deletion, AppRegistration_Update, SubaccountTenant_Creation,
	//	SubaccountTenant_Update, SubaccountTenant_Deletion, EnvironmentInstance_Creation, EnvironmentInstance_Deletion,
	//	EnvironmentInstances_Deletion
	EventType []string `dest:"querystring" dest-name:"eventType"`

	//Start date and time to query the events by the action that triggered them.
	//Use the Unix epoch time in milliseconds (you can find an online converter from a regular date-time format to the Unix epoch time format).
	//For example:
	//	Monday, June 1, 2020 9:40:22 AM is 1590993622000 in Unix epoch milliseconds time.
	FromActionTime time.Time `dest:"querystring" dest-name:"fromActionTime" timestampFormat:"unixTimestamp"`

	//Start date and time to query the events by when they were created.
	//Use the Unix epoch time in milliseconds (you can find an online converter from a regular date-time format to the Unix epoch time format).
	//For example:
	//	Monday, June 10, 2020 04:32:22 AM is 1591752742000 in Unix epoch milliseconds time.
	FromCreationTime time.Time `dest:"querystring" dest-name:"fromCreationTime" timestampFormat:"unixTimestamp"`

	//The page number to retrieve.
	PageNum uint32 `dest:"querystring" dest-name:"pageNum"`

	//The number of events to retrieve per page (max = 150).
	PageSize uint32 `dest:"querystring" dest-name:"pageSize"`

	//Field by which to sort the events.
	SortField string `dest:"querystring" dest-name:"sortField"`

	//Sort order for the events.
	//Can be ascending or descending.
	//
	//Available values : ASC, DESC
	SortOrder string `dest:"querystring" dest-name:"sortOrder"`

	//End date and time to query the events by the action that triggered them.
	//Use the Unix epoch time in milliseconds (you can find an online converter from a regular date-time format to the Unix epoch time format).
	//For example:
	//	Monday, June 4, 2020 11:40:22 AM is 1591260022000 in Unix epoch milliseconds time.
	ToActionTime time.Time `dest:"querystring" dest-name:"toActionTime" timestampFormat:"unixTimestamp"`

	//End date and time to query the events by when they were created.
	//Use the Unix epoch time in milliseconds (you can find an online converter from a regular date-time format to the Unix epoch time format).
	//For example:
	//	Monday, June 6, 2020 12:32:22 AM is 1591392742000 in Unix epoch milliseconds time.
	ToCreationTime time.Time `dest:"querystring" dest-name:"toCreationTime" timestampFormat:"unixTimestamp"`
}

GET /cloud-management/v1/events Get events

type GetEventsOutput

type GetEventsOutput struct {
	//Lists of the events associated with the API call and used scopes.
	Events []Event `json:"events,omitempty"`

	//Whether there are more pages.
	MorePages bool `json:"morePages,omitempty"`

	//The current page number.
	PageNum int32 `json:"pageNum,omitempty"`

	//Total numbers of results.
	Total int64 `json:"total,omitempty"`

	//Total numbers of pages.
	TotalPages int64 `json:"totalPages,omitempty"`

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

type GetEventsTypesInput

type GetEventsTypesInput struct {
}

GET /cloud-management/v1/events/types Get events

type GetEventsTypesOutput

type GetEventsTypesOutput struct {
	//Category to which the event type belongs.
	//
	//LOCAL: The event is associated with the local region within a multi-region universe.
	//CENTRAL: The event is associated with the central region within a multi-region universe.
	//Enum:
	//	[ LOCAL, CENTRAL ]
	Category string `json:"category,omitempty"`

	//The description of the event type.
	Description string `json:"description,omitempty"`

	//List of all the search parameters for the event type.
	SearchParams []string `json:"searchParams,omitempty"`

	//The type of the event that was triggered.
	//There are two groups of event types: Local Events and Central Events group.
	//Only event types that belong to one of the groups are returned as the result of a single API call.
	//The event types group you get depends on the scope you used to access the API.
	//The examples of some of the events for each of the groups:
	//
	//Central Events group: GlobalAccount_Update, AccountDirectory_Creation, AccountDirectory_Update, AccountDirectory_Update_Type,
	//	AccountDirectory_Deletion, Subaccount_Creation, Subaccount_Deletion, Subaccount_Update, Subaccount_Move,
	//	AccountDirectoryTenant_Creation, AccountDirectoryTenant_Deletion, GlobalAccountEntitlements_Update,
	//	EntityEntitlements_Update, EntityEntitlements_Move
	//
	//Local Events group: SubaccountAppSubscription_Creation, SubaccountAppSubscription_Deletion, SubaccountAppSubscription_Update,
	//	AppRegistration_Creation, AppRegistration_Deletion, AppRegistration_Update, SubaccountTenant_Creation,
	//	SubaccountTenant_Update, SubaccountTenant_Deletion, EnvironmentInstance_Creation, EnvironmentInstance_Deletion,
	//	EnvironmentInstances_Deletion
	Type string `json:"type,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
}

Jump to

Keyboard shortcuts

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