Using the SDK¶
Service Catalog Factory includes a published SDK. You can make use of the python functions available:
from servicecatalog_factory import sdk
The functions available are:
Functions¶
-
servicecatalog_factory.sdk.
add_product_to_portfolio
(portfolio_file_name, portfolio_display_name, product)[source]¶ This function allows to you to add a product to a portfolio that exists already. If the product contains a Source and it is defined as an AWS CodeCommit type then the function will ensure the repository and branch exist.
- Parameters
portfolio_file_name – The name of the file (including .yaml) of your portfolio file. For example ServiceCatalogFactory/portfolios/central_it.yaml should be central_it.yaml
portfolio_display_name – The value of the portfolio DisplayName the product should be added to.
product – a dict of the product that you want to add to the portfolio
-
servicecatalog_factory.sdk.
add_version_to_product
(portfolio_file_name, portfolio_display_name, product_name, version)[source]¶ This function allows to you to add a version to product within a portfolio that exists already. If the version contains a Source and it is defined as an AWS CodeCommit type then the function will ensure the repository and branch exist.
- Parameters
portfolio_file_name – The name of the file (including .yaml) of your portfolio file. For example ServiceCatalogFactory/portfolios/central_it.yaml should be central_it.yaml
portfolio_display_name – The value of the portfolio DisplayName the product version should be added to.
product_name – The value of the product Name the version should be added to.
version – a dict of the version that you want to add to the portfolio
-
servicecatalog_factory.sdk.
bootstrap
()[source]¶ Bootstrap the factory. This will create the AWS CodeCommit repo containing the config and it will also create the AWS CodePipeline that will run the solution.
-
servicecatalog_factory.sdk.
remove_product_from_portfolio
(portfolio_file_name, portfolio_display_name, product_name)[source]¶ This function allows to you to remove a product from a portfolio that exists already.
- Parameters
portfolio_file_name – The name of the file (including .yaml) of your portfolio file. For example ServiceCatalogFactory/portfolios/central_it.yaml should be central_it.yaml
portfolio_display_name – The value of the portfolio DisplayName where the product exists.
product_name – The name of the product you want to remove
-
servicecatalog_factory.sdk.
remove_version_from_product
(portfolio_file_name, portfolio_display_name, product_name, version_name)[source]¶ This function allows to you to remove a version of a product within a portfolio that exists already.
- Parameters
portfolio_file_name – The name of the file (including .yaml) of your portfolio file. For example ServiceCatalogFactory/portfolios/central_it.yaml should be central_it.yaml
portfolio_display_name – The value of the portfolio DisplayName the product version should be removed from.
product_name – The value of the product Name the version should be removed from.
version_name – The name of the version you want to remove
-
servicecatalog_factory.sdk.
set_regions
(regions)[source]¶ Set the regions for the factory.
- Parameters
regions – The list of AWS regions
-
servicecatalog_factory.sdk.
upload_config
(config)[source]¶ This function allows you to upload your configuration for factory. At the moment this should be a dict with an attribute named regions:
- regions: [
‘eu-west-3’, ‘sa-east-1’,
]
- Parameters
config – The dict containing the configuration used for factory