SDK Samples¶
To access OpenTelekomCloud services from FunctionGraph using the API request have to be signed.
The community edition of OTC Java SDK v1 provides utility methods to handle request signing.
SDK samples can be found in: /samples-doc/doc-sample-sdk.
Note
To prevent extended logging deploy function with Class isolation set to enabled.
Dependencies¶
The community edition of the OTC Java SDK v1 can be found on otc-java-sdk-v1
For installation see: Getting started
To use this jar the pom.xml has to be adapted.
As an example see:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.github.opentelekomcloud</groupId>
<artifactId>opentelekomcloud-functiongraph-java-samples-doc-pom</artifactId>
<version>1.0.0</version>
</parent>
<groupId>io.github.opentelekomcloud</groupId>
<artifactId>opentelekomcloud-functiongraph-java-samples-doc-sdk</artifactId>
<name>opentelekomcloud-functiongraph-java-samples-doc-sdk</name>
<description>Open Telekom Cloud FunctionGraph Java SDK samples documentation for SDK</description>
<url>https://docs.otc.t-systems.com/opentelekomcloud-functiongraph-java</url>
<packaging>jar</packaging>
<scm>
<connection>scm:git:git://github.com/opentelekomcloud/opentelekomcloud-functiongraph-java.git</connection>
<developerConnection>scm:git:ssh://github.com:opentelekomcloud/opentelekomcloud-functiongraph-java.git</developerConnection>
<url>http://github.com/opentelekomcloud/opentelekomcloud-functiongraph-java/tree/main</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<commons-lang3.version>3.18.0</commons-lang3.version>
<otc-sdk-core-v1.version>1.0.0</otc-sdk-core-v1.version>
</properties>
<dependencies>
<dependency>
<groupId>io.github.opentelekomcloud-community</groupId>
<artifactId>otc-sdk-v1-core</artifactId>
<version>${otc-sdk-core-v1.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<inlineDescriptors>
<inlineDescriptor>
<id>jar-with-all-dependencies</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
</dependencySet>
<!-- include system dependencies like 'com-otc-sdk-core' -->
<dependencySet>
<outputDirectory>/</outputDirectory>
<unpack>true</unpack>
<scope>system</scope>
</dependencySet>
</dependencySets>
</inlineDescriptor>
</inlineDescriptors>
<archive>
</archive>
<finalName>${project.name}</finalName>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>