mirror of https://github.com/kubernetes/kops.git
Update dependencies
This commit is contained in:
parent
b4d787f390
commit
ceae8ab49c
20
go.mod
20
go.mod
|
@ -14,7 +14,7 @@ require (
|
|||
github.com/Masterminds/sprig/v3 v3.2.3
|
||||
github.com/apparentlymart/go-cidr v1.1.0
|
||||
github.com/aws/amazon-ec2-instance-selector/v2 v2.4.1
|
||||
github.com/aws/aws-sdk-go v1.47.13
|
||||
github.com/aws/aws-sdk-go v1.48.3
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
github.com/cert-manager/cert-manager v1.13.2
|
||||
github.com/digitalocean/godo v1.106.0
|
||||
|
@ -41,11 +41,11 @@ require (
|
|||
github.com/spotinst/spotinst-sdk-go v1.171.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/weaveworks/mesh v0.0.0-20191105120815-58dbcc3e8e63
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0
|
||||
go.opentelemetry.io/otel v1.19.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
|
||||
go.opentelemetry.io/otel/sdk v1.19.0
|
||||
go.opentelemetry.io/otel/trace v1.19.0
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1
|
||||
go.opentelemetry.io/otel v1.21.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0
|
||||
go.opentelemetry.io/otel/sdk v1.21.0
|
||||
go.opentelemetry.io/otel/trace v1.21.0
|
||||
go.opentelemetry.io/proto/otlp v1.0.0
|
||||
go.uber.org/multierr v1.11.0
|
||||
golang.org/x/crypto v0.15.0
|
||||
|
@ -65,7 +65,7 @@ require (
|
|||
k8s.io/apimachinery v0.28.4
|
||||
k8s.io/cli-runtime v0.28.4
|
||||
k8s.io/client-go v0.28.4
|
||||
k8s.io/cloud-provider-aws v1.28.2
|
||||
k8s.io/cloud-provider-aws v1.28.3
|
||||
k8s.io/cloud-provider-gcp/providers v0.27.1
|
||||
k8s.io/component-base v0.28.4
|
||||
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01
|
||||
|
@ -73,7 +73,7 @@ require (
|
|||
k8s.io/kubectl v0.28.4
|
||||
k8s.io/kubelet v0.28.4
|
||||
k8s.io/mount-utils v0.28.4
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf
|
||||
sigs.k8s.io/controller-runtime v0.16.3
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
|
@ -121,7 +121,7 @@ require (
|
|||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
|
||||
github.com/evertras/bubble-table v0.14.4 // indirect
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/felixge/httpsnoop v1.0.3 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-errors/errors v1.4.2 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
|
@ -217,7 +217,7 @@ require (
|
|||
github.com/vbatts/tar-split v0.11.3 // indirect
|
||||
github.com/xlab/treeprint v1.2.0 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.21.0 // indirect
|
||||
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
|
||||
golang.org/x/mod v0.14.0 // indirect
|
||||
golang.org/x/term v0.14.0 // indirect
|
||||
|
|
40
go.sum
40
go.sum
|
@ -128,8 +128,8 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z
|
|||
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
|
||||
github.com/aws/amazon-ec2-instance-selector/v2 v2.4.1 h1:DmxtwV+pkakkVRhxKcAgnLbxCxvT7k8DBG271dfKPZ8=
|
||||
github.com/aws/amazon-ec2-instance-selector/v2 v2.4.1/go.mod h1:AEJrtkLkCkfIBIazidrVrgZqaXl+9dxI/wRgjdw+7G0=
|
||||
github.com/aws/aws-sdk-go v1.47.13 h1:pJgCtldg5azDAFoEcE0fz6n+FnCc1/FY4krtUa5uvZQ=
|
||||
github.com/aws/aws-sdk-go v1.47.13/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go v1.48.3 h1:btYjT+opVFxUbRz+qSCjJe07cdX82BHmMX/FXYmoL7g=
|
||||
github.com/aws/aws-sdk-go v1.48.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
|
@ -238,8 +238,8 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM
|
|||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
|
||||
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
|
||||
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
|
||||
github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI=
|
||||
github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4=
|
||||
|
@ -735,18 +735,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
|||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q=
|
||||
go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
|
||||
go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE=
|
||||
go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE=
|
||||
go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A=
|
||||
go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg=
|
||||
go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo=
|
||||
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
|
||||
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
|
||||
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
|
||||
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
|
||||
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
|
||||
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
|
||||
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
|
||||
|
@ -1265,8 +1265,8 @@ k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY=
|
|||
k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4=
|
||||
k8s.io/cloud-provider v0.28.3 h1:9u+JjA3zIn0nqLOOa8tWnprFkffguSAhfBvo8p7LhBQ=
|
||||
k8s.io/cloud-provider v0.28.3/go.mod h1:shAJxdrKu+SwwGUhkodxByPjaH8KBFZqXo6jU1F0ehI=
|
||||
k8s.io/cloud-provider-aws v1.28.2 h1:k/ub5dRJSxE1a+caZcXUoV9+f5Tfttc7sR58Jp22g50=
|
||||
k8s.io/cloud-provider-aws v1.28.2/go.mod h1:Q/lMMqIYXVv2GFQPtPIYcKqzIS7EWTM9DuiLlLZ5Y5E=
|
||||
k8s.io/cloud-provider-aws v1.28.3 h1:JcgtHCxO3rMV3OzncW/UL3iPRgHAPnklkz6OG+DJJV4=
|
||||
k8s.io/cloud-provider-aws v1.28.3/go.mod h1:Au90yabJ9C0GxpP/U3XzoP3RmkJOyXzNgopJaxwIBWo=
|
||||
k8s.io/cloud-provider-gcp/providers v0.27.1 h1:dHBfDCVqu+AhC8JRt1tGJdm7MGwxUwPNwauO6Jx3DSo=
|
||||
k8s.io/cloud-provider-gcp/providers v0.27.1/go.mod h1:nJpF5c121eZ73gPrKaLmj4D1HC0Yr6hdyprCKLMH7Ug=
|
||||
k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo=
|
||||
|
@ -1292,8 +1292,8 @@ k8s.io/kubelet v0.28.4 h1:Ypxy1jaFlSXFXbg/yVtFOU2ZxErBVRJfLu8+t4s7Dtw=
|
|||
k8s.io/kubelet v0.28.4/go.mod h1:w1wPI12liY/aeC70nqKYcNNkr6/nbyvdMB7P7wmww2o=
|
||||
k8s.io/mount-utils v0.28.4 h1:5GOZLm2dXi2fr+MKY8hS6kdV5reXrZBiK7848O5MVD0=
|
||||
k8s.io/mount-utils v0.28.4/go.mod h1:ceMAZ+Nzlk8zOwN205YXXGJRGmf1o0/XIwsKnG44p0I=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf h1:iTzha1p7Fi83476ypNSz8nV9iR9932jIIs26F7gNLsU=
|
||||
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
oras.land/oras-go v1.2.4 h1:djpBY2/2Cs1PV87GSJlxv4voajVOMZxqqtq9AB8YNvY=
|
||||
oras.land/oras-go v1.2.4/go.mod h1:DYcGfb3YF1nKjcezfX2SNlDAeQFKSXmf+qrFmrh4324=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
|
|
|
@ -18,7 +18,7 @@ require (
|
|||
k8s.io/klog/v2 v2.110.1
|
||||
k8s.io/kops v1.24.1
|
||||
k8s.io/release v0.16.4-0.20231018070448-ced7e7123958
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf
|
||||
sigs.k8s.io/boskos v0.0.0-20230524062849-a7ef97ee445d
|
||||
sigs.k8s.io/kubetest2 v0.0.0-20231014151303-89f09b65e8dd
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
|
@ -66,7 +66,7 @@ require (
|
|||
github.com/aliyun/credentials-go v1.2.3 // indirect
|
||||
github.com/apparentlymart/go-cidr v1.1.0 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
github.com/aws/aws-sdk-go v1.47.13 // indirect
|
||||
github.com/aws/aws-sdk-go v1.48.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.18.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.27 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.26 // indirect
|
||||
|
@ -248,9 +248,9 @@ require (
|
|||
gitlab.alpinelinux.org/alpine/go v0.7.0 // indirect
|
||||
go.mongodb.org/mongo-driver v1.11.3 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/otel v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.21.0 // indirect
|
||||
go.step.sm/crypto v0.32.2 // indirect
|
||||
go.uber.org/atomic v1.11.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
|
|
|
@ -201,8 +201,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
|
|||
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/aws/aws-sdk-go v1.47.13 h1:pJgCtldg5azDAFoEcE0fz6n+FnCc1/FY4krtUa5uvZQ=
|
||||
github.com/aws/aws-sdk-go v1.47.13/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go v1.48.3 h1:btYjT+opVFxUbRz+qSCjJe07cdX82BHmMX/FXYmoL7g=
|
||||
github.com/aws/aws-sdk-go v1.48.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.7.1/go.mod h1:L5LuPC1ZgDr2xQS7AmIec/Jlc7O/Y1u2KxJyNVab250=
|
||||
github.com/aws/aws-sdk-go-v2 v1.14.0/go.mod h1:ZA3Y8V0LrlWj63MQAnRHgKf/5QB//LSZCPNWlWrNGLU=
|
||||
github.com/aws/aws-sdk-go-v2 v1.18.1 h1:+tefE750oAb7ZQGzla6bLkOwfcQCEtC5y2RqoqCeqKo=
|
||||
|
@ -1118,14 +1118,14 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
|||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
|
||||
go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
|
||||
go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE=
|
||||
go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A=
|
||||
go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg=
|
||||
go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
|
||||
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
|
||||
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
|
||||
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
|
||||
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
|
||||
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
|
||||
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.step.sm/crypto v0.32.2 h1:EhJpFRNgU3RaNEO3WZ62Kn2gF9NWNglNG4DvSPeuiTs=
|
||||
go.step.sm/crypto v0.32.2/go.mod h1:JwarCq+Sn6N8IbRSKfSJfjUNKfO8c4N1mcNxYXuxXzc=
|
||||
|
@ -1714,8 +1714,8 @@ k8s.io/release v0.16.4-0.20231018070448-ced7e7123958 h1:jEFJZt1alm0P/HZrJ85lfyCM
|
|||
k8s.io/release v0.16.4-0.20231018070448-ced7e7123958/go.mod h1:gIOUMzXXLHr1WT+7QU/GEBdsWOM84ikC/M9lTa0HEmY=
|
||||
k8s.io/test-infra v0.0.0-20220913174101-46ac1a6cf806 h1:TIT4tzITs2yaaFmBPy3gRVza0QEvE8Sra2cAyAbYrV0=
|
||||
k8s.io/test-infra v0.0.0-20220913174101-46ac1a6cf806/go.mod h1:1emAuQGuX9NvcVYeO10mx7v2TnE3dmHhMiP6rKLVjZM=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf h1:iTzha1p7Fi83476ypNSz8nV9iR9932jIIs26F7gNLsU=
|
||||
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
|
|
@ -1040,6 +1040,21 @@ var awsPartition = partition{
|
|||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.detective-fips.ca-central-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "ca-central-1-fips",
|
||||
}: endpoint{
|
||||
Hostname: "api.detective-fips.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
|
@ -11747,6 +11762,9 @@ var awsPartition = partition{
|
|||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
|
@ -11819,6 +11837,9 @@ var awsPartition = partition{
|
|||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "me-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "me-south-1",
|
||||
}: endpoint{},
|
||||
|
@ -18064,6 +18085,9 @@ var awsPartition = partition{
|
|||
endpointKey{
|
||||
Region: "eu-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-south-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
|
@ -18357,6 +18381,9 @@ var awsPartition = partition{
|
|||
endpointKey{
|
||||
Region: "eu-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-south-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
|
@ -18824,46 +18851,6 @@ var awsPartition = partition{
|
|||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"macie": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "fips-us-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "macie-fips.us-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-west-2",
|
||||
}: endpoint{
|
||||
Hostname: "macie-fips.us-west-2.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-west-2",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "macie-fips.us-east-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "macie-fips.us-west-2.amazonaws.com",
|
||||
},
|
||||
},
|
||||
},
|
||||
"macie2": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
|
@ -21429,12 +21416,21 @@ var awsPartition = partition{
|
|||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
|
@ -26738,6 +26734,9 @@ var awsPartition = partition{
|
|||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "il-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "me-central-1",
|
||||
}: endpoint{},
|
||||
|
@ -32591,6 +32590,9 @@ var awsPartition = partition{
|
|||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "il-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
|
|
|
@ -5,4 +5,4 @@ package aws
|
|||
const SDKName = "aws-sdk-go"
|
||||
|
||||
// SDKVersion is the version of this SDK
|
||||
const SDKVersion = "1.47.13"
|
||||
const SDKVersion = "1.48.3"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -144,6 +144,10 @@ type EC2API interface {
|
|||
AssociateInstanceEventWindowWithContext(aws.Context, *ec2.AssociateInstanceEventWindowInput, ...request.Option) (*ec2.AssociateInstanceEventWindowOutput, error)
|
||||
AssociateInstanceEventWindowRequest(*ec2.AssociateInstanceEventWindowInput) (*request.Request, *ec2.AssociateInstanceEventWindowOutput)
|
||||
|
||||
AssociateIpamByoasn(*ec2.AssociateIpamByoasnInput) (*ec2.AssociateIpamByoasnOutput, error)
|
||||
AssociateIpamByoasnWithContext(aws.Context, *ec2.AssociateIpamByoasnInput, ...request.Option) (*ec2.AssociateIpamByoasnOutput, error)
|
||||
AssociateIpamByoasnRequest(*ec2.AssociateIpamByoasnInput) (*request.Request, *ec2.AssociateIpamByoasnOutput)
|
||||
|
||||
AssociateIpamResourceDiscovery(*ec2.AssociateIpamResourceDiscoveryInput) (*ec2.AssociateIpamResourceDiscoveryOutput, error)
|
||||
AssociateIpamResourceDiscoveryWithContext(aws.Context, *ec2.AssociateIpamResourceDiscoveryInput, ...request.Option) (*ec2.AssociateIpamResourceDiscoveryOutput, error)
|
||||
AssociateIpamResourceDiscoveryRequest(*ec2.AssociateIpamResourceDiscoveryInput) (*request.Request, *ec2.AssociateIpamResourceDiscoveryOutput)
|
||||
|
@ -904,6 +908,10 @@ type EC2API interface {
|
|||
DeprovisionByoipCidrWithContext(aws.Context, *ec2.DeprovisionByoipCidrInput, ...request.Option) (*ec2.DeprovisionByoipCidrOutput, error)
|
||||
DeprovisionByoipCidrRequest(*ec2.DeprovisionByoipCidrInput) (*request.Request, *ec2.DeprovisionByoipCidrOutput)
|
||||
|
||||
DeprovisionIpamByoasn(*ec2.DeprovisionIpamByoasnInput) (*ec2.DeprovisionIpamByoasnOutput, error)
|
||||
DeprovisionIpamByoasnWithContext(aws.Context, *ec2.DeprovisionIpamByoasnInput, ...request.Option) (*ec2.DeprovisionIpamByoasnOutput, error)
|
||||
DeprovisionIpamByoasnRequest(*ec2.DeprovisionIpamByoasnInput) (*request.Request, *ec2.DeprovisionIpamByoasnOutput)
|
||||
|
||||
DeprovisionIpamPoolCidr(*ec2.DeprovisionIpamPoolCidrInput) (*ec2.DeprovisionIpamPoolCidrOutput, error)
|
||||
DeprovisionIpamPoolCidrWithContext(aws.Context, *ec2.DeprovisionIpamPoolCidrInput, ...request.Option) (*ec2.DeprovisionIpamPoolCidrOutput, error)
|
||||
DeprovisionIpamPoolCidrRequest(*ec2.DeprovisionIpamPoolCidrInput) (*request.Request, *ec2.DeprovisionIpamPoolCidrOutput)
|
||||
|
@ -1269,6 +1277,10 @@ type EC2API interface {
|
|||
DescribeInternetGatewaysPages(*ec2.DescribeInternetGatewaysInput, func(*ec2.DescribeInternetGatewaysOutput, bool) bool) error
|
||||
DescribeInternetGatewaysPagesWithContext(aws.Context, *ec2.DescribeInternetGatewaysInput, func(*ec2.DescribeInternetGatewaysOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeIpamByoasn(*ec2.DescribeIpamByoasnInput) (*ec2.DescribeIpamByoasnOutput, error)
|
||||
DescribeIpamByoasnWithContext(aws.Context, *ec2.DescribeIpamByoasnInput, ...request.Option) (*ec2.DescribeIpamByoasnOutput, error)
|
||||
DescribeIpamByoasnRequest(*ec2.DescribeIpamByoasnInput) (*request.Request, *ec2.DescribeIpamByoasnOutput)
|
||||
|
||||
DescribeIpamPools(*ec2.DescribeIpamPoolsInput) (*ec2.DescribeIpamPoolsOutput, error)
|
||||
DescribeIpamPoolsWithContext(aws.Context, *ec2.DescribeIpamPoolsInput, ...request.Option) (*ec2.DescribeIpamPoolsOutput, error)
|
||||
DescribeIpamPoolsRequest(*ec2.DescribeIpamPoolsInput) (*request.Request, *ec2.DescribeIpamPoolsOutput)
|
||||
|
@ -1963,6 +1975,10 @@ type EC2API interface {
|
|||
DisassociateInstanceEventWindowWithContext(aws.Context, *ec2.DisassociateInstanceEventWindowInput, ...request.Option) (*ec2.DisassociateInstanceEventWindowOutput, error)
|
||||
DisassociateInstanceEventWindowRequest(*ec2.DisassociateInstanceEventWindowInput) (*request.Request, *ec2.DisassociateInstanceEventWindowOutput)
|
||||
|
||||
DisassociateIpamByoasn(*ec2.DisassociateIpamByoasnInput) (*ec2.DisassociateIpamByoasnOutput, error)
|
||||
DisassociateIpamByoasnWithContext(aws.Context, *ec2.DisassociateIpamByoasnInput, ...request.Option) (*ec2.DisassociateIpamByoasnOutput, error)
|
||||
DisassociateIpamByoasnRequest(*ec2.DisassociateIpamByoasnInput) (*request.Request, *ec2.DisassociateIpamByoasnOutput)
|
||||
|
||||
DisassociateIpamResourceDiscovery(*ec2.DisassociateIpamResourceDiscoveryInput) (*ec2.DisassociateIpamResourceDiscoveryOutput, error)
|
||||
DisassociateIpamResourceDiscoveryWithContext(aws.Context, *ec2.DisassociateIpamResourceDiscoveryInput, ...request.Option) (*ec2.DisassociateIpamResourceDiscoveryOutput, error)
|
||||
DisassociateIpamResourceDiscoveryRequest(*ec2.DisassociateIpamResourceDiscoveryInput) (*request.Request, *ec2.DisassociateIpamResourceDiscoveryOutput)
|
||||
|
@ -2173,6 +2189,10 @@ type EC2API interface {
|
|||
GetIpamDiscoveredAccountsPages(*ec2.GetIpamDiscoveredAccountsInput, func(*ec2.GetIpamDiscoveredAccountsOutput, bool) bool) error
|
||||
GetIpamDiscoveredAccountsPagesWithContext(aws.Context, *ec2.GetIpamDiscoveredAccountsInput, func(*ec2.GetIpamDiscoveredAccountsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetIpamDiscoveredPublicAddresses(*ec2.GetIpamDiscoveredPublicAddressesInput) (*ec2.GetIpamDiscoveredPublicAddressesOutput, error)
|
||||
GetIpamDiscoveredPublicAddressesWithContext(aws.Context, *ec2.GetIpamDiscoveredPublicAddressesInput, ...request.Option) (*ec2.GetIpamDiscoveredPublicAddressesOutput, error)
|
||||
GetIpamDiscoveredPublicAddressesRequest(*ec2.GetIpamDiscoveredPublicAddressesInput) (*request.Request, *ec2.GetIpamDiscoveredPublicAddressesOutput)
|
||||
|
||||
GetIpamDiscoveredResourceCidrs(*ec2.GetIpamDiscoveredResourceCidrsInput) (*ec2.GetIpamDiscoveredResourceCidrsOutput, error)
|
||||
GetIpamDiscoveredResourceCidrsWithContext(aws.Context, *ec2.GetIpamDiscoveredResourceCidrsInput, ...request.Option) (*ec2.GetIpamDiscoveredResourceCidrsOutput, error)
|
||||
GetIpamDiscoveredResourceCidrsRequest(*ec2.GetIpamDiscoveredResourceCidrsInput) (*request.Request, *ec2.GetIpamDiscoveredResourceCidrsOutput)
|
||||
|
@ -2647,6 +2667,10 @@ type EC2API interface {
|
|||
ProvisionByoipCidrWithContext(aws.Context, *ec2.ProvisionByoipCidrInput, ...request.Option) (*ec2.ProvisionByoipCidrOutput, error)
|
||||
ProvisionByoipCidrRequest(*ec2.ProvisionByoipCidrInput) (*request.Request, *ec2.ProvisionByoipCidrOutput)
|
||||
|
||||
ProvisionIpamByoasn(*ec2.ProvisionIpamByoasnInput) (*ec2.ProvisionIpamByoasnOutput, error)
|
||||
ProvisionIpamByoasnWithContext(aws.Context, *ec2.ProvisionIpamByoasnInput, ...request.Option) (*ec2.ProvisionIpamByoasnOutput, error)
|
||||
ProvisionIpamByoasnRequest(*ec2.ProvisionIpamByoasnInput) (*request.Request, *ec2.ProvisionIpamByoasnOutput)
|
||||
|
||||
ProvisionIpamPoolCidr(*ec2.ProvisionIpamPoolCidrInput) (*ec2.ProvisionIpamPoolCidrOutput, error)
|
||||
ProvisionIpamPoolCidrWithContext(aws.Context, *ec2.ProvisionIpamPoolCidrInput, ...request.Option) (*ec2.ProvisionIpamPoolCidrOutput, error)
|
||||
ProvisionIpamPoolCidrRequest(*ec2.ProvisionIpamPoolCidrInput) (*request.Request, *ec2.ProvisionIpamPoolCidrOutput)
|
||||
|
|
|
@ -241,6 +241,12 @@ func (c *EventBridge) CreateApiDestinationRequest(input *CreateApiDestinationInp
|
|||
// Creates an API destination, which is an HTTP invocation endpoint configured
|
||||
// as a target for events.
|
||||
//
|
||||
// API destinations do not support private destinations, such as interface VPC
|
||||
// endpoints.
|
||||
//
|
||||
// For more information, see API destinations (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html)
|
||||
// in the EventBridge User Guide.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
// the error.
|
||||
|
@ -727,13 +733,21 @@ func (c *EventBridge) CreatePartnerEventSourceRequest(input *CreatePartnerEventS
|
|||
//
|
||||
// partner_name/event_namespace/event_name
|
||||
//
|
||||
// partner_name is determined during partner registration and identifies the
|
||||
// partner to Amazon Web Services customers. event_namespace is determined by
|
||||
// the partner and is a way for the partner to categorize their events. event_name
|
||||
// is determined by the partner, and should uniquely identify an event-generating
|
||||
// resource within the partner system. The combination of event_namespace and
|
||||
// event_name should help Amazon Web Services customers decide whether to create
|
||||
// an event bus to receive these events.
|
||||
// - partner_name is determined during partner registration, and identifies
|
||||
// the partner to Amazon Web Services customers.
|
||||
//
|
||||
// - event_namespace is determined by the partner, and is a way for the partner
|
||||
// to categorize their events.
|
||||
//
|
||||
// - event_name is determined by the partner, and should uniquely identify
|
||||
// an event-generating resource within the partner system. The event_name
|
||||
// must be unique across all Amazon Web Services customers. This is because
|
||||
// the event source is a shared resource between the partner and customer
|
||||
// accounts, and each partner event source unique in the partner account.
|
||||
//
|
||||
// The combination of event_namespace and event_name should help Amazon Web
|
||||
// Services customers decide whether to create an event bus to receive these
|
||||
// events.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
|
@ -1893,7 +1907,7 @@ func (c *EventBridge) DescribeEndpointRequest(input *DescribeEndpointInput) (req
|
|||
// Get the information about an existing global endpoint. For more information
|
||||
// about global endpoints, see Making applications Regional-fault tolerant with
|
||||
// global endpoints and event replication (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html)
|
||||
// in the Amazon EventBridge User Guide..
|
||||
// in the Amazon EventBridge User Guide.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
|
@ -2854,7 +2868,7 @@ func (c *EventBridge) ListEndpointsRequest(input *ListEndpointsInput) (req *requ
|
|||
// List the global endpoints associated with this account. For more information
|
||||
// about global endpoints, see Making applications Regional-fault tolerant with
|
||||
// global endpoints and event replication (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html)
|
||||
// in the Amazon EventBridge User Guide..
|
||||
// in the Amazon EventBridge User Guide.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
|
@ -3348,6 +3362,8 @@ func (c *EventBridge) ListRuleNamesByTargetRequest(input *ListRuleNamesByTargetI
|
|||
// Lists the rules for the specified target. You can see which of the rules
|
||||
// in Amazon EventBridge can invoke a specific target in your account.
|
||||
//
|
||||
// The maximum number of results per page for requests is 100.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
// the error.
|
||||
|
@ -3431,6 +3447,8 @@ func (c *EventBridge) ListRulesRequest(input *ListRulesInput) (req *request.Requ
|
|||
// Lists your Amazon EventBridge rules. You can either list all the rules or
|
||||
// you can provide a prefix to match to the rule names.
|
||||
//
|
||||
// The maximum number of results per page for requests is 100.
|
||||
//
|
||||
// ListRules does not list the targets of a rule. To see the targets associated
|
||||
// with a rule, use ListTargetsByRule (https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListTargetsByRule.html).
|
||||
//
|
||||
|
@ -3599,6 +3617,8 @@ func (c *EventBridge) ListTargetsByRuleRequest(input *ListTargetsByRuleInput) (r
|
|||
//
|
||||
// Lists the targets assigned to the specified rule.
|
||||
//
|
||||
// The maximum number of results per page for requests is 100.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
// the error.
|
||||
|
@ -3682,6 +3702,15 @@ func (c *EventBridge) PutEventsRequest(input *PutEventsInput) (req *request.Requ
|
|||
// Sends custom events to Amazon EventBridge so that they can be matched to
|
||||
// rules.
|
||||
//
|
||||
// The maximum size for a PutEvents event entry is 256 KB. Entry size is calculated
|
||||
// including the event and any necessary characters and keys of the JSON representation
|
||||
// of the event. To learn more, see Calculating PutEvents event entry size (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-putevent-size.html)
|
||||
// in the Amazon EventBridge User Guide
|
||||
//
|
||||
// PutEvents accepts the data in JSON format. For the JSON number (integer)
|
||||
// data type, the constraints are: a minimum value of -9,223,372,036,854,775,808
|
||||
// and a maximum value of 9,223,372,036,854,775,807.
|
||||
//
|
||||
// PutEvents will only process nested JSON up to 1100 levels deep.
|
||||
//
|
||||
// This AWS SDK does not support calling multi-region endpoints with SigV4a authentication.
|
||||
|
@ -3765,6 +3794,10 @@ func (c *EventBridge) PutPartnerEventsRequest(input *PutPartnerEventsInput) (req
|
|||
// This is used by SaaS partners to write events to a customer's partner event
|
||||
// bus. Amazon Web Services customers do not use this operation.
|
||||
//
|
||||
// For information on calculating event batch size, see Calculating EventBridge
|
||||
// PutEvents event entry size (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-putevent-size.html)
|
||||
// in the EventBridge User Guide.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
// the error.
|
||||
|
@ -4117,72 +4150,24 @@ func (c *EventBridge) PutTargetsRequest(input *PutTargetsInput) (req *request.Re
|
|||
//
|
||||
// Targets are the resources that are invoked when a rule is triggered.
|
||||
//
|
||||
// The maximum number of entries per request is 10.
|
||||
//
|
||||
// Each rule can have up to five (5) targets associated with it at one time.
|
||||
//
|
||||
// You can configure the following as targets for Events:
|
||||
//
|
||||
// - API destination (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html)
|
||||
//
|
||||
// - API Gateway (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-gateway-target.html)
|
||||
//
|
||||
// - Batch job queue
|
||||
//
|
||||
// - CloudWatch group
|
||||
//
|
||||
// - CodeBuild project
|
||||
//
|
||||
// - CodePipeline
|
||||
//
|
||||
// - EC2 CreateSnapshot API call
|
||||
//
|
||||
// - EC2 Image Builder
|
||||
//
|
||||
// - EC2 RebootInstances API call
|
||||
//
|
||||
// - EC2 StopInstances API call
|
||||
//
|
||||
// - EC2 TerminateInstances API call
|
||||
//
|
||||
// - ECS task
|
||||
//
|
||||
// - Event bus in a different account or Region (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-account.html)
|
||||
//
|
||||
// - Event bus in the same account and Region (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-bus-to-bus.html)
|
||||
//
|
||||
// - Firehose delivery stream
|
||||
//
|
||||
// - Glue workflow
|
||||
//
|
||||
// - Incident Manager response plan (https://docs.aws.amazon.com/incident-manager/latest/userguide/incident-creation.html#incident-tracking-auto-eventbridge)
|
||||
//
|
||||
// - Inspector assessment template
|
||||
//
|
||||
// - Kinesis stream
|
||||
//
|
||||
// - Lambda function
|
||||
//
|
||||
// - Redshift cluster
|
||||
//
|
||||
// - Redshift Serverless workgroup
|
||||
//
|
||||
// - SageMaker Pipeline
|
||||
//
|
||||
// - SNS topic
|
||||
//
|
||||
// - SQS queue
|
||||
//
|
||||
// - Step Functions state machine
|
||||
//
|
||||
// - Systems Manager Automation
|
||||
//
|
||||
// - Systems Manager OpsItem
|
||||
//
|
||||
// - Systems Manager Run Command
|
||||
// For a list of services you can configure as targets for events, see EventBridge
|
||||
// targets (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html)
|
||||
// in the Amazon EventBridge User Guide.
|
||||
//
|
||||
// Creating rules with built-in targets is supported only in the Amazon Web
|
||||
// Services Management Console. The built-in targets are EC2 CreateSnapshot
|
||||
// API call, EC2 RebootInstances API call, EC2 StopInstances API call, and EC2
|
||||
// TerminateInstances API call.
|
||||
// Services Management Console. The built-in targets are:
|
||||
//
|
||||
// - Amazon EBS CreateSnapshot API call
|
||||
//
|
||||
// - Amazon EC2 RebootInstances API call
|
||||
//
|
||||
// - Amazon EC2 StopInstances API call
|
||||
//
|
||||
// - Amazon EC2 TerminateInstances API call
|
||||
//
|
||||
// For some target types, PutTargets provides target-specific parameters. If
|
||||
// the target is a Kinesis data stream, you can optionally specify which shard
|
||||
|
@ -4191,11 +4176,16 @@ func (c *EventBridge) PutTargetsRequest(input *PutTargetsInput) (req *request.Re
|
|||
// field.
|
||||
//
|
||||
// To be able to make API calls against the resources that you own, Amazon EventBridge
|
||||
// needs the appropriate permissions. For Lambda and Amazon SNS resources, EventBridge
|
||||
// relies on resource-based policies. For EC2 instances, Kinesis Data Streams,
|
||||
// Step Functions state machines and API Gateway APIs, EventBridge relies on
|
||||
// IAM roles that you specify in the RoleARN argument in PutTargets. For more
|
||||
// information, see Authentication and Access Control (https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html)
|
||||
// needs the appropriate permissions:
|
||||
//
|
||||
// - For Lambda and Amazon SNS resources, EventBridge relies on resource-based
|
||||
// policies.
|
||||
//
|
||||
// - For EC2 instances, Kinesis Data Streams, Step Functions state machines
|
||||
// and API Gateway APIs, EventBridge relies on IAM roles that you specify
|
||||
// in the RoleARN argument in PutTargets.
|
||||
//
|
||||
// For more information, see Authentication and Access Control (https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html)
|
||||
// in the Amazon EventBridge User Guide.
|
||||
//
|
||||
// If another Amazon Web Services account is in the same region and has granted
|
||||
|
@ -4218,6 +4208,10 @@ func (c *EventBridge) PutTargetsRequest(input *PutTargetsInput) (req *request.Re
|
|||
// Receiving Events Between Amazon Web Services Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html)
|
||||
// in the Amazon EventBridge User Guide.
|
||||
//
|
||||
// If you have an IAM role on a cross-account event bus target, a PutTargets
|
||||
// call without a role on the same target (same Id and Arn) will not remove
|
||||
// the role.
|
||||
//
|
||||
// For more information about enabling cross-account events, see PutPermission
|
||||
// (https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPermission.html).
|
||||
//
|
||||
|
@ -4456,6 +4450,8 @@ func (c *EventBridge) RemoveTargetsRequest(input *RemoveTargetsInput) (req *requ
|
|||
// entry in FailedEntries provides the ID of the failed target and the error
|
||||
// code.
|
||||
//
|
||||
// The maximum number of entries per request is 10.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
// the error.
|
||||
|
@ -5212,7 +5208,7 @@ func (c *EventBridge) UpdateEndpointRequest(input *UpdateEndpointInput) (req *re
|
|||
// Update an existing endpoint. For more information about global endpoints,
|
||||
// see Making applications Regional-fault tolerant with global endpoints and
|
||||
// event replication (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html)
|
||||
// in the Amazon EventBridge User Guide..
|
||||
// in the Amazon EventBridge User Guide.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
|
@ -13669,21 +13665,34 @@ type PutEventsRequestEntry struct {
|
|||
_ struct{} `type:"structure"`
|
||||
|
||||
// A valid JSON object. There is no other schema imposed. The JSON object may
|
||||
// contain fields and nested subobjects.
|
||||
// contain fields and nested sub-objects.
|
||||
//
|
||||
// Detail, DetailType, and Source are required for EventBridge to successfully
|
||||
// send an event to an event bus. If you include event entries in a request
|
||||
// that do not include each of those properties, EventBridge fails that entry.
|
||||
// If you submit a request in which none of the entries have each of these properties,
|
||||
// EventBridge fails the entire request.
|
||||
Detail *string `type:"string"`
|
||||
|
||||
// Free-form string, with a maximum of 128 characters, used to decide what fields
|
||||
// to expect in the event detail.
|
||||
//
|
||||
// Detail, DetailType, and Source are required for EventBridge to successfully
|
||||
// send an event to an event bus. If you include event entries in a request
|
||||
// that do not include each of those properties, EventBridge fails that entry.
|
||||
// If you submit a request in which none of the entries have each of these properties,
|
||||
// EventBridge fails the entire request.
|
||||
DetailType *string `type:"string"`
|
||||
|
||||
// The name or ARN of the event bus to receive the event. Only the rules that
|
||||
// are associated with this event bus are used to match the event. If you omit
|
||||
// this, the default event bus is used.
|
||||
//
|
||||
// If you're using a global endpoint with a custom bus, you must enter the name,
|
||||
// not the ARN, of the event bus in either the primary or secondary Region here
|
||||
// and the corresponding event bus in the other Region will be determined based
|
||||
// on the endpoint referenced by the EndpointId.
|
||||
// If you're using a global endpoint with a custom bus, you can enter either
|
||||
// the name or Amazon Resource Name (ARN) of the event bus in either the primary
|
||||
// or secondary Region here. EventBridge then determines the corresponding event
|
||||
// bus in the other Region based on the endpoint referenced by the EndpointId.
|
||||
// Specifying the event bus ARN is preferred.
|
||||
EventBusName *string `min:"1" type:"string"`
|
||||
|
||||
// Amazon Web Services resources, identified by Amazon Resource Name (ARN),
|
||||
|
@ -13691,6 +13700,12 @@ type PutEventsRequestEntry struct {
|
|||
Resources []*string `type:"list"`
|
||||
|
||||
// The source of the event.
|
||||
//
|
||||
// Detail, DetailType, and Source are required for EventBridge to successfully
|
||||
// send an event to an event bus. If you include event entries in a request
|
||||
// that do not include each of those properties, EventBridge fails that entry.
|
||||
// If you submit a request in which none of the entries have each of these properties,
|
||||
// EventBridge fails the entire request.
|
||||
Source *string `type:"string"`
|
||||
|
||||
// The time stamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt).
|
||||
|
@ -13782,12 +13797,46 @@ func (s *PutEventsRequestEntry) SetTraceHeader(v string) *PutEventsRequestEntry
|
|||
return s
|
||||
}
|
||||
|
||||
// Represents an event that failed to be submitted. For information about the
|
||||
// errors that are common to all actions, see Common Errors (https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html).
|
||||
// Represents the results of an event submitted to an event bus.
|
||||
//
|
||||
// If the submission was successful, the entry has the event ID in it. Otherwise,
|
||||
// you can use the error code and error message to identify the problem with
|
||||
// the entry.
|
||||
//
|
||||
// For information about the errors that are common to all actions, see Common
|
||||
// Errors (https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html).
|
||||
type PutEventsResultEntry struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The error code that indicates why the event submission failed.
|
||||
//
|
||||
// Retryable errors include:
|
||||
//
|
||||
// * InternalFailure (https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html)
|
||||
// The request processing has failed because of an unknown error, exception
|
||||
// or failure.
|
||||
//
|
||||
// * ThrottlingException (https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html)
|
||||
// The request was denied due to request throttling.
|
||||
//
|
||||
// Non-retryable errors include:
|
||||
//
|
||||
// * AccessDeniedException (https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html)
|
||||
// You do not have sufficient access to perform this action.
|
||||
//
|
||||
// * InvalidAccountIdException The account ID provided is not valid.
|
||||
//
|
||||
// * InvalidArgument A specified parameter is not valid.
|
||||
//
|
||||
// * MalformedDetail The JSON provided is not valid.
|
||||
//
|
||||
// * RedactionFailure Redacting the CloudTrail event failed.
|
||||
//
|
||||
// * NotAuthorizedForSourceException You do not have permissions to publish
|
||||
// events with this source onto this event bus.
|
||||
//
|
||||
// * NotAuthorizedForDetailTypeException You do not have permissions to publish
|
||||
// events with this detail type onto this event bus.
|
||||
ErrorCode *string `type:"string"`
|
||||
|
||||
// The error message that explains why the event submission failed.
|
||||
|
@ -13895,8 +13944,13 @@ func (s *PutPartnerEventsInput) SetEntries(v []*PutPartnerEventsRequestEntry) *P
|
|||
type PutPartnerEventsOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The list of events from this operation that were successfully written to
|
||||
// the partner event bus.
|
||||
// The results for each event entry the partner submitted in this request. If
|
||||
// the event was successfully submitted, the entry has the event ID in it. Otherwise,
|
||||
// you can use the error code and error message to identify the problem with
|
||||
// the entry.
|
||||
//
|
||||
// For each record, the index of the response element is the same as the index
|
||||
// in the request array.
|
||||
Entries []*PutPartnerEventsResultEntry `type:"list"`
|
||||
|
||||
// The number of events from this operation that could not be written to the
|
||||
|
@ -13939,11 +13993,23 @@ type PutPartnerEventsRequestEntry struct {
|
|||
_ struct{} `type:"structure"`
|
||||
|
||||
// A valid JSON string. There is no other schema imposed. The JSON string may
|
||||
// contain fields and nested subobjects.
|
||||
// contain fields and nested sub-objects.
|
||||
//
|
||||
// Detail, DetailType, and Source are required for EventBridge to successfully
|
||||
// send an event to an event bus. If you include event entries in a request
|
||||
// that do not include each of those properties, EventBridge fails that entry.
|
||||
// If you submit a request in which none of the entries have each of these properties,
|
||||
// EventBridge fails the entire request.
|
||||
Detail *string `type:"string"`
|
||||
|
||||
// A free-form string, with a maximum of 128 characters, used to decide what
|
||||
// fields to expect in the event detail.
|
||||
//
|
||||
// Detail, DetailType, and Source are required for EventBridge to successfully
|
||||
// send an event to an event bus. If you include event entries in a request
|
||||
// that do not include each of those properties, EventBridge fails that entry.
|
||||
// If you submit a request in which none of the entries have each of these properties,
|
||||
// EventBridge fails the entire request.
|
||||
DetailType *string `type:"string"`
|
||||
|
||||
// Amazon Web Services resources, identified by Amazon Resource Name (ARN),
|
||||
|
@ -13951,6 +14017,12 @@ type PutPartnerEventsRequestEntry struct {
|
|||
Resources []*string `type:"list"`
|
||||
|
||||
// The event source that is generating the entry.
|
||||
//
|
||||
// Detail, DetailType, and Source are required for EventBridge to successfully
|
||||
// send an event to an event bus. If you include event entries in a request
|
||||
// that do not include each of those properties, EventBridge fails that entry.
|
||||
// If you submit a request in which none of the entries have each of these properties,
|
||||
// EventBridge fails the entire request.
|
||||
Source *string `min:"1" type:"string"`
|
||||
|
||||
// The date and time of the event.
|
||||
|
@ -14018,7 +14090,10 @@ func (s *PutPartnerEventsRequestEntry) SetTime(v time.Time) *PutPartnerEventsReq
|
|||
return s
|
||||
}
|
||||
|
||||
// Represents an event that a partner tried to generate, but failed.
|
||||
// The result of an event entry the partner submitted in this request. If the
|
||||
// event was successfully submitted, the entry has the event ID in it. Otherwise,
|
||||
// you can use the error code and error message to identify the problem with
|
||||
// the entry.
|
||||
type PutPartnerEventsResultEntry struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
|
@ -14249,7 +14324,29 @@ type PutRuleInput struct {
|
|||
// The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)".
|
||||
ScheduleExpression *string `type:"string"`
|
||||
|
||||
// Indicates whether the rule is enabled or disabled.
|
||||
// The state of the rule.
|
||||
//
|
||||
// Valid values include:
|
||||
//
|
||||
// * DISABLED: The rule is disabled. EventBridge does not match any events
|
||||
// against the rule.
|
||||
//
|
||||
// * ENABLED: The rule is enabled. EventBridge matches events against the
|
||||
// rule, except for Amazon Web Services management events delivered through
|
||||
// CloudTrail.
|
||||
//
|
||||
// * ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for
|
||||
// all events, including Amazon Web Services management events delivered
|
||||
// through CloudTrail. Management events provide visibility into management
|
||||
// operations that are performed on resources in your Amazon Web Services
|
||||
// account. These are also known as control plane operations. For more information,
|
||||
// see Logging management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events)
|
||||
// in the CloudTrail User Guide, and Filtering management events from Amazon
|
||||
// Web Services services (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail)
|
||||
// in the Amazon EventBridge User Guide. This value is only valid for rules
|
||||
// on the default (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses)
|
||||
// event bus or custom event buses (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html).
|
||||
// It does not apply to partner event buses (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html).
|
||||
State *string `type:"string" enum:"RuleState"`
|
||||
|
||||
// The list of key-value pairs to associate with the rule.
|
||||
|
@ -14567,8 +14664,8 @@ func (s *PutTargetsResultEntry) SetTargetId(v string) *PutTargetsResultEntry {
|
|||
}
|
||||
|
||||
// These are custom parameters to be used when the target is a Amazon Redshift
|
||||
// cluster or Redshift Serverless workgroup to invoke the Amazon Redshift Data
|
||||
// API ExecuteStatement based on EventBridge events.
|
||||
// cluster to invoke the Amazon Redshift Data API ExecuteStatement based on
|
||||
// EventBridge events.
|
||||
type RedshiftDataParameters struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
|
@ -14578,8 +14675,6 @@ type RedshiftDataParameters struct {
|
|||
Database *string `min:"1" type:"string" required:"true"`
|
||||
|
||||
// The database user name. Required when authenticating using temporary credentials.
|
||||
//
|
||||
// Do not provide this parameter when connecting to a Redshift Serverless workgroup.
|
||||
DbUser *string `min:"1" type:"string"`
|
||||
|
||||
// The name or ARN of the secret that enables access to the database. Required
|
||||
|
@ -14593,7 +14688,11 @@ type RedshiftDataParameters struct {
|
|||
// String and GoString methods.
|
||||
Sql *string `min:"1" type:"string" sensitive:"true"`
|
||||
|
||||
// A list of SQLs.
|
||||
// One or more SQL statements to run. The SQL statements are run as a single
|
||||
// transaction. They run serially in the order of the array. Subsequent SQL
|
||||
// statements don't start until the previous statement in the array completes.
|
||||
// If any SQL statement fails, then because they are run as one transaction,
|
||||
// all work is rolled back.
|
||||
//
|
||||
// Sqls is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by RedshiftDataParameters's
|
||||
|
@ -15446,6 +15545,28 @@ type Rule struct {
|
|||
ScheduleExpression *string `type:"string"`
|
||||
|
||||
// The state of the rule.
|
||||
//
|
||||
// Valid values include:
|
||||
//
|
||||
// * DISABLED: The rule is disabled. EventBridge does not match any events
|
||||
// against the rule.
|
||||
//
|
||||
// * ENABLED: The rule is enabled. EventBridge matches events against the
|
||||
// rule, except for Amazon Web Services management events delivered through
|
||||
// CloudTrail.
|
||||
//
|
||||
// * ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for
|
||||
// all events, including Amazon Web Services management events delivered
|
||||
// through CloudTrail. Management events provide visibility into management
|
||||
// operations that are performed on resources in your Amazon Web Services
|
||||
// account. These are also known as control plane operations. For more information,
|
||||
// see Logging management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events)
|
||||
// in the CloudTrail User Guide, and Filtering management events from Amazon
|
||||
// Web Services services (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail)
|
||||
// in the Amazon EventBridge User Guide. This value is only valid for rules
|
||||
// on the default (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses)
|
||||
// event bus or custom event buses (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html).
|
||||
// It does not apply to partner event buses (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html).
|
||||
State *string `type:"string" enum:"RuleState"`
|
||||
}
|
||||
|
||||
|
@ -18052,6 +18173,9 @@ const (
|
|||
|
||||
// RuleStateDisabled is a RuleState enum value
|
||||
RuleStateDisabled = "DISABLED"
|
||||
|
||||
// RuleStateEnabledWithAllCloudtrailManagementEvents is a RuleState enum value
|
||||
RuleStateEnabledWithAllCloudtrailManagementEvents = "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS"
|
||||
)
|
||||
|
||||
// RuleState_Values returns all elements of the RuleState enum
|
||||
|
@ -18059,5 +18183,6 @@ func RuleState_Values() []string {
|
|||
return []string{
|
||||
RuleStateEnabled,
|
||||
RuleStateDisabled,
|
||||
RuleStateEnabledWithAllCloudtrailManagementEvents,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4690,6 +4690,10 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp
|
|||
// as if the object was deleted and includes x-amz-delete-marker: true in
|
||||
// the response.
|
||||
//
|
||||
// - If the specified version is a delete marker, the response returns a
|
||||
// 405 (Method Not Allowed) error and the Last-Modified: timestamp response
|
||||
// header.
|
||||
//
|
||||
// For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html).
|
||||
//
|
||||
// # Overriding Response Header Values
|
||||
|
@ -5710,9 +5714,10 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou
|
|||
//
|
||||
// A HEAD request has the same options as a GET action on an object. The response
|
||||
// is identical to the GET response except that there is no response body. Because
|
||||
// of this, if the HEAD request generates an error, it returns a generic 400
|
||||
// Bad Request, 403 Forbidden or 404 Not Found code. It is not possible to retrieve
|
||||
// the exact exception beyond these error codes.
|
||||
// of this, if the HEAD request generates an error, it returns a generic code,
|
||||
// such as 400 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed,
|
||||
// 412 Precondition Failed, or 304 Not Modified. It's not possible to retrieve
|
||||
// the exact exception of these error codes.
|
||||
//
|
||||
// If you encrypt an object by using server-side encryption with customer-provided
|
||||
// encryption keys (SSE-C) when you store the object in Amazon S3, then when
|
||||
|
@ -5768,6 +5773,16 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou
|
|||
// - If you don’t have the s3:ListBucket permission, Amazon S3 returns
|
||||
// an HTTP status code 403 error.
|
||||
//
|
||||
// Versioning
|
||||
//
|
||||
// - If the current version of the object is a delete marker, Amazon S3 behaves
|
||||
// as if the object was deleted and includes x-amz-delete-marker: true in
|
||||
// the response.
|
||||
//
|
||||
// - If the specified version is a delete marker, the response returns a
|
||||
// 405 (Method Not Allowed) error and the Last-Modified: timestamp response
|
||||
// header.
|
||||
//
|
||||
// The following actions are related to HeadObject:
|
||||
//
|
||||
// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
|
@ -6502,8 +6517,6 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req
|
|||
//
|
||||
// To use this operation, you must have READ access to the bucket.
|
||||
//
|
||||
// This action is not supported by Amazon S3 on Outposts.
|
||||
//
|
||||
// The following operations are related to ListObjectVersions:
|
||||
//
|
||||
// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
|
||||
|
@ -10246,7 +10259,7 @@ func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req
|
|||
// or an object, it checks the PublicAccessBlock configuration for both the
|
||||
// bucket (or the bucket that contains the object) and the bucket owner's account.
|
||||
// If the PublicAccessBlock configurations are different between the bucket
|
||||
// and the account, S3 uses the most restrictive combination of the bucket-level
|
||||
// and the account, Amazon S3 uses the most restrictive combination of the bucket-level
|
||||
// and account-level settings.
|
||||
//
|
||||
// For more information about when Amazon S3 considers a bucket or an object
|
||||
|
@ -12834,8 +12847,9 @@ type CompleteMultipartUploadInput struct {
|
|||
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
|
||||
|
||||
// The server-side encryption (SSE) algorithm used to encrypt the object. This
|
||||
// parameter is needed only when the object was created using a checksum algorithm.
|
||||
// For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
|
||||
// parameter is required only when the object was created using a checksum algorithm
|
||||
// or if your bucket policy requires the use of SSE-C. For more information,
|
||||
// see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key)
|
||||
// in the Amazon S3 User Guide.
|
||||
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
|
||||
|
||||
|
@ -13672,7 +13686,8 @@ type CopyObjectInput struct {
|
|||
|
||||
// Specifies the Amazon Web Services KMS Encryption Context to use for object
|
||||
// encryption. The value of this header is a base64-encoded UTF-8 string holding
|
||||
// JSON with the encryption context key-value pairs.
|
||||
// JSON with the encryption context key-value pairs. This value must be explicitly
|
||||
// added to specify encryption context for CopyObject requests.
|
||||
//
|
||||
// SSEKMSEncryptionContext is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CopyObjectInput's
|
||||
|
@ -16930,7 +16945,7 @@ type DeleteMarkerEntry struct {
|
|||
// The object key.
|
||||
Key *string `min:"1" type:"string"`
|
||||
|
||||
// Date and time the object was last modified.
|
||||
// Date and time when the object was last modified.
|
||||
LastModified *time.Time `type:"timestamp"`
|
||||
|
||||
// The account that created the delete marker.>
|
||||
|
@ -22841,7 +22856,7 @@ type GetObjectOutput struct {
|
|||
// The date and time at which the object is no longer cacheable.
|
||||
Expires *string `location:"header" locationName:"Expires" type:"string"`
|
||||
|
||||
// Creation date of the object.
|
||||
// Date and time when the object was last modified.
|
||||
LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
|
||||
|
||||
// A map of metadata to store with the object in S3.
|
||||
|
@ -24514,7 +24529,7 @@ type HeadObjectOutput struct {
|
|||
// The date and time at which the object is no longer cacheable.
|
||||
Expires *string `location:"header" locationName:"Expires" type:"string"`
|
||||
|
||||
// Creation date of the object.
|
||||
// Date and time when the object was last modified.
|
||||
LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
|
||||
|
||||
// A map of metadata to store with the object in S3.
|
||||
|
@ -29102,6 +29117,9 @@ type LoggingEnabled struct {
|
|||
// in the Amazon S3 User Guide.
|
||||
TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
|
||||
|
||||
// Amazon S3 key format for log objects.
|
||||
TargetObjectKeyFormat *TargetObjectKeyFormat `type:"structure"`
|
||||
|
||||
// A prefix for all log object keys. If you store log files from multiple Amazon
|
||||
// S3 buckets in a single bucket, you can use a prefix to distinguish which
|
||||
// log files came from which bucket.
|
||||
|
@ -29166,6 +29184,12 @@ func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
|
|||
return s
|
||||
}
|
||||
|
||||
// SetTargetObjectKeyFormat sets the TargetObjectKeyFormat field's value.
|
||||
func (s *LoggingEnabled) SetTargetObjectKeyFormat(v *TargetObjectKeyFormat) *LoggingEnabled {
|
||||
s.TargetObjectKeyFormat = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetTargetPrefix sets the TargetPrefix field's value.
|
||||
func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
|
||||
s.TargetPrefix = &v
|
||||
|
@ -29590,9 +29614,10 @@ func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
|
|||
type NoncurrentVersionExpiration struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Specifies how many noncurrent versions Amazon S3 will retain. If there are
|
||||
// this many more recent noncurrent versions, Amazon S3 will take the associated
|
||||
// action. For more information about noncurrent versions, see Lifecycle configuration
|
||||
// Specifies how many newer noncurrent versions must exist before Amazon S3
|
||||
// can perform the associated action on a given version. If there are this many
|
||||
// more recent noncurrent versions, Amazon S3 will take the associated action.
|
||||
// For more information about noncurrent versions, see Lifecycle configuration
|
||||
// elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
NewerNoncurrentVersions *int64 `type:"integer"`
|
||||
|
@ -29645,9 +29670,10 @@ func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVers
|
|||
type NoncurrentVersionTransition struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Specifies how many noncurrent versions Amazon S3 will retain. If there are
|
||||
// this many more recent noncurrent versions, Amazon S3 will take the associated
|
||||
// action. For more information about noncurrent versions, see Lifecycle configuration
|
||||
// Specifies how many newer noncurrent versions must exist before Amazon S3
|
||||
// can perform the associated action on a given version. If there are this many
|
||||
// more recent noncurrent versions, Amazon S3 will take the associated action.
|
||||
// For more information about noncurrent versions, see Lifecycle configuration
|
||||
// elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
NewerNoncurrentVersions *int64 `type:"integer"`
|
||||
|
@ -30339,7 +30365,7 @@ type ObjectVersion struct {
|
|||
// The object key.
|
||||
Key *string `min:"1" type:"string"`
|
||||
|
||||
// Date and time the object was last modified.
|
||||
// Date and time when the object was last modified.
|
||||
LastModified *time.Time `type:"timestamp"`
|
||||
|
||||
// Specifies the owner of the object.
|
||||
|
@ -30840,6 +30866,44 @@ func (s *Part) SetSize(v int64) *Part {
|
|||
return s
|
||||
}
|
||||
|
||||
// Amazon S3 keys for log objects are partitioned in the following format:
|
||||
//
|
||||
// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]
|
||||
//
|
||||
// PartitionedPrefix defaults to EventTime delivery when server access logs
|
||||
// are delivered.
|
||||
type PartitionedPrefix struct {
|
||||
_ struct{} `locationName:"PartitionedPrefix" type:"structure"`
|
||||
|
||||
// Specifies the partition date source for the partitioned prefix. PartitionDateSource
|
||||
// can be EventTime or DeliveryTime.
|
||||
PartitionDateSource *string `type:"string" enum:"PartitionDateSource"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s PartitionedPrefix) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s PartitionedPrefix) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// SetPartitionDateSource sets the PartitionDateSource field's value.
|
||||
func (s *PartitionedPrefix) SetPartitionDateSource(v string) *PartitionedPrefix {
|
||||
s.PartitionDateSource = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// The container element for a bucket's policy status.
|
||||
type PolicyStatus struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
@ -34771,7 +34835,8 @@ type PutObjectInput struct {
|
|||
// encryption. The value of this header is a base64-encoded UTF-8 string holding
|
||||
// JSON with the encryption context key-value pairs. This value is stored as
|
||||
// object metadata and automatically gets passed on to Amazon Web Services KMS
|
||||
// for future GetObject or CopyObject operations on this object.
|
||||
// for future GetObject or CopyObject operations on this object. This value
|
||||
// must be explicitly added during CopyObject operations.
|
||||
//
|
||||
// SSEKMSEncryptionContext is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by PutObjectInput's
|
||||
|
@ -38828,6 +38893,32 @@ func (s *ServerSideEncryptionRule) SetBucketKeyEnabled(v bool) *ServerSideEncryp
|
|||
return s
|
||||
}
|
||||
|
||||
// To use simple format for S3 keys for log objects, set SimplePrefix to an
|
||||
// empty object.
|
||||
//
|
||||
// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]
|
||||
type SimplePrefix struct {
|
||||
_ struct{} `locationName:"SimplePrefix" type:"structure"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s SimplePrefix) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s SimplePrefix) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// A container that describes additional filters for identifying the source
|
||||
// objects that you want to replicate. You can choose to enable or disable the
|
||||
// replication of these objects. Currently, Amazon S3 supports only the filter
|
||||
|
@ -39364,6 +39455,49 @@ func (s *TargetGrant) SetPermission(v string) *TargetGrant {
|
|||
return s
|
||||
}
|
||||
|
||||
// Amazon S3 key format for log objects. Only one format, PartitionedPrefix
|
||||
// or SimplePrefix, is allowed.
|
||||
type TargetObjectKeyFormat struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Partitioned S3 key for log objects.
|
||||
PartitionedPrefix *PartitionedPrefix `locationName:"PartitionedPrefix" type:"structure"`
|
||||
|
||||
// To use the simple format for S3 keys for log objects. To specify SimplePrefix
|
||||
// format, set SimplePrefix to {}.
|
||||
SimplePrefix *SimplePrefix `locationName:"SimplePrefix" type:"structure"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s TargetObjectKeyFormat) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s TargetObjectKeyFormat) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// SetPartitionedPrefix sets the PartitionedPrefix field's value.
|
||||
func (s *TargetObjectKeyFormat) SetPartitionedPrefix(v *PartitionedPrefix) *TargetObjectKeyFormat {
|
||||
s.PartitionedPrefix = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetSimplePrefix sets the SimplePrefix field's value.
|
||||
func (s *TargetObjectKeyFormat) SetSimplePrefix(v *SimplePrefix) *TargetObjectKeyFormat {
|
||||
s.SimplePrefix = v
|
||||
return s
|
||||
}
|
||||
|
||||
// The S3 Intelligent-Tiering storage class is designed to optimize storage
|
||||
// costs by automatically moving data to the most cost-effective storage access
|
||||
// tier, without additional operational overhead.
|
||||
|
@ -42259,6 +42393,22 @@ func OwnerOverride_Values() []string {
|
|||
}
|
||||
}
|
||||
|
||||
const (
|
||||
// PartitionDateSourceEventTime is a PartitionDateSource enum value
|
||||
PartitionDateSourceEventTime = "EventTime"
|
||||
|
||||
// PartitionDateSourceDeliveryTime is a PartitionDateSource enum value
|
||||
PartitionDateSourceDeliveryTime = "DeliveryTime"
|
||||
)
|
||||
|
||||
// PartitionDateSource_Values returns all elements of the PartitionDateSource enum
|
||||
func PartitionDateSource_Values() []string {
|
||||
return []string{
|
||||
PartitionDateSourceEventTime,
|
||||
PartitionDateSourceDeliveryTime,
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
// PayerRequester is a Payer enum value
|
||||
PayerRequester = "Requester"
|
||||
|
|
|
@ -56,9 +56,10 @@ func (c *SSOOIDC) CreateTokenRequest(input *CreateTokenInput) (req *request.Requ
|
|||
|
||||
// CreateToken API operation for AWS SSO OIDC.
|
||||
//
|
||||
// Creates and returns an access token for the authorized client. The access
|
||||
// token issued will be used to fetch short-term credentials for the assigned
|
||||
// roles in the AWS account.
|
||||
// Creates and returns access and refresh tokens for clients that are authenticated
|
||||
// using client secrets. The access token can be used to fetch short-term credentials
|
||||
// for the assigned AWS accounts or to access application APIs using bearer
|
||||
// authentication.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
|
@ -133,6 +134,131 @@ func (c *SSOOIDC) CreateTokenWithContext(ctx aws.Context, input *CreateTokenInpu
|
|||
return out, req.Send()
|
||||
}
|
||||
|
||||
const opCreateTokenWithIAM = "CreateTokenWithIAM"
|
||||
|
||||
// CreateTokenWithIAMRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the CreateTokenWithIAM operation. The "output" return
|
||||
// value will be populated with the request's response once the request completes
|
||||
// successfully.
|
||||
//
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// See CreateTokenWithIAM for more information on using the CreateTokenWithIAM
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// // Example sending a request using the CreateTokenWithIAMRequest method.
|
||||
// req, resp := client.CreateTokenWithIAMRequest(params)
|
||||
//
|
||||
// err := req.Send()
|
||||
// if err == nil { // resp is now filled
|
||||
// fmt.Println(resp)
|
||||
// }
|
||||
//
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM
|
||||
func (c *SSOOIDC) CreateTokenWithIAMRequest(input *CreateTokenWithIAMInput) (req *request.Request, output *CreateTokenWithIAMOutput) {
|
||||
op := &request.Operation{
|
||||
Name: opCreateTokenWithIAM,
|
||||
HTTPMethod: "POST",
|
||||
HTTPPath: "/token?aws_iam=t",
|
||||
}
|
||||
|
||||
if input == nil {
|
||||
input = &CreateTokenWithIAMInput{}
|
||||
}
|
||||
|
||||
output = &CreateTokenWithIAMOutput{}
|
||||
req = c.newRequest(op, input, output)
|
||||
return
|
||||
}
|
||||
|
||||
// CreateTokenWithIAM API operation for AWS SSO OIDC.
|
||||
//
|
||||
// Creates and returns access and refresh tokens for clients and applications
|
||||
// that are authenticated using IAM entities. The access token can be used to
|
||||
// fetch short-term credentials for the assigned AWS accounts or to access application
|
||||
// APIs using bearer authentication.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
// the error.
|
||||
//
|
||||
// See the AWS API reference guide for AWS SSO OIDC's
|
||||
// API operation CreateTokenWithIAM for usage and error information.
|
||||
//
|
||||
// Returned Error Types:
|
||||
//
|
||||
// - InvalidRequestException
|
||||
// Indicates that something is wrong with the input to the request. For example,
|
||||
// a required parameter might be missing or out of range.
|
||||
//
|
||||
// - InvalidClientException
|
||||
// Indicates that the clientId or clientSecret in the request is invalid. For
|
||||
// example, this can occur when a client sends an incorrect clientId or an expired
|
||||
// clientSecret.
|
||||
//
|
||||
// - InvalidGrantException
|
||||
// Indicates that a request contains an invalid grant. This can occur if a client
|
||||
// makes a CreateToken request with an invalid grant type.
|
||||
//
|
||||
// - UnauthorizedClientException
|
||||
// Indicates that the client is not currently authorized to make the request.
|
||||
// This can happen when a clientId is not issued for a public client.
|
||||
//
|
||||
// - UnsupportedGrantTypeException
|
||||
// Indicates that the grant type in the request is not supported by the service.
|
||||
//
|
||||
// - InvalidScopeException
|
||||
// Indicates that the scope provided in the request is invalid.
|
||||
//
|
||||
// - AuthorizationPendingException
|
||||
// Indicates that a request to authorize a client with an access user session
|
||||
// token is pending.
|
||||
//
|
||||
// - SlowDownException
|
||||
// Indicates that the client is making the request too frequently and is more
|
||||
// than the service can handle.
|
||||
//
|
||||
// - AccessDeniedException
|
||||
// You do not have sufficient access to perform this action.
|
||||
//
|
||||
// - ExpiredTokenException
|
||||
// Indicates that the token issued by the service is expired and is no longer
|
||||
// valid.
|
||||
//
|
||||
// - InternalServerException
|
||||
// Indicates that an error from the service occurred while trying to process
|
||||
// a request.
|
||||
//
|
||||
// - InvalidRequestRegionException
|
||||
// Indicates that a token provided as input to the request was issued by and
|
||||
// is only usable by calling IAM Identity Center endpoints in another region.
|
||||
//
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM
|
||||
func (c *SSOOIDC) CreateTokenWithIAM(input *CreateTokenWithIAMInput) (*CreateTokenWithIAMOutput, error) {
|
||||
req, out := c.CreateTokenWithIAMRequest(input)
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
// CreateTokenWithIAMWithContext is the same as CreateTokenWithIAM with the addition of
|
||||
// the ability to pass a context and additional request options.
|
||||
//
|
||||
// See CreateTokenWithIAM for details on how to use this API operation.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *SSOOIDC) CreateTokenWithIAMWithContext(ctx aws.Context, input *CreateTokenWithIAMInput, opts ...request.Option) (*CreateTokenWithIAMOutput, error) {
|
||||
req, out := c.CreateTokenWithIAMRequest(input)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
const opRegisterClient = "RegisterClient"
|
||||
|
||||
// RegisterClientRequest generates a "aws/request.Request" representing the
|
||||
|
@ -331,8 +457,11 @@ type AccessDeniedException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be access_denied.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -400,8 +529,11 @@ type AuthorizationPendingException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be authorization_pending.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -466,8 +598,8 @@ func (s *AuthorizationPendingException) RequestID() string {
|
|||
type CreateTokenInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The unique identifier string for each client. This value should come from
|
||||
// the persisted result of the RegisterClient API.
|
||||
// The unique identifier string for the client or application. This value comes
|
||||
// from the result of the RegisterClient API.
|
||||
//
|
||||
// ClientId is a required field
|
||||
ClientId *string `locationName:"clientId" type:"string" required:"true"`
|
||||
|
@ -475,23 +607,30 @@ type CreateTokenInput struct {
|
|||
// A secret string generated for the client. This value should come from the
|
||||
// persisted result of the RegisterClient API.
|
||||
//
|
||||
// ClientSecret is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenInput's
|
||||
// String and GoString methods.
|
||||
//
|
||||
// ClientSecret is a required field
|
||||
ClientSecret *string `locationName:"clientSecret" type:"string" required:"true"`
|
||||
ClientSecret *string `locationName:"clientSecret" type:"string" required:"true" sensitive:"true"`
|
||||
|
||||
// The authorization code received from the authorization service. This parameter
|
||||
// is required to perform an authorization grant request to get access to a
|
||||
// token.
|
||||
// Used only when calling this API for the Authorization Code grant type. The
|
||||
// short-term code is used to identify this authorization request. This grant
|
||||
// type is currently unsupported for the CreateToken API.
|
||||
Code *string `locationName:"code" type:"string"`
|
||||
|
||||
// Used only when calling this API for the device code grant type. This short-term
|
||||
// code is used to identify this authentication attempt. This should come from
|
||||
// an in-memory reference to the result of the StartDeviceAuthorization API.
|
||||
// Used only when calling this API for the Device Code grant type. This short-term
|
||||
// code is used to identify this authorization request. This comes from the
|
||||
// result of the StartDeviceAuthorization API.
|
||||
DeviceCode *string `locationName:"deviceCode" type:"string"`
|
||||
|
||||
// Supports grant types for the authorization code, refresh token, and device
|
||||
// code request. For device code requests, specify the following value:
|
||||
// Supports the following OAuth grant types: Device Code and Refresh Token.
|
||||
// Specify either of the following values, depending on the grant type that
|
||||
// you want:
|
||||
//
|
||||
// urn:ietf:params:oauth:grant-type:device_code
|
||||
// * Device Code - urn:ietf:params:oauth:grant-type:device_code
|
||||
//
|
||||
// * Refresh Token - refresh_token
|
||||
//
|
||||
// For information about how to obtain the device code, see the StartDeviceAuthorization
|
||||
// topic.
|
||||
|
@ -499,21 +638,28 @@ type CreateTokenInput struct {
|
|||
// GrantType is a required field
|
||||
GrantType *string `locationName:"grantType" type:"string" required:"true"`
|
||||
|
||||
// The location of the application that will receive the authorization code.
|
||||
// Users authorize the service to send the request to this location.
|
||||
// Used only when calling this API for the Authorization Code grant type. This
|
||||
// value specifies the location of the client or application that has registered
|
||||
// to receive the authorization code.
|
||||
RedirectUri *string `locationName:"redirectUri" type:"string"`
|
||||
|
||||
// Currently, refreshToken is not yet implemented and is not supported. For
|
||||
// more information about the features and limitations of the current IAM Identity
|
||||
// Center OIDC implementation, see Considerations for Using this Guide in the
|
||||
// IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
// Used only when calling this API for the Refresh Token grant type. This token
|
||||
// is used to refresh short-term tokens, such as the access token, that might
|
||||
// expire.
|
||||
//
|
||||
// The token used to obtain an access token in the event that the access token
|
||||
// is invalid or expired.
|
||||
RefreshToken *string `locationName:"refreshToken" type:"string"`
|
||||
// For more information about the features and limitations of the current IAM
|
||||
// Identity Center OIDC implementation, see Considerations for Using this Guide
|
||||
// in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
//
|
||||
// RefreshToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenInput's
|
||||
// String and GoString methods.
|
||||
RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"`
|
||||
|
||||
// The list of scopes that is defined by the client. Upon authorization, this
|
||||
// list is used to restrict permissions when granting an access token.
|
||||
// The list of scopes for which authorization is requested. The access token
|
||||
// that is issued is limited to the scopes that are granted. If this value is
|
||||
// not specified, IAM Identity Center authorizes all scopes that are configured
|
||||
// for the client during the call to RegisterClient.
|
||||
Scope []*string `locationName:"scope" type:"list"`
|
||||
}
|
||||
|
||||
|
@ -605,31 +751,43 @@ func (s *CreateTokenInput) SetScope(v []*string) *CreateTokenInput {
|
|||
type CreateTokenOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// An opaque token to access IAM Identity Center resources assigned to a user.
|
||||
AccessToken *string `locationName:"accessToken" type:"string"`
|
||||
// A bearer token to access AWS accounts and applications assigned to a user.
|
||||
//
|
||||
// AccessToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenOutput's
|
||||
// String and GoString methods.
|
||||
AccessToken *string `locationName:"accessToken" type:"string" sensitive:"true"`
|
||||
|
||||
// Indicates the time in seconds when an access token will expire.
|
||||
ExpiresIn *int64 `locationName:"expiresIn" type:"integer"`
|
||||
|
||||
// Currently, idToken is not yet implemented and is not supported. For more
|
||||
// information about the features and limitations of the current IAM Identity
|
||||
// Center OIDC implementation, see Considerations for Using this Guide in the
|
||||
// IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
// The idToken is not implemented or supported. For more information about the
|
||||
// features and limitations of the current IAM Identity Center OIDC implementation,
|
||||
// see Considerations for Using this Guide in the IAM Identity Center OIDC API
|
||||
// Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
//
|
||||
// The identifier of the user that associated with the access token, if present.
|
||||
IdToken *string `locationName:"idToken" type:"string"`
|
||||
// A JSON Web Token (JWT) that identifies who is associated with the issued
|
||||
// access token.
|
||||
//
|
||||
// IdToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenOutput's
|
||||
// String and GoString methods.
|
||||
IdToken *string `locationName:"idToken" type:"string" sensitive:"true"`
|
||||
|
||||
// Currently, refreshToken is not yet implemented and is not supported. For
|
||||
// more information about the features and limitations of the current IAM Identity
|
||||
// Center OIDC implementation, see Considerations for Using this Guide in the
|
||||
// IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
//
|
||||
// A token that, if present, can be used to refresh a previously issued access
|
||||
// token that might have expired.
|
||||
RefreshToken *string `locationName:"refreshToken" type:"string"`
|
||||
//
|
||||
// For more information about the features and limitations of the current IAM
|
||||
// Identity Center OIDC implementation, see Considerations for Using this Guide
|
||||
// in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
//
|
||||
// RefreshToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenOutput's
|
||||
// String and GoString methods.
|
||||
RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"`
|
||||
|
||||
// Used to notify the client that the returned token is an access token. The
|
||||
// supported type is BearerToken.
|
||||
// supported token type is Bearer.
|
||||
TokenType *string `locationName:"tokenType" type:"string"`
|
||||
}
|
||||
|
||||
|
@ -681,14 +839,312 @@ func (s *CreateTokenOutput) SetTokenType(v string) *CreateTokenOutput {
|
|||
return s
|
||||
}
|
||||
|
||||
type CreateTokenWithIAMInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Used only when calling this API for the JWT Bearer grant type. This value
|
||||
// specifies the JSON Web Token (JWT) issued by a trusted token issuer. To authorize
|
||||
// a trusted token issuer, configure the JWT Bearer GrantOptions for the application.
|
||||
//
|
||||
// Assertion is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMInput's
|
||||
// String and GoString methods.
|
||||
Assertion *string `locationName:"assertion" type:"string" sensitive:"true"`
|
||||
|
||||
// The unique identifier string for the client or application. This value is
|
||||
// an application ARN that has OAuth grants configured.
|
||||
//
|
||||
// ClientId is a required field
|
||||
ClientId *string `locationName:"clientId" type:"string" required:"true"`
|
||||
|
||||
// Used only when calling this API for the Authorization Code grant type. This
|
||||
// short-term code is used to identify this authorization request. The code
|
||||
// is obtained through a redirect from IAM Identity Center to a redirect URI
|
||||
// persisted in the Authorization Code GrantOptions for the application.
|
||||
Code *string `locationName:"code" type:"string"`
|
||||
|
||||
// Supports the following OAuth grant types: Authorization Code, Refresh Token,
|
||||
// JWT Bearer, and Token Exchange. Specify one of the following values, depending
|
||||
// on the grant type that you want:
|
||||
//
|
||||
// * Authorization Code - authorization_code
|
||||
//
|
||||
// * Refresh Token - refresh_token
|
||||
//
|
||||
// * JWT Bearer - urn:ietf:params:oauth:grant-type:jwt-bearer
|
||||
//
|
||||
// * Token Exchange - urn:ietf:params:oauth:grant-type:token-exchange
|
||||
//
|
||||
// GrantType is a required field
|
||||
GrantType *string `locationName:"grantType" type:"string" required:"true"`
|
||||
|
||||
// Used only when calling this API for the Authorization Code grant type. This
|
||||
// value specifies the location of the client or application that has registered
|
||||
// to receive the authorization code.
|
||||
RedirectUri *string `locationName:"redirectUri" type:"string"`
|
||||
|
||||
// Used only when calling this API for the Refresh Token grant type. This token
|
||||
// is used to refresh short-term tokens, such as the access token, that might
|
||||
// expire.
|
||||
//
|
||||
// For more information about the features and limitations of the current IAM
|
||||
// Identity Center OIDC implementation, see Considerations for Using this Guide
|
||||
// in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
//
|
||||
// RefreshToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMInput's
|
||||
// String and GoString methods.
|
||||
RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"`
|
||||
|
||||
// Used only when calling this API for the Token Exchange grant type. This value
|
||||
// specifies the type of token that the requester can receive. The following
|
||||
// values are supported:
|
||||
//
|
||||
// * Access Token - urn:ietf:params:oauth:token-type:access_token
|
||||
//
|
||||
// * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token
|
||||
RequestedTokenType *string `locationName:"requestedTokenType" type:"string"`
|
||||
|
||||
// The list of scopes for which authorization is requested. The access token
|
||||
// that is issued is limited to the scopes that are granted. If the value is
|
||||
// not specified, IAM Identity Center authorizes all scopes configured for the
|
||||
// application, including the following default scopes: openid, aws, sts:identity_context.
|
||||
Scope []*string `locationName:"scope" type:"list"`
|
||||
|
||||
// Used only when calling this API for the Token Exchange grant type. This value
|
||||
// specifies the subject of the exchange. The value of the subject token must
|
||||
// be an access token issued by IAM Identity Center to a different client or
|
||||
// application. The access token must have authorized scopes that indicate the
|
||||
// requested application as a target audience.
|
||||
//
|
||||
// SubjectToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMInput's
|
||||
// String and GoString methods.
|
||||
SubjectToken *string `locationName:"subjectToken" type:"string" sensitive:"true"`
|
||||
|
||||
// Used only when calling this API for the Token Exchange grant type. This value
|
||||
// specifies the type of token that is passed as the subject of the exchange.
|
||||
// The following value is supported:
|
||||
//
|
||||
// * Access Token - urn:ietf:params:oauth:token-type:access_token
|
||||
SubjectTokenType *string `locationName:"subjectTokenType" type:"string"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s CreateTokenWithIAMInput) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s CreateTokenWithIAMInput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// Validate inspects the fields of the type to determine if they are valid.
|
||||
func (s *CreateTokenWithIAMInput) Validate() error {
|
||||
invalidParams := request.ErrInvalidParams{Context: "CreateTokenWithIAMInput"}
|
||||
if s.ClientId == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("ClientId"))
|
||||
}
|
||||
if s.GrantType == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("GrantType"))
|
||||
}
|
||||
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetAssertion sets the Assertion field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetAssertion(v string) *CreateTokenWithIAMInput {
|
||||
s.Assertion = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetClientId sets the ClientId field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetClientId(v string) *CreateTokenWithIAMInput {
|
||||
s.ClientId = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetCode sets the Code field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetCode(v string) *CreateTokenWithIAMInput {
|
||||
s.Code = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetGrantType sets the GrantType field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetGrantType(v string) *CreateTokenWithIAMInput {
|
||||
s.GrantType = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetRedirectUri sets the RedirectUri field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetRedirectUri(v string) *CreateTokenWithIAMInput {
|
||||
s.RedirectUri = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetRefreshToken sets the RefreshToken field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetRefreshToken(v string) *CreateTokenWithIAMInput {
|
||||
s.RefreshToken = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetRequestedTokenType sets the RequestedTokenType field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetRequestedTokenType(v string) *CreateTokenWithIAMInput {
|
||||
s.RequestedTokenType = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetScope sets the Scope field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetScope(v []*string) *CreateTokenWithIAMInput {
|
||||
s.Scope = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetSubjectToken sets the SubjectToken field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetSubjectToken(v string) *CreateTokenWithIAMInput {
|
||||
s.SubjectToken = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetSubjectTokenType sets the SubjectTokenType field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetSubjectTokenType(v string) *CreateTokenWithIAMInput {
|
||||
s.SubjectTokenType = &v
|
||||
return s
|
||||
}
|
||||
|
||||
type CreateTokenWithIAMOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// A bearer token to access AWS accounts and applications assigned to a user.
|
||||
//
|
||||
// AccessToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMOutput's
|
||||
// String and GoString methods.
|
||||
AccessToken *string `locationName:"accessToken" type:"string" sensitive:"true"`
|
||||
|
||||
// Indicates the time in seconds when an access token will expire.
|
||||
ExpiresIn *int64 `locationName:"expiresIn" type:"integer"`
|
||||
|
||||
// A JSON Web Token (JWT) that identifies the user associated with the issued
|
||||
// access token.
|
||||
//
|
||||
// IdToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMOutput's
|
||||
// String and GoString methods.
|
||||
IdToken *string `locationName:"idToken" type:"string" sensitive:"true"`
|
||||
|
||||
// Indicates the type of tokens that are issued by IAM Identity Center. The
|
||||
// following values are supported:
|
||||
//
|
||||
// * Access Token - urn:ietf:params:oauth:token-type:access_token
|
||||
//
|
||||
// * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token
|
||||
IssuedTokenType *string `locationName:"issuedTokenType" type:"string"`
|
||||
|
||||
// A token that, if present, can be used to refresh a previously issued access
|
||||
// token that might have expired.
|
||||
//
|
||||
// For more information about the features and limitations of the current IAM
|
||||
// Identity Center OIDC implementation, see Considerations for Using this Guide
|
||||
// in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
//
|
||||
// RefreshToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMOutput's
|
||||
// String and GoString methods.
|
||||
RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"`
|
||||
|
||||
// The list of scopes for which authorization is granted. The access token that
|
||||
// is issued is limited to the scopes that are granted.
|
||||
Scope []*string `locationName:"scope" type:"list"`
|
||||
|
||||
// Used to notify the requester that the returned token is an access token.
|
||||
// The supported token type is Bearer.
|
||||
TokenType *string `locationName:"tokenType" type:"string"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s CreateTokenWithIAMOutput) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s CreateTokenWithIAMOutput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// SetAccessToken sets the AccessToken field's value.
|
||||
func (s *CreateTokenWithIAMOutput) SetAccessToken(v string) *CreateTokenWithIAMOutput {
|
||||
s.AccessToken = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetExpiresIn sets the ExpiresIn field's value.
|
||||
func (s *CreateTokenWithIAMOutput) SetExpiresIn(v int64) *CreateTokenWithIAMOutput {
|
||||
s.ExpiresIn = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetIdToken sets the IdToken field's value.
|
||||
func (s *CreateTokenWithIAMOutput) SetIdToken(v string) *CreateTokenWithIAMOutput {
|
||||
s.IdToken = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetIssuedTokenType sets the IssuedTokenType field's value.
|
||||
func (s *CreateTokenWithIAMOutput) SetIssuedTokenType(v string) *CreateTokenWithIAMOutput {
|
||||
s.IssuedTokenType = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetRefreshToken sets the RefreshToken field's value.
|
||||
func (s *CreateTokenWithIAMOutput) SetRefreshToken(v string) *CreateTokenWithIAMOutput {
|
||||
s.RefreshToken = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetScope sets the Scope field's value.
|
||||
func (s *CreateTokenWithIAMOutput) SetScope(v []*string) *CreateTokenWithIAMOutput {
|
||||
s.Scope = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetTokenType sets the TokenType field's value.
|
||||
func (s *CreateTokenWithIAMOutput) SetTokenType(v string) *CreateTokenWithIAMOutput {
|
||||
s.TokenType = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// Indicates that the token issued by the service is expired and is no longer
|
||||
// valid.
|
||||
type ExpiredTokenException struct {
|
||||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be expired_token.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -756,8 +1212,11 @@ type InternalServerException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be server_error.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -826,8 +1285,11 @@ type InvalidClientException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be invalid_client.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -895,8 +1357,11 @@ type InvalidClientMetadataException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be invalid_client_metadata.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -964,8 +1429,11 @@ type InvalidGrantException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be invalid_grant.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -1033,8 +1501,11 @@ type InvalidRequestException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be invalid_request.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -1096,13 +1567,95 @@ func (s *InvalidRequestException) RequestID() string {
|
|||
return s.RespMetadata.RequestID
|
||||
}
|
||||
|
||||
// Indicates that a token provided as input to the request was issued by and
|
||||
// is only usable by calling IAM Identity Center endpoints in another region.
|
||||
type InvalidRequestRegionException struct {
|
||||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Indicates the IAM Identity Center endpoint which the requester may call with
|
||||
// this token.
|
||||
Endpoint *string `locationName:"endpoint" type:"string"`
|
||||
|
||||
// Single error code. For this exception the value will be invalid_request.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
||||
// Indicates the region which the requester may call with this token.
|
||||
Region *string `locationName:"region" type:"string"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s InvalidRequestRegionException) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s InvalidRequestRegionException) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
func newErrorInvalidRequestRegionException(v protocol.ResponseMetadata) error {
|
||||
return &InvalidRequestRegionException{
|
||||
RespMetadata: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Code returns the exception type name.
|
||||
func (s *InvalidRequestRegionException) Code() string {
|
||||
return "InvalidRequestRegionException"
|
||||
}
|
||||
|
||||
// Message returns the exception's message.
|
||||
func (s *InvalidRequestRegionException) Message() string {
|
||||
if s.Message_ != nil {
|
||||
return *s.Message_
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// OrigErr always returns nil, satisfies awserr.Error interface.
|
||||
func (s *InvalidRequestRegionException) OrigErr() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *InvalidRequestRegionException) Error() string {
|
||||
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
|
||||
}
|
||||
|
||||
// Status code returns the HTTP status code for the request's response error.
|
||||
func (s *InvalidRequestRegionException) StatusCode() int {
|
||||
return s.RespMetadata.StatusCode
|
||||
}
|
||||
|
||||
// RequestID returns the service's response RequestID for request.
|
||||
func (s *InvalidRequestRegionException) RequestID() string {
|
||||
return s.RespMetadata.RequestID
|
||||
}
|
||||
|
||||
// Indicates that the scope provided in the request is invalid.
|
||||
type InvalidScopeException struct {
|
||||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be invalid_scope.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -1238,7 +1791,7 @@ func (s *RegisterClientInput) SetScopes(v []*string) *RegisterClientInput {
|
|||
type RegisterClientOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The endpoint where the client can request authorization.
|
||||
// An endpoint that the client can use to request authorization.
|
||||
AuthorizationEndpoint *string `locationName:"authorizationEndpoint" type:"string"`
|
||||
|
||||
// The unique identifier string for each client. This client uses this identifier
|
||||
|
@ -1250,12 +1803,16 @@ type RegisterClientOutput struct {
|
|||
|
||||
// A secret string generated for the client. The client will use this string
|
||||
// to get authenticated by the service in subsequent calls.
|
||||
ClientSecret *string `locationName:"clientSecret" type:"string"`
|
||||
//
|
||||
// ClientSecret is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by RegisterClientOutput's
|
||||
// String and GoString methods.
|
||||
ClientSecret *string `locationName:"clientSecret" type:"string" sensitive:"true"`
|
||||
|
||||
// Indicates the time at which the clientId and clientSecret will become invalid.
|
||||
ClientSecretExpiresAt *int64 `locationName:"clientSecretExpiresAt" type:"long"`
|
||||
|
||||
// The endpoint where the client can get an access token.
|
||||
// An endpoint that the client can use to create tokens.
|
||||
TokenEndpoint *string `locationName:"tokenEndpoint" type:"string"`
|
||||
}
|
||||
|
||||
|
@ -1319,8 +1876,11 @@ type SlowDownException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be slow_down.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -1395,11 +1955,15 @@ type StartDeviceAuthorizationInput struct {
|
|||
// A secret string that is generated for the client. This value should come
|
||||
// from the persisted result of the RegisterClient API operation.
|
||||
//
|
||||
// ClientSecret is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by StartDeviceAuthorizationInput's
|
||||
// String and GoString methods.
|
||||
//
|
||||
// ClientSecret is a required field
|
||||
ClientSecret *string `locationName:"clientSecret" type:"string" required:"true"`
|
||||
ClientSecret *string `locationName:"clientSecret" type:"string" required:"true" sensitive:"true"`
|
||||
|
||||
// The URL for the AWS access portal. For more information, see Using the AWS
|
||||
// access portal (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html)
|
||||
// The URL for the Amazon Web Services access portal. For more information,
|
||||
// see Using the Amazon Web Services access portal (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html)
|
||||
// in the IAM Identity Center User Guide.
|
||||
//
|
||||
// StartUrl is a required field
|
||||
|
@ -1550,8 +2114,11 @@ type UnauthorizedClientException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be unauthorized_client.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
@ -1618,8 +2185,11 @@ type UnsupportedGrantTypeException struct {
|
|||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be unsupported_grant_type.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
|
|
|
@ -3,15 +3,13 @@
|
|||
// Package ssooidc provides the client and types for making API
|
||||
// requests to AWS SSO OIDC.
|
||||
//
|
||||
// AWS IAM Identity Center (successor to AWS Single Sign-On) OpenID Connect
|
||||
// (OIDC) is a web service that enables a client (such as AWS CLI or a native
|
||||
// application) to register with IAM Identity Center. The service also enables
|
||||
// the client to fetch the user’s access token upon successful authentication
|
||||
// and authorization with IAM Identity Center.
|
||||
// IAM Identity Center OpenID Connect (OIDC) is a web service that enables a
|
||||
// client (such as CLI or a native application) to register with IAM Identity
|
||||
// Center. The service also enables the client to fetch the user’s access
|
||||
// token upon successful authentication and authorization with IAM Identity
|
||||
// Center.
|
||||
//
|
||||
// Although AWS Single Sign-On was renamed, the sso and identitystore API namespaces
|
||||
// will continue to retain their original name for backward compatibility purposes.
|
||||
// For more information, see IAM Identity Center rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed).
|
||||
// IAM Identity Center uses the sso and identitystore API namespaces.
|
||||
//
|
||||
// # Considerations for Using This Guide
|
||||
//
|
||||
|
@ -22,21 +20,24 @@
|
|||
// - The IAM Identity Center OIDC service currently implements only the portions
|
||||
// of the OAuth 2.0 Device Authorization Grant standard (https://tools.ietf.org/html/rfc8628
|
||||
// (https://tools.ietf.org/html/rfc8628)) that are necessary to enable single
|
||||
// sign-on authentication with the AWS CLI. Support for other OIDC flows
|
||||
// frequently needed for native applications, such as Authorization Code
|
||||
// Flow (+ PKCE), will be addressed in future releases.
|
||||
// sign-on authentication with the CLI.
|
||||
//
|
||||
// - The service emits only OIDC access tokens, such that obtaining a new
|
||||
// token (For example, token refresh) requires explicit user re-authentication.
|
||||
// - With older versions of the CLI, the service only emits OIDC access tokens,
|
||||
// so to obtain a new token, users must explicitly re-authenticate. To access
|
||||
// the OIDC flow that supports token refresh and doesn’t require re-authentication,
|
||||
// update to the latest CLI version (1.27.10 for CLI V1 and 2.9.0 for CLI
|
||||
// V2) with support for OIDC token refresh and configurable IAM Identity
|
||||
// Center session durations. For more information, see Configure Amazon Web
|
||||
// Services access portal session duration (https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html).
|
||||
//
|
||||
// - The access tokens provided by this service grant access to all AWS account
|
||||
// entitlements assigned to an IAM Identity Center user, not just a particular
|
||||
// application.
|
||||
// - The access tokens provided by this service grant access to all Amazon
|
||||
// Web Services account entitlements assigned to an IAM Identity Center user,
|
||||
// not just a particular application.
|
||||
//
|
||||
// - The documentation in this guide does not describe the mechanism to convert
|
||||
// the access token into AWS Auth (“sigv4”) credentials for use with
|
||||
// IAM-protected AWS service endpoints. For more information, see GetRoleCredentials
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html)
|
||||
// the access token into Amazon Web Services Auth (“sigv4”) credentials
|
||||
// for use with IAM-protected Amazon Web Services service endpoints. For
|
||||
// more information, see GetRoleCredentials (https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html)
|
||||
// in the IAM Identity Center Portal API Reference Guide.
|
||||
//
|
||||
// For general information about IAM Identity Center, see What is IAM Identity
|
||||
|
|
|
@ -64,6 +64,13 @@ const (
|
|||
// a required parameter might be missing or out of range.
|
||||
ErrCodeInvalidRequestException = "InvalidRequestException"
|
||||
|
||||
// ErrCodeInvalidRequestRegionException for service response error code
|
||||
// "InvalidRequestRegionException".
|
||||
//
|
||||
// Indicates that a token provided as input to the request was issued by and
|
||||
// is only usable by calling IAM Identity Center endpoints in another region.
|
||||
ErrCodeInvalidRequestRegionException = "InvalidRequestRegionException"
|
||||
|
||||
// ErrCodeInvalidScopeException for service response error code
|
||||
// "InvalidScopeException".
|
||||
//
|
||||
|
@ -100,6 +107,7 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
|
|||
"InvalidClientMetadataException": newErrorInvalidClientMetadataException,
|
||||
"InvalidGrantException": newErrorInvalidGrantException,
|
||||
"InvalidRequestException": newErrorInvalidRequestException,
|
||||
"InvalidRequestRegionException": newErrorInvalidRequestRegionException,
|
||||
"InvalidScopeException": newErrorInvalidScopeException,
|
||||
"SlowDownException": newErrorSlowDownException,
|
||||
"UnauthorizedClientException": newErrorUnauthorizedClientException,
|
||||
|
|
|
@ -51,7 +51,7 @@ const (
|
|||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSOOIDC {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "awsssooidc"
|
||||
c.SigningName = "sso-oauth"
|
||||
}
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
|
||||
}
|
||||
|
|
|
@ -1460,7 +1460,15 @@ type AssumeRoleInput struct {
|
|||
// in the IAM User Guide.
|
||||
PolicyArns []*PolicyDescriptorType `type:"list"`
|
||||
|
||||
// Reserved for future use.
|
||||
// A list of previously acquired trusted context assertions in the format of
|
||||
// a JSON array. The trusted context assertion is signed and encrypted by Amazon
|
||||
// Web Services STS.
|
||||
//
|
||||
// The following is an example of a ProvidedContext value that includes a single
|
||||
// trusted context assertion and the ARN of the context provider from which
|
||||
// the trusted context assertion was generated.
|
||||
//
|
||||
// [{"ProviderArn":"arn:aws:iam::aws:contextProvider/identitycenter","ContextAssertion":"trusted-context-assertion"}]
|
||||
ProvidedContexts []*ProvidedContext `type:"list"`
|
||||
|
||||
// The Amazon Resource Name (ARN) of the role to assume.
|
||||
|
@ -3405,14 +3413,18 @@ func (s *PolicyDescriptorType) SetArn(v string) *PolicyDescriptorType {
|
|||
return s
|
||||
}
|
||||
|
||||
// Reserved for future use.
|
||||
// Contains information about the provided context. This includes the signed
|
||||
// and encrypted trusted context assertion and the context provider ARN from
|
||||
// which the trusted context assertion was generated.
|
||||
type ProvidedContext struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Reserved for future use.
|
||||
// The signed and encrypted trusted context assertion generated by the context
|
||||
// provider. The trusted context assertion is signed and encrypted by Amazon
|
||||
// Web Services STS.
|
||||
ContextAssertion *string `min:"4" type:"string"`
|
||||
|
||||
// Reserved for future use.
|
||||
// The context provider ARN from which the trusted context assertion was generated.
|
||||
ProviderArn *string `min:"20" type:"string"`
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- 1.6
|
||||
- 1.7
|
||||
- 1.8
|
|
@ -1,7 +1,7 @@
|
|||
.PHONY: ci generate clean
|
||||
|
||||
ci: clean generate
|
||||
go test -v ./...
|
||||
go test -race -v ./...
|
||||
|
||||
generate:
|
||||
go generate .
|
||||
|
|
|
@ -7,8 +7,8 @@ http.Handlers.
|
|||
Doing this requires non-trivial wrapping of the http.ResponseWriter interface,
|
||||
which is also exposed for users interested in a more low-level API.
|
||||
|
||||
[](https://godoc.org/github.com/felixge/httpsnoop)
|
||||
[](https://travis-ci.org/felixge/httpsnoop)
|
||||
[](https://pkg.go.dev/github.com/felixge/httpsnoop)
|
||||
[](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml)
|
||||
|
||||
## Usage Example
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWri
|
|||
return func(code int) {
|
||||
next(code)
|
||||
|
||||
if !headerWritten {
|
||||
if !(code >= 100 && code <= 199) && !headerWritten {
|
||||
m.Code = code
|
||||
headerWritten = true
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// +build go1.8
|
||||
// Code generated by "httpsnoop/codegen"; DO NOT EDIT
|
||||
// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
|
||||
|
||||
package httpsnoop
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// +build !go1.8
|
||||
// Code generated by "httpsnoop/codegen"; DO NOT EDIT
|
||||
// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
|
||||
|
||||
package httpsnoop
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ const (
|
|||
RequestCount = "http.server.request_count" // Incoming request count total
|
||||
RequestContentLength = "http.server.request_content_length" // Incoming request bytes total
|
||||
ResponseContentLength = "http.server.response_content_length" // Incoming response bytes total
|
||||
ServerLatency = "http.server.duration" // Incoming end to end duration, microseconds
|
||||
ServerLatency = "http.server.duration" // Incoming end to end duration, milliseconds
|
||||
)
|
||||
|
||||
// Filter is a predicate used to determine whether a given http.request should
|
||||
|
@ -42,5 +42,5 @@ const (
|
|||
type Filter func(*http.Request) bool
|
||||
|
||||
func newTracer(tp trace.TracerProvider) trace.Tracer {
|
||||
return tp.Tracer(instrumentationName, trace.WithInstrumentationVersion(Version()))
|
||||
return tp.Tracer(ScopeName, trace.WithInstrumentationVersion(Version()))
|
||||
}
|
||||
|
|
|
@ -25,9 +25,8 @@ import (
|
|||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
const (
|
||||
instrumentationName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
)
|
||||
// ScopeName is the instrumentation scope name.
|
||||
const ScopeName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
|
||||
// config represents the configuration options available for the http.Handler
|
||||
// and http.Transport types.
|
||||
|
@ -76,7 +75,7 @@ func newConfig(opts ...Option) *config {
|
|||
}
|
||||
|
||||
c.Meter = c.MeterProvider.Meter(
|
||||
instrumentationName,
|
||||
ScopeName,
|
||||
metric.WithInstrumentationVersion(Version()),
|
||||
)
|
||||
|
||||
|
|
18
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
generated
vendored
18
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
generated
vendored
|
@ -107,13 +107,25 @@ func (h *middleware) createMeasures() {
|
|||
h.counters = make(map[string]metric.Int64Counter)
|
||||
h.valueRecorders = make(map[string]metric.Float64Histogram)
|
||||
|
||||
requestBytesCounter, err := h.meter.Int64Counter(RequestContentLength)
|
||||
requestBytesCounter, err := h.meter.Int64Counter(
|
||||
RequestContentLength,
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Measures the size of HTTP request content length (uncompressed)"),
|
||||
)
|
||||
handleErr(err)
|
||||
|
||||
responseBytesCounter, err := h.meter.Int64Counter(ResponseContentLength)
|
||||
responseBytesCounter, err := h.meter.Int64Counter(
|
||||
ResponseContentLength,
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Measures the size of HTTP response content length (uncompressed)"),
|
||||
)
|
||||
handleErr(err)
|
||||
|
||||
serverLatencyMeasure, err := h.meter.Float64Histogram(ServerLatency)
|
||||
serverLatencyMeasure, err := h.meter.Float64Histogram(
|
||||
ServerLatency,
|
||||
metric.WithUnit("ms"),
|
||||
metric.WithDescription("Measures the duration of HTTP request handling"),
|
||||
)
|
||||
handleErr(err)
|
||||
|
||||
h.counters[RequestContentLength] = requestBytesCounter
|
||||
|
|
2
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
generated
vendored
2
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
generated
vendored
|
@ -16,7 +16,7 @@ package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http
|
|||
|
||||
// Version is the current release version of the otelhttp instrumentation.
|
||||
func Version() string {
|
||||
return "0.45.0"
|
||||
return "0.46.1"
|
||||
// This string is updated by the pre_release.sh script during release
|
||||
}
|
||||
|
||||
|
|
|
@ -14,12 +14,9 @@ go.work.sum
|
|||
gen/
|
||||
|
||||
/example/dice/dice
|
||||
/example/fib/fib
|
||||
/example/fib/traces.txt
|
||||
/example/jaeger/jaeger
|
||||
/example/namedtracer/namedtracer
|
||||
/example/otel-collector/otel-collector
|
||||
/example/opencensus/opencensus
|
||||
/example/passthrough/passthrough
|
||||
/example/prometheus/prometheus
|
||||
/example/zipkin/zipkin
|
||||
/example/otel-collector/otel-collector
|
||||
|
|
|
@ -12,8 +12,9 @@ linters:
|
|||
- depguard
|
||||
- errcheck
|
||||
- godot
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
|
@ -53,6 +54,20 @@ issues:
|
|||
text: "calls to (.+) only in main[(][)] or init[(][)] functions"
|
||||
linters:
|
||||
- revive
|
||||
# It's okay to not run gosec in a test.
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- gosec
|
||||
# Igonoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand)
|
||||
# as we commonly use it in tests and examples.
|
||||
- text: "G404:"
|
||||
linters:
|
||||
- gosec
|
||||
# Igonoring gosec G402: TLS MinVersion too low
|
||||
# as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well.
|
||||
- text: "G402: TLS MinVersion too low."
|
||||
linters:
|
||||
- gosec
|
||||
include:
|
||||
# revive exported should have comment or be unexported.
|
||||
- EXC0012
|
||||
|
|
|
@ -8,6 +8,85 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.21.0/0.44.0] 2023-11-16
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719)
|
||||
- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719)
|
||||
|
||||
## [1.20.0/0.43.0] 2023-11-10
|
||||
|
||||
This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementors need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this.
|
||||
|
||||
### Added
|
||||
|
||||
- Add `go.opentelemetry.io/otel/bridge/opencensus.InstallTraceBridge`, which installs the OpenCensus trace bridge, and replaces `opencensus.NewTracer`. (#4567)
|
||||
- Add scope version to trace and metric bridges in `go.opentelemetry.io/otel/bridge/opencensus`. (#4584)
|
||||
- Add the `go.opentelemetry.io/otel/trace/embedded` package to be embedded in the exported trace API interfaces. (#4620)
|
||||
- Add the `go.opentelemetry.io/otel/trace/noop` package as a default no-op implementation of the trace API. (#4620)
|
||||
- Add context propagation in `go.opentelemetry.io/otel/example/dice`. (#4644)
|
||||
- Add view configuration to `go.opentelemetry.io/otel/example/prometheus`. (#4649)
|
||||
- Add `go.opentelemetry.io/otel/metric.WithExplicitBucketBoundaries`, which allows defining default explicit bucket boundaries when creating histogram instruments. (#4603)
|
||||
- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4660)
|
||||
- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4660)
|
||||
- Add Summary, SummaryDataPoint, and QuantileValue to `go.opentelemetry.io/sdk/metric/metricdata`. (#4622)
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` now supports exemplars from OpenCensus. (#4585)
|
||||
- Add support for `WithExplicitBucketBoundaries` in `go.opentelemetry.io/otel/sdk/metric`. (#4605)
|
||||
- Add support for Summary metrics in `go.opentelemetry.io/otel/bridge/opencensus`. (#4668)
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Deprecate `go.opentelemetry.io/otel/bridge/opencensus.NewTracer` in favor of `opencensus.InstallTraceBridge`. (#4567)
|
||||
- Deprecate `go.opentelemetry.io/otel/example/fib` package is in favor of `go.opentelemetry.io/otel/example/dice`. (#4618)
|
||||
- Deprecate `go.opentelemetry.io/otel/trace.NewNoopTracerProvider`.
|
||||
Use the added `NewTracerProvider` function in `go.opentelemetry.io/otel/trace/noop` instead. (#4620)
|
||||
- Deprecate `go.opentelemetry.io/otel/example/view` package in favor of `go.opentelemetry.io/otel/example/prometheus`. (#4649)
|
||||
- Deprecate `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4693)
|
||||
|
||||
### Changed
|
||||
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583)
|
||||
- The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type.
|
||||
This extends the `TracerProvider` interface and is is a breaking change for any existing implementation.
|
||||
Implementors need to update their implementations based on what they want the default behavior of the interface to be.
|
||||
See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
|
||||
- The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type.
|
||||
This extends the `Tracer` interface and is is a breaking change for any existing implementation.
|
||||
Implementors need to update their implementations based on what they want the default behavior of the interface to be.
|
||||
See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
|
||||
- The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type.
|
||||
This extends the `Span` interface and is is a breaking change for any existing implementation.
|
||||
Implementors need to update their implementations based on what they want the default behavior of the interface to be.
|
||||
See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)
|
||||
- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4670)
|
||||
- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4670)
|
||||
- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4669)
|
||||
- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4669)
|
||||
- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4679)
|
||||
- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4679)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix improper parsing of characters such us `+`, `/` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_RESOURCE_ATTRIBUTES` in `go.opentelemetry.io/otel/sdk/resource` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracegrpc` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp` as they were rendered as a whitespace. (#4699)
|
||||
- In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648)
|
||||
- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695)
|
||||
- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695)
|
||||
|
||||
## [1.19.0/0.42.0/0.0.7] 2023-09-28
|
||||
|
||||
This release contains the first stable release of the OpenTelemetry Go [metric SDK].
|
||||
|
@ -2656,7 +2735,9 @@ It contains api and sdk for trace and meter.
|
|||
- CircleCI build CI manifest files.
|
||||
- CODEOWNERS file to track owners of this project.
|
||||
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...HEAD
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...HEAD
|
||||
[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0
|
||||
[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0
|
||||
[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0
|
||||
[1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1
|
||||
[1.18.0/0.41.0/0.0.6]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.18.0
|
||||
|
@ -2731,7 +2812,7 @@ It contains api and sdk for trace and meter.
|
|||
[Go 1.20]: https://go.dev/doc/go1.20
|
||||
[Go 1.19]: https://go.dev/doc/go1.19
|
||||
[Go 1.18]: https://go.dev/doc/go1.18
|
||||
[Go 1.19]: https://go.dev/doc/go1.19
|
||||
|
||||
[metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric
|
||||
[metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric
|
||||
[trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace
|
||||
|
|
|
@ -90,6 +90,10 @@ git push <YOUR_FORK> <YOUR_BRANCH_NAME>
|
|||
Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull
|
||||
request ID to the entry you added to `CHANGELOG.md`.
|
||||
|
||||
Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request.
|
||||
Rewriting Git history makes it difficult to keep track of iterations during code review.
|
||||
All pull requests are squashed to a single commit upon merge to `main`.
|
||||
|
||||
### How to Receive Comments
|
||||
|
||||
* If the PR is not ready for review, please put `[WIP]` in the title,
|
||||
|
|
|
@ -77,6 +77,9 @@ $(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl
|
|||
GORELEASE = $(TOOLS)/gorelease
|
||||
$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease
|
||||
|
||||
GOVULNCHECK = $(TOOLS)/govulncheck
|
||||
$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck
|
||||
|
||||
.PHONY: tools
|
||||
tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)
|
||||
|
||||
|
@ -189,6 +192,18 @@ test-coverage: | $(GOCOVMERGE)
|
|||
done; \
|
||||
$(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt
|
||||
|
||||
# Adding a directory will include all benchmarks in that direcotry if a filter is not specified.
|
||||
BENCHMARK_TARGETS := sdk/trace
|
||||
.PHONY: benchmark
|
||||
benchmark: $(BENCHMARK_TARGETS:%=benchmark/%)
|
||||
BENCHMARK_FILTER = .
|
||||
# You can override the filter for a particular directory by adding a rule here.
|
||||
benchmark/sdk/trace: BENCHMARK_FILTER = SpanWithAttributes_8/AlwaysSample
|
||||
benchmark/%:
|
||||
@echo "$(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(BENCHMARK_FILTER) $*..." \
|
||||
&& cd $* \
|
||||
$(foreach filter, $(BENCHMARK_FILTER), && $(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(filter))
|
||||
|
||||
.PHONY: golangci-lint golangci-lint-fix
|
||||
golangci-lint-fix: ARGS=--fix
|
||||
golangci-lint-fix: golangci-lint
|
||||
|
@ -216,7 +231,7 @@ go-mod-tidy/%: | crosslink
|
|||
lint-modules: go-mod-tidy
|
||||
|
||||
.PHONY: lint
|
||||
lint: misspell lint-modules golangci-lint
|
||||
lint: misspell lint-modules golangci-lint govulncheck
|
||||
|
||||
.PHONY: vanity-import-check
|
||||
vanity-import-check: | $(PORTO)
|
||||
|
@ -226,6 +241,14 @@ vanity-import-check: | $(PORTO)
|
|||
misspell: | $(MISSPELL)
|
||||
@$(MISSPELL) -w $(ALL_DOCS)
|
||||
|
||||
.PHONY: govulncheck
|
||||
govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%)
|
||||
govulncheck/%: DIR=$*
|
||||
govulncheck/%: | $(GOVULNCHECK)
|
||||
@echo "govulncheck ./... in $(DIR)" \
|
||||
&& cd $(DIR) \
|
||||
&& $(GOVULNCHECK) ./...
|
||||
|
||||
.PHONY: codespell
|
||||
codespell: | $(CODESPELL)
|
||||
@$(DOCKERPY) $(CODESPELL)
|
||||
|
@ -289,3 +312,7 @@ COMMIT ?= "HEAD"
|
|||
add-tags: | $(MULTIMOD)
|
||||
@[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
|
||||
$(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT}
|
||||
|
||||
.PHONY: lint-markdown
|
||||
lint-markdown:
|
||||
docker run -v "$(CURDIR):$(WORKDIR)" docker://avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md
|
||||
|
|
|
@ -11,16 +11,13 @@ It provides a set of APIs to directly measure performance and behavior of your s
|
|||
|
||||
## Project Status
|
||||
|
||||
| Signal | Status | Project |
|
||||
|---------|------------|-----------------------|
|
||||
| Traces | Stable | N/A |
|
||||
| Metrics | Mixed [1] | [Go: Metric SDK (GA)] |
|
||||
| Logs | Frozen [2] | N/A |
|
||||
| Signal | Status |
|
||||
|---------|------------|
|
||||
| Traces | Stable |
|
||||
| Metrics | Stable |
|
||||
| Logs | Design [1] |
|
||||
|
||||
[Go: Metric SDK (GA)]: https://github.com/orgs/open-telemetry/projects/34
|
||||
|
||||
- [1]: [Metrics API](https://pkg.go.dev/go.opentelemetry.io/otel/metric) is Stable. [Metrics SDK](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric) is Beta.
|
||||
- [2]: The Logs signal development is halted for this project while we stabilize the Metrics SDK.
|
||||
- [1]: Currently the logs signal development is in a design phase ([#4696](https://github.com/open-telemetry/opentelemetry-go/issues/4696)).
|
||||
No Logs Pull Requests are currently being accepted.
|
||||
|
||||
Progress and status specific to this repository is tracked in our
|
||||
|
|
|
@ -254,7 +254,7 @@ func NewMember(key, value string, props ...Property) (Member, error) {
|
|||
if err := m.validate(); err != nil {
|
||||
return newInvalidMember(), err
|
||||
}
|
||||
decodedValue, err := url.QueryUnescape(value)
|
||||
decodedValue, err := url.PathUnescape(value)
|
||||
if err != nil {
|
||||
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ func parseMember(member string) (Member, error) {
|
|||
// when converting the header into a data structure."
|
||||
key = strings.TrimSpace(k)
|
||||
var err error
|
||||
value, err = url.QueryUnescape(strings.TrimSpace(v))
|
||||
value, err = url.PathUnescape(strings.TrimSpace(v))
|
||||
if err != nil {
|
||||
return newInvalidMember(), fmt.Errorf("%w: %q", err, value)
|
||||
}
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
# OpenTelemetry-Go OTLP Span Exporter
|
||||
|
||||
[](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace)
|
||||
|
||||
[OpenTelemetry Protocol Exporter](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/protocol/exporter.md) implementation.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
go get -u go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
- [HTTP Exporter setup and examples](./otlptracehttp/example_test.go)
|
||||
- [Full example of gRPC Exporter sending telemetry to a local collector](../../../example/otel-collector)
|
||||
|
||||
## [`otlptrace`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace)
|
||||
|
||||
The `otlptrace` package provides an exporter implementing the OTel span exporter interface.
|
||||
This exporter is configured using a client satisfying the `otlptrace.Client` interface.
|
||||
This client handles the transformation of data into wire format and the transmission of that data to the collector.
|
||||
|
||||
## [`otlptracegrpc`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc)
|
||||
|
||||
The `otlptracegrpc` package implements a client for the span exporter that sends trace telemetry data to the collector using gRPC with protobuf-encoded payloads.
|
||||
|
||||
## [`otlptracehttp`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp)
|
||||
|
||||
The `otlptracehttp` package implements a client for the span exporter that sends trace telemetry data to the collector using HTTP with protobuf-encoded payloads.
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
The following environment variables can be used (instead of options objects) to
|
||||
override the default configuration. For more information about how each of
|
||||
these environment variables is interpreted, see [the OpenTelemetry
|
||||
specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/protocol/exporter.md).
|
||||
|
||||
| Environment variable | Option | Default value |
|
||||
| ------------------------------------------------------------------------ |------------------------------ | -------------------------------------------------------- |
|
||||
| `OTEL_EXPORTER_OTLP_ENDPOINT` `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | `WithEndpoint` `WithInsecure` | `https://localhost:4317` or `https://localhost:4318`[^1] |
|
||||
| `OTEL_EXPORTER_OTLP_CERTIFICATE` `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` | `WithTLSClientConfig` | |
|
||||
| `OTEL_EXPORTER_OTLP_HEADERS` `OTEL_EXPORTER_OTLP_TRACES_HEADERS` | `WithHeaders` | |
|
||||
| `OTEL_EXPORTER_OTLP_COMPRESSION` `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` | `WithCompression` | |
|
||||
| `OTEL_EXPORTER_OTLP_TIMEOUT` `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` | `WithTimeout` | `10s` |
|
||||
|
||||
[^1]: The gRPC client defaults to `https://localhost:4317` and the HTTP client `https://localhost:4318`.
|
||||
|
||||
Configuration using options have precedence over the environment variables.
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
/*
|
||||
Package otlptrace contains abstractions for OTLP span exporters.
|
||||
See the official OTLP span exporter implementations:
|
||||
- [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc],
|
||||
- [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp].
|
||||
*/
|
||||
package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
|
@ -24,9 +24,7 @@ import (
|
|||
tracesdk "go.opentelemetry.io/otel/sdk/trace"
|
||||
)
|
||||
|
||||
var (
|
||||
errAlreadyStarted = errors.New("already started")
|
||||
)
|
||||
var errAlreadyStarted = errors.New("already started")
|
||||
|
||||
// Exporter exports trace data in the OTLP wire format.
|
||||
type Exporter struct {
|
||||
|
@ -55,7 +53,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, ss []tracesdk.ReadOnlySpan)
|
|||
|
||||
// Start establishes a connection to the receiving endpoint.
|
||||
func (e *Exporter) Start(ctx context.Context) error {
|
||||
var err = errAlreadyStarted
|
||||
err := errAlreadyStarted
|
||||
e.startOnce.Do(func() {
|
||||
e.mu.Lock()
|
||||
e.started = true
|
||||
|
|
|
@ -16,5 +16,5 @@ package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
|||
|
||||
// Version is the current release version of the OpenTelemetry OTLP trace exporter in use.
|
||||
func Version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
|
|
@ -34,11 +34,13 @@ type afCounter struct {
|
|||
name string
|
||||
opts []metric.Float64ObservableCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64ObservableCounter
|
||||
delegate atomic.Value // metric.Float64ObservableCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*afCounter)(nil)
|
||||
var _ metric.Float64ObservableCounter = (*afCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*afCounter)(nil)
|
||||
_ metric.Float64ObservableCounter = (*afCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *afCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Float64ObservableCounter(i.name, i.opts...)
|
||||
|
@ -63,11 +65,13 @@ type afUpDownCounter struct {
|
|||
name string
|
||||
opts []metric.Float64ObservableUpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64ObservableUpDownCounter
|
||||
delegate atomic.Value // metric.Float64ObservableUpDownCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*afUpDownCounter)(nil)
|
||||
var _ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*afUpDownCounter)(nil)
|
||||
_ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *afUpDownCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Float64ObservableUpDownCounter(i.name, i.opts...)
|
||||
|
@ -92,11 +96,13 @@ type afGauge struct {
|
|||
name string
|
||||
opts []metric.Float64ObservableGaugeOption
|
||||
|
||||
delegate atomic.Value //metric.Float64ObservableGauge
|
||||
delegate atomic.Value // metric.Float64ObservableGauge
|
||||
}
|
||||
|
||||
var _ unwrapper = (*afGauge)(nil)
|
||||
var _ metric.Float64ObservableGauge = (*afGauge)(nil)
|
||||
var (
|
||||
_ unwrapper = (*afGauge)(nil)
|
||||
_ metric.Float64ObservableGauge = (*afGauge)(nil)
|
||||
)
|
||||
|
||||
func (i *afGauge) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Float64ObservableGauge(i.name, i.opts...)
|
||||
|
@ -121,11 +127,13 @@ type aiCounter struct {
|
|||
name string
|
||||
opts []metric.Int64ObservableCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64ObservableCounter
|
||||
delegate atomic.Value // metric.Int64ObservableCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*aiCounter)(nil)
|
||||
var _ metric.Int64ObservableCounter = (*aiCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*aiCounter)(nil)
|
||||
_ metric.Int64ObservableCounter = (*aiCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *aiCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Int64ObservableCounter(i.name, i.opts...)
|
||||
|
@ -150,11 +158,13 @@ type aiUpDownCounter struct {
|
|||
name string
|
||||
opts []metric.Int64ObservableUpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64ObservableUpDownCounter
|
||||
delegate atomic.Value // metric.Int64ObservableUpDownCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*aiUpDownCounter)(nil)
|
||||
var _ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*aiUpDownCounter)(nil)
|
||||
_ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *aiUpDownCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Int64ObservableUpDownCounter(i.name, i.opts...)
|
||||
|
@ -179,11 +189,13 @@ type aiGauge struct {
|
|||
name string
|
||||
opts []metric.Int64ObservableGaugeOption
|
||||
|
||||
delegate atomic.Value //metric.Int64ObservableGauge
|
||||
delegate atomic.Value // metric.Int64ObservableGauge
|
||||
}
|
||||
|
||||
var _ unwrapper = (*aiGauge)(nil)
|
||||
var _ metric.Int64ObservableGauge = (*aiGauge)(nil)
|
||||
var (
|
||||
_ unwrapper = (*aiGauge)(nil)
|
||||
_ metric.Int64ObservableGauge = (*aiGauge)(nil)
|
||||
)
|
||||
|
||||
func (i *aiGauge) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Int64ObservableGauge(i.name, i.opts...)
|
||||
|
@ -208,7 +220,7 @@ type sfCounter struct {
|
|||
name string
|
||||
opts []metric.Float64CounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64Counter
|
||||
delegate atomic.Value // metric.Float64Counter
|
||||
}
|
||||
|
||||
var _ metric.Float64Counter = (*sfCounter)(nil)
|
||||
|
@ -234,7 +246,7 @@ type sfUpDownCounter struct {
|
|||
name string
|
||||
opts []metric.Float64UpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64UpDownCounter
|
||||
delegate atomic.Value // metric.Float64UpDownCounter
|
||||
}
|
||||
|
||||
var _ metric.Float64UpDownCounter = (*sfUpDownCounter)(nil)
|
||||
|
@ -260,7 +272,7 @@ type sfHistogram struct {
|
|||
name string
|
||||
opts []metric.Float64HistogramOption
|
||||
|
||||
delegate atomic.Value //metric.Float64Histogram
|
||||
delegate atomic.Value // metric.Float64Histogram
|
||||
}
|
||||
|
||||
var _ metric.Float64Histogram = (*sfHistogram)(nil)
|
||||
|
@ -286,7 +298,7 @@ type siCounter struct {
|
|||
name string
|
||||
opts []metric.Int64CounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64Counter
|
||||
delegate atomic.Value // metric.Int64Counter
|
||||
}
|
||||
|
||||
var _ metric.Int64Counter = (*siCounter)(nil)
|
||||
|
@ -312,7 +324,7 @@ type siUpDownCounter struct {
|
|||
name string
|
||||
opts []metric.Int64UpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64UpDownCounter
|
||||
delegate atomic.Value // metric.Int64UpDownCounter
|
||||
}
|
||||
|
||||
var _ metric.Int64UpDownCounter = (*siUpDownCounter)(nil)
|
||||
|
@ -338,7 +350,7 @@ type siHistogram struct {
|
|||
name string
|
||||
opts []metric.Int64HistogramOption
|
||||
|
||||
delegate atomic.Value //metric.Int64Histogram
|
||||
delegate atomic.Value // metric.Int64Histogram
|
||||
}
|
||||
|
||||
var _ metric.Int64Histogram = (*siHistogram)(nil)
|
||||
|
|
|
@ -39,6 +39,7 @@ import (
|
|||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
// tracerProvider is a placeholder for a configured SDK TracerProvider.
|
||||
|
@ -46,6 +47,8 @@ import (
|
|||
// All TracerProvider functionality is forwarded to a delegate once
|
||||
// configured.
|
||||
type tracerProvider struct {
|
||||
embedded.TracerProvider
|
||||
|
||||
mtx sync.Mutex
|
||||
tracers map[il]*tracer
|
||||
delegate trace.TracerProvider
|
||||
|
@ -119,6 +122,8 @@ type il struct {
|
|||
// All Tracer functionality is forwarded to a delegate once configured.
|
||||
// Otherwise, all functionality is forwarded to a NoopTracer.
|
||||
type tracer struct {
|
||||
embedded.Tracer
|
||||
|
||||
name string
|
||||
opts []trace.TracerOption
|
||||
provider *tracerProvider
|
||||
|
@ -156,6 +161,8 @@ func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStart
|
|||
// SpanContext. It performs no operations other than to return the wrapped
|
||||
// SpanContext.
|
||||
type nonRecordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
sc trace.SpanContext
|
||||
tracer *tracer
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ of [go.opentelemetry.io/otel/metric].
|
|||
|
||||
Finally, an author can embed another implementation in theirs. The embedded
|
||||
implementation will be used for methods not defined by the author. For example,
|
||||
an author who want to default to silently dropping the call can use
|
||||
an author who wants to default to silently dropping the call can use
|
||||
[go.opentelemetry.io/otel/metric/noop]:
|
||||
|
||||
import "go.opentelemetry.io/otel/metric/noop"
|
||||
|
|
|
@ -39,6 +39,12 @@ type InstrumentOption interface {
|
|||
Float64ObservableGaugeOption
|
||||
}
|
||||
|
||||
// HistogramOption applies options to histogram instruments.
|
||||
type HistogramOption interface {
|
||||
Int64HistogramOption
|
||||
Float64HistogramOption
|
||||
}
|
||||
|
||||
type descOpt string
|
||||
|
||||
func (o descOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig {
|
||||
|
@ -171,6 +177,23 @@ func (o unitOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64Ob
|
|||
// The unit u should be defined using the appropriate [UCUM](https://ucum.org) case-sensitive code.
|
||||
func WithUnit(u string) InstrumentOption { return unitOpt(u) }
|
||||
|
||||
// WithExplicitBucketBoundaries sets the instrument explicit bucket boundaries.
|
||||
//
|
||||
// This option is considered "advisory", and may be ignored by API implementations.
|
||||
func WithExplicitBucketBoundaries(bounds ...float64) HistogramOption { return bucketOpt(bounds) }
|
||||
|
||||
type bucketOpt []float64
|
||||
|
||||
func (o bucketOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {
|
||||
c.explicitBucketBoundaries = o
|
||||
return c
|
||||
}
|
||||
|
||||
func (o bucketOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {
|
||||
c.explicitBucketBoundaries = o
|
||||
return c
|
||||
}
|
||||
|
||||
// AddOption applies options to an addition measurement. See
|
||||
// [MeasurementOption] for other options that can be used as an AddOption.
|
||||
type AddOption interface {
|
||||
|
|
|
@ -147,8 +147,9 @@ type Float64Histogram interface {
|
|||
// Float64HistogramConfig contains options for synchronous counter instruments
|
||||
// that record int64 values.
|
||||
type Float64HistogramConfig struct {
|
||||
description string
|
||||
unit string
|
||||
description string
|
||||
unit string
|
||||
explicitBucketBoundaries []float64
|
||||
}
|
||||
|
||||
// NewFloat64HistogramConfig returns a new [Float64HistogramConfig] with all
|
||||
|
@ -171,6 +172,11 @@ func (c Float64HistogramConfig) Unit() string {
|
|||
return c.unit
|
||||
}
|
||||
|
||||
// ExplicitBucketBoundaries returns the configured explicit bucket boundaries.
|
||||
func (c Float64HistogramConfig) ExplicitBucketBoundaries() []float64 {
|
||||
return c.explicitBucketBoundaries
|
||||
}
|
||||
|
||||
// Float64HistogramOption applies options to a [Float64HistogramConfig]. See
|
||||
// [InstrumentOption] for other options that can be used as a
|
||||
// Float64HistogramOption.
|
||||
|
|
|
@ -147,8 +147,9 @@ type Int64Histogram interface {
|
|||
// Int64HistogramConfig contains options for synchronous counter instruments
|
||||
// that record int64 values.
|
||||
type Int64HistogramConfig struct {
|
||||
description string
|
||||
unit string
|
||||
description string
|
||||
unit string
|
||||
explicitBucketBoundaries []float64
|
||||
}
|
||||
|
||||
// NewInt64HistogramConfig returns a new [Int64HistogramConfig] with all opts
|
||||
|
@ -171,6 +172,11 @@ func (c Int64HistogramConfig) Unit() string {
|
|||
return c.unit
|
||||
}
|
||||
|
||||
// ExplicitBucketBoundaries returns the configured explicit bucket boundaries.
|
||||
func (c Int64HistogramConfig) ExplicitBucketBoundaries() []float64 {
|
||||
return c.explicitBucketBoundaries
|
||||
}
|
||||
|
||||
// Int64HistogramOption applies options to a [Int64HistogramConfig]. See
|
||||
// [InstrumentOption] for other options that can be used as an
|
||||
// Int64HistogramOption.
|
||||
|
|
|
@ -40,8 +40,10 @@ const (
|
|||
// their proprietary information.
|
||||
type TraceContext struct{}
|
||||
|
||||
var _ TextMapPropagator = TraceContext{}
|
||||
var traceCtxRegExp = regexp.MustCompile("^(?P<version>[0-9a-f]{2})-(?P<traceID>[a-f0-9]{32})-(?P<spanID>[a-f0-9]{16})-(?P<traceFlags>[a-f0-9]{2})(?:-.*)?$")
|
||||
var (
|
||||
_ TextMapPropagator = TraceContext{}
|
||||
traceCtxRegExp = regexp.MustCompile("^(?P<version>[0-9a-f]{2})-(?P<traceID>[a-f0-9]{32})-(?P<spanID>[a-f0-9]{16})-(?P<traceFlags>[a-f0-9]{2})(?:-.*)?$")
|
||||
)
|
||||
|
||||
// Inject set tracecontext from the Context into the carrier.
|
||||
func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
codespell==2.2.5
|
||||
codespell==2.2.6
|
||||
|
|
|
@ -21,12 +21,10 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
ErrPartialResource = errors.New("partial resource")
|
||||
)
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
var ErrPartialResource = errors.New("partial resource")
|
||||
|
||||
// Detector detects OpenTelemetry resource information.
|
||||
type Detector interface {
|
||||
|
|
|
@ -28,16 +28,14 @@ import (
|
|||
|
||||
const (
|
||||
// resourceAttrKey is the environment variable name OpenTelemetry Resource information will be read from.
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES"
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES" //nolint:gosec // False positive G101: Potential hardcoded credentials
|
||||
|
||||
// svcNameKey is the environment variable name that Service Name information will be read from.
|
||||
svcNameKey = "OTEL_SERVICE_NAME"
|
||||
)
|
||||
|
||||
var (
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
)
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
var errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
|
||||
// fromEnv is a Detector that implements the Detector and collects
|
||||
// resources from environment. This Detector is included as a
|
||||
|
@ -91,7 +89,7 @@ func constructOTResources(s string) (*Resource, error) {
|
|||
continue
|
||||
}
|
||||
key := strings.TrimSpace(k)
|
||||
val, err := url.QueryUnescape(strings.TrimSpace(v))
|
||||
val, err := url.PathUnescape(strings.TrimSpace(v))
|
||||
if err != nil {
|
||||
// Retain original value if decoding fails, otherwise it will be
|
||||
// an empty string.
|
||||
|
|
|
@ -36,8 +36,10 @@ func setOSDescriptionProvider(osDescriptionProvider osDescriptionProvider) {
|
|||
osDescription = osDescriptionProvider
|
||||
}
|
||||
|
||||
type osTypeDetector struct{}
|
||||
type osDescriptionDetector struct{}
|
||||
type (
|
||||
osTypeDetector struct{}
|
||||
osDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the operating system type the
|
||||
// service is running on.
|
||||
|
@ -56,7 +58,6 @@ func (osTypeDetector) Detect(ctx context.Context) (*Resource, error) {
|
|||
// service is running on.
|
||||
func (osDescriptionDetector) Detect(ctx context.Context) (*Resource, error) {
|
||||
description, err := osDescription()
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -25,14 +25,16 @@ import (
|
|||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||
)
|
||||
|
||||
type pidProvider func() int
|
||||
type executablePathProvider func() (string, error)
|
||||
type commandArgsProvider func() []string
|
||||
type ownerProvider func() (*user.User, error)
|
||||
type runtimeNameProvider func() string
|
||||
type runtimeVersionProvider func() string
|
||||
type runtimeOSProvider func() string
|
||||
type runtimeArchProvider func() string
|
||||
type (
|
||||
pidProvider func() int
|
||||
executablePathProvider func() (string, error)
|
||||
commandArgsProvider func() []string
|
||||
ownerProvider func() (*user.User, error)
|
||||
runtimeNameProvider func() string
|
||||
runtimeVersionProvider func() string
|
||||
runtimeOSProvider func() string
|
||||
runtimeArchProvider func() string
|
||||
)
|
||||
|
||||
var (
|
||||
defaultPidProvider pidProvider = os.Getpid
|
||||
|
@ -108,14 +110,16 @@ func setUserProviders(ownerProvider ownerProvider) {
|
|||
owner = ownerProvider
|
||||
}
|
||||
|
||||
type processPIDDetector struct{}
|
||||
type processExecutableNameDetector struct{}
|
||||
type processExecutablePathDetector struct{}
|
||||
type processCommandArgsDetector struct{}
|
||||
type processOwnerDetector struct{}
|
||||
type processRuntimeNameDetector struct{}
|
||||
type processRuntimeVersionDetector struct{}
|
||||
type processRuntimeDescriptionDetector struct{}
|
||||
type (
|
||||
processPIDDetector struct{}
|
||||
processExecutableNameDetector struct{}
|
||||
processExecutablePathDetector struct{}
|
||||
processCommandArgsDetector struct{}
|
||||
processOwnerDetector struct{}
|
||||
processRuntimeNameDetector struct{}
|
||||
processRuntimeVersionDetector struct{}
|
||||
processRuntimeDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the process identifier (PID) of the
|
||||
// executing process.
|
||||
|
|
|
@ -25,6 +25,8 @@ import (
|
|||
"go.opentelemetry.io/otel/sdk/instrumentation"
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
"go.opentelemetry.io/otel/trace/noop"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -73,6 +75,8 @@ func (cfg tracerProviderConfig) MarshalLog() interface{} {
|
|||
// TracerProvider is an OpenTelemetry TracerProvider. It provides Tracers to
|
||||
// instrumentation so it can trace operational flow through a system.
|
||||
type TracerProvider struct {
|
||||
embedded.TracerProvider
|
||||
|
||||
mu sync.Mutex
|
||||
namedTracer map[instrumentation.Scope]*tracer
|
||||
spanProcessors atomic.Pointer[spanProcessorStates]
|
||||
|
@ -139,7 +143,7 @@ func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
|
|||
func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
|
||||
// This check happens before the mutex is acquired to avoid deadlocking if Tracer() is called from within Shutdown().
|
||||
if p.isShutdown.Load() {
|
||||
return trace.NewNoopTracerProvider().Tracer(name, opts...)
|
||||
return noop.NewTracerProvider().Tracer(name, opts...)
|
||||
}
|
||||
c := trace.NewTracerConfig(opts...)
|
||||
if name == "" {
|
||||
|
@ -157,7 +161,7 @@ func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T
|
|||
// Must check the flag after acquiring the mutex to avoid returning a valid tracer if Shutdown() ran
|
||||
// after the first check above but before we acquired the mutex.
|
||||
if p.isShutdown.Load() {
|
||||
return trace.NewNoopTracerProvider().Tracer(name, opts...), true
|
||||
return noop.NewTracerProvider().Tracer(name, opts...), true
|
||||
}
|
||||
t, ok := p.namedTracer[is]
|
||||
if !ok {
|
||||
|
|
|
@ -158,9 +158,9 @@ func NeverSample() Sampler {
|
|||
return alwaysOffSampler{}
|
||||
}
|
||||
|
||||
// ParentBased returns a composite sampler which behaves differently,
|
||||
// ParentBased returns a sampler decorator which behaves differently,
|
||||
// based on the parent of the span. If the span has no parent,
|
||||
// the root(Sampler) is used to make sampling decision. If the span has
|
||||
// the decorated sampler is used to make sampling decision. If the span has
|
||||
// a parent, depending on whether the parent is remote and whether it
|
||||
// is sampled, one of the following samplers will apply:
|
||||
// - remoteParentSampled(Sampler) (default: AlwaysOn)
|
||||
|
|
|
@ -32,6 +32,7 @@ import (
|
|||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
// ReadOnlySpan allows reading information from the data structure underlying a
|
||||
|
@ -108,6 +109,8 @@ type ReadWriteSpan interface {
|
|||
// recordingSpan is an implementation of the OpenTelemetry Span API
|
||||
// representing the individual component of a trace that is sampled.
|
||||
type recordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
// mu protects the contents of this span.
|
||||
mu sync.Mutex
|
||||
|
||||
|
@ -158,8 +161,10 @@ type recordingSpan struct {
|
|||
tracer *tracer
|
||||
}
|
||||
|
||||
var _ ReadWriteSpan = (*recordingSpan)(nil)
|
||||
var _ runtimeTracer = (*recordingSpan)(nil)
|
||||
var (
|
||||
_ ReadWriteSpan = (*recordingSpan)(nil)
|
||||
_ runtimeTracer = (*recordingSpan)(nil)
|
||||
)
|
||||
|
||||
// SpanContext returns the SpanContext of this span.
|
||||
func (s *recordingSpan) SpanContext() trace.SpanContext {
|
||||
|
@ -772,6 +777,8 @@ func (s *recordingSpan) runtimeTrace(ctx context.Context) context.Context {
|
|||
// that wraps a SpanContext. It performs no operations other than to return
|
||||
// the wrapped SpanContext or TracerProvider that created it.
|
||||
type nonRecordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
// tracer is the SDK tracer that created this span.
|
||||
tracer *tracer
|
||||
sc trace.SpanContext
|
||||
|
|
|
@ -20,9 +20,12 @@ import (
|
|||
|
||||
"go.opentelemetry.io/otel/sdk/instrumentation"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
type tracer struct {
|
||||
embedded.Tracer
|
||||
|
||||
provider *TracerProvider
|
||||
instrumentationScope instrumentation.Scope
|
||||
}
|
||||
|
|
|
@ -16,5 +16,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk"
|
|||
|
||||
// Version is the current release version of the OpenTelemetry SDK in use.
|
||||
func Version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
|
|
@ -268,6 +268,7 @@ func (o stackTraceOption) applyEvent(c EventConfig) EventConfig {
|
|||
c.stackTrace = bool(o)
|
||||
return c
|
||||
}
|
||||
|
||||
func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig {
|
||||
c.stackTrace = bool(o)
|
||||
return c
|
||||
|
|
|
@ -62,5 +62,69 @@ a default.
|
|||
defer span.End()
|
||||
// ...
|
||||
}
|
||||
|
||||
# API Implementations
|
||||
|
||||
This package does not conform to the standard Go versioning policy; all of its
|
||||
interfaces may have methods added to them without a package major version bump.
|
||||
This non-standard API evolution could surprise an uninformed implementation
|
||||
author. They could unknowingly build their implementation in a way that would
|
||||
result in a runtime panic for their users that update to the new API.
|
||||
|
||||
The API is designed to help inform an instrumentation author about this
|
||||
non-standard API evolution. It requires them to choose a default behavior for
|
||||
unimplemented interface methods. There are three behavior choices they can
|
||||
make:
|
||||
|
||||
- Compilation failure
|
||||
- Panic
|
||||
- Default to another implementation
|
||||
|
||||
All interfaces in this API embed a corresponding interface from
|
||||
[go.opentelemetry.io/otel/trace/embedded]. If an author wants the default
|
||||
behavior of their implementations to be a compilation failure, signaling to
|
||||
their users they need to update to the latest version of that implementation,
|
||||
they need to embed the corresponding interface from
|
||||
[go.opentelemetry.io/otel/trace/embedded] in their implementation. For
|
||||
example,
|
||||
|
||||
import "go.opentelemetry.io/otel/trace/embedded"
|
||||
|
||||
type TracerProvider struct {
|
||||
embedded.TracerProvider
|
||||
// ...
|
||||
}
|
||||
|
||||
If an author wants the default behavior of their implementations to panic, they
|
||||
can embed the API interface directly.
|
||||
|
||||
import "go.opentelemetry.io/otel/trace"
|
||||
|
||||
type TracerProvider struct {
|
||||
trace.TracerProvider
|
||||
// ...
|
||||
}
|
||||
|
||||
This option is not recommended. It will lead to publishing packages that
|
||||
contain runtime panics when users update to newer versions of
|
||||
[go.opentelemetry.io/otel/trace], which may be done with a trasitive
|
||||
dependency.
|
||||
|
||||
Finally, an author can embed another implementation in theirs. The embedded
|
||||
implementation will be used for methods not defined by the author. For example,
|
||||
an author who wants to default to silently dropping the call can use
|
||||
[go.opentelemetry.io/otel/trace/noop]:
|
||||
|
||||
import "go.opentelemetry.io/otel/trace/noop"
|
||||
|
||||
type TracerProvider struct {
|
||||
noop.TracerProvider
|
||||
// ...
|
||||
}
|
||||
|
||||
It is strongly recommended that authors only embed
|
||||
[go.opentelemetry.io/otel/trace/noop] if they choose this default behavior.
|
||||
That implementation is the only one OpenTelemetry authors can guarantee will
|
||||
fully implement all the API interfaces when a user updates their API.
|
||||
*/
|
||||
package trace // import "go.opentelemetry.io/otel/trace"
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package embedded provides interfaces embedded within the [OpenTelemetry
|
||||
// trace API].
|
||||
//
|
||||
// Implementers of the [OpenTelemetry trace API] can embed the relevant type
|
||||
// from this package into their implementation directly. Doing so will result
|
||||
// in a compilation error for users when the [OpenTelemetry trace API] is
|
||||
// extended (which is something that can happen without a major version bump of
|
||||
// the API package).
|
||||
//
|
||||
// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace
|
||||
package embedded // import "go.opentelemetry.io/otel/trace/embedded"
|
||||
|
||||
// TracerProvider is embedded in
|
||||
// [go.opentelemetry.io/otel/trace.TracerProvider].
|
||||
//
|
||||
// Embed this interface in your implementation of the
|
||||
// [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to
|
||||
// experience a compilation error, signaling they need to update to your latest
|
||||
// implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider]
|
||||
// interface is extended (which is something that can happen without a major
|
||||
// version bump of the API package).
|
||||
type TracerProvider interface{ tracerProvider() }
|
||||
|
||||
// Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer].
|
||||
//
|
||||
// Embed this interface in your implementation of the
|
||||
// [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a
|
||||
// compilation error, signaling they need to update to your latest
|
||||
// implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface
|
||||
// is extended (which is something that can happen without a major version bump
|
||||
// of the API package).
|
||||
type Tracer interface{ tracer() }
|
||||
|
||||
// Span is embedded in [go.opentelemetry.io/otel/trace.Span].
|
||||
//
|
||||
// Embed this interface in your implementation of the
|
||||
// [go.opentelemetry.io/otel/trace.Span] if you want users to experience a
|
||||
// compilation error, signaling they need to update to your latest
|
||||
// implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is
|
||||
// extended (which is something that can happen without a major version bump of
|
||||
// the API package).
|
||||
type Span interface{ span() }
|
|
@ -19,16 +19,20 @@ import (
|
|||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
// NewNoopTracerProvider returns an implementation of TracerProvider that
|
||||
// performs no operations. The Tracer and Spans created from the returned
|
||||
// TracerProvider also perform no operations.
|
||||
//
|
||||
// Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider]
|
||||
// instead.
|
||||
func NewNoopTracerProvider() TracerProvider {
|
||||
return noopTracerProvider{}
|
||||
}
|
||||
|
||||
type noopTracerProvider struct{}
|
||||
type noopTracerProvider struct{ embedded.TracerProvider }
|
||||
|
||||
var _ TracerProvider = noopTracerProvider{}
|
||||
|
||||
|
@ -38,7 +42,7 @@ func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer {
|
|||
}
|
||||
|
||||
// noopTracer is an implementation of Tracer that performs no operations.
|
||||
type noopTracer struct{}
|
||||
type noopTracer struct{ embedded.Tracer }
|
||||
|
||||
var _ Tracer = noopTracer{}
|
||||
|
||||
|
@ -54,7 +58,7 @@ func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption
|
|||
}
|
||||
|
||||
// noopSpan is an implementation of Span that performs no operations.
|
||||
type noopSpan struct{}
|
||||
type noopSpan struct{ embedded.Span }
|
||||
|
||||
var _ Span = noopSpan{}
|
||||
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package noop provides an implementation of the OpenTelemetry trace API that
|
||||
// produces no telemetry and minimizes used computation resources.
|
||||
//
|
||||
// Using this package to implement the OpenTelemetry trace API will effectively
|
||||
// disable OpenTelemetry.
|
||||
//
|
||||
// This implementation can be embedded in other implementations of the
|
||||
// OpenTelemetry trace API. Doing so will mean the implementation defaults to
|
||||
// no operation for methods it does not implement.
|
||||
package noop // import "go.opentelemetry.io/otel/trace/noop"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
var (
|
||||
// Compile-time check this implements the OpenTelemetry API.
|
||||
|
||||
_ trace.TracerProvider = TracerProvider{}
|
||||
_ trace.Tracer = Tracer{}
|
||||
_ trace.Span = Span{}
|
||||
)
|
||||
|
||||
// TracerProvider is an OpenTelemetry No-Op TracerProvider.
|
||||
type TracerProvider struct{ embedded.TracerProvider }
|
||||
|
||||
// NewTracerProvider returns a TracerProvider that does not record any telemetry.
|
||||
func NewTracerProvider() TracerProvider {
|
||||
return TracerProvider{}
|
||||
}
|
||||
|
||||
// Tracer returns an OpenTelemetry Tracer that does not record any telemetry.
|
||||
func (TracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer {
|
||||
return Tracer{}
|
||||
}
|
||||
|
||||
// Tracer is an OpenTelemetry No-Op Tracer.
|
||||
type Tracer struct{ embedded.Tracer }
|
||||
|
||||
// Start creates a span. The created span will be set in a child context of ctx
|
||||
// and returned with the span.
|
||||
//
|
||||
// If ctx contains a span context, the returned span will also contain that
|
||||
// span context. If the span context in ctx is for a non-recording span, that
|
||||
// span instance will be returned directly.
|
||||
func (t Tracer) Start(ctx context.Context, _ string, _ ...trace.SpanStartOption) (context.Context, trace.Span) {
|
||||
span := trace.SpanFromContext(ctx)
|
||||
|
||||
// If the parent context contains a non-zero span context, that span
|
||||
// context needs to be returned as a non-recording span
|
||||
// (https://github.com/open-telemetry/opentelemetry-specification/blob/3a1dde966a4ce87cce5adf464359fe369741bbea/specification/trace/api.md#behavior-of-the-api-in-the-absence-of-an-installed-sdk).
|
||||
var zeroSC trace.SpanContext
|
||||
if sc := span.SpanContext(); !sc.Equal(zeroSC) {
|
||||
if !span.IsRecording() {
|
||||
// If the span is not recording return it directly.
|
||||
return ctx, span
|
||||
}
|
||||
// Otherwise, return the span context needs in a non-recording span.
|
||||
span = Span{sc: sc}
|
||||
} else {
|
||||
// No parent, return a No-Op span with an empty span context.
|
||||
span = Span{}
|
||||
}
|
||||
return trace.ContextWithSpan(ctx, span), span
|
||||
}
|
||||
|
||||
// Span is an OpenTelemetry No-Op Span.
|
||||
type Span struct {
|
||||
embedded.Span
|
||||
|
||||
sc trace.SpanContext
|
||||
}
|
||||
|
||||
// SpanContext returns an empty span context.
|
||||
func (s Span) SpanContext() trace.SpanContext { return s.sc }
|
||||
|
||||
// IsRecording always returns false.
|
||||
func (Span) IsRecording() bool { return false }
|
||||
|
||||
// SetStatus does nothing.
|
||||
func (Span) SetStatus(codes.Code, string) {}
|
||||
|
||||
// SetAttributes does nothing.
|
||||
func (Span) SetAttributes(...attribute.KeyValue) {}
|
||||
|
||||
// End does nothing.
|
||||
func (Span) End(...trace.SpanEndOption) {}
|
||||
|
||||
// RecordError does nothing.
|
||||
func (Span) RecordError(error, ...trace.EventOption) {}
|
||||
|
||||
// AddEvent does nothing.
|
||||
func (Span) AddEvent(string, ...trace.EventOption) {}
|
||||
|
||||
// SetName does nothing.
|
||||
func (Span) SetName(string) {}
|
||||
|
||||
// TracerProvider returns a No-Op TracerProvider.
|
||||
func (Span) TracerProvider() trace.TracerProvider { return TracerProvider{} }
|
|
@ -22,6 +22,7 @@ import (
|
|||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -48,8 +49,10 @@ func (e errorConst) Error() string {
|
|||
// nolint:revive // revive complains about stutter of `trace.TraceID`.
|
||||
type TraceID [16]byte
|
||||
|
||||
var nilTraceID TraceID
|
||||
var _ json.Marshaler = nilTraceID
|
||||
var (
|
||||
nilTraceID TraceID
|
||||
_ json.Marshaler = nilTraceID
|
||||
)
|
||||
|
||||
// IsValid checks whether the trace TraceID is valid. A valid trace ID does
|
||||
// not consist of zeros only.
|
||||
|
@ -71,8 +74,10 @@ func (t TraceID) String() string {
|
|||
// SpanID is a unique identity of a span in a trace.
|
||||
type SpanID [8]byte
|
||||
|
||||
var nilSpanID SpanID
|
||||
var _ json.Marshaler = nilSpanID
|
||||
var (
|
||||
nilSpanID SpanID
|
||||
_ json.Marshaler = nilSpanID
|
||||
)
|
||||
|
||||
// IsValid checks whether the SpanID is valid. A valid SpanID does not consist
|
||||
// of zeros only.
|
||||
|
@ -338,8 +343,15 @@ func (sc SpanContext) MarshalJSON() ([]byte, error) {
|
|||
// create a Span and it is then up to the operation the Span represents to
|
||||
// properly end the Span when the operation itself ends.
|
||||
//
|
||||
// Warning: methods may be added to this interface in minor releases.
|
||||
// Warning: Methods may be added to this interface in minor releases. See
|
||||
// package documentation on API implementation for information on how to set
|
||||
// default behavior for unimplemented methods.
|
||||
type Span interface {
|
||||
// Users of the interface can ignore this. This embedded type is only used
|
||||
// by implementations of this interface. See the "API Implementations"
|
||||
// section of the package documentation for more information.
|
||||
embedded.Span
|
||||
|
||||
// End completes the Span. The Span is considered complete and ready to be
|
||||
// delivered through the rest of the telemetry pipeline after this method
|
||||
// is called. Therefore, updates to the Span are not allowed after this
|
||||
|
@ -486,8 +498,15 @@ func (sk SpanKind) String() string {
|
|||
|
||||
// Tracer is the creator of Spans.
|
||||
//
|
||||
// Warning: methods may be added to this interface in minor releases.
|
||||
// Warning: Methods may be added to this interface in minor releases. See
|
||||
// package documentation on API implementation for information on how to set
|
||||
// default behavior for unimplemented methods.
|
||||
type Tracer interface {
|
||||
// Users of the interface can ignore this. This embedded type is only used
|
||||
// by implementations of this interface. See the "API Implementations"
|
||||
// section of the package documentation for more information.
|
||||
embedded.Tracer
|
||||
|
||||
// Start creates a span and a context.Context containing the newly-created span.
|
||||
//
|
||||
// If the context.Context provided in `ctx` contains a Span then the newly-created
|
||||
|
@ -518,8 +537,15 @@ type Tracer interface {
|
|||
// at runtime from its users or it can simply use the globally registered one
|
||||
// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider).
|
||||
//
|
||||
// Warning: methods may be added to this interface in minor releases.
|
||||
// Warning: Methods may be added to this interface in minor releases. See
|
||||
// package documentation on API implementation for information on how to set
|
||||
// default behavior for unimplemented methods.
|
||||
type TracerProvider interface {
|
||||
// Users of the interface can ignore this. This embedded type is only used
|
||||
// by implementations of this interface. See the "API Implementations"
|
||||
// section of the package documentation for more information.
|
||||
embedded.TracerProvider
|
||||
|
||||
// Tracer returns a unique Tracer scoped to be used by instrumentation code
|
||||
// to trace computational workflows. The scope and identity of that
|
||||
// instrumentation code is uniquely defined by the name and options passed.
|
||||
|
|
|
@ -28,9 +28,9 @@ const (
|
|||
|
||||
// based on the W3C Trace Context specification, see
|
||||
// https://www.w3.org/TR/trace-context-1/#tracestate-header
|
||||
noTenantKeyFormat = `[a-z][_0-9a-z\-\*\/]{0,255}`
|
||||
withTenantKeyFormat = `[a-z0-9][_0-9a-z\-\*\/]{0,240}@[a-z][_0-9a-z\-\*\/]{0,13}`
|
||||
valueFormat = `[\x20-\x2b\x2d-\x3c\x3e-\x7e]{0,255}[\x21-\x2b\x2d-\x3c\x3e-\x7e]`
|
||||
noTenantKeyFormat = `[a-z][_0-9a-z\-\*\/]*`
|
||||
withTenantKeyFormat = `[a-z0-9][_0-9a-z\-\*\/]*@[a-z][_0-9a-z\-\*\/]*`
|
||||
valueFormat = `[\x20-\x2b\x2d-\x3c\x3e-\x7e]*[\x21-\x2b\x2d-\x3c\x3e-\x7e]`
|
||||
|
||||
errInvalidKey errorConst = "invalid tracestate key"
|
||||
errInvalidValue errorConst = "invalid tracestate value"
|
||||
|
@ -40,9 +40,10 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
keyRe = regexp.MustCompile(`^((` + noTenantKeyFormat + `)|(` + withTenantKeyFormat + `))$`)
|
||||
valueRe = regexp.MustCompile(`^(` + valueFormat + `)$`)
|
||||
memberRe = regexp.MustCompile(`^\s*((` + noTenantKeyFormat + `)|(` + withTenantKeyFormat + `))=(` + valueFormat + `)\s*$`)
|
||||
noTenantKeyRe = regexp.MustCompile(`^` + noTenantKeyFormat + `$`)
|
||||
withTenantKeyRe = regexp.MustCompile(`^` + withTenantKeyFormat + `$`)
|
||||
valueRe = regexp.MustCompile(`^` + valueFormat + `$`)
|
||||
memberRe = regexp.MustCompile(`^\s*((?:` + noTenantKeyFormat + `)|(?:` + withTenantKeyFormat + `))=(` + valueFormat + `)\s*$`)
|
||||
)
|
||||
|
||||
type member struct {
|
||||
|
@ -51,10 +52,19 @@ type member struct {
|
|||
}
|
||||
|
||||
func newMember(key, value string) (member, error) {
|
||||
if !keyRe.MatchString(key) {
|
||||
if len(key) > 256 {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidKey, key)
|
||||
}
|
||||
if !valueRe.MatchString(value) {
|
||||
if !noTenantKeyRe.MatchString(key) {
|
||||
if !withTenantKeyRe.MatchString(key) {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidKey, key)
|
||||
}
|
||||
atIndex := strings.LastIndex(key, "@")
|
||||
if atIndex > 241 || len(key)-1-atIndex > 14 {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidKey, key)
|
||||
}
|
||||
}
|
||||
if len(value) > 256 || !valueRe.MatchString(value) {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidValue, value)
|
||||
}
|
||||
return member{Key: key, Value: value}, nil
|
||||
|
@ -62,14 +72,14 @@ func newMember(key, value string) (member, error) {
|
|||
|
||||
func parseMember(m string) (member, error) {
|
||||
matches := memberRe.FindStringSubmatch(m)
|
||||
if len(matches) != 5 {
|
||||
if len(matches) != 3 {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
||||
}
|
||||
|
||||
return member{
|
||||
Key: matches[1],
|
||||
Value: matches[4],
|
||||
}, nil
|
||||
result, e := newMember(matches[1], matches[2])
|
||||
if e != nil {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// String encodes member into a string compliant with the W3C Trace Context
|
||||
|
|
|
@ -16,5 +16,5 @@ package otel // import "go.opentelemetry.io/otel"
|
|||
|
||||
// Version is the current release version of OpenTelemetry in use.
|
||||
func Version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
|
|
@ -14,13 +14,12 @@
|
|||
|
||||
module-sets:
|
||||
stable-v1:
|
||||
version: v1.19.0
|
||||
version: v1.21.0
|
||||
modules:
|
||||
- go.opentelemetry.io/otel
|
||||
- go.opentelemetry.io/otel/bridge/opentracing
|
||||
- go.opentelemetry.io/otel/bridge/opentracing/test
|
||||
- go.opentelemetry.io/otel/example/dice
|
||||
- go.opentelemetry.io/otel/example/fib
|
||||
- go.opentelemetry.io/otel/example/namedtracer
|
||||
- go.opentelemetry.io/otel/example/otel-collector
|
||||
- go.opentelemetry.io/otel/example/passthrough
|
||||
|
@ -35,14 +34,12 @@ module-sets:
|
|||
- go.opentelemetry.io/otel/sdk/metric
|
||||
- go.opentelemetry.io/otel/trace
|
||||
experimental-metrics:
|
||||
version: v0.42.0
|
||||
version: v0.44.0
|
||||
modules:
|
||||
- go.opentelemetry.io/otel/bridge/opencensus
|
||||
- go.opentelemetry.io/otel/bridge/opencensus/test
|
||||
- go.opentelemetry.io/otel/example/opencensus
|
||||
- go.opentelemetry.io/otel/example/prometheus
|
||||
- go.opentelemetry.io/otel/example/view
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
|
||||
- go.opentelemetry.io/otel/exporters/prometheus
|
||||
|
|
|
@ -213,17 +213,3 @@ func (s Set[T]) Clone() Set[T] {
|
|||
func (s Set[T]) SymmetricDifference(s2 Set[T]) Set[T] {
|
||||
return s.Difference(s2).Union(s2.Difference(s))
|
||||
}
|
||||
|
||||
// Clear empties the set.
|
||||
// It is preferable to replace the set with a newly constructed set,
|
||||
// but not all callers can do that (when there are other references to the map).
|
||||
// In some cases the set *won't* be fully cleared, e.g. a Set[float32] containing NaN
|
||||
// can't be cleared because NaN can't be removed.
|
||||
// For sets containing items of a type that is reflexive for ==,
|
||||
// this is optimized to a single call to runtime.mapclear().
|
||||
func (s Set[T]) Clear() Set[T] {
|
||||
for key := range s {
|
||||
delete(s, key)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
//go:build !go1.21
|
||||
|
||||
/*
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package set
|
||||
|
||||
// Clear empties the set.
|
||||
// It is preferable to replace the set with a newly constructed set,
|
||||
// but not all callers can do that (when there are other references to the map).
|
||||
// In some cases the set *won't* be fully cleared, e.g. a Set[float32] containing NaN
|
||||
// can't be cleared because NaN can't be removed.
|
||||
// For sets containing items of a type that is reflexive for ==,
|
||||
// this is optimized to a single call to runtime.mapclear().
|
||||
func (s Set[T]) Clear() Set[T] {
|
||||
for key := range s {
|
||||
delete(s, key)
|
||||
}
|
||||
return s
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
//go:build go1.21
|
||||
|
||||
/*
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package set
|
||||
|
||||
// Clear empties the set.
|
||||
// It is preferable to replace the set with a newly constructed set,
|
||||
// but not all callers can do that (when there are other references to the map).
|
||||
func (s Set[T]) Clear() Set[T] {
|
||||
clear(s)
|
||||
return s
|
||||
}
|
|
@ -97,7 +97,7 @@ github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes
|
|||
github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector
|
||||
github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs
|
||||
github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter
|
||||
# github.com/aws/aws-sdk-go v1.47.13
|
||||
# github.com/aws/aws-sdk-go v1.48.3
|
||||
## explicit; go 1.19
|
||||
github.com/aws/aws-sdk-go/aws
|
||||
github.com/aws/aws-sdk-go/aws/arn
|
||||
|
@ -328,7 +328,7 @@ github.com/evertras/bubble-table/table
|
|||
# github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d
|
||||
## explicit
|
||||
github.com/exponent-io/jsonpath
|
||||
# github.com/felixge/httpsnoop v1.0.3
|
||||
# github.com/felixge/httpsnoop v1.0.4
|
||||
## explicit; go 1.13
|
||||
github.com/felixge/httpsnoop
|
||||
# github.com/fsnotify/fsnotify v1.6.0
|
||||
|
@ -916,11 +916,11 @@ go.opencensus.io/trace
|
|||
go.opencensus.io/trace/internal
|
||||
go.opencensus.io/trace/propagation
|
||||
go.opencensus.io/trace/tracestate
|
||||
# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0
|
||||
## explicit; go 1.19
|
||||
# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil
|
||||
# go.opentelemetry.io/otel v1.19.0
|
||||
# go.opentelemetry.io/otel v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel
|
||||
go.opentelemetry.io/otel/attribute
|
||||
|
@ -935,15 +935,15 @@ go.opentelemetry.io/otel/semconv/internal/v2
|
|||
go.opentelemetry.io/otel/semconv/v1.17.0
|
||||
go.opentelemetry.io/otel/semconv/v1.17.0/httpconv
|
||||
go.opentelemetry.io/otel/semconv/v1.21.0
|
||||
# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
|
||||
# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform
|
||||
# go.opentelemetry.io/otel/metric v1.19.0
|
||||
# go.opentelemetry.io/otel/metric v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel/metric
|
||||
go.opentelemetry.io/otel/metric/embedded
|
||||
# go.opentelemetry.io/otel/sdk v1.19.0
|
||||
# go.opentelemetry.io/otel/sdk v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel/sdk
|
||||
go.opentelemetry.io/otel/sdk/instrumentation
|
||||
|
@ -951,9 +951,11 @@ go.opentelemetry.io/otel/sdk/internal
|
|||
go.opentelemetry.io/otel/sdk/internal/env
|
||||
go.opentelemetry.io/otel/sdk/resource
|
||||
go.opentelemetry.io/otel/sdk/trace
|
||||
# go.opentelemetry.io/otel/trace v1.19.0
|
||||
# go.opentelemetry.io/otel/trace v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel/trace
|
||||
go.opentelemetry.io/otel/trace/embedded
|
||||
go.opentelemetry.io/otel/trace/noop
|
||||
# go.opentelemetry.io/proto/otlp v1.0.0
|
||||
## explicit; go 1.17
|
||||
go.opentelemetry.io/proto/otlp/collector/trace/v1
|
||||
|
@ -1730,7 +1732,7 @@ k8s.io/cloud-provider/service/helpers
|
|||
k8s.io/cloud-provider/volume
|
||||
k8s.io/cloud-provider/volume/errors
|
||||
k8s.io/cloud-provider/volume/helpers
|
||||
# k8s.io/cloud-provider-aws v1.28.2
|
||||
# k8s.io/cloud-provider-aws v1.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/cloud-provider-aws/pkg/providers/v1
|
||||
# k8s.io/cloud-provider-gcp/providers v0.27.1
|
||||
|
@ -1814,7 +1816,7 @@ k8s.io/kubelet/config/v1beta1
|
|||
# k8s.io/mount-utils v0.28.4
|
||||
## explicit; go 1.20
|
||||
k8s.io/mount-utils
|
||||
# k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
# k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf
|
||||
## explicit; go 1.18
|
||||
k8s.io/utils/buffer
|
||||
k8s.io/utils/clock
|
||||
|
|
Loading…
Reference in New Issue