

# DescribeCodeRepository
<a name="API_DescribeCodeRepository"></a>

Gets details about the specified Git repository.

## Request Syntax
<a name="API_DescribeCodeRepository_RequestSyntax"></a>

```
{
   "CodeRepositoryName": "string"
}
```

## Request Parameters
<a name="API_DescribeCodeRepository_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [CodeRepositoryName](#API_DescribeCodeRepository_RequestSyntax) **   <a name="sagemaker-DescribeCodeRepository-request-CodeRepositoryName"></a>
The name of the Git repository to describe.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 63.  
Pattern: `[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}`   
Required: Yes

## Response Syntax
<a name="API_DescribeCodeRepository_ResponseSyntax"></a>

```
{
   "CodeRepositoryArn": "string",
   "CodeRepositoryName": "string",
   "CreationTime": number,
   "GitConfig": { 
      "Branch": "string",
      "RepositoryUrl": "string",
      "SecretArn": "string"
   },
   "LastModifiedTime": number
}
```

## Response Elements
<a name="API_DescribeCodeRepository_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [CodeRepositoryArn](#API_DescribeCodeRepository_ResponseSyntax) **   <a name="sagemaker-DescribeCodeRepository-response-CodeRepositoryArn"></a>
The Amazon Resource Name (ARN) of the Git repository.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Pattern: `arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]{9,16}:[0-9]{12}:code-repository/[\S]{1,2048}` 

 ** [CodeRepositoryName](#API_DescribeCodeRepository_ResponseSyntax) **   <a name="sagemaker-DescribeCodeRepository-response-CodeRepositoryName"></a>
The name of the Git repository.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 63.  
Pattern: `[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}` 

 ** [CreationTime](#API_DescribeCodeRepository_ResponseSyntax) **   <a name="sagemaker-DescribeCodeRepository-response-CreationTime"></a>
The date and time that the repository was created.  
Type: Timestamp

 ** [GitConfig](#API_DescribeCodeRepository_ResponseSyntax) **   <a name="sagemaker-DescribeCodeRepository-response-GitConfig"></a>
Configuration details about the repository, including the URL where the repository is located, the default branch, and the Amazon Resource Name (ARN) of the Amazon Secrets Manager secret that contains the credentials used to access the repository.  
Type: [GitConfig](API_GitConfig.md) object

 ** [LastModifiedTime](#API_DescribeCodeRepository_ResponseSyntax) **   <a name="sagemaker-DescribeCodeRepository-response-LastModifiedTime"></a>
The date and time that the repository was last changed.  
Type: Timestamp

## Errors
<a name="API_DescribeCodeRepository_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

## See Also
<a name="API_DescribeCodeRepository_SeeAlso"></a>

For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/sagemaker-2017-07-24/DescribeCodeRepository) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/sagemaker-2017-07-24/DescribeCodeRepository) 