InlineCode Class
AppSync function code from an inline string.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const inlineCode = new appsync.InlineCode('code');
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync
inline_code = appsync.InlineCode("code")
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;
InlineCode inlineCode = new InlineCode("code");
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
var inlineCode = new InlineCode("code");
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
inlineCode := awscdk.Aws_appsync.NewInlineCode(jsii.String("code"))
Initializer
ts
new InlineCode(code: string)
python
InlineCode(code: str)
java
new InlineCode(String code)
csharp
new InlineCode(string code)
go
NewInlineCode(Code *string)
Methods
bind(_scope: Construct): CodeConfigdef bind(self, _scope: Construct) -> CodeConfigpublic CodeConfig bind(Construct _scope)public CodeConfig Bind(Construct _scope)func Bind(_scope Construct) CodeConfig#Bind source code to an AppSync Function or resolver.
fromAsset(path: string, options?: AssetOptions): AssetCode@staticmethod def from_asset(path: str, options: typing.Optional[AssetOptions] = None) -> AssetCodepublic static AssetCode fromAsset(String path, AssetOptions options)public static AssetCode FromAsset(string path, AssetOptions? options = null)func FromAsset(Path *string, Options AssetOptions) AssetCodestatic#Loads the function code from a local disk path.
1 parameter
Parameters
pathpathpathpathPath— The path to the source code file.
fromInline(code: string): InlineCode // chainable@staticmethod def from_inline(code: str) -> InlineCodepublic static InlineCode fromInline(String code)public static InlineCode FromInline(string code)func FromInline(Code *string) InlineCodestatic#Inline code for AppSync function.
1 parameter · returns
Parameters
codecodecodecodeCode— The actual handler code (the resulting zip file cannot exceed 4MB).
Returns: InlineCode with inline code.