{"record":{"id":"2a1ba613110aacf2","repo":"pulumi/pulumi","slug":"nothing-to-update-pass-at-least-one-of-name","errorCode":null,"errorMessage":"nothing to update: pass at least one of --name, --description, or --details-file","messagePattern":"nothing to update: pass at least one of --name, --description, or --details-file","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/pulumi/org/org_role_edit.go","lineNumber":82,"sourceCode":"\t\t\tif cmd.Flags().Changed(\"name\") {\n\t\t\t\teditArgs.SetName = true\n\t\t\t\teditArgs.Name = newName\n\t\t\t}\n\t\t\tif cmd.Flags().Changed(\"description\") {\n\t\t\t\teditArgs.SetDescription = true\n\t\t\t\teditArgs.Description = description\n\t\t\t}\n\t\t\tif cmd.Flags().Changed(\"details-file\") {\n\t\t\t\tdetails, err := readRoleDetails(cmd.InOrStdin(), detailsFile)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\teditArgs.SetDetails = true\n\t\t\t\teditArgs.Details = details\n\t\t\t}\n\n\t\t\tif !editArgs.SetName && !editArgs.SetDescription && !editArgs.SetDetails {\n\t\t\t\treturn errors.New(\n\t\t\t\t\t\"nothing to update: pass at least one of --name, --description, or --details-file\")\n\t\t\t}\n\n\t\t\treturn runOrgRoleEdit(cmd.Context(), cmd.OutOrStdout(), factory, org, editArgs, output.Get())\n\t\t},\n\t}\n\n\tconstrictor.AttachArguments(cmd, &constrictor.Arguments{\n\t\tArguments: []constrictor.Argument{\n\t\t\t{Name: \"role-id\"},\n\t\t},\n\t\tRequired: 1,\n\t})\n\n\tcmd.Flags().StringVar(&org, \"org\", \"\",\n\t\t\"The organization that owns the role. Defaults to the current default organization\")\n\tcmd.Flags().StringVar(&newName, \"name\", \"\", \"Rename the role\")\n\tcmd.Flags().StringVar(&description, \"description\", \"\", \"Update the role's description\")","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/pulumi/org/org_role_edit.go#L64-L100","documentation":"This validation error is returned by the `pulumi org role edit` command (org_role_edit.go:82) when the RunE handler detects that none of the update flags (--name, --description, --details-file) were passed, so there is nothing to change. The command uses cmd.Flags().Changed(...) with ternary semantics, so flags absent from the command line mean \"leave unchanged\"; with all absent, the update is a no-op and is rejected before any API call.","triggerScenarios":"Running `pulumi org role edit <role-id>` with only the role-id argument and no --name, --description, or --details-file flags.","commonSituations":"Typing the edit command intending to inspect a role (use `pulumi org role list` or the API instead); scripting where flag values are empty shell variables ($NAME unset) so the flags are omitted; typos like --Name or --desc that cobra doesn't recognize as the tracked flags.","solutions":["Pass at least one of --name, --description, or --details-file to the edit command.","If you only wanted to view the role, use `pulumi org role list --output=json` or the GetOrgRole API instead of edit.","In scripts, validate that at least one update variable is non-empty before invoking `org role edit`."],"exampleFix":"# before\n$ pulumi org role edit role-123\nerror: nothing to update: pass at least one of --name, --description, or --details-file\n\n# after\n$ pulumi org role edit role-123 --description \"Read-only auditor\"\n# or\n$ pulumi org role edit role-123 --details-file ./updated.json","handlingStrategy":"validation","validationCode":"# shell: ensure at least one update flag before invoking edit\nif [ -z \"$NAME\" ] && [ -z \"$DESC\" ] && [ -z \"$DETAILS_FILE\" ]; then\n  echo \"error: pass at least one of --name, --description, or --details-file\" >&2; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["In scripts, assert at least one of the update variables is non-empty before calling edit.","Use edit only for actual changes; inspect roles via `org role list --output=json`.","Watch flag spelling — unrecognized flags won't count as 'changed'.","Remember ternary semantics: omitted flag = unchanged, not cleared."],"tags":["cli","validation","flags"],"backgroundTag":"no-op-update-rejected","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}