import { ActionEnvironmentSecret } from 'cdk-github'
new ActionEnvironmentSecret(scope: Construct, id: string, props: ActionEnvironmentSecretProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
ActionEnvironmentSecretProps |
No description. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { ActionEnvironmentSecret } from 'cdk-github'
ActionEnvironmentSecret.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
import { ActionSecret } from 'cdk-github'
new ActionSecret(scope: Construct, id: string, props: ActionSecretProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
ActionSecretProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: ActionSecretProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { ActionSecret } from 'cdk-github'
ActionSecret.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
import { GitHubResource } from 'cdk-github'
new GitHubResource(scope: Construct, id: string, props: GitHubResourceProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
GitHubResourceProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: GitHubResourceProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { GitHubResource } from 'cdk-github'
GitHubResource.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
import { ActionEnvironmentSecretProps } from 'cdk-github'
const actionEnvironmentSecretProps: ActionEnvironmentSecretProps = { ... }
Name | Type | Description |
---|---|---|
environment |
string |
The GithHub environment name which the secret should be stored in. |
githubTokenSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
The AWS secret in which the OAuth GitHub (personal) access token is stored. |
repository |
IGitHubRepository |
The GitHub repository information (owner and name). |
repositorySecretName |
string |
The GitHub secret name to be stored. |
sourceSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
This AWS secret value will be stored in GitHub as a secret (under the name of repositorySecretName). |
sourceSecretJsonField |
string |
The key of a JSON field to retrieve in sourceSecret. |
public readonly environment: string;
- Type: string
The GithHub environment name which the secret should be stored in.
public readonly githubTokenSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The AWS secret in which the OAuth GitHub (personal) access token is stored.
public readonly repository: IGitHubRepository;
- Type: IGitHubRepository
The GitHub repository information (owner and name).
public readonly repositorySecretName: string;
- Type: string
The GitHub secret name to be stored.
public readonly sourceSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
This AWS secret value will be stored in GitHub as a secret (under the name of repositorySecretName).
public readonly sourceSecretJsonField: string;
- Type: string
- Default: returns all the content stored in the Secrets Manager secret.
The key of a JSON field to retrieve in sourceSecret.
This can only be used if the secret stores a JSON object.
import { ActionSecretProps } from 'cdk-github'
const actionSecretProps: ActionSecretProps = { ... }
Name | Type | Description |
---|---|---|
githubTokenSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
The AWS secret in which the OAuth GitHub (personal) access token is stored. |
repository |
IGitHubRepository |
The GitHub repository information (owner and name). |
repositorySecretName |
string |
The GitHub secret name to be stored. |
sourceSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
This AWS secret value will be stored in GitHub as a secret (under the name of repositorySecretName). |
sourceSecretJsonField |
string |
The key of a JSON field to retrieve in sourceSecret. |
public readonly githubTokenSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The AWS secret in which the OAuth GitHub (personal) access token is stored.
public readonly repository: IGitHubRepository;
- Type: IGitHubRepository
The GitHub repository information (owner and name).
public readonly repositorySecretName: string;
- Type: string
The GitHub secret name to be stored.
public readonly sourceSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
This AWS secret value will be stored in GitHub as a secret (under the name of repositorySecretName).
public readonly sourceSecretJsonField: string;
- Type: string
- Default: returns all the content stored in the Secrets Manager secret.
The key of a JSON field to retrieve in sourceSecret.
This can only be used if the secret stores a JSON object.
import { GitHubResourceProps } from 'cdk-github'
const gitHubResourceProps: GitHubResourceProps = { ... }
Name | Type | Description |
---|---|---|
createRequestEndpoint |
string |
The GitHub api endpoint url for creating resources in format: POST /repos/OWNER/REPO/issues . |
deleteRequestEndpoint |
string |
The GitHub api endpoint url to delete this resource in format: POST /repos/OWNER/REPO/issues . |
githubTokenSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
The AWS secret in which the OAuth GitHub (personal) access token is stored. |
createRequestPayload |
string |
The GitHub api request payload for creating resources. This is a JSON parseable string. |
createRequestResultParameter |
string |
Used to extract a value from the result of the createRequest(Endpoint) to be used in update/deleteRequests. |
deleteRequestPayload |
string |
The GitHub api request payload to delete this resource. This is a JSON parseable string. |
updateRequestEndpoint |
string |
The GitHub api endpoint url to update this resource in format: POST /repos/OWNER/REPO/issues . |
updateRequestPayload |
string |
The GitHub api request payload to update this resources. This is a JSON parseable string. |
writeResponseToSSMParameter |
aws-cdk-lib.aws_ssm.IParameter |
The response body of the last GitHub api request will be written to this ssm parameter. |
public readonly createRequestEndpoint: string;
- Type: string
The GitHub api endpoint url for creating resources in format: POST /repos/OWNER/REPO/issues
.
This is called when the GitHubResource is created.
Example:
const createRequestEndpoint = 'POST /repos/octocat/Hello-World/issues'
public readonly deleteRequestEndpoint: string;
- Type: string
The GitHub api endpoint url to delete this resource in format: POST /repos/OWNER/REPO/issues
.
This is called when the GitHubResource is deleted/destroyed.
Example:
const deleteRequestEndpoint = 'PATCH repos/octocat/Hello-World/issues/1'
If you want to use the @see {@link GitHubResourceProps#createRequestResultParameter}, you can use the following syntax (assuming you have set createRequestResultParameter to "number"
):
const deleteRequestEndpoint = 'PATCH repos/octocat/Hello-World/:number'
public readonly githubTokenSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The AWS secret in which the OAuth GitHub (personal) access token is stored.
public readonly createRequestPayload: string;
- Type: string
The GitHub api request payload for creating resources. This is a JSON parseable string.
Used for @see {@link GitHubResourceProps#createRequestEndpoint}.
Example:
const createRequestPayload = JSON.stringify({ title: 'Found a bug', body: "I'm having a problem with this.", assignees: ['octocat'], milestone: 1, labels: ['bug'] })
public readonly createRequestResultParameter: string;
- Type: string
Used to extract a value from the result of the createRequest(Endpoint) to be used in update/deleteRequests.
Example: "number"
(for the issue number)
When this parameter is set and can be extracted from the result, the extracted value will be used for the PhyscialResourceId of the CustomResource. Changing the parameter once the stack is deployed is not supported.
public readonly deleteRequestPayload: string;
- Type: string
The GitHub api request payload to delete this resource. This is a JSON parseable string.
Used for @see {@link GitHubResourceProps#deleteRequestEndpoint}.
Example:
const deleteRequestPayload = JSON.stringify({ state: 'closed' })
public readonly updateRequestEndpoint: string;
- Type: string
The GitHub api endpoint url to update this resource in format: POST /repos/OWNER/REPO/issues
.
This is called when the GitHubResource is updated.
In most of the cases you want to either omit this or use the same value as createRequestEndpoint.
Example:
const updateRequestEndpoint = 'PATCH repos/octocat/Hello-World/issues/1'
If you want to use the @see {@link GitHubResourceProps#createRequestResultParameter}, you can use the following syntax (assuming you have set createRequestResultParameter to "number"
):
const updateRequestEndpoint = 'PATCH repos/octocat/Hello-World/:number'
public readonly updateRequestPayload: string;
- Type: string
The GitHub api request payload to update this resources. This is a JSON parseable string.
Used for @see {@link GitHubResourceProps#createRequestEndpoint}.
Example:
const updateRequestPayload = JSON.stringify({ title: 'Found a bug', body: "I'm having a problem with this.", assignees: ['octocat'], milestone: 1, state: 'open', labels: ['bug'] })
public readonly writeResponseToSSMParameter: IParameter;
- Type: aws-cdk-lib.aws_ssm.IParameter
The response body of the last GitHub api request will be written to this ssm parameter.
- Implemented By: IGitHubRepository
Name | Type | Description |
---|---|---|
name |
string |
The GitHub repository name. |
owner |
string |
The GitHub repository owner. |
public readonly name: string;
- Type: string
The GitHub repository name.
public readonly owner: string;
- Type: string
- Default: user account which owns the personal access token
The GitHub repository owner.