Account secrets (GraphQL)

Related queries and mutations in Agents and deployments. Each has its own section.

Queries

getAccountSecret (query)

getAccountSecret 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 an account secret

Arguments

ArgumentTypeDescription
nameString!If the secret name
revealBooleanIf the secret value must be returned

Returns

AccountSecretOutput

Example

query GetAccountSecret($name: String!) {
  getAccountSecret(name: $name) {
    name
    scope
    description
    expiresAt
    value
    createdBy
    createdAt
    updatedBy
    lastUpdate
  }
}

Related types

AccountSecretOutput

getAccountSecrets (query)

getAccountSecrets 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.

Returns

[AccountSecretOutput!]!

Example

query GetAccountSecrets {
  getAccountSecrets {
    name
    scope
    description
    expiresAt
    value
    createdBy
    createdAt
    updatedBy
    lastUpdate
  }
}

Related types

AccountSecretOutput

Mutations

createAccountSecret (mutation)

createAccountSecret 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 an account secret

Arguments

ArgumentTypeDescription
descriptionStringThe secret description
expiresAtDateTimeWhen does the secret expire. Null if it doesn't expire.
nameString!The secret name
scopeString!The secret scope
valueString!The secret value.

Returns

CreateAccountSecret

Example

mutation CreateAccountSecret($name: String!, $scope: String!, $value: String!) {
  createAccountSecret(name: $name, scope: $scope, value: $value) {
    secret {
      name
      scope
      description
      expiresAt
      value
      createdBy
      createdAt
      updatedBy
      lastUpdate
    }
  }
}

Types used only by createAccountSecret

CreateAccountSecret

Object type. Create an account secret

FieldTypeDescription
secretAccountSecretOutputThe secret that was created

Related types

AccountSecretOutput, DateTime

deleteAccountSecret (mutation)

deleteAccountSecret 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 an account secret

Arguments

ArgumentTypeDescription
nameString!The secret name

Returns

DeleteAccountSecret

Example

mutation DeleteAccountSecret($name: String!) {
  deleteAccountSecret(name: $name) {
    deleted
  }
}

Types used only by deleteAccountSecret

DeleteAccountSecret

Object type. Delete an account secret

FieldTypeDescription
deletedBoolean

updateAccountSecret (mutation)

updateAccountSecret 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.

Update an account secret

Arguments

ArgumentTypeDescription
descriptionStringThe secret description
expiresAtDateTimeWhen does the secret expire. Null if it doesn't expire.
nameString!The secret name
scopeString!The secret scope
valueStringThe secret value. If not provided, the value will not be changed.

Returns

UpdateAccountSecret

Example

mutation UpdateAccountSecret($name: String!, $scope: String!) {
  updateAccountSecret(name: $name, scope: $scope) {
    secret {
      name
      scope
      description
      expiresAt
      value
      createdBy
      createdAt
      updatedBy
      lastUpdate
    }
  }
}

Types used only by updateAccountSecret

UpdateAccountSecret

Object type. Update an account secret

FieldTypeDescription
secretAccountSecretOutputThe secret that was updated

Related types

AccountSecretOutput, DateTime

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.