diff --git a/examples/apigateway/v1beta2/methodsettings.yaml b/examples/apigateway/v1beta2/methodsettings.yaml new file mode 100644 index 0000000000..cb484e288e --- /dev/null +++ b/examples/apigateway/v1beta2/methodsettings.yaml @@ -0,0 +1,91 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: apigateway.aws.upbound.io/v1beta2 +kind: MethodSettings +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/methodsettings + labels: + testing.upbound.io/example-name: example-methodsettings + name: example-methodsettings-all +spec: + forProvider: + methodPath: '*/*' + region: us-west-1 + restApiIdSelector: + matchLabels: + testing.upbound.io/example-name: example-methodsettings + settings: + metricsEnabled: true + stageNameSelector: + matchLabels: + testing.upbound.io/example-name: example-methodsettings +--- +apiVersion: apigateway.aws.upbound.io/v1beta2 +kind: Stage +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/methodsettings + labels: + testing.upbound.io/example-name: example-methodsettings + name: example-methodsettings-stage +spec: + forProvider: + deploymentIdSelector: + matchLabels: + testing.upbound.io/example-name: example-methodsettings + region: us-west-1 + restApiIdSelector: + matchLabels: + testing.upbound.io/example-name: example-methodsettings + stageName: development +--- +apiVersion: apigateway.aws.upbound.io/v1beta1 +kind: Deployment +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/methodsettings + labels: + testing.upbound.io/example-name: example-methodsettings + name: example-methodsettings-deployment +spec: + forProvider: + region: us-west-1 + restApiIdSelector: + matchLabels: + testing.upbound.io/example-name: example-methodsettings +--- +apiVersion: apigateway.aws.upbound.io/v1beta1 +kind: RestAPI +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/methodsettings + labels: + testing.upbound.io/example-name: example-methodsettings + name: example-methodsettings-restapi +spec: + forProvider: + body: |- + ${jsonencode({ + openapi = "3.0.1" + info = { + title = "example" + version = "1.0" + } + paths = { + "/path1" = { + get = { + x-amazon-apigateway-integration = { + httpMethod = "GET" + payloadFormatVersion = "1.0" + type = "HTTP_PROXY" + uri = "https://ip-ranges.amazonaws.com/ip-ranges.json" + } + } + } + } + })} + name: test-demo + region: us-west-1 diff --git a/examples/apigateway/v1beta2/stage.yaml b/examples/apigateway/v1beta2/stage.yaml index cffabb13f3..e45405d019 100644 --- a/examples/apigateway/v1beta2/stage.yaml +++ b/examples/apigateway/v1beta2/stage.yaml @@ -2,90 +2,48 @@ # # SPDX-License-Identifier: CC0-1.0 -apiVersion: apigateway.aws.upbound.io/v1beta1 -kind: UsagePlanKey +apiVersion: apigateway.aws.upbound.io/v1beta2 +kind: Stage metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/stage labels: testing.upbound.io/example-name: stage - name: main + name: example-stage spec: forProvider: - keyIdSelector: + deploymentIdSelector: matchLabels: - testing.upbound.io/example-name: stage - keyType: API_KEY + testing.upbound.io/example-name: example-stage region: us-west-1 - usagePlanIdSelector: + restApiIdSelector: matchLabels: - testing.upbound.io/example-name: stage - ---- - -apiVersion: apigateway.aws.upbound.io/v1beta2 -kind: UsagePlan -metadata: - labels: - testing.upbound.io/example-name: stage - name: example -spec: - forProvider: - apiStages: - - apiIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - stageSelector: - matchLabels: - testing.upbound.io/example-name: stage - - apiIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - stageSelector: - matchLabels: - testing.upbound.io/example-name: stage - description: my description - name: my-usage-plan - productCode: MYCODE - quotaSettings: - limit: 20 - offset: 2 - period: WEEK - region: us-west-1 - throttleSettings: - burstLimit: 5 - rateLimit: 10 - ---- - -apiVersion: apigateway.aws.upbound.io/v1beta1 -kind: APIKey -metadata: - labels: - testing.upbound.io/example-name: stage - name: mykey -spec: - forProvider: - name: my_key - region: us-west-1 + testing.upbound.io/example-name: example-stage + stageName: development --- apiVersion: apigateway.aws.upbound.io/v1beta1 kind: Deployment metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/stage labels: - testing.upbound.io/example-name: stage - name: stage + testing.upbound.io/example-name: example-stage + name: example-stage-deployment spec: forProvider: region: us-west-1 restApiIdSelector: matchLabels: - testing.upbound.io/example-name: stage + testing.upbound.io/example-name: example-stage --- apiVersion: apigateway.aws.upbound.io/v1beta1 kind: RestAPI metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/stage labels: - testing.upbound.io/example-name: stage - name: test-demo + testing.upbound.io/example-name: example-stage + name: example-stage-restapi spec: forProvider: body: |- @@ -110,72 +68,3 @@ spec: })} name: test-demo region: us-west-1 ---- -apiVersion: apigateway.aws.upbound.io/v1beta2 -kind: Stage -metadata: - labels: - testing.upbound.io/example-name: stage - name: development -spec: - forProvider: - deploymentIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - region: us-west-1 - restApiIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - stageName: development ---- -apiVersion: apigateway.aws.upbound.io/v1beta1 -kind: Stage -metadata: - labels: - testing.upbound.io/example-name: stage - name: production -spec: - forProvider: - deploymentIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - region: us-west-1 - restApiIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - stageName: production ---- -apiVersion: apigateway.aws.upbound.io/v1beta2 -kind: MethodSettings -metadata: - labels: - testing.upbound.io/example-name: stage - name: all -spec: - forProvider: - methodPath: '*/*' - region: us-west-1 - restApiIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - settings: - metricsEnabled: true - stageNameSelector: - matchLabels: - testing.upbound.io/example-name: stage ---- -apiVersion: apigateway.aws.upbound.io/v1beta1 -kind: RequestValidator -metadata: - labels: - testing.upbound.io/example-name: stage - name: example -spec: - forProvider: - name: example - region: us-west-1 - restApiIdSelector: - matchLabels: - testing.upbound.io/example-name: stage - validateRequestBody: true - validateRequestParameters: true diff --git a/examples/apigateway/v1beta2/usageplan.yaml b/examples/apigateway/v1beta2/usageplan.yaml new file mode 100644 index 0000000000..f58703616f --- /dev/null +++ b/examples/apigateway/v1beta2/usageplan.yaml @@ -0,0 +1,124 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: apigateway.aws.upbound.io/v1beta2 +kind: UsagePlan +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/usageplan + labels: + testing.upbound.io/example-name: stage + name: example-usageplan +spec: + forProvider: + apiStages: + - apiIdSelector: + matchLabels: + testing.upbound.io/example-name: stage + stageSelector: + matchLabels: + testing.upbound.io/example-name: stage + - apiIdSelector: + matchLabels: + testing.upbound.io/example-name: stage + stageSelector: + matchLabels: + testing.upbound.io/example-name: stage + description: my description + name: my-usage-plan + productCode: MYCODE + quotaSettings: + limit: 20 + offset: 2 + period: WEEK + region: us-west-1 + throttleSettings: + burstLimit: 5 + rateLimit: 10 +--- +apiVersion: apigateway.aws.upbound.io/v1beta1 +kind: Deployment +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/usageplan + labels: + testing.upbound.io/example-name: stage + name: stage +spec: + forProvider: + region: us-west-1 + restApiIdSelector: + matchLabels: + testing.upbound.io/example-name: stage +--- +apiVersion: apigateway.aws.upbound.io/v1beta1 +kind: RestAPI +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/usageplan + labels: + testing.upbound.io/example-name: stage + name: test-demo +spec: + forProvider: + body: |- + ${jsonencode({ + openapi = "3.0.1" + info = { + title = "example" + version = "1.0" + } + paths = { + "/path1" = { + get = { + x-amazon-apigateway-integration = { + httpMethod = "GET" + payloadFormatVersion = "1.0" + type = "HTTP_PROXY" + uri = "https://ip-ranges.amazonaws.com/ip-ranges.json" + } + } + } + } + })} + name: test-demo + region: us-west-1 +--- +apiVersion: apigateway.aws.upbound.io/v1beta2 +kind: Stage +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/usageplan + labels: + testing.upbound.io/example-name: stage + name: development +spec: + forProvider: + deploymentIdSelector: + matchLabels: + testing.upbound.io/example-name: stage + region: us-west-1 + restApiIdSelector: + matchLabels: + testing.upbound.io/example-name: stage + stageName: development +--- +apiVersion: apigateway.aws.upbound.io/v1beta1 +kind: Stage +metadata: + annotations: + meta.upbound.io/example-id: apigateway/v1beta2/usageplan + labels: + testing.upbound.io/example-name: stage + name: production +spec: + forProvider: + deploymentIdSelector: + matchLabels: + testing.upbound.io/example-name: stage + region: us-west-1 + restApiIdSelector: + matchLabels: + testing.upbound.io/example-name: stage + stageName: production