Is codecommit cli and sdk command for get-file and get-folder deprecated?

0

I've been using cli and sdk calls to CodeCommit to manage my companies code repositories. I've been able to get around this issue for a while now by just using getDifferences and then using getBlob to retrieve each of those files.

But now, I want the files for a specific folder in my code repository. I was thinking of just doing a getFolder and then doing a getBlob for all the files that it returned using promises but it seems that I can't use the getFolder sdk command or the get-folder cli command. The aws documentation says that these commands are still available but all I get back is that the command is not recognized.

Am I missing something here?

asked 5 years ago364 views
4 Answers
0

Hi vwhitehurst

Sorry to hear you are having problems calling CodeCommit APIs via SDK and CLI.
Would you be able to give us more information about the error you are getting?

  • Which region are you using to make the calls?
  • What is the actual error message you are getting?
  • Which Operating System are you using?
  • Which command are you trying in the CLI?

It would also be helpful to know the version of your SDK and AWS CLI

Those information will help us investigate the problem.

Thanks

Edited by: robison-aws on Apr 3, 2019 11:15 AM

Edited by: robison-aws on Apr 3, 2019 11:16 AM

answered 5 years ago
0

OS: macOS Mojave 10.14.2

Region: us-east-1

Command:

aws codecommit get-folder --repository-name ${my_repo_name} --folder-path ${path_to_folder_in_repo} --profile ${aws_creds_for_account} --region us-east-1

Error:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:

batch-get-repositories                   | create-branch
create-pull-request                      | create-repository
delete-branch                            | delete-comment-content
delete-repository                        | describe-pull-request-events
get-blob                                 | get-branch
get-comment                              | get-comments-for-compared-commit
get-comments-for-pull-request            | get-commit
get-differences                          | get-merge-conflicts
get-pull-request                         | get-repository
get-repository-triggers                  | list-branches
list-pull-requests                       | list-repositories
merge-pull-request-by-fast-forward       | post-comment-for-compared-commit
post-comment-for-pull-request            | post-comment-reply
put-file                                 | put-repository-triggers
test-repository-triggers                 | update-comment
update-default-branch                    | update-pull-request-description
update-pull-request-status               | update-pull-request-title
update-repository-description            | update-repository-name
credential-helper                        | help

Where get-folder and get-file aren't listed which made me think they were deprecated or something.

answered 5 years ago
0

Hi, thanks for the response.

Can you confirm the version of the CLI you are using?

You should be able to execute those commands in CLI versions aws-cli/1.16.102 and newer.

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:

batch-get-repositories                   | create-branch
create-commit                            | create-pull-request
create-repository                        | delete-branch
delete-comment-content                   | delete-file
delete-repository                        | describe-pull-request-events
get-blob                                 | get-branch
get-comment                              | get-comments-for-compared-commit
get-comments-for-pull-request            | get-commit
get-differences                          | get-file
get-folder                               | get-merge-conflicts
get-pull-request                         | get-repository
get-repository-triggers                  | list-branches
list-pull-requests                       | list-repositories
merge-pull-request-by-fast-forward       | post-comment-for-compared-commit
post-comment-for-pull-request            | post-comment-reply
put-file                                 | put-repository-triggers
test-repository-triggers                 | update-comment
update-default-branch                    | update-pull-request-description
update-pull-request-status               | update-pull-request-title
update-repository-description            | update-repository-name
credential-helper                        | clone
help
  • Robison
answered 5 years ago
0

Ahhhh, that was it. I was running version 1.15.0. Now I see the commands. Thank you.

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions