copyInstance
Copy configuration from one instance to another.
Both instances must be built from the same component. Source params (minus any
fields the bundle marks non-copyable) are written to the destination, deep-merged
with any overrides. copySecrets and copyRemoteReferences opt in to additional
state transfer. Deployment is a separate action โ call createDeployment on the
destination when you're ready to apply.
Copying secrets requires instance:configure on the source instance. Copying remote
references requires resource:view on each referenced resource and a resource grant
that covers the destination environment โ the same checks as setRemoteReference.
If any check fails, nothing is copied.
mutation {
copyInstance(
organizationId: "my-org"
sourceId: "ecomm-prod-db"
destinationId: "ecomm-staging-db"
input: { overrides: { size: "small" }, copySecrets: true }
) {
result { id params }
successful
}
}
copyInstance(
organizationId: ID!
sourceId: ID!
destinationId: ID!
input: CopyInstanceInput!
): InstancePayload
Form Schemaโ
This mutation supports dynamic form generation using JSON Schema.
Loading schema...
Argumentsโ
copyInstance.organizationIdย โย ID! non-null scalar {#organization-id}โ
Your organization's unique identifier.
copyInstance.sourceIdย โย ID! non-null scalar {#source-id}โ
The instance to copy configuration from.
copyInstance.destinationIdย โย ID! non-null scalar {#destination-id}โ
The instance to copy configuration into. Must be built from the same component as the source.
copyInstance.inputย โย CopyInstanceInput! non-null input {#input}โ
Copy configuration from one instance to another. The source and destination must be instances of the same component. Source params (minus any fields marked non-copyable in the bundle) are written to the destination.