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

docs(platform): remove tabs #97

Merged
merged 3 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/account_types/create_account_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
accounts = StaxClient('accounts')

response = accounts.CreateAccountType(
Name=account_type_name
Name=account_type_name
)
print(json.dumps(response, indent=4, sort_keys=True))
2 changes: 1 addition & 1 deletion examples/account_types/delete_account_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
accounts = StaxClient('accounts')

response = accounts.DeleteAccountType(
account_type_id=account_type_id
account_type_id=account_type_id
)
print(json.dumps(response, indent=4, sort_keys=True))
4 changes: 2 additions & 2 deletions examples/account_types/update_account_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
accounts = StaxClient('accounts')

response = accounts.UpdateAccountType(
account_type_id = account_type_id,
Name = account_type_name
account_type_id = account_type_id,
Name = account_type_name
)
print(json.dumps(response, indent=4, sort_keys=True))
6 changes: 3 additions & 3 deletions examples/account_types/update_account_type_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
accounts = StaxClient('accounts')

# An array of access_role dicts to enable or empty array
# Properties: RoleName, AccountTypeId, GroupId
# Properties: RoleName, AccountTypeId, GroupId
access_roles_to_add = <An array of access_roles?>

# # An array of access_role dicts to disable or empty arry
access_roles_to_remove = <An array of access_roles?>


response = accounts.UpdateAccountTypeAccess(
AddRoles= access_roles_to_add,
RemoveRoles=access_roles_to_remove
AddRoles= access_roles_to_add,
RemoveRoles=access_roles_to_remove
)
print(json.dumps(response, indent=4, sort_keys=True))
2 changes: 1 addition & 1 deletion examples/account_types/update_account_type_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
account_type_mappings[0]["AccountTypeId"] = account_type_id

response = accounts.UpdateAccountTypeMembers(
Members=account_type_mappings
Members=account_type_mappings
)
print(json.dumps(response, indent=4, sort_keys=True))
4 changes: 2 additions & 2 deletions examples/accounts/create_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
accounts = StaxClient('accounts')

response = accounts.CreateAccount(
Name=account_name,
AccountType=account_type,
Name=account_name,
AccountType=account_type,
OrganisationalUnitId=organisational_unit_id,
)
print(json.dumps(response, indent=4, sort_keys=True))
8 changes: 4 additions & 4 deletions examples/accounts/update_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

update_properties = {}
if tags_dict:
update_properties.update(tags)
update_properties.update(tags)
if account_type_id:
update_properties["AccountType"] = account_type_id
update_properties["AccountType"] = account_type_id

response = accounts.UpdateAccount(
account_id=account_id,
**update_properties
account_id=account_id,
**update_properties
)
print(json.dumps(response, indent=4, sort_keys=True))
6 changes: 3 additions & 3 deletions examples/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
accounts_au1 = StaxClient('accounts')

au1_response = accounts_au1.CreateAccountType(
Name="sdk-au1"
Name="sdk-au1"
)

print(json.dumps(au1_response, indent=4, sort_keys=True))
Expand All @@ -28,6 +28,6 @@
us1_accounts = StaxClient('accounts', config=config)

us1_response = us1_accounts.CreateAccountType(
Name="sdk-us1"
Name="sdk-us1"
)
print(json.dumps(us1_response, indent=4, sort_keys=True))
print(json.dumps(us1_response, indent=4, sort_keys=True))
2 changes: 1 addition & 1 deletion examples/groups/create_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# Create a Stax groups
teams = StaxClient("teams")
response = teams.CreateGroup(
Name=group_name
Name=group_name
)
print(json.dumps(response, indent=4, sort_keys=True))
2 changes: 1 addition & 1 deletion examples/groups/delete_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# Create a Stax groups
teams = StaxClient("teams")
response = teams.DeleteGroup(
group_id=group_id
group_id=group_id
)
print(json.dumps(response, indent=4, sort_keys=True))
4 changes: 2 additions & 2 deletions examples/groups/update_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Create a Stax groups
teams = StaxClient("teams")
response = teams.UpdateGroup(
group_id=group_id,
Name=group_name
group_id=group_id,
Name=group_name
)
print(json.dumps(response, indent=4, sort_keys=True))
6 changes: 3 additions & 3 deletions examples/groups/update_group_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Config.secret_key = os.getenv("STAX_SECRET_KEY")

# An array of user memberships dicts to enableor an empty array
# Properties: GroupId(string), UserId(string)
# Properties: GroupId(string), UserId(string)
user_membership_to_add = <An array of User Membership?>

# An array of user memberships dicts to disable or an empty arry
Expand All @@ -17,7 +17,7 @@
# Create a Stax groups
teams = StaxClient("teams")
response = teams.UpdateGroupMembers(
AddMembers = user_membership_to_add,
RemoveMembers = user_membership_to_remove
AddMembers = user_membership_to_add,
RemoveMembers = user_membership_to_remove
)
print(json.dumps(response, indent=4, sort_keys=True))
6 changes: 3 additions & 3 deletions examples/users/create_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
# Create a Stax User
teams = StaxClient("teams")
response = teams.CreateUser(
FirstName = first_name,
LastName = last_name,
Email = user_email
FirstName = first_name,
LastName = last_name,
Email = user_email
)
print(json.dumps(response, indent=4, sort_keys=True))
2 changes: 1 addition & 1 deletion examples/users/reset_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

teams = StaxClient("teams")
response = teams.UpdateUserPassword(
user_id = user_id
user_id = user_id
)
print(json.dumps(response, indent=4, sort_keys=True))
6 changes: 3 additions & 3 deletions examples/users/update_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# Update a Stax User
teams = StaxClient("teams")
response = teams.UpdateUser(
user_id = user_id,
Role = user_role,
Status = user_status
user_id = user_id,
Role = user_role,
Status = user_status
)
print(json.dumps(response, indent=4, sort_keys=True))
2 changes: 1 addition & 1 deletion examples/users/update_user_invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

teams = StaxClient("teams")
response = teams.UpdateUserInvite(
user_id = user_id
user_id = user_id
)
print(json.dumps(response, indent=4, sort_keys=True))
10 changes: 5 additions & 5 deletions examples/workloads/create_catalogue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Requirements
# - Logged into the deployment bucket account
# - Logged into the SDK
# - Logged into the SDK


Config.access_key = <Access Key>
Expand Down Expand Up @@ -39,9 +39,9 @@
TemplateURL: s3://{bucket_name["Parameter"]["Value"]}/{cfn_name}
"""
response = workload_client.CreateCatalogueItem(
Name=catalogue_name,
ManifestBody=manifest_body,
Version=catalogue_version,
Description='Example of how to use the sdk',
Name=catalogue_name,
ManifestBody=manifest_body,
Version=catalogue_version,
Description='Example of how to use the sdk',
)

10 changes: 5 additions & 5 deletions examples/workloads/create_catalogue_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Requirements
# - Logged into the deployment bucket account
# - Logged into the SDK
# - Logged into the SDK

Config.access_key = <Access Key>
Config.secret_key = <Secret Key>
Expand Down Expand Up @@ -42,9 +42,9 @@
"""

response = workload_client.CreateCatalogueVersion(
ManifestBody=manifest_body,
Version=catalogue_version,
Description='Updating versions via sdk',
catalogue_id=catalogue_id
ManifestBody=manifest_body,
Version=catalogue_version,
Description='Updating versions via sdk',
catalogue_id=catalogue_id
)
print(json.dumps(response, indent=4, sort_keys=True))
2 changes: 1 addition & 1 deletion examples/workloads/create_workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from staxapp.openapi import StaxClient

# Requirements
# - Logged into the SDK
# - Logged into the SDK

Config.access_key = <Access Key>
Config.secret_key = <Secret Key>
Expand Down
2 changes: 1 addition & 1 deletion examples/workloads/delete_catalogue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from staxapp.api import Api

# Requirements
# - Logged into the SDK
# - Logged into the SDK


Config.access_key = <Access Key>
Expand Down
6 changes: 3 additions & 3 deletions examples/workloads/delete_catalogue_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from staxapp.openapi import StaxClient

# Requirements
# - Logged into the SDK
# - Logged into the SDK

Config.access_key = <Access Key>
Config.secret_key = <Secret Key>
Expand All @@ -17,7 +17,7 @@
catalogue_version_id = <Catalogue Version>

response = workload_client.DeleteCatalogueVersion(
catalogue_id=catalogue_id,
version_id=catalogue_version_id
catalogue_id=catalogue_id,
version_id=catalogue_version_id
)
print(json.dumps(response, indent=4, sort_keys=True))