Skip to content

[src] Avoid creating accounts with duplicate names#108

Open
YarinPinyan wants to merge 1 commit intov2from
duplicate_account_prevention
Open

[src] Avoid creating accounts with duplicate names#108
YarinPinyan wants to merge 1 commit intov2from
duplicate_account_prevention

Conversation

@YarinPinyan
Copy link
Copy Markdown
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
Copy Markdown
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