Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[src] Avoid creating accounts with duplicate names #108

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

YarinPinyan
Copy link
Contributor

@YarinPinyan YarinPinyan commented Mar 25, 2022

This is the default pull request template. You can customize it by adding a pull_request_template.md at the root of your repo or inside the .github folder.

Demo

With the following code, that the first account that exists under your entered Spotinst creds file, it should raise a SpotinstClientException

spotinst = SpotinstSession()

client = spotinst.client(service="admin")
my_accounts = client.get_accounts()
if my_accounts:
    sample_name: str = my_accounts[0]['name']
    client.create_account(sample_name)

Output

image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have validated all the requirements in the Jira task were answered
  • I have all necessary approvals for the design/mini design of this task
  • I have approved the API changes and granular permission patterns (documentation subtask) (For public services only)

@YarinPinyan
Copy link
Contributor Author

@guyalt3 @zivmessing Please review and approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant