This topic tells you about API references for surfaces in Tanzu Developer Portal.
The following packages are described:
The following sections describe the package.
This class can manipulate the contents of pages for Backstage catalog entities.
Each catalog entity subtype can specify a dedicated template. This surface standardizes the contents of those templates and allows for some amount of external configuration.
This example adds a tab to the template for Backstage Service entities:
context.applyWithDependency(
AppRouteSurface,
EntityPageSurface,
(_, surface) => {
surface.servicePage.addTab(
<EntityLayout.Route path="/some-subpath" title="Additional content for Services">
<MyAdditionalContent />
</EntityLayout.Route>,
);
},
);
Property | Type | Description |
---|---|---|
apiPage |
ApiPage |
|
componentPageCases |
ReactElement[] |
|
defaultPage |
BasicPage |
|
domainPage |
BasicPage |
|
groupPage |
BasicPage |
|
packagePage |
BasicPage |
|
servicePage |
BasicPage |
|
systemPage |
BasicPage |
|
userPage |
BasicPage |
|
websitePage |
BasicPage |
The package has the following constructor(s).
This constructor constructs a new instance of the EntityPageSurface
class.
The package has the following methods.
This table describes the parameters.
Parameter | Type | Description |
---|---|---|
pageCase |
ReactElement |
This table describes the parameters.
Parameter | Type | Description |
---|---|---|
content |
ReactElement |
The following sections describe the package.
The package has the following types.
BackendPluginInterface<T = {}> = (config?: T & BackendPluginConfig) => TpbPluginInterface;
CatalogProcessorBuilder = (env: PluginEnvironment) => CatalogProcessor[] | CatalogProcessor;
EntityProviderBuilder = (env: PluginEnvironment) => EntityProvider[] | EntityProvider;
PermissionRuleBuilder = (env: PluginEnvironment) => CatalogPermissionRule[] | CatalogPermissionRule;
PluginFn = (env: PluginEnvironment) => Promise<Router>;
RouterBuilder = (env: PluginEnvironment) => Promise<Router>;
This class can manipulate the catalog backend.
This class provides extension points for registering catalog processors, entity providers, routes, and permissions.
The package has the following constructor(s).
This constructor constructs a new instance of the BackendCatalogSurface
class.
The package has the following methods.
This method registers a Backstage CatalogProcessor
that applies transformations to unprocessed entities.
For more information about processors, see the Backstage documentation.
For more information about processing, see the Backstage documentation.
Parameter | Type | Description |
---|---|---|
builder |
CatalogProcessorBuilder | Builds a CatalogProcessor for a given PluginEnvironment . |
This method registers a Backstage EntityProvider
to ingest generate catalog entries for further processing.
For more information about ingestion, see the Backstage documentation.
Parameter | Type | Description |
---|---|---|
builder |
EntityProviderBuilder | Builds an EntityProvider for a given PluginEnvironment . |
This method registers Backstage CatalogPermissionRules
to limit access to catalog entries.
For more information about custom permission rules, see the Backstage documentation.
Parameter | Type | Description |
---|---|---|
builder |
PermissionRuleBuilder | Builds CatalogPermissionRules for a given PluginEnvironment . |
This method registers an Express Router to handle arbitrary requests made to the Backstage backend.
Parameter | Type | Description |
---|---|---|
routerBuilder |
RouterBuilder | Builds an Express Router for a given PluginEnvironment . |
You can use this class to add plug-ins to the Backstage backend.
The package has the following constructor(s).
This constructor constructs a new instance of the BackendPluginSurface
class.
The package has the following methods.
This method registers a named plug-in to handle backend requests at a subpath.
Plug-ins must have unique names. The first plug-in registered with a given name wins.
Parameter | Type | Description |
---|---|---|
plugin |
Plugin | Plug-in to add |
The following sections describe the package.
The package has the following type.
AppPluginInterface<T = {}> = (config?: T) => TpbPluginInterface;
You can use this class to add Backstage ApiFactories
.
The package has the following methods.
This method registers a new Backstage ApiFactory
. Factories must specify an API with a unique ID. The last factory registered with a given ID wins.
Factories that specify APIs with IDs on the ignored list will not be registered.
Parameter | Type | Description |
---|---|---|
factory |
AnyApiFactory |
You can use this class to replace core components of the Backstage app.
The package has the following constructor(s).
This constructor constructs a new instance of the AppComponentSurface
class.
The package has the following methods.
This method replaces a given Backstage AppComponent
with another. AppComponents
must be unique by key. The last AppComponent
registered with a given key wins.
Parameter | Type | Description |
---|---|---|
key |
Unique key for the AppComponent . |
|
component |
AppComponents |
Custom AppComponent to substitute for Backstage’s default. |
You can use this class to register additional frontend plug-ins with the Backstage app.
https://backstage.io/docs/plugins/
The package has the following constructor(s).
Constructs a new instance of the AppPluginSurface
class
The package has the following methods.
This method registers a frontend BackstagePlugin
.
Parameter | Type | Description |
---|---|---|
plugin |
BackstagePlugin |
Manipulate routes in the frontend Backstage app.
https://backstage.io/docs/plugins/composability/#routing-system
The package has the following constructor(s).
Constructs a new instance of the AppRouteSurface
class
The package has the following methods.
This method registers a react-router Route.
Parameter | Type | Description |
---|---|---|
route |
ReactElement |
Route to register. Intended to be a react-router#Route or a subclass of it. |
This method binds external routes.
https://backstage.io/docs/plugins/composability/#binding-external-routes-in-the-app
Parameter | Type | Description |
---|---|---|
routeBinder |
RouteBinder |
You can use this class to add page-level banners to the Backstage app.
The package has the following constructor(s).
Constructs a new instance of the BannerSurface
class
The package has the following methods.
This method adds a new page-level banner.
Parameter | Type | Description |
---|---|---|
banner |
ReactElement |
You can use this class to add tabs to the Settings page.
The package has the following constructor(s).
This constructor constructs a new instance of the SettingsTabsSurface
class.
The package has the following methods.
This method adds a new tab to the Settings page.
Parameter | Type | Description |
---|---|---|
tab |
ReactElement |
Typically an instance of @ backstage/ @ plugin-user-settings#SettingsLayout.Route |
You can use this class to manipulate entries in sidebar.
Entries are split into two sections: top items appear above a divider and main items appear below it. Tabs within each section are rendered in order of registration.
The package has the following constructor(s).
This constructor constructs a new instance of the SidebarItemSurface
class.
The package has the following methods.
This method adds an item to the main items section.
Parameter | Type | Description |
---|---|---|
item |
ReactElement |
This method adds an item to the top items section.
Parameter | Type | Description |
---|---|---|
item |
ReactElement |
You can use this class to manipulate themes available to the Backstage application.
The package has the following constructor(s).
This constructor constructs a new instance of the ThemeSurface
class.
The package has the following methods.
This method registers an additional theme.
Parameter | Type | Description |
---|---|---|
theme |
AppTheme |
This method registers the factory that renders the application’s root element.
Parameter | Type | Description |
---|---|---|
builder |
JSX.ElementReactElement |
The following sections describe the package.
You can use this class to register additional Auth Providers.
https://backstage.io/docs/auth/add-auth-provider
The package has the following methods.
This method registers an additional Auth Provider. The Auth Provider named last wins.
Parameter | Type | Description |
---|---|---|
signInProvider |
SignInProvider |
Map of @ backstage/plugin-auth-backend#AuthProviderFactory instances. |
You can use this class to register SignInResolvers
and provide utility methods to log in with them.
The package has the following methods.
This method registers a new SignInResolver
.
Parameter | Type | Description |
---|---|---|
authProviderKey |
Name resolver to add. Uniqueness of name is not enforced, but the behavior of duplicate named entries is undefined. | |
resolver |
SignInResolver |
Resolver to add. |
This method gets the first named provider, or fall back to the guest resolver.
Parameter | Type | Description |
---|---|---|
authProviderKey |
This method gets a resolver that creates an ad-hoc guest user.
This method provides a utility function to sign in as a user by email address.
The method attempts to match the given email address with a catalog user’s email address for sign-in. If that fails, the method signs the user in without associating with a catalog user.
Parameter | Type | Description |
---|---|---|
email |
Email address to attempt sign-in with. | |
context |
AuthResolverContext |
This method provides a utility function to sign in as a user by name.
The method attempts to match the name with a catalog user for signing in. If that fails, the method signs the user in with that name without associating with a catalog user.
Parameter | Type | Description |
---|---|---|
name |
Username to attempt sign-in with. | |
context |
AuthResolverContext |
The following sections describe the package.
You can use this class to allow for configuration of the Backstage logger.
The package has the following constructor(s).
This constructor constructs a new instance of the LoggerOptionsSurface
class.
The package has the following methods.
This method sets options for the Backstage logger. This method can be invoked multiple times. The last invocation wins.
Parameter | Type | Description |
---|---|---|
loggerOptions |
LoggerOptions |
The following sections describe the package.
You can use this class to add content to the Backstage Home screen.
The package has the following constructor(s).
This constructor constructs a new instance of the HomeSurface
class.
The package has the following methods.
This method adds content to the main section below the widget grid.
Parameter | Type | Description |
---|---|---|
item |
ReactElement |
Item to add. |
This method adds a widget to the Home screen’s widget grid.
Parameter | Type | Description |
---|---|---|
item |
ReactElement |
Widget to add. |
config |
LayoutConfiguration |
(Optional) layout configuration for the widget. The config.component field must match the added widget either by name (if provided as string) or by direct reference (if provided as a React element). |
This method specifies the layout configuration for a widget.
Parameter | Type | Description |
---|---|---|
config |
LayoutConfiguration |
Optional layout configuration for a widget. The config.component field must match some registered widget either by name (if provided as string) or by direct reference (if provided as a React element). |
The following sections describe the package.
You can use this class to allow for manipulation of LDAP groups and users during ingestion.
The package has the following constructor(s).
This constructor constructs a new instance of the LdapSurface
class.
The package has the following methods.
This method specifies the transformation of LDAP groups during ingestion.
Parameter | Type | Description |
---|---|---|
builder |
GroupTransformerBuilder |
This method specifies the transformation of LDAP users during ingestion.
Parameter | Type | Description |
---|---|---|
builder |
UserTransformerBuilder |
The following sections describe the package.
You can use this class to register new login providers with Backstage’s SignIn
page.
For more information about sign-in configuration, see the Backstage documentation.
The package has the following methods.
This method registers a login provider.
Parameter | Type | Description |
---|---|---|
provider |
Provider |
The following sections describe the package.
You can use this class to allow for manipulation of Microsoft Graph groups and users during ingestion.
The package has the following methods.
This method specifies the transformation of Microsoft Graph groups during ingestion.
Parameter | Type | Description |
---|---|---|
groupTransformer |
GroupTransformer |
This method specifies the transformation of Microsoft Graph organizations during ingestion.
Parameter | Type | Description |
---|---|---|
organizationTransformer |
OrganizationTransformer |
This method specifies the transformation of Microsoft Graph users during ingestion.
Parameter | Type | Description |
---|---|---|
userTransformer |
UserTransformer |
The following sections describe the package.
The package has the following methods.
Parameter | Type | Description |
---|---|---|
request |
PolicyQuery |
You can use this class to define a PermissionPolicy
for the Backstage application.
https://backstage.io/docs/permissions/writing-a-policy
The package has the following methods.
This method defines the PermissionPolicy
for the Backstage application. This method can be invoked only once.
Parameter | Type | Description |
---|---|---|
permissionPolicy |
PermissionPolicy |