ErmeticGraphQL is a PowerShell module that provides a set of cmdlets for interacting with the Ermetic GraphQL API. It allows you to automate various operations related to user role assignments, folders, and more in the Ermetic platform.
The ErmeticGraphQL PowerShell module provides cmdlets for interacting with ErmeticGraphQL. It allows you to retrieve information about Cloud Providers, Findings, and user assignments. You can also configure and update the Ermetic connection settings.
You can install the ErmeticGraphQL module from the PowerShell Gallery using the following command:
Install-Module -Name ErmeticGraphQL- PowerShell 5.1 or later.
- Ermetic API credentials and access to the Ermetic platform.
-
Import the ErmeticGraphQL module:
Import-Module -Name ErmeticGraphQL
-
Set up the module configuration with your Ermetic API token and URI:
Set-ErmeticConfig -Token "your_api_token" -Uri "https://api.ermetic.com"
Replace
"your_api_token"with your actual Ermetic API token. -
Start using the ErmeticGraphQL cmdlets to interact with the Ermetic platform.
The ErmeticGraphQL module provides the following cmdlets:
Set-ErmeticConfig: Sets the Ermetic module configurations with new values for the Token and URI.Update-ErmeticConfig: Updates the Ermetic module configurations with new values for the token and URI.Get-ErmeticAwsAccounts: RetrievesAll,Valid, orInvalidAWS Account and their connection status.Get-ErmeticUsersAssignments: Retrieves user assignments for all users in the Ermetic platform.
Connects to the ErmeticGraphQL API with the provided access token.
Set-ErmeticConfig -Token 'your-access-token' -Uri "https://us.app.ermetic.com/api/graph"Type: string
Parameter Sets: (All)
Aliases:
Require: True
Position: Named
Default Value: None
Accept pipeline input: False
Accept wildcard characters: FalseFilters the AWS accounts based on their status.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseUpdates the Ermetic module configurations with new values for the token and URI.
# Only update the token
Update-ErmeticConfig -Token 'new-token'
# Only update the url
Update-ErmeticConfig -Uri 'https://new-uri.com'
# Update both token and url
Update-ErmeticConfig -Token 'new-token' -Uri 'https://new-uri.com'
Type: string
Parameter Sets: (All)
Aliases:
Require: False
Position: Named
Default Value: None
Accept pipeline input: False
Accept wildcard characters: FalseFilters the AWS accounts based on their status.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRetrieves All, Valid, or Invalid AWS Account and their connection status. This Cmdlet returns a custom object unless specified with -NoOutPut Parameter
# Retrieve all AWS accounts
Get-ErmeticAwsAccounts
# Retrieve only valid AWS accounts
Get-ErmeticAwsAccounts -Filter 'Valid'
# Retrieve only invalid AWS accounts
Get-ErmeticAwsAccounts -Filter 'Invalid'
# Export the results to a CSV file
Get-ErmeticAwsAccounts -CSV -Filter 'Valid'
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Require: False
Position: Named
Default Value: None
Accept pipeline input: False
Accept wildcard characters: FalseFilters the AWS accounts based on their status.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: All
Accepted Values: All, Valid, Invalid
Accept pipeline input: False
Accept wildcard characters: FalseRetrieves all user assignments from Ermetic in csv or json format, or returns PSCustomObject.
# Retrieve user assignments and return as PSCustomObject
Get-ErmeticUserAssignments
# Retrieve user assignments and export the results to a CSV file
Get-ErmeticUserAssignments -CSV
# Retrieve user assignments and export the results to a JSON file
Get-ErmeticUserAssignments -JSON
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseType: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseYou can find detailed usage examples and parameters for each cmdlet in their respective help documentation. Use the Get-Help cmdlet followed by the cmdlet name to view the help documentation.
Contributions to the ErmeticGraphQL module are welcome! If you encounter any issues, have suggestions, or want to contribute improvements, please create an issue or submit a pull request on the GitHub repository.
This project is licensed under the Apache License.
The ErmeticGraphQL module is developed and maintained by [Ali Falahi].