# SagemakerIntegration

Integrates an AWS Sagemaker Endpoint to an API Gateway method.

Extends: [Integration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.Integration.html) › [AwsIntegration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.AwsIntegration.html) › SagemakerIntegration

- Source: [`aws-apigateway/lib/integrations/sagemaker.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigateway/lib/integrations/sagemaker.ts#L23)
- Type last changed: v2.94.0 · 1 Sep 2023

## Example

TypeScript:

```ts
  declare const resource: apigateway.Resource;
  declare const endpoint: sagemaker.IEndpoint;
  resource.addMethod('POST', new apigateway.SagemakerIntegration(endpoint));
```

Python:

```python
# resource: apigateway.Resource
# endpoint: sagemaker.IEndpoint

resource.add_method("POST", apigateway.SagemakerIntegration(endpoint))
```

Java:

```java
Resource resource;
IEndpoint endpoint;

resource.addMethod("POST", new SagemakerIntegration(endpoint));
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Resource resource;
IEndpoint endpoint;

resource.AddMethod("POST", new SagemakerIntegration(endpoint));
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var resource Resource
var endpoint IEndpoint

resource.AddMethod(jsii.String("POST"), apigateway.NewSagemakerIntegration(endpoint))
```

## Initializer

TypeScript:

```ts
new SagemakerIntegration(endpoint: IEndpoint, options?: SagemakerIntegrationOptions)
```

Python:

```python
SagemakerIntegration(endpoint: IEndpoint, options: typing.Optional[SagemakerIntegrationOptions] = None)
```

Java:

```java
new SagemakerIntegration(IEndpoint endpoint, SagemakerIntegrationOptions options)
```

C# / .NET:

```csharp
new SagemakerIntegration(IEndpoint endpoint, SagemakerIntegrationOptions? options = null)
```

Golang:

```go
NewSagemakerIntegration(Endpoint IEndpoint, Options SagemakerIntegrationOptions)
```

## Methods

- `bind(method: Method): IntegrationConfig` — Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.
