Integration with the License Manager API
If you created a subscription within one of these service plans:
Subscription
: Set up integration with the License Manager API for your subscription to work properly.PAYG
: The user will automatically switch to this service plan as soon as they unlink the subscription from a resource or as soon as the subscription expires. You can set up integration with the License Manager API if needed.
-
Get the subscription template ID.
You can find the subscription template ID in the Cloud Marketplace partner dashboard. Use the ID in the product code to manage the subscription.
-
Implement the following steps in your product code:
-
Regular subscription active status check.
You can get the up-to-date subscription information using the list REST API method for the Instance resource or the InstanceService/List gRPC API call.
Note
Please note that the user can unlink a resource from the subscription and link another one to it. Make sure your code can handle cases like this correctly.
-
Configuring business logic for subscription processing: consumption records, limitations related to time, number of users, etc.
-
-
Get the subscription template ID.
You can find the subscription template ID in the Cloud Marketplace partner dashboard. Use the ID in the product code to manage the subscription.
-
Implement the following steps in your product code:
-
Getting the ID of application installation to the Kubernetes cluster and linking it to the subscription. Sample code
. -
Regular subscription active status check.
You can get the up-to-date subscription information using the list REST API method for the Instance resource or the InstanceService/List gRPC API call.
Note
Please note that the user can unlink a resource from the subscription and link another one to it. Make sure your code can handle cases like this correctly.
-
Configuring business logic for subscription processing: consumption records, limitations related to time, number of users, etc.
-
-
Get the subscription template ID.
You can find the subscription template ID in the Cloud Marketplace partner dashboard. Use the ID in the product code to manage the subscription.
-
Implement the following steps in your product code:
-
Regular subscription active status check.
You can get the up-to-date subscription information using the list REST API method for the Instance resource or the InstanceService/List gRPC API call.
Note
Please note that the user can unlink a resource from the subscription and link another one to it. Make sure your code can handle cases like this correctly.
-
Configuring business logic for subscription processing: consumption records, limitations related to time, number of users, etc.
-
-
Create:
- Page to redirect the user to. When redirecting the user, a query string will provide the token generated by Yandex Cloud in the
token
parameter. The token is valid for 10 minutes. Use this time to authorize the user and assign them a unique ID to be later linked to the subscription. - Service account. The account will be used to link the user's unique ID to the subscription:
- Log in to the Marketplace partner dashboard
. - Open the Access management section.
- Click Add federated user.
- In the window that opens, specify the service account ID and click Add.
- Find the service account in the list and click → Change.
- In the window that opens, click + Add role, select the
license-manager.saasSubscriptionSupervisor
role, and click Save. - Authenticate with the License Manager API as a service account. For authentication, use an IAM token.
- Log in to the Marketplace partner dashboard
- Page to redirect the user to. When redirecting the user, a query string will provide the token generated by Yandex Cloud in the
-
Get the subscription template ID.
You can find the subscription template ID in the Cloud Marketplace partner dashboard. Use the ID in the product code to manage the subscription.
-
Implement the following steps in your product code:
-
Getting a unique user ID to be linked to the subscription.
-
Linking the unique user ID to the subscription.
You can link an ID to a subscription using the ensure REST API method for the Lock resource or the LockService/Ensure gRPC API call.
-
Regular checks that your linked subscription is active.
To get up-to-date information about a linked subscription, use the get REST API method for the Lock resource or the LockService/Get gRPC API call.
Note
Please note that the user can unlink an ID from the subscription and link another one to it. Make sure your code can handle cases like this correctly.
-
Configuring business logic for subscription processing: consumption records, limitations related to time, number of users, etc.
-