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?

질문됨 5년 전405회 조회
4개 답변
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

답변함 5년 전
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.

답변함 5년 전
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
답변함 5년 전
0

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

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠