Skip to content

Commit 8d7539c

Browse files
author
DyfanJones
committed
feature: add support for eks (#5)
1 parent f26c412 commit 8d7539c

30 files changed

+3348
-22
lines changed

NAMESPACE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ export(DynamoDBGetItemStep)
2323
export(DynamoDBPutItemStep)
2424
export(DynamoDBUpdateItemStep)
2525
export(EcsRunTaskStep)
26+
export(EksCallStep)
27+
export(EksCreateClusterStep)
28+
export(EksCreateFargateProfileStep)
29+
export(EksCreateNodegroupStep)
30+
export(EksDeleteClusterStep)
31+
export(EksDeleteFargateProfileStep)
32+
export(EksDeleteNodegroupStep)
33+
export(EksRunJobStep)
2634
export(EmrAddStepStep)
2735
export(EmrCancelStepStep)
2836
export(EmrCreateClusterStep)

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Stepfunctions
1010
* apigateway
1111
* Emr on Eks
12+
* Eks
1213

1314
# stepfunctions 0.1.0
1415

R/steps_service.R

Lines changed: 167 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,9 +2106,7 @@ EksCreateFargateProfileStep = R6Class("EksCreateFargateProfileStep",
21062106
)
21072107

21082108
#' @title EksDeleteFargateProfileStep class
2109-
#' @description Creates a Task State to create Fargate Profile on `AWS EKS cluster`.
2110-
#' `Amazon EKS` uses service-linked roles which contain the permissions
2111-
#' `Amazon EKS` requires to call other services on your behalf
2109+
#' @description Creates a Task State to delete Fargate Profile on `AWS EKS cluster`.
21122110
#' See `Manage Amazon EKS` with Step Functions
21132111
#' \url{https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html}
21142112
#' for more details.
@@ -2189,3 +2187,169 @@ EksDeleteFargateProfileStep = R6Class("EksDeleteFargateProfileStep",
21892187
),
21902188
lock_objects=F
21912189
)
2190+
2191+
#' @title EksCreateNodegroupStep class
2192+
#' @description Creates a Task State to create a managed node group for an `AWS EKS cluster`.
2193+
#' See `Manage Amazon EKS` with Step Functions
2194+
#' \url{https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html}
2195+
#' for more details.
2196+
#' @export
2197+
EksCreateNodegroupStep = R6Class("EksCreateNodegroupStep",
2198+
inherit = Task,
2199+
public = list(
2200+
2201+
#' @description Initialize EksCreateNodegroupStep Task class
2202+
#' @param state_id (str): State name whose length **must be** less than or
2203+
#' equal to 128 unicode characters. State names **must be** unique
2204+
#' within the scope of the whole state machine.
2205+
#' @param wait_for_completion (bool, optional): Boolean value set to `True` if
2206+
#' the Task state should wait for the glue job to complete before proceeding
2207+
#' to the next step in the workflow. Set to `False` if the Task state should
2208+
#' submit the glue job and proceed to the next step. (default: True)
2209+
#' @param timeout_seconds (int, optional): Positive integer specifying timeout for the
2210+
#' state in seconds. If the state runs longer than the specified timeout,
2211+
#' then the interpreter fails the state with a `States.Timeout` Error Name. (default: 60)
2212+
#' @param timeout_seconds_path (str, optional): Path specifying the state's timeout
2213+
#' value in seconds from the state input. When resolved, the path must select
2214+
#' a field whose value is a positive integer.
2215+
#' @param heartbeat_seconds (int, optional): Positive integer specifying heartbeat
2216+
#' timeout for the state in seconds. This value should be lower than
2217+
#' the one specified for `timeout_seconds`. If more time than the specified
2218+
#' heartbeat elapses between heartbeats from the task, then the interpreter
2219+
#' fails the state with a `States.Timeout` Error Name.
2220+
#' @param heartbeat_seconds_path (str, optional): Path specifying the state's
2221+
#' heartbeat value in seconds from the state input. When resolved,
2222+
#' the path must select a field whose value is a positive integer.
2223+
#' @param comment (str, optional): Human-readable comment or description. (default: None)
2224+
#' @param input_path (str, optional): Path applied to the state’s raw input to
2225+
#' select some or all of it; that selection is used by the state. (default: '$')
2226+
#' @param parameters (list, optional): The value of this field becomes the effective
2227+
#' input for the state.
2228+
#' @param result_path (str, optional): Path specifying the raw input’s combination
2229+
#' with or replacement by the state’s result. (default: '$')
2230+
#' @param output_path (str, optional): Path applied to the state’s output after
2231+
#' the application of `result_path`, producing the effective output
2232+
#' which serves as the raw input for the next state. (default: '$')
2233+
#' @param ... : Extra Fields passed to Task class
2234+
initialize = function(state_id,
2235+
wait_for_completion=TRUE,
2236+
timeout_seconds=NULL,
2237+
timeout_seconds_path=NULL,
2238+
heartbeat_seconds=NULL,
2239+
heartbeat_seconds_path=NULL,
2240+
comment=NULL,
2241+
input_path=NULL,
2242+
parameters=NULL,
2243+
result_path=NULL,
2244+
output_path=NULL,
2245+
...){
2246+
kwargs = list(
2247+
state_id=state_id,
2248+
timeout_seconds=timeout_seconds,
2249+
timeout_seconds_path=timeout_seconds_path,
2250+
heartbeat_seconds=heartbeat_seconds,
2251+
heartbeat_seconds_path=heartbeat_seconds_path,
2252+
comment=comment,
2253+
input_path=input_path,
2254+
parameters=parameters,
2255+
result_path=result_path,
2256+
output_path=output_path,
2257+
...)
2258+
if (wait_for_completion)
2259+
kwargs[Field$Resource] = get_service_integration_arn(
2260+
EKS_SERVICE_NAME,
2261+
EksApi$CreateNodegroup,
2262+
IntegrationPattern$WaitForCompletion)
2263+
else
2264+
kwargs[[Field$Resource]] = get_service_integration_arn(
2265+
EKS_SERVICE_NAME,
2266+
EksApi$CreateNodegroup)
2267+
2268+
do.call(super$initialize, kwargs)
2269+
}
2270+
),
2271+
lock_objects=F
2272+
)
2273+
2274+
#' @title EksDeleteNodegroupStep class
2275+
#' @description Creates a Task State to delete node groups for a `AWS EKS cluster`.
2276+
#' See `Manage Amazon EKS` with Step Functions
2277+
#' \url{https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html}
2278+
#' for more details.
2279+
#' @export
2280+
EksDeleteNodegroupStep = R6Class("EksDeleteNodegroupStep",
2281+
inherit = Task,
2282+
public = list(
2283+
2284+
#' @description Initialize EksDeleteNodegroupStep Task class
2285+
#' @param state_id (str): State name whose length **must be** less than or
2286+
#' equal to 128 unicode characters. State names **must be** unique
2287+
#' within the scope of the whole state machine.
2288+
#' @param wait_for_completion (bool, optional): Boolean value set to `True` if
2289+
#' the Task state should wait for the glue job to complete before proceeding
2290+
#' to the next step in the workflow. Set to `False` if the Task state should
2291+
#' submit the glue job and proceed to the next step. (default: True)
2292+
#' @param timeout_seconds (int, optional): Positive integer specifying timeout for the
2293+
#' state in seconds. If the state runs longer than the specified timeout,
2294+
#' then the interpreter fails the state with a `States.Timeout` Error Name. (default: 60)
2295+
#' @param timeout_seconds_path (str, optional): Path specifying the state's timeout
2296+
#' value in seconds from the state input. When resolved, the path must select
2297+
#' a field whose value is a positive integer.
2298+
#' @param heartbeat_seconds (int, optional): Positive integer specifying heartbeat
2299+
#' timeout for the state in seconds. This value should be lower than
2300+
#' the one specified for `timeout_seconds`. If more time than the specified
2301+
#' heartbeat elapses between heartbeats from the task, then the interpreter
2302+
#' fails the state with a `States.Timeout` Error Name.
2303+
#' @param heartbeat_seconds_path (str, optional): Path specifying the state's
2304+
#' heartbeat value in seconds from the state input. When resolved,
2305+
#' the path must select a field whose value is a positive integer.
2306+
#' @param comment (str, optional): Human-readable comment or description. (default: None)
2307+
#' @param input_path (str, optional): Path applied to the state’s raw input to
2308+
#' select some or all of it; that selection is used by the state. (default: '$')
2309+
#' @param parameters (list, optional): The value of this field becomes the effective
2310+
#' input for the state.
2311+
#' @param result_path (str, optional): Path specifying the raw input’s combination
2312+
#' with or replacement by the state’s result. (default: '$')
2313+
#' @param output_path (str, optional): Path applied to the state’s output after
2314+
#' the application of `result_path`, producing the effective output
2315+
#' which serves as the raw input for the next state. (default: '$')
2316+
#' @param ... : Extra Fields passed to Task class
2317+
initialize = function(state_id,
2318+
wait_for_completion=TRUE,
2319+
timeout_seconds=NULL,
2320+
timeout_seconds_path=NULL,
2321+
heartbeat_seconds=NULL,
2322+
heartbeat_seconds_path=NULL,
2323+
comment=NULL,
2324+
input_path=NULL,
2325+
parameters=NULL,
2326+
result_path=NULL,
2327+
output_path=NULL,
2328+
...){
2329+
kwargs = list(
2330+
state_id=state_id,
2331+
timeout_seconds=timeout_seconds,
2332+
timeout_seconds_path=timeout_seconds_path,
2333+
heartbeat_seconds=heartbeat_seconds,
2334+
heartbeat_seconds_path=heartbeat_seconds_path,
2335+
comment=comment,
2336+
input_path=input_path,
2337+
parameters=parameters,
2338+
result_path=result_path,
2339+
output_path=output_path,
2340+
...)
2341+
if (wait_for_completion)
2342+
kwargs[Field$Resource] = get_service_integration_arn(
2343+
EKS_SERVICE_NAME,
2344+
EksApi$DeleteNodegroup,
2345+
IntegrationPattern$WaitForCompletion)
2346+
else
2347+
kwargs[[Field$Resource]] = get_service_integration_arn(
2348+
EKS_SERVICE_NAME,
2349+
EksApi$DeleteNodegroup)
2350+
2351+
do.call(super$initialize, kwargs)
2352+
}
2353+
),
2354+
lock_objects=F
2355+
)

docs/news/index.html

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ pandoc: 2.11.2
22
pkgdown: 1.6.1
33
pkgdown_sha: ~
44
articles: {}
5-
last_built: 2021-05-25T15:34Z
5+
last_built: 2021-05-25T16:33Z
66

docs/reference/ApiGateway.html

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)