Related queries and mutations in Agents and deployments. Each has its own section.
Queries
getAgentAwsExternalId (query)
getAgentAwsExternalId is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: General availability
Read the IAM ExternalId currently configured for an AWS agent. Returns null if no ExternalId has been generated yet.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | UUID of the AWS agent. |
Returns
Example
query GetAgentAwsExternalId($agentId: UUID!) {
getAgentAwsExternalId(agentId: $agentId) {
externalId
}
}Related types
getAgentOperationLogs (query)
getAgentOperationLogs is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get Agent operations log entries for a given time period, optionally matching a connection type
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | Agent ID |
startTime | DateTime | Optional start time, defaults to 10 minutes ago |
endTime | DateTime | Optional end time, defaults to now |
limit | Int | Maximum number of entries to return, defaults to 1000 |
connectionType | String | Optional connection type, for example "snowflake", "redshift", etc. |
Returns
Example
query GetAgentOperationLogs($agentId: UUID!) {
getAgentOperationLogs(agentId: $agentId) {
timestamp
payload
}
}Related types
getAwsAgentInfraDetails (query)
getAwsAgentInfraDetails is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get infrastructure information from an AWS Agent like CloudFormation template and parameters.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | Agent ID |
Returns
AwsAgentInfraDetailsResult
Example
query GetAwsAgentInfraDetails($agentId: UUID!) {
getAwsAgentInfraDetails(agentId: $agentId) {
template
parameters
}
}Types used only by getAwsAgentInfraDetails
getAwsAgentInfraDetailsAwsAgentInfraDetailsResult
AwsAgentInfraDetailsResultObject type. Infrastructure information for an AWS Agent.
| Field | Type | Description |
|---|---|---|
template | GenericScalar! | The CloudFormation template, in YAML format |
parameters | [GenericScalar]! | The current template parameters. |
Related types
getAwsAgentLogs (query)
getAwsAgentLogs is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get AWS Agent log entries for a given time period, optionally matching a filter
Arguments
Returns
Example
query GetAwsAgentLogs($agentId: UUID!) {
getAwsAgentLogs(agentId: $agentId) {
timestamp
payload
}
}Related types
getAwsAgentUpgradeLogs (query)
getAwsAgentUpgradeLogs is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get AWS Agent upgrade log entries from a given start time.
Arguments
Returns
[AwsAgentUpgradeLogEntry]
Example
query GetAwsAgentUpgradeLogs($agentId: UUID!) {
getAwsAgentUpgradeLogs(agentId: $agentId) {
timestamp
logicalResourceId
resourceStatus
resourceStatusReason
resourceType
}
}Types used only by getAwsAgentUpgradeLogs
getAwsAgentUpgradeLogsAwsAgentUpgradeLogEntry
AwsAgentUpgradeLogEntryObject type. An upgrade log entry from an AWS agent.
| Field | Type | Description |
|---|---|---|
timestamp | String! | Timestamp for the log entry. |
logicalResourceId | String! | Resource ID. |
resourceStatus | String! | Resource status, for example: 'UPDATE_COMPLETE'. |
resourceStatusReason | String | Reason for the status, for example: 'User Initiated'. |
resourceType | String! | Resource type, for example: 'AWS::Lambda::Function'. |
Related types
getAwsLogsQueryResults (query)
getAwsLogsQueryResults is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get the results of a query started using start_aws_logs_query.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | Agent ID |
queryId | String! | The query_id as returned by start_aws_query |
Returns
AwsAgentLogsQueryResult
Example
query GetAwsLogsQueryResults($agentId: UUID!, $queryId: String!) {
getAwsLogsQueryResults(agentId: $agentId, queryId: $queryId) {
status
events
}
}Types used only by getAwsLogsQueryResults
getAwsLogsQueryResultsAwsAgentLogsQueryResult
AwsAgentLogsQueryResultObject type. The result for a CloudWatch query, includes events and status.
| Field | Type | Description |
|---|---|---|
status | String! | The status of the query, for example Running or Complete |
events | [GenericScalar]! | The log events. |
Related types
getAzureAgentLogs (query)
getAzureAgentLogs is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get Azure Agent log entries for a given time period, optionally matching a query
Arguments
Returns
Example
query GetAzureAgentLogs($agentId: UUID!) {
getAzureAgentLogs(agentId: $agentId) {
timestamp
payload
}
}Related types
getAzureAgentTasksSummary (query)
getAzureAgentTasksSummary is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get Durable Functions tasks summary for an Azure Agent.
Arguments
Returns
AzureAgentTasksSummary
Example
query GetAzureAgentTasksSummary($agentId: UUID!) {
getAzureAgentTasksSummary(agentId: $agentId) {
pendingInstances
completedInstances
}
}Types used only by getAzureAgentTasksSummary
getAzureAgentTasksSummaryAzureAgentTasksSummary
AzureAgentTasksSummaryObject type. Durable Functions tasks information for an Azure Agent.
| Field | Type | Description |
|---|---|---|
pendingInstances | Int! | Number of pending tasks. |
completedInstances | Int! | Number of completed tasks |
Related types
getGcpAgentLogs (query)
getGcpAgentLogs is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get GCP Agent log entries for a given time period, optionally matching a filter
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | GCP Agent ID |
limit | Int | Maximum number of entries to return, defaults to 1000 |
logsFilter | String | Optional filter, for example: SEARCH("text") or timestamp >= "2023-01-01T00:00:00Z" |
Returns
Example
query GetGcpAgentLogs($agentId: UUID!) {
getGcpAgentLogs(agentId: $agentId) {
timestamp
payload
}
}Related types
getSnowflakeAgentLogs (query)
getSnowflakeAgentLogs is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: General availability
Get Snowflake Agent log entries
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | Snowflake Agent ID |
limit | Int | Maximum number of entries to return, defaults to 1000 |
Returns
Example
query GetSnowflakeAgentLogs($agentId: UUID!) {
getSnowflakeAgentLogs(agentId: $agentId) {
timestamp
payload
}
}Related types
startAwsLogsQuery (query)
startAwsLogsQuery is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get the results of a query started using start_aws_logs_query.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | Agent ID |
startTime | DateTime | Optional start time, defaults to 10 minutes ago |
endTime | DateTime | Optional end time, defaults to now |
limit | Int | Maximum number of entries to return, defaults to 1000 |
query | String! | The CloudWatch query following the syntax defined at: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html. For example: 'fields @timestamp, @message | filter @message like "error"' |
Returns
AwsAgentStartLogsQueryResult
Example
query StartAwsLogsQuery($agentId: UUID!, $query: String!) {
startAwsLogsQuery(agentId: $agentId, query: $query) {
queryId
}
}Types used only by startAwsLogsQuery
startAwsLogsQueryAwsAgentStartLogsQueryResult
AwsAgentStartLogsQueryResultObject type. The result for start_query including the query ID.
| Field | Type | Description |
|---|---|---|
queryId | String! | The ID for the started query |
Related types
stopAwsLogsQuery (query)
stopAwsLogsQuery is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Stops a query started using start_aws_logs_query.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | Agent ID |
queryId | String! | The query_id as returned by start_aws_query |
Returns
AwsAgentLogsStopQueryResult
Example
query StopAwsLogsQuery($agentId: UUID!, $queryId: String!) {
stopAwsLogsQuery(agentId: $agentId, queryId: $queryId) {
success
}
}Types used only by stopAwsLogsQuery
stopAwsLogsQueryAwsAgentLogsStopQueryResult
AwsAgentLogsStopQueryResultObject type. The result for stop_query.
| Field | Type | Description |
|---|---|---|
success | Boolean! | Indicates if the query was successfully stopped |
Related types
Mutations
cleanupAzureAgentTasks (mutation)
cleanupAzureAgentTasks is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Cleanup Durable Functions tasks for an Azure Agent
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | The UUID of the Azure Agent to cleanup Durable Functions tasks. |
createdTimeFrom | DateTime | Optional start time, defaults to 10 years ago |
createdTimeTo | DateTime | Optional end time, defaults to 10 minutes ago |
includePending | Boolean | Include pending tasks in the cleanup, defaults to false. |
Returns
AzureAgentCleanupTasks
Example
mutation CleanupAzureAgentTasks($agentId: UUID!) {
cleanupAzureAgentTasks(agentId: $agentId) {
deletedInstances
}
}Types used only by cleanupAzureAgentTasks
cleanupAzureAgentTasksAzureAgentCleanupTasks
AzureAgentCleanupTasksObject type.
| Field | Type | Description |
|---|---|---|
deletedInstances | Int! | Number of deleted tasks |
Related types
createOrUpdateAgent (mutation)
createOrUpdateAgent is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Create or Update a Monte Carlo Agent
Arguments
| Argument | Type | Description |
|---|---|---|
additionalInfo | JSONString | Additional information for the agent, for now only account_name is supported and used by Snowflake agents for the endpoint value. |
agentId | UUID | UUID of Agent to update. |
agentType | AgentTypeEnum | The type of Agent being deployed. |
authType | AuthTypeEnum | The type of authorization provided. |
credentials | JSONString | JSON of credentials for Agent. |
dataCollectorId | UUID | The UUID of the Data Collector to associate the agent with. |
dryRun | Boolean | Dry run? Default: false. |
endpoint | String | Bucket name, IP address or URL of the agent. |
friendlyName | String | Display name for the agent or data store. Also names the warehouse and connection created for a Snowflake agent. |
imageBuild | String | Build number of agent image. Ignored if agent type is DATA_STORE_AGENT. |
imageVersion | String | The image version of the Agent. Null if agent type is data_store. |
platform | PlatformTypeEnum | The cloud platform the agent is deployed on. |
storageType | StorageTypeEnum | The storage type of the Agent. |
upgradeable | Boolean | Boolean if the agent is remote upgradeable. |
validationName | String | Run only this single validation instead of the full sequence. Dry-run only (ignored when dry_run is false); lets the UI show per-check progress and short-circuit on prerequisite failures. |
wrapperType | String | The wrapper type of the Agent. |
wrapperVersion | String | The wrapper version of the Agent. |
Returns
CreateOrUpdateAgent
Example
mutation CreateOrUpdateAgent {
createOrUpdateAgent {
agentId
autoEnabled
}
}Types used only by createOrUpdateAgent
createOrUpdateAgentAuthTypeEnum
AuthTypeEnumEnum type.
| Value | Description |
|---|---|
GCP_JSON_SERVICE_ACCOUNT_KEY | |
GCP_WORKLOAD_IDENTITY_FEDERATION | |
AWS_VPCE | |
AWS_ASSUMABLE_ROLE | |
AZURE_STORAGE_ACCOUNT_KEYS | |
AZURE_FUNCTION_APP_KEY | |
AZURE_FUNCTION_SERVICE_PRINCIPAL | |
AZURE_STORAGE_SERVICE_PRINCIPAL | |
AWS_IAM_AUTH | |
MCD_SHA512 | |
OAUTH2_CLIENT_CREDENTIALS | |
OAUTH2_PASSWORD | |
CUSTOM_AUTH_HEADERS |
CreateOrUpdateAgent
CreateOrUpdateAgentObject type.
| Field | Type | Description |
|---|---|---|
agentId | UUID | The UUID of the agent that was created or updated. |
validationResult | TestCredentialsV2Response | Result validating the provided parameters. |
autoEnabled | Boolean | True when the agent was disabled before the update and the update enabled it. That happens once everything it was missing is supplied: its endpoint, and the credentials its platform and authentication type require. No separate updateAgentEnabled call is needed then. Always false on initial registration and on an update that leaves the enabled state unchanged. Also always false for Snowflake and generic agents, which are enabled with updateAgentEnabled instead. |
StorageTypeEnum
StorageTypeEnumEnum type.
| Value | Description |
|---|---|
AZURE_BLOB | |
GCS | |
S3 | |
SNOWFLAKE_INTERNAL_STAGE | |
S3_COMPATIBLE |
Related types
AgentTypeEnum, JSONString, PlatformTypeEnum, TestCredentialsV2Response, UUID
deleteAgent (mutation)
deleteAgent is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Delete a Monte Carlo Agent
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | UUID of Agent to delete |
Returns
DeleteAgent
Example
mutation DeleteAgent($agentId: UUID!) {
deleteAgent(agentId: $agentId) {
success
}
}Types used only by deleteAgent
deleteAgentDeleteAgent
DeleteAgentObject type.
| Field | Type | Description |
|---|---|---|
success | Boolean |
Related types
generateAgentAwsExternalId (mutation)
generateAgentAwsExternalId is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: General availability
Generate or rotate the IAM ExternalId an AWS agent uses to assume the customer's role. The customer must configure the returned value in the role's trust policy before the agent can be enabled.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | UUID of the AWS agent to generate the ExternalId for. |
Returns
GenerateAgentAwsExternalId
Example
mutation GenerateAgentAwsExternalId($agentId: UUID!) {
generateAgentAwsExternalId(agentId: $agentId) {
result {
externalId
}
}
}Types used only by generateAgentAwsExternalId
generateAgentAwsExternalIdGenerateAgentAwsExternalId
GenerateAgentAwsExternalIdObject type.
| Field | Type | Description |
|---|---|---|
result | AwsAgentExternalId! | The newly generated ExternalId. |
Related types
migrateConnectionFromSnowflakeAgent (mutation)
migrateConnectionFromSnowflakeAgent is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Migrates a Snowflake Agent connection to another platform service
Arguments
| Argument | Type | Description |
|---|---|---|
connectionDetails | SnowflakeConnectionDetails! | Connection parameters. |
connectionId | UUID! | UUID of Connection to migrate. |
serviceUuid | UUID! | UUID of DC to migrate to. |
Returns
MigrateConnectionFromSnowflakeAgent
Example
mutation MigrateConnectionFromSnowflakeAgent($connectionDetails: SnowflakeConnectionDetails!, $connectionId: UUID!, $serviceUuid: UUID!) {
migrateConnectionFromSnowflakeAgent(connectionDetails: $connectionDetails, connectionId: $connectionId, serviceUuid: $serviceUuid) {
success
}
}Types used only by migrateConnectionFromSnowflakeAgent
migrateConnectionFromSnowflakeAgentMigrateConnectionFromSnowflakeAgent
MigrateConnectionFromSnowflakeAgentObject type.
| Field | Type | Description |
|---|---|---|
success | Boolean | True if the connection was migrated successfully. |
Related types
SnowflakeConnectionDetails, UUID
migrateConnectionToSnowflakeAgent (mutation)
migrateConnectionToSnowflakeAgent is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Migrate an existing connection to a Snowflake Agent
Arguments
Returns
MigrateConnectionToSnowflakeAgent
Example
mutation MigrateConnectionToSnowflakeAgent($agentId: UUID!, $connectionId: UUID!) {
migrateConnectionToSnowflakeAgent(agentId: $agentId, connectionId: $connectionId) {
success
}
}Types used only by migrateConnectionToSnowflakeAgent
migrateConnectionToSnowflakeAgentMigrateConnectionToSnowflakeAgent
MigrateConnectionToSnowflakeAgentObject type.
| Field | Type | Description |
|---|---|---|
success | Boolean | True if the connection was migrated successfully. |
Related types
restartAgent (mutation)
restartAgent is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Restarts an agent, supported only for Azure agents.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | The UUID of the Agent to restart, supported only for Azure agents. |
traceId | String | Trace ID for the request. |
Returns
RestartAgent
Example
mutation RestartAgent($agentId: UUID!) {
restartAgent(agentId: $agentId) {
restartResult
}
}Types used only by restartAgent
restartAgentRestartAgent
RestartAgentObject type.
| Field | Type | Description |
|---|---|---|
restartResult | GenericScalar | The result object returned from the agent. |
Related types
updateAgentEnabled (mutation)
updateAgentEnabled is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: General availability
Updates the enabled state of an agent.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | The UUID of the Agent to upgrade. |
dryRun | Boolean | If true, runs the precondition + reachability check that an enable would perform but does not change the agent's state. Default: false. |
enabled | Boolean! | Whether the agent should be enabled or not. |
Returns
UpdateAgentEnabled
Example
mutation UpdateAgentEnabled($agentId: UUID!, $enabled: Boolean!) {
updateAgentEnabled(agentId: $agentId, enabled: $enabled) {
enableResult
}
}Types used only by updateAgentEnabled
updateAgentEnabledUpdateAgentEnabled
UpdateAgentEnabledObject type.
| Field | Type | Description |
|---|---|---|
enableResult | Boolean! | The agent's enabled state after the call (unchanged when dry_run is true). |
validationResult | TestCredentialsV2Response | Result of the reachability check performed when enabling. Null when disabling or when the agent was already in the requested state. |
Related types
TestCredentialsV2Response, UUID
updateAgentParameters (mutation)
updateAgentParameters is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Updates agent parameters like MemorySize or ConcurrentExecutions.
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | The UUID of the Agent to update parameters. |
parameters | GenericScalar | New values for template parameters, for example: MemorySize=1024 |
traceId | String | Trace ID for the request. |
Returns
UpdateAgentParameters
Example
mutation UpdateAgentParameters($agentId: UUID!) {
updateAgentParameters(agentId: $agentId) {
updateResult
}
}Types used only by updateAgentParameters
updateAgentParametersUpdateAgentParameters
UpdateAgentParametersObject type.
| Field | Type | Description |
|---|---|---|
updateResult | GenericScalar | The result object returned from the agent. |
Related types
upgradeAgent (mutation)
upgradeAgent is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Upgrades a Monte Carlo Agent to a given version
Arguments
| Argument | Type | Description |
|---|---|---|
agentId | UUID! | The UUID of the Agent to upgrade. |
image | String | Image to upgrade the agent to (upgrades to the latest image by default). |
parameters | GenericScalar | New values for template parameters, for example: MemorySize=1024 |
timeout | Int | Time to wait for the upgrade to complete |
traceId | String | Trace ID for the request. |
Returns
UpgradeAgent
Example
mutation UpgradeAgent($agentId: UUID!) {
upgradeAgent(agentId: $agentId) {
upgradeResult
}
}Types used only by upgradeAgent
upgradeAgentUpgradeAgent
UpgradeAgentObject type.
| Field | Type | Description |
|---|---|---|
upgradeResult | GenericScalar | The result object returned from the agent. |
Related types
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
