file_name
stringlengths
3
137
prefix
stringlengths
0
918k
suffix
stringlengths
0
962k
middle
stringlengths
0
812k
splitter.rs
use makepad_render::*; pub struct Splitter { view: View, axis: Axis, align_position: AlignPosition, rect: Rect, position: f32, split_bar: DrawColor, split_bar_size: f32, drag_start_align_position: Option<AlignPosition>, } impl Splitter { pub fn style(cx: &mut Cx) { live_body!(cx, { self::split_bar_size: 2.0; self::split_bar_color: #19; }) } pub fn new(cx: &mut Cx) -> Splitter { Splitter { view: View::new(), axis: Axis::Horizontal, align_position: AlignPosition::Weighted(0.5), rect: Rect::default(), position: 0.0, split_bar: DrawColor::new(cx, default_shader!()), split_bar_size: 0.0, drag_start_align_position: None, } } pub fn begin(&mut self, cx: &mut Cx) -> Result<(), ()> { self.view.begin_view(cx, Layout::default())?; self.apply_style(cx); self.rect = cx.get_turtle_rect(); self.position = self.align_position.to_position(self.axis, self.rect); cx.begin_turtle(self.layout(), Area::Empty); Ok(()) } pub fn middle(&mut self, cx: &mut Cx) { cx.end_turtle(Area::Empty); match self.axis { Axis::Horizontal => { self.split_bar.draw_quad_abs( cx, Rect { pos: vec2(self.rect.pos.x + self.position, self.rect.pos.y), size: vec2(self.split_bar_size, self.rect.size.y), }, ); cx.set_turtle_pos(Vec2 { x: self.rect.pos.x + self.position + self.split_bar_size, y: self.rect.pos.y, }); } Axis::Vertical => { self.split_bar.draw_quad_abs( cx, Rect { pos: vec2(self.rect.pos.x, self.rect.pos.y + self.position), size: vec2(self.rect.size.x, self.split_bar_size), }, ); cx.set_turtle_pos(Vec2 { x: self.rect.pos.x, y: self.rect.pos.y + self.position + self.split_bar_size, }); } } cx.begin_turtle(Layout::default(), Area::Empty); } pub fn end(&mut self, cx: &mut Cx) { cx.end_turtle(Area::Empty); self.view.end_view(cx); } fn apply_style(&mut self, cx: &mut Cx) { self.split_bar_size = live_float!(cx, self::split_bar_size); self.split_bar.color = live_vec4!(cx, self::split_bar_color); } fn layout(&self) -> Layout { Layout { walk: match self.axis { Axis::Horizontal => Walk::wh(Width::Fix(self.position), Height::Fill), Axis::Vertical => Walk::wh(Width::Fill, Height::Fix(self.position)), }, ..Layout::default() } } pub fn axis(&self) -> Axis { self.axis } pub fn set_axis(&mut self, axis: Axis) { self.axis = axis; } pub fn align_position(&self) -> AlignPosition { self.align_position } pub fn set_align_position(&mut self, align_position: AlignPosition) { self.align_position = align_position; } pub fn handle_event( &mut self, cx: &mut Cx, event: &mut Event, dispatch_action: &mut dyn FnMut(&mut Cx, Action), ) { match event.hits( cx, self.split_bar.area(), HitOpt { margin: Some(self.margin()), ..HitOpt::default() }, ) { Event::FingerHover(_) => match self.axis { Axis::Horizontal => cx.set_hover_mouse_cursor(MouseCursor::ColResize), Axis::Vertical => cx.set_hover_mouse_cursor(MouseCursor::RowResize), }, Event::FingerDown(_) => { self.drag_start_align_position = Some(self.align_position); } Event::FingerUp(_) => { self.drag_start_align_position = None; } Event::FingerMove(event) => { if let Some(drag_start_align_position) = self.drag_start_align_position { let delta = match self.axis { Axis::Horizontal => event.abs.x - event.abs_start.x, Axis::Vertical => event.abs.y - event.abs_start.y, }; let new_position = drag_start_align_position.to_position(self.axis, self.rect) + delta; self.align_position = match self.axis { Axis::Horizontal => { let center = self.rect.size.x / 2.0; if new_position < center - 30.0 { AlignPosition::FromStart(new_position) } else if new_position > center + 30.0 { AlignPosition::FromEnd(self.rect.size.x - new_position) } else { AlignPosition::Weighted(new_position / self.rect.size.x) } } Axis::Vertical => { let center = self.rect.size.y / 2.0; if new_position < center - 30.0 { AlignPosition::FromStart(new_position) } else if new_position > center + 30.0 { AlignPosition::FromEnd(self.rect.size.y - new_position) } else
} }; cx.redraw_child_area(self.split_bar.area()); dispatch_action(cx, Action::Redraw); } } _ => {} } } fn margin(&self) -> Margin { match self.axis { Axis::Horizontal => Margin { l: 3.0, t: 0.0, r: 7.0, b: 0.0, }, Axis::Vertical => Margin { l: 0.0, t: 3.0, r: 0.0, b: 7.0, }, } } } #[derive(Clone, Copy, Debug)] pub enum AlignPosition { FromStart(f32), FromEnd(f32), Weighted(f32), } impl AlignPosition { fn to_position(self, axis: Axis, rect: Rect) -> f32 { match axis { Axis::Horizontal => match self { AlignPosition::FromStart(position) => position, AlignPosition::FromEnd(position) => rect.size.x - position, AlignPosition::Weighted(weight) => weight * rect.size.x, }, Axis::Vertical => match self { AlignPosition::FromStart(position) => position, AlignPosition::FromEnd(position) => rect.size.y - position, AlignPosition::Weighted(weight) => weight * rect.size.y, }, } } } pub enum Action { Redraw, }
{ AlignPosition::Weighted(new_position / self.rect.size.y) }
fre.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from argparse import ArgumentParser from urllib import request from bs4 import BeautifulSoup from xml.etree import ElementTree from re import search import os import humanfriendly def is_url_or_file(item): ret = "file" if search("http[s]", item): ret = "url" return ret def remove_html_tags(t):
def readability_index(lang, asl, asw): idx = 206.835 - (1.015 * asl) - (84.6 * asw) if lang == "de": idx = 180 - asl - (58.5 * asw) return idx def readability_notes(index): note = "Very difficult to read. Best understood by university graduates." if index > 90: note = "Very easy to read. Easily understood by an average 11-year-old student." elif index > 80: note = "Easy to read. Conversational English for consumers." elif index > 70: note = "Fairly easy to read." elif index > 60: note = "Plain English. Easily understood by 13- to 15-year-old students." elif index > 50: note = "Fairly difficult to read." elif index > 30: note = "Difficult to read." return note def count_syllables(lang, word): """ Detect syllables in words Thanks to http://codegolf.stackexchange.com/questions/47322/how-to-count-the-syllables-in-a-word """ if lang == 'en': cnt = len(''.join(" x"[c in"aeiouy"]for c in(word[:-1]if'e' == word[-1]else word)).split()) else: cnt = len(''.join(" x"[c in"aeiou"]for c in(word[:-1]if'e' == word[-1]else word)).split()) return cnt def output(r_idx, r_note): print() print("Readability checker (Flesh Reading Ease)") print("========================================") print() print("Score:\t%.2f" % r_idx) print("Note:\t%s" % r_note) exit() def main(arguments): src = arguments.source lang = arguments.lang source_type = is_url_or_file(src) paragraphs = [] sentences_cnt = 0 word_cnt = 0 syllables_cnt = 0 if source_type == "url": content = request.urlopen(src).read() paragraphs = BeautifulSoup(content, "html.parser").find_all("p") for idx, el in enumerate(paragraphs): paragraphs[idx] = remove_html_tags(str(el)) else: if os.path.isfile(src): with open(src, "r") as f: content = f.read() paragraphs = content.split("\n\n") else: print("-> The specified file (" + src + ") does not exist!") exit() if len(paragraphs) > 0: for p in paragraphs: words = p.split() word_cnt += len(words) sentences_cnt += len(p.split(".")) for w in words: syllables_cnt += count_syllables(lang, w) asl = word_cnt / sentences_cnt asw = syllables_cnt / word_cnt ridx = readability_index(lang, asl, asw) output(ridx, readability_notes(ridx)) else: print("-> No text to analyze!") if __name__ == '__main__': parser = ArgumentParser(description="Check the readability of a given text (URL or local file) with the \ Flesh Reading Ease algorithm.") parser.add_argument('lang', default="en", help="Select the language of the text, supported 'en' or 'de'") parser.add_argument('source', help="Specify a URL (http://example.com) or a local file (path/to/file)") args = parser.parse_args() main(args)
return ''.join(ElementTree.fromstring(t).itertext())
AmsPacket.go
// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you 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 model import ( "encoding/xml" "errors" "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils" "io" ) // Code generated by build-utils. DO NOT EDIT. // The data-structure of this message type AmsPacket struct { TargetAmsNetId *AmsNetId TargetAmsPort uint16 SourceAmsNetId *AmsNetId SourceAmsPort uint16 CommandId CommandId State *State ErrorCode uint32 InvokeId uint32 Data *AdsData IAmsPacket } // The corresponding interface type IAmsPacket interface { LengthInBytes() uint16 LengthInBits() uint16 Serialize(io utils.WriteBuffer) error xml.Marshaler } func NewAmsPacket(targetAmsNetId *AmsNetId, targetAmsPort uint16, sourceAmsNetId *AmsNetId, sourceAmsPort uint16, commandId CommandId, state *State, errorCode uint32, invokeId uint32, data *AdsData) *AmsPacket { return &AmsPacket{TargetAmsNetId: targetAmsNetId, TargetAmsPort: targetAmsPort, SourceAmsNetId: sourceAmsNetId, SourceAmsPort: sourceAmsPort, CommandId: commandId, State: state, ErrorCode: errorCode, InvokeId: invokeId, Data: data} } func
(structType interface{}) *AmsPacket { castFunc := func(typ interface{}) *AmsPacket { if casted, ok := typ.(AmsPacket); ok { return &casted } if casted, ok := typ.(*AmsPacket); ok { return casted } return nil } return castFunc(structType) } func (m *AmsPacket) GetTypeName() string { return "AmsPacket" } func (m *AmsPacket) LengthInBits() uint16 { lengthInBits := uint16(0) // Simple field (targetAmsNetId) lengthInBits += m.TargetAmsNetId.LengthInBits() // Simple field (targetAmsPort) lengthInBits += 16 // Simple field (sourceAmsNetId) lengthInBits += m.SourceAmsNetId.LengthInBits() // Simple field (sourceAmsPort) lengthInBits += 16 // Simple field (commandId) lengthInBits += 16 // Simple field (state) lengthInBits += m.State.LengthInBits() // Implicit Field (length) lengthInBits += 32 // Simple field (errorCode) lengthInBits += 32 // Simple field (invokeId) lengthInBits += 32 // Simple field (data) lengthInBits += m.Data.LengthInBits() return lengthInBits } func (m *AmsPacket) LengthInBytes() uint16 { return m.LengthInBits() / 8 } func AmsPacketParse(io *utils.ReadBuffer) (*AmsPacket, error) { // Simple Field (targetAmsNetId) targetAmsNetId, _targetAmsNetIdErr := AmsNetIdParse(io) if _targetAmsNetIdErr != nil { return nil, errors.New("Error parsing 'targetAmsNetId' field " + _targetAmsNetIdErr.Error()) } // Simple Field (targetAmsPort) targetAmsPort, _targetAmsPortErr := io.ReadUint16(16) if _targetAmsPortErr != nil { return nil, errors.New("Error parsing 'targetAmsPort' field " + _targetAmsPortErr.Error()) } // Simple Field (sourceAmsNetId) sourceAmsNetId, _sourceAmsNetIdErr := AmsNetIdParse(io) if _sourceAmsNetIdErr != nil { return nil, errors.New("Error parsing 'sourceAmsNetId' field " + _sourceAmsNetIdErr.Error()) } // Simple Field (sourceAmsPort) sourceAmsPort, _sourceAmsPortErr := io.ReadUint16(16) if _sourceAmsPortErr != nil { return nil, errors.New("Error parsing 'sourceAmsPort' field " + _sourceAmsPortErr.Error()) } // Simple Field (commandId) commandId, _commandIdErr := CommandIdParse(io) if _commandIdErr != nil { return nil, errors.New("Error parsing 'commandId' field " + _commandIdErr.Error()) } // Simple Field (state) state, _stateErr := StateParse(io) if _stateErr != nil { return nil, errors.New("Error parsing 'state' field " + _stateErr.Error()) } // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) _, _lengthErr := io.ReadUint32(32) if _lengthErr != nil { return nil, errors.New("Error parsing 'length' field " + _lengthErr.Error()) } // Simple Field (errorCode) errorCode, _errorCodeErr := io.ReadUint32(32) if _errorCodeErr != nil { return nil, errors.New("Error parsing 'errorCode' field " + _errorCodeErr.Error()) } // Simple Field (invokeId) invokeId, _invokeIdErr := io.ReadUint32(32) if _invokeIdErr != nil { return nil, errors.New("Error parsing 'invokeId' field " + _invokeIdErr.Error()) } // Simple Field (data) data, _dataErr := AdsDataParse(io, &commandId, state.Response) if _dataErr != nil { return nil, errors.New("Error parsing 'data' field " + _dataErr.Error()) } // Create the instance return NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, commandId, state, errorCode, invokeId, data), nil } func (m *AmsPacket) Serialize(io utils.WriteBuffer) error { // Simple Field (targetAmsNetId) _targetAmsNetIdErr := m.TargetAmsNetId.Serialize(io) if _targetAmsNetIdErr != nil { return errors.New("Error serializing 'targetAmsNetId' field " + _targetAmsNetIdErr.Error()) } // Simple Field (targetAmsPort) targetAmsPort := uint16(m.TargetAmsPort) _targetAmsPortErr := io.WriteUint16(16, (targetAmsPort)) if _targetAmsPortErr != nil { return errors.New("Error serializing 'targetAmsPort' field " + _targetAmsPortErr.Error()) } // Simple Field (sourceAmsNetId) _sourceAmsNetIdErr := m.SourceAmsNetId.Serialize(io) if _sourceAmsNetIdErr != nil { return errors.New("Error serializing 'sourceAmsNetId' field " + _sourceAmsNetIdErr.Error()) } // Simple Field (sourceAmsPort) sourceAmsPort := uint16(m.SourceAmsPort) _sourceAmsPortErr := io.WriteUint16(16, (sourceAmsPort)) if _sourceAmsPortErr != nil { return errors.New("Error serializing 'sourceAmsPort' field " + _sourceAmsPortErr.Error()) } // Simple Field (commandId) _commandIdErr := m.CommandId.Serialize(io) if _commandIdErr != nil { return errors.New("Error serializing 'commandId' field " + _commandIdErr.Error()) } // Simple Field (state) _stateErr := m.State.Serialize(io) if _stateErr != nil { return errors.New("Error serializing 'state' field " + _stateErr.Error()) } // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) length := uint32(m.Data.LengthInBytes()) _lengthErr := io.WriteUint32(32, (length)) if _lengthErr != nil { return errors.New("Error serializing 'length' field " + _lengthErr.Error()) } // Simple Field (errorCode) errorCode := uint32(m.ErrorCode) _errorCodeErr := io.WriteUint32(32, (errorCode)) if _errorCodeErr != nil { return errors.New("Error serializing 'errorCode' field " + _errorCodeErr.Error()) } // Simple Field (invokeId) invokeId := uint32(m.InvokeId) _invokeIdErr := io.WriteUint32(32, (invokeId)) if _invokeIdErr != nil { return errors.New("Error serializing 'invokeId' field " + _invokeIdErr.Error()) } // Simple Field (data) _dataErr := m.Data.Serialize(io) if _dataErr != nil { return errors.New("Error serializing 'data' field " + _dataErr.Error()) } return nil } func (m *AmsPacket) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { var token xml.Token var err error for { token, err = d.Token() if err != nil { if err == io.EOF { return nil } return err } switch token.(type) { case xml.StartElement: tok := token.(xml.StartElement) switch tok.Name.Local { case "targetAmsNetId": var data *AmsNetId if err := d.DecodeElement(data, &tok); err != nil { return err } m.TargetAmsNetId = data case "targetAmsPort": var data uint16 if err := d.DecodeElement(&data, &tok); err != nil { return err } m.TargetAmsPort = data case "sourceAmsNetId": var data *AmsNetId if err := d.DecodeElement(data, &tok); err != nil { return err } m.SourceAmsNetId = data case "sourceAmsPort": var data uint16 if err := d.DecodeElement(&data, &tok); err != nil { return err } m.SourceAmsPort = data case "commandId": var data CommandId if err := d.DecodeElement(&data, &tok); err != nil { return err } m.CommandId = data case "state": var data *State if err := d.DecodeElement(data, &tok); err != nil { return err } m.State = data case "errorCode": var data uint32 if err := d.DecodeElement(&data, &tok); err != nil { return err } m.ErrorCode = data case "invokeId": var data uint32 if err := d.DecodeElement(&data, &tok); err != nil { return err } m.InvokeId = data case "data": var dt *AdsData if err := d.DecodeElement(&dt, &tok); err != nil { return err } m.Data = dt } } } } func (m *AmsPacket) MarshalXML(e *xml.Encoder, start xml.StartElement) error { className := "org.apache.plc4x.java.ads.readwrite.AmsPacket" if err := e.EncodeToken(xml.StartElement{Name: start.Name, Attr: []xml.Attr{ {Name: xml.Name{Local: "className"}, Value: className}, }}); err != nil { return err } if err := e.EncodeElement(m.TargetAmsNetId, xml.StartElement{Name: xml.Name{Local: "targetAmsNetId"}}); err != nil { return err } if err := e.EncodeElement(m.TargetAmsPort, xml.StartElement{Name: xml.Name{Local: "targetAmsPort"}}); err != nil { return err } if err := e.EncodeElement(m.SourceAmsNetId, xml.StartElement{Name: xml.Name{Local: "sourceAmsNetId"}}); err != nil { return err } if err := e.EncodeElement(m.SourceAmsPort, xml.StartElement{Name: xml.Name{Local: "sourceAmsPort"}}); err != nil { return err } if err := e.EncodeElement(m.CommandId, xml.StartElement{Name: xml.Name{Local: "commandId"}}); err != nil { return err } if err := e.EncodeElement(m.State, xml.StartElement{Name: xml.Name{Local: "state"}}); err != nil { return err } if err := e.EncodeElement(m.ErrorCode, xml.StartElement{Name: xml.Name{Local: "errorCode"}}); err != nil { return err } if err := e.EncodeElement(m.InvokeId, xml.StartElement{Name: xml.Name{Local: "invokeId"}}); err != nil { return err } if err := e.EncodeElement(m.Data, xml.StartElement{Name: xml.Name{Local: "data"}}); err != nil { return err } if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil { return err } return nil }
CastAmsPacket
shared.module.ts
/* * This module is to be imported ONLY by the AppModule * Contains all global services * */ import { AngularSplitModule } from 'angular-split'; // @angular stuff import { NgModule, SkipSelf, Optional } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule } from '@angular/router'; import { FormsModule } from '@angular/forms'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatIconModule } from '@angular/material/icon'; import { MatSliderModule } from '@angular/material/slider'; // app directives import { MbFileReaderDirective } from './directives/filesys'; // app components import { ExecuteComponent } from './components/execute/execute.component'; import { PageNotFoundComponent } from './components/not-found/not-found.component'; import { NavigationComponent } from './components/navigation/navigation.component'; import { PanelHeaderComponent } from './components/header/panel-header.component'; import { PublishHeaderComponent } from './components/header/publish-header.component'; // import { AddOutputComponent } from './components/add-components/add_output.component'; // import { AddNodeComponent } from './components/add-components/add_node.component'; // import { AddInputComponent } from './components/add-components/add_input.component'; // import { ParameterViewerComponent } from './components/parameter-viewer/parameter-viewer.component'; // import { InputPortViewerComponent } from './components/parameter-viewer/input-port-viewer/input-port-viewer.component'; // import { ProcedureInputViewerComponent } from './components/parameter-viewer/procedure-input-viewer/procedure-input-viewer.component'; import { NewFileComponent, SaveFileComponent, LoadFileComponent } from './components/file'; import { NotificationComponent } from './components/notification/notification.component'; // app model viewers import { DataViewersContainer } from '../model-viewers/model-viewers-container.module'; import { LoadUrlComponent } from './components/file/loadurl.component'; import { SpinnerComponent } from './components/spinner/spinner.component'; import { ChromeComponent } from './components/chrome/chrome.component'; import { AutogrowDirective } from './directives/textarea'; import { ProcedureInputViewerComponent } from './components/parameter-viewer/procedure-input-viewer/procedure-input-viewer.component'; import { ParameterViewerComponent } from './components/parameter-viewer/parameter-viewer.component'; import { SaveJavascriptComponent } from './components/file/savejavascript.component'; import { WindowMessageComponent } from './components/window-message/window-message.component'; @NgModule({ providers: [ ], declarations: [ MbFileReaderDirective, AutogrowDirective, ExecuteComponent, PageNotFoundComponent, NavigationComponent, PanelHeaderComponent, PublishHeaderComponent, NotificationComponent, ProcedureInputViewerComponent, ParameterViewerComponent, // AddNodeComponent, AddInputComponent, AddOutputComponent, // ParameterViewerComponent, InputPortViewerComponent, ProcedureInputViewerComponent, NewFileComponent, SaveFileComponent, LoadFileComponent, LoadUrlComponent, SaveJavascriptComponent, WindowMessageComponent, SpinnerComponent, ChromeComponent, ], imports: [ CommonModule, RouterModule, MatSliderModule, MatCheckboxModule, DataViewersContainer, AngularSplitModule, FormsModule, MatIconModule, ], entryComponents: [ ], exports: [ FormsModule, MatIconModule, MatSliderModule, DataViewersContainer, AngularSplitModule, MbFileReaderDirective, AutogrowDirective, ExecuteComponent, PageNotFoundComponent, NavigationComponent, PanelHeaderComponent, PublishHeaderComponent, // AddNodeComponent, // AddInputComponent, // AddOutputComponent, SpinnerComponent, ChromeComponent, // ParameterViewerComponent, NotificationComponent, NewFileComponent, SaveFileComponent, LoadFileComponent, LoadUrlComponent, SaveJavascriptComponent, WindowMessageComponent, ParameterViewerComponent, ] }) export class
{ constructor(@Optional() @SkipSelf() shared: SharedModule) { /* /// Prevents any module apart from AppModule from re-importing if(shared){ throw new Error("Core Module has already been imported"); } */ } }
SharedModule
signed_msg_type.go
package types import tmproto "github.com/line/ostracon/proto/ostracon/types" // IsVoteTypeValid returns true if t is a valid vote type. func IsVoteTypeValid(t tmproto.SignedMsgType) bool { switch t { case tmproto.PrevoteType, tmproto.PrecommitType:
} }
return true default: return false
tables.go
package sdata import ( "database/sql" "fmt" "strconv" "strings" "github.com/gobuffalo/flect" ) type DBInfo struct { Version int Type string Tables []DBTable Functions []DBFunction VTables []VirtualTable colMap map[string]*DBColumn tableMap map[string]*DBTable } type DBTable struct { Schema string Name string Type string Columns []DBColumn PrimaryCol DBColumn SecondaryCol DBColumn FullText []DBColumn Singular string Plural string Blocked bool colMap map[string]int } type VirtualTable struct { Name string IDColumn string TypeColumn string FKeyColumn string } type st struct { schema, table string } func GetDBInfo(db *sql.DB, dbtype string, blockList []string) (*DBInfo, error) { var version string _ = db.QueryRow(`SHOW server_version_num`).Scan(&version) cols, err := DiscoverColumns(db, dbtype, blockList) if err != nil { return nil, err } funcs, err := DiscoverFunctions(db, blockList) if err != nil { return nil, err } di := NewDBInfo(dbtype, version, cols, funcs, blockList) return di, nil } func NewDBInfo( dbtype string, version string, cols []DBColumn, funcs []DBFunction, blockList []string) *DBInfo { di := &DBInfo{ Type: dbtype, Functions: funcs, colMap: make(map[string]*DBColumn), tableMap: make(map[string]*DBTable), } if version == "" { version = "110000" } di.Version, _ = strconv.Atoi(version) tm := make(map[st][]DBColumn) for i := range cols { c := cols[i] c.Key = strings.ToLower(c.Name) di.colMap[(c.Schema + ":" + c.Table + ":" + c.Name)] = &c k1 := st{c.Schema, c.Table} tm[k1] = append(tm[k1], c) } for k, tcols := range tm { ti := NewDBTable(k.schema, k.table, "", tcols) ti.Blocked = isInList(ti.Name, blockList) di.AddTable(ti) } return di } func NewDBTable(schema, name, _type string, cols []DBColumn) DBTable { key := strings.ToLower(name) singular := flect.Singularize(key) plural := flect.Pluralize(key) ti := DBTable{ Schema: schema, Name: name, Type: _type, Columns: cols, Singular: singular, Plural: plural, colMap: make(map[string]int, len(cols)), } for i := range cols { c := &cols[i] switch { case c.FullText: ti.FullText = append(ti.FullText, cols[i]) case c.PrimaryKey: ti.PrimaryCol = cols[i] } ti.colMap[c.Key] = i } return ti } func (di *DBInfo) AddTable(t DBTable) { for i, c := range t.Columns { di.colMap[(c.Schema + ":" + c.Table + ":" + c.Name)] = &t.Columns[i] di.colMap[(":" + c.Table + ":" + c.Name)] = &t.Columns[i] } di.Tables = append(di.Tables, t) di.tableMap[(t.Schema + ":" + t.Name)] = &t k := (":" + t.Name) if _, ok := di.tableMap[k]; !ok { di.tableMap[k] = &t } } func (di *DBInfo) GetColumn(schema, table, column string) (*DBColumn, error) { c, ok := di.colMap[(schema + ":" + table + ":" + column)] if !ok { return nil, fmt.Errorf("column: '%s.%s.%s' not found", schema, table, column) } return c, nil } func (di *DBInfo) GetTable(schema, table string) (*DBTable, error) { t, ok := di.tableMap[(schema + ":" + table)] if !ok { return nil, fmt.Errorf("table: '%s.%s' not found", schema, table) } return t, nil } type DBColumn struct { Name string Key string Type string Array bool NotNull bool PrimaryKey bool UniqueKey bool FullText bool FKeySchema string FKeyTable string FKeyCol string Blocked bool Table string Schema string } func DiscoverColumns(db *sql.DB, dbtype string, blockList []string) ([]DBColumn, error) { var sqlStmt string switch dbtype { case "mysql": sqlStmt = mysqlColumnsStmt default: sqlStmt = postgresColumnsStmt } rows, err := db.Query(sqlStmt) if err != nil { return nil, fmt.Errorf("error fetching columns: %s", err) } defer rows.Close() cmap := make(map[string]DBColumn) for rows.Next() { var c DBColumn err = rows.Scan(&c.Schema, &c.Table, &c.Name, &c.Type, &c.NotNull, &c.PrimaryKey, &c.UniqueKey, &c.Array, &c.FullText, &c.FKeySchema, &c.FKeyTable, &c.FKeyCol) if err != nil { return nil, err } k := (c.Schema + ":" + c.Table + ":" + c.Name) v := cmap[k] if v.Key == "" { v = c v.Blocked = isInList(v.Key, blockList) } if c.Type != "" { v.Type = c.Type } if c.PrimaryKey { v.PrimaryKey = true v.UniqueKey = true } if c.NotNull { v.NotNull = true } if c.UniqueKey { v.UniqueKey = true } if c.Array { v.Array = true } if c.FullText { v.FullText = true } if c.FKeySchema != "" { v.FKeySchema = c.FKeySchema } if c.FKeyTable != "" { v.FKeyTable = c.FKeyTable } if c.FKeyCol != "" { v.FKeyCol = c.FKeyCol } cmap[k] = v } var cols []DBColumn for _, c := range cmap { cols = append(cols, c) } return cols, nil } type DBFunction struct { Name string Params []DBFuncParam } type DBFuncParam struct { ID int Name sql.NullString Type string } func DiscoverFunctions(db *sql.DB, blockList []string) ([]DBFunction, error) { rows, err := db.Query(functionsStmt) if err != nil { return nil, fmt.Errorf("Error fetching functions: %s", err) } defer rows.Close() var funcs []DBFunction fm := make(map[string]int) parameterIndex := 1 for rows.Next() { var fn, fid string fp := DBFuncParam{} err = rows.Scan(&fn, &fid, &fp.Type, &fp.Name, &fp.ID) if err != nil { return nil, err } if !fp.Name.Valid { fp.Name.String = fmt.Sprintf("%d", parameterIndex) fp.Name.Valid = true } if i, ok := fm[fid]; ok { funcs[i].Params = append(funcs[i].Params, fp) } else { if isInList(fn, blockList) { continue } funcs = append(funcs, DBFunction{Name: fn, Params: []DBFuncParam{fp}}) fm[fid] = len(funcs) - 1 } parameterIndex++ } return funcs, nil } func isInList(val string, s []string) bool
{ for _, v := range s { if strings.EqualFold(v, val) { return true } } return false }
packages.py
class Packages: def __init__(self, dir, index_url, extra_url): self.dir = dir self.index_url = index_url self.extra_url = extra_url def __get_installed_packages(self): try: with open(self.dir + '/packages') as f: return f.read().split(' ') except IOError: return [] def __create_environment(self): import os.path ready_env = os.path.isfile(self.dir + '/env') if not ready_env: import venv # inherit system site packages for fast installation times # in `init` function pip will be used with '--upgrade' option to allow using different versions venv.create(self.dir, system_site_packages=True) open(self.dir + '/env', 'a').close() def __clean(self, packages): for package in packages: index = len(package) if '==' in package: index = package.find('==') elif '>' in package and '<' in package: greater = package.find('>') less = package.find('<') index = min(greater, less) elif '>' in package: index = package.find('>') elif '<' in package: index = package.find('<')
from quix import Quix quix = Quix() process = subprocess.Popen(self.dir + '/bin/python3 -m pip list --format=freeze', shell=True, stdout=subprocess.PIPE) stdout = process.communicate()[0] reqs = sorted(stdout.decode('utf-8').strip().split('\n')) splitted = [req.split('==') for req in reqs] quix.fields('package', 'version') for (package, version) in splitted: quix.row(package, version) def install(self, *required_packages): installed_packages = self.__get_installed_packages() self.__create_environment() if not set(required_packages).issubset(installed_packages): exec (open(self.dir + '/bin/activator.py').read(), {'__file__': self.dir + '/bin/activator.py'}) index_url_args = [] extra_index_url_args = [] if self.index_url: index_url_args = ['--index-url', self.index_url] if self.extra_url: extra_index_url_args = ['--extra-index-url', self.extra_url] pipargs = ['install'] + list(required_packages) + ['--prefix', self.dir, '--ignore-installed', '--no-warn-script-location', '--no-warn-conflicts'] + index_url_args + extra_index_url_args import subprocess import sys subprocess.check_call([sys.executable, '-m', 'pip'] + pipargs) packages_file = open(self.dir + '/packages', 'w+') packages = self.__clean(required_packages) packages_file.write(' '.join(list(packages) + installed_packages)) packages_file.close() else: exec (open(self.dir + '/bin/activator.py').read(), {'__file__': self.dir + '/bin/activator.py'}) def uninstall(self, *packages): self.__create_environment() installed_packages = self.__get_installed_packages() if set(packages).issubset(installed_packages): import subprocess import sys process = subprocess.Popen(self.dir + '/bin/python3 -m pip uninstall --yes ' + ' '.join(list(packages)), shell=True) process.wait() packages_file = open(self.dir + '/packages', 'w+') for package in packages: installed_packages.remove(package) packages_file.write(' '.join(installed_packages)) packages_file.close()
yield package[0: index] def list(self): import subprocess
dotenv.go
package env import ( "log" "github.com/enorith/enorith/internal/pkg/path" "github.com/joho/godotenv" ) func
() { file := path.BasePath(".env") log.Printf("loading dotenv file %s", file) _ = godotenv.Load(file) }
LoadDotenv
common_test.go
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you 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 actions import ( "testing" "github.com/stretchr/testify/assert" "github.com/elastic/beats/v7/libbeat/beat" "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/processors" ) type testCase struct { event common.MapStr want common.MapStr cfg []string } func testProcessors(t *testing.T, cases map[string]testCase)
{ for name, test := range cases { test := test t.Run(name, func(t *testing.T) { ps := make([]*processors.Processors, len(test.cfg)) for i := range test.cfg { config, err := common.NewConfigWithYAML([]byte(test.cfg[i]), "test") if err != nil { t.Fatalf("Failed to create config(%v): %+v", i, err) } ps[i], err = processors.New([]*common.Config{config}) if err != nil { t.Fatalf("Failed to create add_tags processor(%v): %+v", i, err) } } current := &beat.Event{} if test.event != nil { current.Fields = test.event.Clone() } for i, processor := range ps { var err error current, err = processor.Run(current) if err != nil { t.Fatal(err) } if current == nil { t.Fatalf("Event dropped(%v)", i) } } assert.Equal(t, test.want, current.Fields) }) } }
varDA.py
#!/usr/bin/env python ############################################################### # < next few lines under version control, D O N O T E D I T > # $Date$ # $Revision$ # $Author$ # $Id$ ############################################################### ############################################################### # varDA.py - driver script for variational DA ############################################################### ############################################################### __author__ = "Rahul Mahajan" __email__ = "[email protected]"
__status__ = "Prototype" ############################################################### ############################################################### import sys import numpy as np from module_Lorenz import * from module_DA import * from module_IO import * from param_varDA import * ############################################################### ############################################################### def main(): # insure the same sequence of random numbers EVERY TIME np.random.seed(0) # check for valid variational data assimilation options check_varDA(DA,varDA) # get IC's [xt, xa] = get_IC(model, restart, Nens=None) xb = xa.copy() # Load climatological covariance once and for all ... Bc = read_clim_cov(model=model,norm=True) nobs = model.Ndof*varDA.fdvar.nobstimes y = np.tile(np.dot(H,xt),[varDA.fdvar.nobstimes,1]) # create diagnostic file and write initial conditions to the diagnostic file create_diag(diag_file, model.Ndof, nobs=nobs, nouter=DA.maxouter) for outer in range(DA.maxouter): write_diag(diag_file.filename, 0, outer, xt, xb, xa, np.reshape(y,[nobs]), np.diag(H), np.diag(R), niters=np.NaN) print 'Cycling ON the attractor ...' for k in range(DA.nassim): print '========== assimilation time = %5d ========== ' % (k+1) # advance truth with the full nonlinear model; set verification values xs = model.advance(xt, varDA.fdvar.tbkgd, perfect=True) xt = xs[-1,:].copy() ver = xt.copy() # new observations from noise about truth y = create_obs(model,varDA,xt,H,R,yold=y) # advance analysis with the full nonlinear model xs = model.advance(xa, varDA.fdvar.tbkgd, perfect=False) xb = xs[-1,:].copy() for outer in range(DA.maxouter): # compute static background error cov. Bs = compute_B(varDA,Bc,outer=outer) # update step xa, niters = update_varDA(xb, Bs, y, R, H, varDA, model) # write diagnostics to disk for each outer loop (at the beginning of the window) write_diag(diag_file.filename, k+1, outer, ver, xb, xa, np.reshape(y,[nobs]), np.diag(H), np.diag(R), niters=niters) # update prior for next outer loop xb = xa.copy() # if doing 4Dvar, step to the next assimilation time from the beginning of assimilation window if ( varDA.update == 2 ): xs = model.advance(xt, varDA.fdvar.tanal, perfect=True ) xt = xs[-1,:].copy() xs = model.advance(xa, varDA.fdvar.tanal, perfect=False) xa = xs[-1,:].copy() print '... all done ...' sys.exit(0) ############################################################### ############################################################### if __name__ == "__main__": main() ###############################################################
__copyright__ = "Copyright 2012, NASA / GSFC / GMAO" __license__ = "GPL"
markdown_functionality.py
from os import startfile from base_functions import base_functions from markdown import markdownFromFile class markdown_functionality(base_functions): """Seperate Class to hold markdown methods""" def __init__(self): super(markdown_functionality, self).__init__() def compileAndDisplayMarkdown(self, label_index):
def _compileMarkDownFile(self, label_index = None): """ Function to compile the markdown file. Uses markdown's markdownFromFile method and saves it to the file name generated from _getFile """ inputFileName = self._getFileName(label_index) outputFileName = self._getFileName(label_index, 'html') html_output = markdownFromFile(inputFileName, outputFileName) def _openCompiledMarkDownFile(self, label_index): """ Function to open the compiled HTML file with os.startfile """ startfile(self._getFileName(label_index, 'html')) def _openMarkDownFile(self, label_index): """ Function to start the markdown file """ startfile(self._getFileName(label_index)) if __name__ == '__main__': t = markdown_functionality() t.compileAndDisplayMarkdown(0)
self._compileMarkDownFile(label_index) self._openCompiledMarkDownFile(label_index)
fritzhosts.py
# -*- coding: utf-8 -*- __version__ = '0.4.6' import argparse from . import fritzconnection SERVICE = 'Hosts' # version-access: def get_version(): return __version__ class FritzHosts(object): def __init__(self, fc=None, address=fritzconnection.FRITZ_IP_ADDRESS, port=fritzconnection.FRITZ_TCP_PORT, user=fritzconnection.FRITZ_USERNAME, password=''): super(FritzHosts, self).__init__() if fc is None: fc = fritzconnection.FritzConnection(address, port, user, password) self.fc = fc def action(self, actionname, **kwargs): return self.fc.call_action(SERVICE, actionname, **kwargs) @property def modelname(self): return self.fc.modelname @property def host_numbers(self): result = self.action('GetHostNumberOfEntries') return result['NewHostNumberOfEntries'] def get_generic_host_entry(self, index): result = self.action('GetGenericHostEntry', NewIndex=index) return result def get_specific_host_entry(self, mac_address): result = self.action('GetSpecificHostEntry', NewMACAddress=mac_address) return result def get_hosts_info(self): """ Returns a list of dicts with information about the known hosts. The dict-keys are: 'ip', 'name', 'mac', 'status' """ result = [] index = 0 while index < self.host_numbers: host = self.get_generic_host_entry(index) result.append({ 'ip': host['NewIPAddress'], 'name': host['NewHostName'], 'mac': host['NewMACAddress'], 'status': host['NewActive']}) index += 1 return result # --------------------------------------------------------- # terminal-output: # --------------------------------------------------------- def _print_header(fh): print('\nFritzHosts:') print('{:<20}{}'.format('version:', get_version())) print('{:<20}{}'.format('model:', fh.modelname)) print('{:<20}{}'.format('ip:', fh.fc.address)) def print_hosts(fh): print('\nList of registered hosts:\n') print('{:>3}: {:<15} {:<26} {:<17} {}\n'.format( 'n', 'ip', 'name', 'mac', 'status')) hosts = fh.get_hosts_info() for index, host in enumerate(hosts): if host['status'] == '1': status = 'active' else: status = '-' print('{:>3}: {:<15} {:<26} {:<17} {}'.format( index, host['ip'], host['name'], host['mac'], status, ) ) print('\n') def _print_detail(fh, detail): mac_address = detail[0] print('\n{:<23}{}\n'.format('Details for host:', mac_address)) info = fh.get_specific_host_entry(mac_address) for key, value in info.items(): print('{:<23}: {}'.format(key, value)) print('\n') def _print_nums(fh): print('{:<20}{}\n'.format('Number of hosts:', fh.host_numbers)) # --------------------------------------------------------- # cli-section: # --------------------------------------------------------- def _get_cli_arguments(): parser = argparse.ArgumentParser(description='FritzBox Hosts') parser.add_argument('-i', '--ip-address', nargs='?', default=fritzconnection.FRITZ_IP_ADDRESS, dest='address', help='ip-address of the FritzBox to connect to. ' 'Default: %s' % fritzconnection.FRITZ_IP_ADDRESS) parser.add_argument('--port', nargs='?', default=fritzconnection.FRITZ_TCP_PORT, dest='port',
'Default: %s' % fritzconnection.FRITZ_TCP_PORT) parser.add_argument('-u', '--username', nargs=1, default=fritzconnection.FRITZ_USERNAME, help='Fritzbox authentication username') parser.add_argument('-p', '--password', nargs=1, default='', help='Fritzbox authentication password') parser.add_argument('-a', '--all', action='store_true', help='Show all hosts ' '(default if no other options given)') parser.add_argument('-n', '--nums', action='store_true', help='Show number of known hosts') parser.add_argument('-d', '--detail', nargs=1, default='', help='Show information about a specific host ' '(DETAIL: MAC Address)') args = parser.parse_args() return args def _print_status(arguments): fh = FritzHosts(address=arguments.address, port=arguments.port, user=arguments.username, password=arguments.password) _print_header(fh) if arguments.detail: _print_detail(fh, arguments.detail) elif arguments.nums: _print_nums(fh) else: print_hosts(fh) if __name__ == '__main__': _print_status(_get_cli_arguments())
help='port of the FritzBox to connect to. '
ssd1306_graphicsmode_128x32_i2c.rs
#![no_std] #![no_main] //! Draw a square, circle and triangle on an SSD1306-based Adafruit OLED //! Featherwing display using the `embedded_graphics` crate. //! //! This example is for the _Adafruit Feather M0_ series boards connected to a //! Adafruit OLED Featherwing, which has 128x32 pixel resolution. I2C is used //! to communicate between the processor board and the display module. //! //! This example is based on: //! - https://github.com/jamwaffles/ssd1306/blob/master/examples/graphics_i2c_128x32.rs //! - https://github.com/atsamd-rs/atsamd/blob/master/boards/itsybitsy_m0/examples/i2c_ssd1306.rs //! //! You can either use the USB port on the Feather + BOSSAC or a SWD //! debugger/programmer to load this example onto the Feather M0 board. //! //! Adafruit Feather M0 Boards: //! - Feather M0 Express: https://www.adafruit.com/product/3403 //! - Feather M0 Adalogger: https://www.adafruit.com/product/2796 //! - Feather M0 Basic: https://www.adafruit.com/product/2772 //! //! Adafruit OLED Featherwing: //! - https://www.adafruit.com/product/2900 //! //! Other generic SSD1306 modules will work with this demo as well.
//! //! Wiring connections for the Adafruit OLED Featherwing: //! //! ``` //! OLED Featherwing -> Feather M0 //! GND -> GND //! 3v -> 3v3 //! GPIOSDA -> PA22 (SDA) //! GPIOSCL -> PA23 (SCL) //! ``` //! //! Build this example with: `cargo build --example //! ssd1306_graphicsmode_128x32_i2c` #[cfg(not(feature = "use_semihosting"))] use panic_halt as _; #[cfg(feature = "use_semihosting")] use panic_semihosting as _; use embedded_graphics::pixelcolor::BinaryColor; use embedded_graphics::prelude::*; use embedded_graphics::primitives::{Circle, PrimitiveStyleBuilder, Rectangle, Triangle}; use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306}; use bsp::hal; use bsp::pac; use feather_m0 as bsp; use bsp::{entry, periph_alias, pin_alias}; use hal::clock::GenericClockController; use hal::delay::Delay; use hal::prelude::*; use hal::time::KiloHertz; use pac::{CorePeripherals, Peripherals}; #[entry] fn main() -> ! { let mut peripherals = Peripherals::take().unwrap(); let core = CorePeripherals::take().unwrap(); let mut clocks = GenericClockController::with_internal_32kosc( peripherals.GCLK, &mut peripherals.PM, &mut peripherals.SYSCTRL, &mut peripherals.NVMCTRL, ); let pins = bsp::Pins::new(peripherals.PORT); let mut red_led: bsp::RedLed = pin_alias!(pins.red_led).into(); let mut delay = Delay::new(core.SYST, &mut clocks); let i2c_sercom = periph_alias!(peripherals.i2c_sercom); let i2c = bsp::i2c_master( &mut clocks, KiloHertz(400), i2c_sercom, &mut peripherals.PM, pins.sda, pins.scl, ); // NOTE the `DisplaySize` enum comes from the ssd1306 package, // and currently only supports certain display sizes; see // https://jamwaffles.github.io/ssd1306/master/ssd1306/prelude/enum.DisplaySize.html let interface = I2CDisplayInterface::new(i2c); let mut disp = Ssd1306::new(interface, DisplaySize128x32, DisplayRotation::Rotate0) .into_buffered_graphics_mode(); disp.init().unwrap(); disp.flush().unwrap(); let style = PrimitiveStyleBuilder::new() .stroke_color(BinaryColor::On) .stroke_width(1) .build(); let yoffset = 8; let x_max = 127; let y_max = 31; // screen outline Rectangle::with_corners(Point::new(0, 0), Point::new(x_max, y_max)) .into_styled(style) .draw(&mut disp) .unwrap(); // triangle // 'Triangle' requires 'embedded_graphics' 0.6 or newer... Triangle::new( Point::new(16, 16 + yoffset), Point::new(16 + 16, 16 + yoffset), Point::new(16 + 8, yoffset), ) .into_styled(style) .draw(&mut disp) .unwrap(); // square Rectangle::with_corners(Point::new(58, yoffset), Point::new(58 + 16, 16 + yoffset)) .into_styled(style) .draw(&mut disp) .unwrap(); // circle Circle::new(Point::new(108, yoffset + 8), 8) .into_styled(style) .draw(&mut disp) .unwrap(); disp.flush().unwrap(); // blink the onboard blinkenlight (digital pin 13) loop { delay.delay_ms(200u8); red_led.set_high().unwrap(); delay.delay_ms(200u8); red_led.set_low().unwrap(); } }
CreateVersions.ts
import { CommonFunctionsClass } from "Helpers/CommonFunctionsClass"; import { CommonPageObjectsandConstants as constants } from "Fixtures/PageObjects/CommonPageObjectsandConstants"; import { URLPageObject as URLPageObject } from "Fixtures/PageObjects/URLConstants"; let CommonFunctions = new CommonFunctionsClass(); //var createVersionsURL = APIUrlPageObject.POST_URL + "/" + unitId1 + "/" +"versions"; export class
{ createVersionWithAPI(createUnitjson: any,URL: any): any { return new Cypress.Promise((resolve, reject) => { this.generateVersionCallAPI(createUnitjson,URL) .then((response:any) => { expect(JSON.stringify(response.status)).to.be.equals("200"); resolve(response.body.items[0]); }); }); } generateVersionCallAPI(inputData: any,URL: any) { let CommonFunctions = new CommonFunctionsClass(); return CommonFunctions.constructAndSendRequest( URLPageObject.POST_Method, URL, Cypress.env(constants.HEADERS), inputData ); } }
CreateVersions
pemcrypt.ts
/*! * pemcrypt.js - PEM encryption for javascript * Copyright (c) 2018-2019, Christopher Jeffrey (MIT License). * https://github.com/bcoin-org/bcrypto * * Resources: * https://tools.ietf.org/html/rfc1421 */ import {assert} from '../internal/assert'; import {pem} from './pem'; import {cipher} from '../cipher'; import {random} from '../random'; import {eb2k} from '../eb2k'; import {MD5} from '../md5'; export namespace pemcrypt { /* * Constants */ const ciphers: Record<string, [number, number]> = { 'AES-128': [16, 16], 'AES-192': [24, 16], 'AES-256': [32, 16], BF: [16, 8], 'CAMELLIA-128': [16, 16], 'CAMELLIA-192': [24, 16], 'CAMELLIA-256': [32, 16], CAST5: [16, 8], DES: [8, 8], 'DES-EDE': [16, 8], 'DES-EDE3': [24, 8], IDEA: [16, 8], 'RC2-40': [5, 8], 'RC2-64': [8, 8], 'RC2-128': [16, 8], 'TWOFISH-128': [16, 16], 'TWOFISH-192': [24, 16], 'TWOFISH-256': [32, 16], }; /** * Encrypt a block. * @param {pem.PEMBlock} block * @param {String} name * @param {String} passwd * @returns {pem.PEMBlock} */ export function encrypt(block: pem.PEMBlock, name: string, passwd: string) { assert(block instanceof pem.PEMBlock); assert(typeof name === 'string'); assert(typeof passwd === 'string'); if (block.isEncrypted()) throw new Error('PEM block is already encrypted.'); const [keySize, ivSize] = cipherInfo(name); const iv = random.randomBytes(ivSize); const [key] = eb2k.derive(MD5, passwd, iv, keySize, ivSize); block.data = cipher.encrypt(name, key, iv, block.data); block.setProcType(4, 'ENCRYPTED'); block.setDEKInfo(name, iv); return block; } /** * Decrypt a block. * @param {pem.PEMBlock} block * @param {String} passwd * @returns {pem.PEMBlock} */ export function
(block: pem.PEMBlock, passwd: string) { assert(block instanceof pem.PEMBlock); assert(typeof passwd === 'string'); if (!block.isEncrypted()) throw new Error('PEM block is not encrypted.'); const info = block.getDEKInfo(); if (!info) throw new Error('DEK-Info not found.'); const [keySize, ivSize] = cipherInfo(info.name); const [key] = eb2k.derive(MD5, passwd, info.iv, keySize, ivSize); block.data = cipher.decrypt(info.name, key, info.iv, block.data); block.unsetProcType(); block.unsetDEKInfo(); return block; } /* * Helpers */ function cipherInfo(name: string) { assert(typeof name === 'string'); if (name.length < 5 || name[name.length - 4] !== '-') throw new Error(`Unsupported cipher: ${name}.`); const algo = name.substring(0, name.length - 4); const info = ciphers[algo]; if (!info) throw new Error(`Unsupported cipher: ${name}.`); return info; } }
decrypt
conftest.py
import pytest from modeltestSDK import Client @pytest.fixture(scope="module") def
(): """ Expose an SDK API client configured for testing """ client = Client() # TODO: Konfigurer en test API (lokalt?) return client
client
setup.py
import setuptools # Get requirements from requirements.txt, stripping the version tags with open('requirements.txt') as f: requires = [x.strip().split('=')[0] for x in f.readlines()]
history = file.read() setuptools.setup(name='straxen', version='0.2.0', description='Streaming analysis for XENON', author='Straxen contributors, the XENON collaboration', url='https://github.com/XENONnT/straxen', install_requires=requires, long_description=readme + '\n\n' + history, long_description_content_type="text/markdown", python_requires=">=3.6", extras_require={ 'docs': ['sphinx', 'sphinx_rtd_theme', 'nbsphinx', 'recommonmark', 'graphviz'], }, scripts=['bin/bootstrax'], packages=setuptools.find_packages(), classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Programming Language :: Python :: 3.6', 'Intended Audience :: Science/Research', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Scientific/Engineering :: Physics', ], zip_safe=False)
with open('README.md') as file: readme = file.read() with open('HISTORY.md') as file:
zigzagenemy.py
import pygame import random import math import enemies.enemy class ZigZagEnemy(enemies.enemy.Enemy): def __init__(self, game):
def changeAngle(self): if random.randint(0, 1) == 0: self.angle += math.pi / 2 else: self.angle -= math.pi / 2 def update(self, elapsed, gameScene): self.y += math.sin(self.angle) * self.vspeed * elapsed self.x += math.cos(self.angle) * self.hspeed * elapsed self.rect.x = self.x self.rect.y = self.y if not self.active and not self.inGame(): pass if not self.active and self.inGame(): self.active = True if self.active and self.inGame(): pass if self.active and not self.inGame(): self.kill() self.timer.cancel()
super().__init__(game) self.timer = self.game.getRepeateTimer() self.timer.duration = 3000 self.timer.action = self.changeAngle
labelled_table.go
package mem import ( "encoding/json" "errors" "fmt" ) type LabelledTable interface { XName() string YName() string XColumnAt(int) float64 YColumnAt(int) float64 WasImputedAt(int) bool Len() int IncludeOutlierScore(int) bool } type LabelledTableFromMem func(*Mem) LabelledTable type LabTab struct { section string xname string yname string xcol Column ycol Column wasimp Column // TE has more than one table tableNum int // Set to true if using log interpolation logScale bool // These fields can be set to run an alternative column import altSection string altXname string altYname string altImportFunc func(*LabTab) // This can be set to do something with the data before or after imputation. // The passed Column is the raw xcol, and the returned Column is the updated xcol. preImputeAction func(RawSection, Column) Column postImputeAction func() // precision is the float precision precision float64 } func (lt LabTab) XName() string { return lt.xname } func (lt LabTab) YName() string { return lt.yname } func (lt LabTab) XColumnAt(idx int) float64 { return lt.xcol[idx] } func (lt LabTab) YColumnAt(idx int) float64 { return lt.ycol[idx] } func (lt LabTab) WasImputedAt(idx int) bool { return len(lt.wasimp) != 0 && lt.wasimp[idx] > 0.5 } func (lt LabTab) Len() int { return len(lt.ycol) } func (lt LabTab) IncludeOutlierScore(idx int) bool { // Don't include ones that were imputed return !lt.WasImputedAt(idx) } func NewLabTab(xname, yname string, xcol, ycol, wasimp Column) LabTab { return LabTab{ xname: xname, yname: yname, xcol: xcol, ycol: ycol, wasimp: wasimp, } } type emptyLT struct{} func (lt emptyLT) XName() string { return "" } func (lt emptyLT) YName() string { return "" } func (lt emptyLT) XColumnAt(idx int) float64 { return 0 } func (lt emptyLT) YColumnAt(idx int) float64 { return 0 } func (lt emptyLT) WasImputedAt(idx int) bool { return true } func (lt emptyLT) Len() int { return 0 } func (lt emptyLT) IncludeOutlierScore(idx int) bool { return false } // jsonTable is used to restructure LabTab data for json. type jsonTable struct { Columns []string `json:"columns"` Data Table `json:"data"` } func (lt LabTab) MarshalJSON() ([]byte, error) { jt := jsonTable{ Columns: []string{lt.xname, lt.yname}, Data: []Column{lt.xcol, lt.ycol}, } if lt.wasimp != nil { jt.Columns = append(jt.Columns, "Was Imputed") jt.Data = append(jt.Data, lt.wasimp) } return json.Marshal(&jt) } func (lt *LabTab) UnmarshalJSON(value []byte) error { var jt jsonTable err := json.Unmarshal(value, &jt) if err != nil { return err } numCol := len(jt.Columns) numDat := len(jt.Data)
if numCol < 2 || numCol > 3 || numDat < 2 || numDat > 3 { if numCol == 0 && numDat == 0 { return nil // This section is nothing } return fmt.Errorf("Incorrect number of LabelledTable columns in JSON %d %d", numCol, numDat) } lt.xname = jt.Columns[0] lt.yname = jt.Columns[1] lt.xcol = jt.Data[0] lt.ycol = jt.Data[1] if numCol == 3 { if jt.Columns[2] != "Was Imputed" { return errors.New("Incorrect TablelledTable column names in JSON") } lt.wasimp = jt.Data[2] } return nil } type MissingSection error func (lt *LabTab) LoadFromMem(mem *rawMem) error { sec, err := mem.sectionContainingHeader(lt.section) if err != nil && lt.altSection != "" { // Sometimes an old format spelled this incorrectly sec, err = mem.sectionContainingHeader(lt.altSection) } if err != nil { return MissingSection(errors.New("Could not get LT section " + lt.section + ": " + err.Error())) } xcol, err := sec.columnContainsName(lt.xname, lt.tableNum) if err != nil && lt.altXname != "" { // For some reason this column sometimes has the wrong name in older files xcol, err = sec.columnContainsName(lt.altXname, lt.tableNum) } if err != nil { return errors.New("Could not get LT " + lt.section + " xcol: " + err.Error()) } lt.ycol, err = sec.columnContainsName(lt.yname, lt.tableNum) if err != nil && lt.altYname != "" { // Some old formats use this mis-labeled column that must be converted lt.ycol, err = sec.columnContainsName(lt.altYname, lt.tableNum) if err != nil { return errors.New("Could not get LT " + lt.section + " alt ycol: " + err.Error()) } if lt.altImportFunc != nil { lt.altImportFunc(lt) } } else if err != nil { return errors.New("Could not get LT " + lt.section + " ycol: " + err.Error()) } if lt.preImputeAction != nil { xcol = lt.preImputeAction(sec, xcol) } lt.wasimp = lt.ycol.ImputeWithValue(xcol, lt.xcol, lt.precision, lt.logScale) if len(lt.xcol) != len(lt.ycol) { return fmt.Errorf("Mismatching LT "+lt.section+" lengths %d and %d (%v and %v)", len(lt.xcol), len(lt.ycol), lt.xcol, lt.ycol) } if lt.postImputeAction != nil { lt.postImputeAction() } return nil } func (lt *LabTab) LabelledTable(unused string) LabelledTable { return lt }
new-test.js
import { moduleFor, test } from 'ember-qunit'; moduleFor('controller:posts/comments/new', { // Specify the other units that are required for this test. // needs: ['controller:foo'] });
var controller = this.subject(); assert.ok(controller); });
// Replace this with your real tests. test('it exists', function(assert) {
Article.Authors.tsx
import React, { useState } from "react"; import styled from "@emotion/styled"; import OutsideClickHandler from "react-outside-click-handler"; import { useColorMode } from "theme-ui"; import { Link } from "gatsby"; import Image from "@components/Image"; import Icons from "@icons"; import mediaqueries from "@styles/media"; import { IAuthor } from "@types"; /** * When generating the author names we're also checking to see how long the * number of authors are. If it's only 2 authors we'll show the fullnames. * Otherwise it'll only preview the first names of each author. */ function generateAuthorNames(authors: IAuthor[]) { return authors .map(author => { if (authors.length > 2) { return author.name.split(" ")[0]; } else { return author.name; } }) .join(", "); } interface AuthorsProps { authors: IAuthor[] } const CoAuthors: React.FC<AuthorsProps> = ({ authors }) => { const [isOpen, setIsOpen] = useState(false); const [colorMode] = useColorMode(); const names = generateAuthorNames(authors); const fill = colorMode === "dark" ? "#fff" : "#000"; const listWidth = { width: `${10 + authors.length * 15}px` }; return ( <CoAuthorsContainer onClick={() => setIsOpen(!isOpen)} isOpen={isOpen}> <CoAuthorsList style={listWidth}> {authors.map((author, index) => ( <CoAuthorAvatar style={{ left: `${index * 15}px` }} key={author.name}> <Image src={author.avatar.small} /> </CoAuthorAvatar> ))} </CoAuthorsList> <NameContainer>{names}</NameContainer> <IconContainer> <Icons.ToggleOpen fill={fill} /> </IconContainer> {isOpen && ( <OutsideClickHandler onOutsideClick={() => setIsOpen(!isOpen)}> <CoAuthorsListOpen> <IconOpenContainer> <Icons.ToggleClose fill={fill} /> </IconOpenContainer> {authors.map(author => ( <CoAuthorsListItemOpen key={author.name}> <AuthorLink as={author.authorsPage ? Link : "div"} to={author.slug} > <CoAuthorAvatarOpen> <Image src={author.avatar.small} /> </CoAuthorAvatarOpen> <AuthorNameOpen>{author.name}</AuthorNameOpen> </AuthorLink> </CoAuthorsListItemOpen> ))} </CoAuthorsListOpen> </OutsideClickHandler> )} </CoAuthorsContainer> ); }; /** * Novela supports multiple authors and therefore we need to ensure * we render the right UI when there are varying amount of authors. */ const ArticleAuthors: React.FC<AuthorsProps> = ({ authors }) => { const hasCoAuthors = authors.length > 1; // Special dropdown UI for multiple authors if (hasCoAuthors) { return <CoAuthors authors={authors} />; } else { return ( <AuthorLink as={authors[0].authorsPage ? Link : "div"} to={authors[0].slug} > <AuthorAvatar> <Image src={authors[0].avatar.small} /> </AuthorAvatar> <strong>{authors[0].name}</strong> <HideOnMobile>,&nbsp;</HideOnMobile> </AuthorLink> ); } }; export default ArticleAuthors; const AuthorAvatar = styled.div` height: 25px; width: 25px; border-radius: 50%; margin-right: 14px; background: ${p => p.theme.colors.grey}; overflow: hidden; .gatsby-image-wrapper > div { padding-bottom: 100% !important; } ${mediaqueries.phablet` display: none; `} `; const AuthorLink = styled.div` display: flex; align-items: center; color: inherit; strong { transition: ${p => p.theme.colorModeTransition}; } &:hover strong { color: ${p => p.theme.colors.primary}; } `; const CoAuthorsList = styled.div` position: relative; height: 25px; margin-right: 15px; ${mediaqueries.phablet` display: none; `} `; const CoAuthorsListOpen = styled.ul` position: absolute; z-index: 2; left: -21px; right: -21px; top: -19px; padding: 21px; background: ${p => p.theme.colors.card}; box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1); border-radius: 5px; cursor: pointer; list-style: none; transform: translateY(-2px); `; const CoAuthorsListItemOpen = styled.li` a { width: 100%; } &:not(:last-child) { margin-bottom: 10px; } `; const CoAuthorAvatarOpen = styled.div` height: 25px; width: 25px; border-radius: 50%; margin-right: 15px; background: ${p => p.theme.colors.grey}; overflow: hidden; pointer-events: none; .gatsby-image-wrapper > div { padding-bottom: 100% !important; overflow: hidden; } `; const CoAuthorAvatar = styled.div` position: absolute; height: 25px; width: 25px; border-radius: 50%; z-index: 1; background: ${p => p.theme.colors.grey}; box-shadow: 0 0 0 2px ${p => p.theme.colors.background}; transition: box-shadow 0.25s ease; overflow: hidden; pointer-events: none; .gatsby-image-wrapper > div { padding-bottom: 100% !important; overflow: hidden; } ${mediaqueries.phablet` display: none; `}
const NameContainer = styled.strong` position: relative; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; cursor: pointer; ${mediaqueries.desktop` max-width: 120px; `} ${mediaqueries.phablet` max-width: 200px; `} `; const AuthorNameOpen = styled.strong` position: relative; cursor: pointer; color: ${p => p.theme.colors.secondary}; font-weight: 600; `; const IconContainer = styled.div` position: relative; cursor: pointer; margin-left: 10px; ${mediaqueries.phablet` position: absolute; right: 0; bottom: 0; top: 10px; height: 100%; `} `; const IconOpenContainer = styled.div` position: absolute; cursor: pointer; top: 20px; right: 21px; `; const CoAuthorsContainer = styled.div<{ isOpen: boolean }>` position: relative; display: flex; align-items: center; color: ${p => p.theme.colors.secondary}; cursor: pointer; &::before { content: ""; position: absolute; left: -20px; right: -20px; top: -16px; bottom: -16px; background: ${p => p.theme.colors.card}; box-shadow: ${p => p.isOpen ? "none" : " 0px 0px 15px rgba(0, 0, 0, 0.1)"}; border-radius: 5px; z-index: 0; transition: opacity 0.3s; cursor: pointer; opacity: 0; } &:hover::before { opacity: 1; } ${mediaqueries.phablet` font-size: 14px; align-items: center; &::before { box-shadow: none; bottom: -30px; background: transparent; } strong { display: block; font-weight: semi-bold; margin-bottom: 5px; } `} `; const HideOnMobile = styled.span` ${mediaqueries.phablet` display: none; `} `;
`;
test_plan.py
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import range import os import shutil import tempfile import unittest import mock from stacker.context import Context, Config from stacker.dag import walk from stacker.util import stack_template_key_name from stacker.lookups.registry import ( register_lookup_handler, unregister_lookup_handler, ) from stacker.plan import ( Step, build_plan, ) from stacker.exceptions import ( CancelExecution, GraphError, PlanFailed, ) from stacker.status import ( SUBMITTED, COMPLETE, SKIPPED, FAILED, ) from stacker.stack import Stack from .factories import generate_definition count = 0 class TestStep(unittest.TestCase): def setUp(self): stack = mock.MagicMock() stack.name = "stack" stack.fqn = "namespace-stack" self.step = Step(stack=stack, fn=None) def test_status(self): self.assertFalse(self.step.submitted) self.assertFalse(self.step.completed) self.step.submit() self.assertEqual(self.step.status, SUBMITTED) self.assertTrue(self.step.submitted) self.assertFalse(self.step.completed) self.step.complete() self.assertEqual(self.step.status, COMPLETE) self.assertNotEqual(self.step.status, SUBMITTED) self.assertTrue(self.step.submitted) self.assertTrue(self.step.completed) self.assertNotEqual(self.step.status, True) self.assertNotEqual(self.step.status, False) self.assertNotEqual(self.step.status, 'banana') class TestPlan(unittest.TestCase): def setUp(self): self.count = 0 self.config = Config({"namespace": "namespace"}) self.context = Context(config=self.config) register_lookup_handler("noop", lambda **kwargs: "test") def tearDown(self): unregister_lookup_handler("noop") def test_plan(self): vpc = Stack( definition=generate_definition('vpc', 1), context=self.context) bastion = Stack( definition=generate_definition('bastion', 1, requires=[vpc.name]), context=self.context) plan = build_plan(description="Test", steps=[ Step(vpc, fn=None), Step(bastion, fn=None)]) self.assertEqual(plan.graph.to_dict(), { 'bastion.1': set(['vpc.1']), 'vpc.1': set([])}) def test_execute_plan(self): vpc = Stack( definition=generate_definition('vpc', 1), context=self.context) bastion = Stack( definition=generate_definition('bastion', 1, requires=[vpc.name]), context=self.context) calls = [] def fn(stack, status=None): calls.append(stack.fqn) return COMPLETE plan = build_plan( description="Test", steps=[Step(vpc, fn), Step(bastion, fn)]) plan.execute(walk) self.assertEquals(calls, ['namespace-vpc.1', 'namespace-bastion.1']) def test_execute_plan_filtered(self): vpc = Stack( definition=generate_definition('vpc', 1), context=self.context) db = Stack( definition=generate_definition('db', 1, requires=[vpc.name]), context=self.context) app = Stack( definition=generate_definition('app', 1, requires=[db.name]), context=self.context) calls = [] def fn(stack, status=None): calls.append(stack.fqn) return COMPLETE plan = build_plan( description="Test", steps=[Step(vpc, fn), Step(db, fn), Step(app, fn)], targets=['db.1']) plan.execute(walk) self.assertEquals(calls, [ 'namespace-vpc.1', 'namespace-db.1']) def test_execute_plan_exception(self): vpc = Stack( definition=generate_definition('vpc', 1), context=self.context) bastion = Stack( definition=generate_definition('bastion', 1, requires=[vpc.name]), context=self.context) calls = [] def fn(stack, status=None): calls.append(stack.fqn) if stack.name == vpc_step.name: raise ValueError('Boom') return COMPLETE vpc_step = Step(vpc, fn) bastion_step = Step(bastion, fn) plan = build_plan(description="Test", steps=[vpc_step, bastion_step]) with self.assertRaises(PlanFailed): plan.execute(walk) self.assertEquals(calls, ['namespace-vpc.1']) self.assertEquals(vpc_step.status, FAILED) def
(self): vpc = Stack( definition=generate_definition('vpc', 1), context=self.context) bastion = Stack( definition=generate_definition('bastion', 1, requires=[vpc.name]), context=self.context) calls = [] def fn(stack, status=None): calls.append(stack.fqn) if stack.fqn == vpc_step.name: return SKIPPED return COMPLETE vpc_step = Step(vpc, fn) bastion_step = Step(bastion, fn) plan = build_plan(description="Test", steps=[vpc_step, bastion_step]) plan.execute(walk) self.assertEquals(calls, ['namespace-vpc.1', 'namespace-bastion.1']) def test_execute_plan_failed(self): vpc = Stack( definition=generate_definition('vpc', 1), context=self.context) bastion = Stack( definition=generate_definition('bastion', 1, requires=[vpc.name]), context=self.context) db = Stack( definition=generate_definition('db', 1), context=self.context) calls = [] def fn(stack, status=None): calls.append(stack.fqn) if stack.name == vpc_step.name: return FAILED return COMPLETE vpc_step = Step(vpc, fn) bastion_step = Step(bastion, fn) db_step = Step(db, fn) plan = build_plan(description="Test", steps=[ vpc_step, bastion_step, db_step]) with self.assertRaises(PlanFailed): plan.execute(walk) calls.sort() self.assertEquals(calls, ['namespace-db.1', 'namespace-vpc.1']) def test_execute_plan_cancelled(self): vpc = Stack( definition=generate_definition('vpc', 1), context=self.context) bastion = Stack( definition=generate_definition('bastion', 1, requires=[vpc.name]), context=self.context) calls = [] def fn(stack, status=None): calls.append(stack.fqn) if stack.fqn == vpc_step.name: raise CancelExecution return COMPLETE vpc_step = Step(vpc, fn) bastion_step = Step(bastion, fn) plan = build_plan(description="Test", steps=[ vpc_step, bastion_step]) plan.execute(walk) self.assertEquals(calls, ['namespace-vpc.1', 'namespace-bastion.1']) def test_build_plan_missing_dependency(self): bastion = Stack( definition=generate_definition( 'bastion', 1, requires=['vpc.1']), context=self.context) with self.assertRaises(GraphError) as expected: build_plan(description="Test", steps=[Step(bastion, None)]) message_starts = ( "Error detected when adding 'vpc.1' " "as a dependency of 'bastion.1':" ) message_contains = "dependent node vpc.1 does not exist" self.assertTrue(str(expected.exception).startswith(message_starts)) self.assertTrue(message_contains in str(expected.exception)) def test_build_plan_cyclic_dependencies(self): vpc = Stack( definition=generate_definition( 'vpc', 1), context=self.context) db = Stack( definition=generate_definition( 'db', 1, requires=['app.1']), context=self.context) app = Stack( definition=generate_definition( 'app', 1, requires=['db.1']), context=self.context) with self.assertRaises(GraphError) as expected: build_plan( description="Test", steps=[Step(vpc, None), Step(db, None), Step(app, None)]) message = ("Error detected when adding 'db.1' " "as a dependency of 'app.1': graph is " "not acyclic") self.assertEqual(str(expected.exception), message) def test_dump(self, *args): requires = None steps = [] for i in range(5): overrides = { "variables": { "PublicSubnets": "1", "SshKeyName": "1", "PrivateSubnets": "1", "Random": "${noop something}", }, "requires": requires, } stack = Stack( definition=generate_definition('vpc', i, **overrides), context=self.context) requires = [stack.name] steps += [Step(stack, None)] plan = build_plan(description="Test", steps=steps) tmp_dir = tempfile.mkdtemp() try: plan.dump(tmp_dir, context=self.context) for step in plan.steps: template_path = os.path.join( tmp_dir, stack_template_key_name(step.stack.blueprint)) self.assertTrue(os.path.isfile(template_path)) finally: shutil.rmtree(tmp_dir)
test_execute_plan_skipped
model_delete_task_request.go
package model import ( "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" "strings" ) // Request Object
// 实例ID InstanceId string `json:"instance_id"` // 任务ID TaskId string `json:"task_id"` } func (o DeleteTaskRequest) String() string { data, err := utils.Marshal(o) if err != nil { return "DeleteTaskRequest struct{}" } return strings.Join([]string{"DeleteTaskRequest", string(data)}, " ") }
type DeleteTaskRequest struct {
export.py
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You 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. import os from openstack_cli.commands.conf.keys.list import _keys_list from openstack_cli.modules.apputils.terminal import Console from openstack_cli.core.config import Configuration from openstack_cli.modules.apputils.discovery import CommandMetaInfo from openstack_cli.modules.openstack import VMKeypairItemValue, OpenStack __module__ = CommandMetaInfo("export", "Export ssh keys to disk") __args__ = __module__.arg_builder\ .add_default_argument("name", str, "Name of the key to be exported", default="") def _keys_export(conf: Configuration, ostack: OpenStack, name: str): if not name: _keys = _keys_list(conf, ostack, True) item = Console.ask("Select key to export", _type=int) if item is None or item > len(_keys) - 1: Console.print_warning("Invalid selection, aborting") return name = _keys[item].name _key: VMKeypairItemValue try: _key = conf.get_key(name) except KeyError as e: Console.print_error(str(e)) return d = os.getcwd() _public_file_path = os.path.join(d, f"{_key.name}.public.key") _private_file_path = os.path.join(d, f"{_key.name}.private.key") if _key.public_key: try: with open(_public_file_path, "w+", encoding="UTF-8") as f: f.write(_key.public_key) Console.print(f"Public key: {_public_file_path}") except IOError as e: Console.print_error(f"{_key.name}(public): {str(e)}") if _key.private_key: try: with open(_private_file_path, "w+", encoding="UTF-8") as f: f.write(_key.private_key) Console.print(f"Private key: {_private_file_path}") except IOError as e: Console.print_error(f"{_key.name}(private): {str(e)}") def
(conf: Configuration, name: str): ostack = OpenStack(conf) _keys_export(conf, ostack, name)
__init__
conf.py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Project information ----------------------------------------------------- import sys import os import types import ray # stub ray.remote to be a no-op so it doesn't shadow docstrings def
(*args, **kwargs): if len(args) == 1 and len(kwargs) == 0 and callable(args[0]): # This is the case where the decorator is just @ray.remote without parameters. return args[0] return lambda cls_or_func: cls_or_func ray.remote = noop_decorator # fake modules if they're missing for mod_name in ("cudf", "cupy", "pyarrow.gandiva", "omniscidbe"): try: __import__(mod_name) except ImportError: sys.modules[mod_name] = types.ModuleType( mod_name, f"fake {mod_name} for building docs" ) if not hasattr(sys.modules["cudf"], "DataFrame"): sys.modules["cudf"].DataFrame = type("DataFrame", (object,), {}) if not hasattr(sys.modules["omniscidbe"], "PyDbEngine"): sys.modules["omniscidbe"].PyDbEngine = type("PyDbEngine", (object,), {}) sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import modin from modin.config.__main__ import export_config_help configs_file_path = os.path.abspath( os.path.join(os.path.dirname(__file__), "flow/modin/configs_help.csv") ) # Export configs help to create configs table in the docs/flow/modin/config.rst export_config_help(configs_file_path) project = "Modin" copyright = "2018-2022, Modin" author = "Modin contributors" # The short X.Y version version = "{}".format(modin.__version__) # The full version, including alpha/beta/rc tags release = version # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx.ext.mathjax", "sphinx.ext.githubpages", "sphinx.ext.graphviz", "sphinxcontrib.plantuml", "sphinx_issues", ] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = ".rst" # The master toctree document. master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # -- Options for HTML output ------------------------------------------------- # Maps git branches to Sphinx themes default_html_theme = "pydata_sphinx_theme" current_branch = "nature" # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = "pydata_sphinx_theme" html_favicon = "img/MODIN_ver2.ico" html_logo = "img/MODIN_ver2.png" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = { "sidebarwidth": 270, "collapse_navigation": False, "navigation_depth": 4, "show_toc_level": 2, "github_url": "https://github.com/modin-project/modin", "icon_links": [ { "name": "PyPI", "url": "https://pypi.org/project/modin", "icon": "fab fa-python", }, { "name": "conda-forge", "url": "https://anaconda.org/conda-forge/modin", "icon": "fas fa-circle-notch", }, { "name": "Join the Slack", "url": "https://modin.org/slack.html", "icon": "fab fa-slack", }, { "name": "Discourse", "url": "https://discuss.modin.org/", "icon": "fab fa-discourse", }, { "name": "Mailing List", "url": "https://groups.google.com/forum/#!forum/modin-dev", "icon": "fas fa-envelope-square", }, ], } # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # The default sidebars (for documents that don't match any pattern) are # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. # # The default pydata_sphinx_theme sidebar templates are # sidebar-nav-bs.html and search-field.html. html_sidebars = {} issues_github_path = "modin-project/modin"
noop_decorator
event.py
#!/usr/bin/python # -*- coding:utf-8 -*- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Copyright 2016 Everley # # # # 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. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import copy class Field(object): """ The field object of :class:`Event`. """ field_type = None """ The class of the field. """ default = None """ The default value of the filed. """ def __init__(self, field_type, default=None): self.field_type = field_type self.default = default self.match(default) def match(self, value): """ Raise an :class:`TypeError` is `value` is not an instance of `self.field_type`. :param value: The value to match. """ if value is not None and not isinstance(value, self.field_type): raise TypeError('expect %s, not %s' % (self.field_type, type(value))) class EventMetaClass(type): """ The metaclass to help new :class:`Event`. """ def __new__(cls, name, bases, attrs): fields = [] mappings = {} params = {} new_attrs = {} for k, v in attrs.items(): if isinstance(v, Field): fields.append(v) mappings[k] = v params[k] = v.default else: new_attrs[k] = v new_attrs['__fields__'] = fields new_attrs['__mappings__'] = mappings new_attrs['__params__'] = params new_attrs['__actual_params__'] = None new_attrs['__tag__'] = attrs['__tag__'] \ if '__tag__' in attrs else '' new_attrs['__description__'] = attrs['__description__'] \ if '__description__' in attrs else '' return super(EventMetaClass, cls).__new__(cls, name, bases, new_attrs) class Event(object): """ The base class of specific event. """ __metaclass__ = EventMetaClass def __init__(self, **kwargs): self.__actual_params__ = copy.deepcopy(self.__params__) for k, v in kwargs.iteritems(): self.__setattr__(k, v) def __getattr__(self, key): if key in self.__actual_params__: return self.__actual_params__[key] else: raise AttributeError( "%s has no param `%s`" % (type(self), key)) def __setattr__(self, key, value): if key in ['__actual_params__']: return super(Event, self).__setattr__(key, value) if key in self.__actual_params__: self.__mappings__[key].match(value)
self.__actual_params__[key] = value else: raise AttributeError( "%s has no param `%s`" % (type(self), key)) @property def params(self): """ A `dict` which is a deep copy of the event's params. """ return copy.deepcopy(self.__actual_params__) @classmethod def tag(cls): """ The tag of the event. """ return cls.__tag__ @classmethod def description(cls): """ The description of the event. """ return cls.__description__ @classmethod def key(cls): """ A unique string for the event. """ return '%s.%s' % (cls.__module__, cls.__name__) @property def no_field(self): """ return True if the event doesn't have any field. """ return len(self.__params__) == 0
indexing.rs
use fbs::FlatBufferBuilder; use std::borrow::Cow; use std::path::Path; use typed_builder::TypedBuilder; pub fn index(request: Request<'_>) -> anyhow::Result<()> { log::debug!("Attempting to load repo in path: {:?}", &request.path); let packages_path = request.path.join("packages"); std::fs::create_dir_all(&packages_path)?; // Attempt to make strings directory if it doesn't exist let strings_path = request.path.join("strings"); std::fs::create_dir_all(&strings_path)?; // Find all package descriptor TOMLs let packages = std::fs::read_dir(&*packages_path)? .filter_map(Result::ok) .filter(|x| { let v = x.file_type().ok().map(|x| x.is_dir()).unwrap_or(false); log::trace!("Attempting {:?} := {:?}", &x, &v); v }) .filter_map(|x| { let path = x.path().join("index.toml"); log::trace!("Attempting read to string: {:?}", &path); let file = match std::fs::read_to_string(&path) { Ok(v) => v, Err(e) => { log::error!("Could not handle path: {:?}", &path); log::error!("{}", e); log::error!("Continuing."); return None; } }; let package: pahkat_types::package::Package = match toml::from_str(&file) { Ok(v) => v, Err(e) => { log::error!("Could not parse: {:?}", &path); log::error!("{}", e); log::error!("Continuing."); return None; } }; Some(package) }) .collect::<Vec<pahkat_types::package::Package>>(); let mut builder = FlatBufferBuilder::new(); let index = build_index(&mut builder, &packages)?; std::fs::write(packages_path.join("index.bin"), index)?; log::trace!("Finished writing index.bin"); Ok(()) } #[non_exhaustive] #[derive(Debug, Clone, TypedBuilder)] pub struct Request<'a> { pub path: Cow<'a, Path>, } #[non_exhaustive] #[derive(Debug, Clone, Default, TypedBuilder)] pub struct PartialRequest<'a> { #[builder(default)] pub path: Option<&'a Path>, } impl<'a> crate::Request for Request<'a> { type Error = std::convert::Infallible; type Partial = PartialRequest<'a>; fn new_from_user_input(partial: Self::Partial) -> Result<Self, Self::Error> { Ok(Request { path: partial .path .map(Cow::Borrowed) .unwrap_or_else(|| Cow::Owned(std::env::current_dir().unwrap())), }) } } fn vectorize_strings<'a>( keys: Vec<fbs::WIPOffset<&'a str>>, builder: &mut FlatBufferBuilder<'a>, ) -> fbs::WIPOffset<fbs::Vector<'a, fbs::ForwardsUOffset<&'a str>>> { let len = keys.len(); builder.start_vector::<fbs::ForwardsUOffset<&'_ str>>(len); for key in keys.into_iter().rev() { builder.push(key); } builder.end_vector(len) } fn vectorize_lang_map<'a, 'd>( lang_map: &'d pahkat_types::LangTagMap<String>, lang_keys: &mut std::collections::HashMap<&'d str, fbs::WIPOffset<&'a str>>, builder: &mut FlatBufferBuilder<'a>, ) -> ( Option<fbs::WIPOffset<fbs::Vector<'a, fbs::ForwardsUOffset<&'a str>>>>, Option<fbs::WIPOffset<fbs::Vector<'a, fbs::ForwardsUOffset<&'a str>>>>, ) { let (name_keys, name_values): (Vec<_>, Vec<_>) = lang_map .iter() .map(|(key, value)| { let lang_key_ref = lang_keys .entry(key) .or_insert_with(|| builder.create_string(key)) .clone(); let value_ref = builder.create_string(value); (lang_key_ref, value_ref) }) .unzip(); let (name_keys_ref, name_values_ref) = if name_keys.is_empty() { (None, None) } else { let keys_ref = vectorize_strings(name_keys, builder); let values_ref = vectorize_strings(name_values, builder); (Some(keys_ref), Some(values_ref)) }; (name_keys_ref, name_values_ref) } fn create_payload_windows_exe<'a>( payload: &pahkat_types::payload::windows::Executable, builder: &mut FlatBufferBuilder<'a>, ) -> fbs::WIPOffset<fbs::UnionWIPOffset>
fn create_payload_macos_pkg<'a>( payload: &pahkat_types::payload::macos::Package, builder: &mut FlatBufferBuilder<'a>, ) -> fbs::WIPOffset<fbs::UnionWIPOffset> { let url = builder.create_string(payload.url.as_str()); let pkg_id = builder.create_string(payload.pkg_id.as_str()); use crate::fbs::pahkat::MacOSPackageFlag; use pahkat_types::payload::macos::RebootSpec; let mut flags = 0u8; if payload.requires_reboot.contains(&RebootSpec::Install) { flags |= MacOSPackageFlag::RequiresRebootOnInstall as u8; } if payload.requires_reboot.contains(&RebootSpec::Update) { flags |= MacOSPackageFlag::RequiresRebootOnUpdate as u8; } if payload.requires_reboot.contains(&RebootSpec::Install) { flags |= MacOSPackageFlag::RequiresRebootOnUninstall as u8; } use pahkat_types::payload::macos::InstallTarget; if payload.targets.is_empty() { flags |= MacOSPackageFlag::TargetSystem as u8; } else { for target in payload.targets.iter() { match target { InstallTarget::System => flags |= MacOSPackageFlag::TargetSystem as u8, InstallTarget::User => flags |= MacOSPackageFlag::TargetUser as u8, } } } let args = crate::fbs::pahkat::MacOSPackageArgs { url, pkg_id, flags, size: payload.size, installed_size: payload.installed_size, }; crate::fbs::pahkat::MacOSPackage::create(builder, &args).as_union_value() } fn create_payload_tarball_pkg<'a>( payload: &pahkat_types::payload::tarball::Package, builder: &mut FlatBufferBuilder<'a>, ) -> fbs::WIPOffset<fbs::UnionWIPOffset> { log::debug!("Tarball: {}", &payload.url); let url = builder.create_string(payload.url.as_str()); let args = crate::fbs::pahkat::TarballPackageArgs { url, size: payload.size, installed_size: payload.installed_size, }; crate::fbs::pahkat::TarballPackage::create(builder, &args).as_union_value() } fn create_targets<'d, 'a>( targets: &'d Vec<pahkat_types::payload::Target>, builder: &mut FlatBufferBuilder<'a>, ) -> fbs::WIPOffset<fbs::Vector<'a, fbs::ForwardsUOffset<crate::fbs::pahkat::Target<&'a [u8]>>>> { let targets = targets .iter() .map(|target| { let platform = builder.create_string(&target.platform); // TODO: cache keys let (dependencies_keys, dependencies_values): (Vec<_>, Vec<_>) = target .dependencies .iter() .map(|(key, value)| { ( builder.create_string(key.as_str()), builder.create_string(&value), ) }) .unzip(); let (dependencies_keys, dependencies_values) = if dependencies_keys.is_empty() { (None, None) } else { ( Some(vectorize_strings(dependencies_keys, builder)), Some(vectorize_strings(dependencies_values, builder)), ) }; let arch = target.arch.as_ref().map(|x| builder.create_string(&x)); use crate::fbs::pahkat::fbs_gen::PayloadType; use pahkat_types::payload::Payload; let (payload_type, payload) = match &target.payload { Payload::WindowsExecutable(p) => ( PayloadType::WindowsExecutable, create_payload_windows_exe(p, builder), ), Payload::MacOSPackage(p) => ( PayloadType::MacOSPackage, create_payload_macos_pkg(p, builder), ), Payload::TarballPackage(p) => ( PayloadType::TarballPackage, create_payload_tarball_pkg(p, builder), ), _ => panic!("Payload must exist"), }; let args = crate::fbs::pahkat::TargetArgs { platform, arch, dependencies_keys, dependencies_values, payload_type, payload, }; crate::fbs::pahkat::Target::create(builder, &args) }) .collect::<Vec<_>>(); let len = targets.len(); builder.start_vector::<fbs::ForwardsUOffset<crate::fbs::pahkat::Target<&'_ [u8]>>>(len); for target in targets.into_iter().rev() { builder.push(target); } builder.end_vector(len) } fn create_releases<'d, 'a>( releases: &'d Vec<pahkat_types::package::Release>, release_keys: &mut std::collections::HashMap<String, fbs::WIPOffset<&'a str>>, str_keys: &mut std::collections::HashMap<&'d str, fbs::WIPOffset<&'a str>>, builder: &mut FlatBufferBuilder<'a>, ) -> fbs::WIPOffset<fbs::Vector<'a, fbs::ForwardsUOffset<crate::fbs::pahkat::Release<&'a [u8]>>>> { let releases = releases .iter() .map(|release| { // TODO: handle version type properly use pahkat_types::package::version::Version; let (version_type, version) = match &release.version { // Version::Opaque => 1u8, Version::Semantic(v) => (2u8, v.to_string()), _ => panic!(), }; let version = *release_keys .entry(version.clone()) .or_insert_with(|| builder.create_string(&*version)); let channel = release.channel.as_ref().map(|x| { *str_keys .entry(&*x) .or_insert_with(|| builder.create_string(&*x)) }); let authors = release .authors .iter() .map(|x| { *str_keys .entry(&*x) .or_insert_with(|| builder.create_string(&*x)) }) .collect::<Vec<_>>(); let authors = if authors.is_empty() { None } else { Some(vectorize_strings(authors, builder)) }; let license = release.license.as_ref().map(|x| { *str_keys .entry(&*x) .or_insert_with(|| builder.create_string(&*x)) }); let license_url = release.license_url.as_ref().map(|x| { *str_keys .entry(x.as_str()) .or_insert_with(|| builder.create_string(x.as_str())) }); let target = Some(create_targets(&release.target, builder)); let args = crate::fbs::pahkat::ReleaseArgs { version_type, version, channel, authors, license, license_url, target, }; crate::fbs::pahkat::Release::create(builder, &args) }) .collect::<Vec<_>>(); let len = releases.len(); builder.start_vector::<fbs::ForwardsUOffset<crate::fbs::pahkat::Release<&'_ [u8]>>>(len); for release in releases.into_iter().rev() { builder.push(release); } builder.end_vector(len) } fn build_index<'a>( builder: &'a mut FlatBufferBuilder<'a>, packages: &[pahkat_types::package::Package], ) -> anyhow::Result<&'a [u8]> { let mut owned_keys = std::collections::HashMap::new(); let mut str_keys = std::collections::HashMap::new(); // Use the count to create the vectors we need let id_refs = packages .iter() .map(pahkat_types::package::Package::id) .map(|id| builder.create_string(id)) .collect::<Vec<_>>(); builder.start_vector::<fbs::ForwardsUOffset<&'_ str>>(id_refs.len()); for id in id_refs.iter().rev() { builder.push(id.clone()); } let packages_keys = Some(builder.end_vector(id_refs.len())); builder.start_vector::<u8>(id_refs.len()); for _ in id_refs.iter().rev() { builder.push(crate::fbs::pahkat::fbs_gen::PackageType::Descriptor as u8); } let packages_values_types = Some(builder.end_vector::<u8>(id_refs.len())); let packages_values = id_refs .iter() .zip(packages.iter()) .map(|(id_ref, package)| { let descriptor = match package { pahkat_types::package::Package::Concrete(p) => p, _ => panic!("Unsupported package type"), }; let tags = if descriptor.package.tags.is_empty() { None } else { let tags = descriptor .package .tags .iter() .map(|x| { *str_keys .entry(&**x) .or_insert_with(|| builder.create_string(&*x)) }) .collect::<Vec<_>>(); let len = tags.len(); builder.start_vector::<fbs::ForwardsUOffset<&'_ str>>(len); for tag_ref in tags.into_iter().rev() { builder.push(tag_ref); } Some(builder.end_vector(len)) }; let (name_keys, name_values) = vectorize_lang_map(&descriptor.name, &mut str_keys, builder); let (description_keys, description_values) = vectorize_lang_map(&descriptor.description, &mut str_keys, builder); let release = create_releases(&descriptor.release, &mut owned_keys, &mut str_keys, builder); let args = crate::fbs::pahkat::DescriptorArgs { id: id_ref.clone(), name_keys, name_values, description_keys, description_values, tags, release: Some(release), }; crate::fbs::pahkat::Descriptor::create(builder, &args) }) .collect::<Vec<_>>(); builder.start_vector::<fbs::ForwardsUOffset<crate::fbs::pahkat::Descriptor<&'_ [u8]>>>( id_refs.len(), ); for package_value in packages_values.into_iter().rev() { builder.push(package_value); } let packages_values = Some(builder.end_vector(id_refs.len())); let args = crate::fbs::pahkat::PackagesArgs { packages_values_types, packages_keys, packages_values, }; let root = crate::fbs::pahkat::Packages::create(builder, &args); builder.finish_minimal(root); Ok(builder.finished_data()) }
{ let url = builder.create_string(payload.url.as_str()); let product_code = builder.create_string(payload.product_code.as_str()); use crate::fbs::pahkat::WindowsExecutableKind; let kind = match payload.kind.as_ref().map(|x| &**x) { Some("msi") => WindowsExecutableKind::Msi, Some("nsis") => WindowsExecutableKind::Nsis, Some("inno") => WindowsExecutableKind::Inno, _ => WindowsExecutableKind::NONE, }; let args = payload .args .as_ref() .map(|x| builder.create_string(x.as_str())); let uninstall_args = payload .uninstall_args .as_ref() .map(|x| builder.create_string(x.as_str())); use crate::fbs::pahkat::WindowsExecutableFlag; use pahkat_types::payload::windows::RebootSpec; let mut flags = 0u8; if payload.requires_reboot.contains(&RebootSpec::Install) { flags |= WindowsExecutableFlag::RequiresRebootOnInstall as u8; } if payload.requires_reboot.contains(&RebootSpec::Update) { flags |= WindowsExecutableFlag::RequiresRebootOnUpdate as u8; } if payload.requires_reboot.contains(&RebootSpec::Install) { flags |= WindowsExecutableFlag::RequiresRebootOnUninstall as u8; } let args = crate::fbs::pahkat::WindowsExecutableArgs { url, product_code, flags, kind, size: payload.size, installed_size: payload.installed_size, args, uninstall_args, }; crate::fbs::pahkat::WindowsExecutable::create(builder, &args).as_union_value() }
GridColumnMenuFilterBaseProps.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=GridColumnMenuFilterBaseProps.js.map
integration.rs
#[cfg(test)] mod tests { const BASE_NUM_LINES: usize = 3; use std::env; use std::path::Path; use std::process::{Command, Stdio}; fn get_path() -> String { let dir = match env::var("TARGET") { Ok(target) => target, Err(_e) => "".to_string(), }; let executable = Path::new("target") .join(dir) .join("debug") .join("color_bruteforcer"); executable.to_str().unwrap().to_string() } #[test] fn test_no_results() { let output = Command::new(get_path()) .arg("--alpha-min=1") .arg("--alpha-max=1") .arg("--base-colors=#ffffff,#bfbfbf,#808080,#404040,#000000") .arg("--target-colors=#fabbbd,#cd8e91,#a16264,#743538,#47080b") .output() .expect("failed to start color_bruteforcer"); match output.status.code() { Some(code) => assert_eq!(1, code), None => assert!(false, "Process terminated by signal"), } let output_text = String::from_utf8_lossy(&output.stdout); let num_lines = output_text.lines().collect::<Vec<&str>>().len(); assert_eq!(BASE_NUM_LINES, num_lines); } #[test] fn test_has_results() { let output = Command::new(get_path()) .arg("--alpha-min=30") .arg("--alpha-max=30") .arg("--base-colors=#ffffff,#bfbfbf,#808080,#404040,#000000") .arg("--target-colors=#fabbbd,#cd8e91,#a16264,#743538,#47080b") .arg("--results=5") .output() .expect("failed to start color_bruteforcer"); assert!(output.status.success()); let output_text = String::from_utf8_lossy(&output.stdout); let lines = output_text.lines().collect::<Vec<&str>>(); let parse_as_f32 = |x: &str| x.split(" ").last().unwrap().parse().unwrap(); let first_dist: f32 = parse_as_f32(lines.get(3).unwrap()); let last_dist: f32 = parse_as_f32(lines.last().unwrap()); assert!(first_dist < last_dist); assert_eq!(BASE_NUM_LINES + 5, lines.len()); } #[test] fn test_alpha_conflict() { let status = Command::new(get_path()) .arg("--alpha-min=80") .arg("--alpha-max=70") .stderr(Stdio::null()) .status() .expect("failed to start color_bruteforcer"); match status.code() { Some(code) => assert_eq!(1, code), None => assert!(false, "Process terminated by signal"), } } #[test] fn
() { let status = Command::new(get_path()) .arg("--base-colors=#FFFFFF,#001488") .arg("--target-colors=000000") .stderr(Stdio::null()) .status() .expect("failed to start color_bruteforcer"); match status.code() { Some(code) => assert_eq!(1, code), None => assert!(false, "Process terminated by signal"), } } }
test_get_colors_error
katse.py
import tkinter as tk from tkinter import ttk root = tk.Tk() def do_stuff(e=None):
root.option_add("*tearOff", tk.FALSE) menubar = tk.Menu(root) root["menu"] = menubar file_menu = tk.Menu(menubar) menubar.add_cascade(label="File", menu=file_menu) print(file_menu.index("end")) file_menu.add_separator() print(file_menu.index("end")) file_menu.add_separator() print(file_menu.index("end")) file_menu.add_command(label="Tessa", command=do_stuff) print(file_menu.index("end")) b1 = ttk.Button(root, command=do_stuff) b1.grid() root.mainloop()
pass
train.py
import time import torch import torch.nn.functional as F def train_runtime(model, data, epochs, device):
if hasattr(data, 'features'): x = torch.tensor(data.features, dtype=torch.float, device=device) else: x = None mask = data.train_mask if hasattr(data, 'train_mask') else data.train_idx y = torch.tensor(data.labels, dtype=torch.long, device=device)[mask] model = model.to(device) model.train() optimizer = torch.optim.Adam(model.parameters(), lr=0.01) if torch.cuda.is_available(): torch.cuda.synchronize() t_start = time.perf_counter() for epoch in range(epochs): optimizer.zero_grad() out = model(x) loss = F.nll_loss(out[mask], y.view(-1)) loss.backward() optimizer.step() if torch.cuda.is_available(): torch.cuda.synchronize() t_end = time.perf_counter() return t_end - t_start
collections.py
from __future__ import absolute_import, division, print_function import numbers import numpy as np from functools import partial from itertools import chain import datashape from datashape import (DataShape, Option, Record, Unit, dshape, var, Fixed, Var, promote, object_) from datashape.predicates import isscalar, iscollection, isrecord from toolz import (isdistinct, frequencies, concat as tconcat, unique, get, first, compose, keymap) import toolz.curried.operator as op from odo.utils import copydoc from .core import common_subexpression from .expressions import Expr, ElemWise, label, Field from .expressions import dshape_method_list from ..compatibility import zip_longest, _strtypes from ..utils import listpack __all__ = ['Concat', 'concat', 'Distinct', 'distinct', 'Head', 'head', 'IsIn', 'isin', 'Join', 'join', 'Merge', 'merge', 'Sample', 'sample', 'Shift', 'shift', 'Sort', 'sort', 'Tail', 'tail', 'transform'] class Sort(Expr): """ Table in sorted order Examples -------- >>> from blaze import symbol >>> accounts = symbol('accounts', 'var * {name: string, amount: int}') >>> accounts.sort('amount', ascending=False).schema dshape("{name: string, amount: int32}") Some backends support sorting by arbitrary rowwise tables, e.g. >>> accounts.sort(-accounts.amount) # doctest: +SKIP """ __slots__ = '_hash', '_child', '_key', 'ascending' def _dshape(self): return self._child.dshape @property def key(self): if self._key is () or self._key is None: return self._child.fields[0] if isinstance(self._key, tuple): return list(self._key) else: return self._key def _len(self): return self._child._len() @property def _name(self): return self._child._name def __str__(self): return "%s.sort(%s, ascending=%s)" % (self._child, repr(self._key), self.ascending) def sort(child, key=None, ascending=True): """ Sort a collection Parameters ---------- key : str, list of str, or Expr Defines by what you want to sort. * A single column string: ``t.sort('amount')`` * A list of column strings: ``t.sort(['name', 'amount'])`` * An expression: ``t.sort(-t.amount)`` ascending : bool, optional Determines order of the sort """ if not isrecord(child.dshape.measure): key = None if isinstance(key, list): key = tuple(key) return Sort(child, key, ascending) class Distinct(Expr): """ Remove duplicate elements from an expression Parameters ---------- on : tuple of :class:`~blaze.expr.expressions.Field` The subset of fields or names of fields to be distinct on. Examples -------- >>> from blaze import symbol >>> t = symbol('t', 'var * {name: string, amount: int, id: int}') >>> e = distinct(t) >>> data = [('Alice', 100, 1), ... ('Bob', 200, 2), ... ('Alice', 100, 1)] >>> from blaze.compute.python import compute >>> sorted(compute(e, data)) [('Alice', 100, 1), ('Bob', 200, 2)] Use a subset by passing `on`: >>> import pandas as pd >>> e = distinct(t, 'name') >>> data = pd.DataFrame([['Alice', 100, 1], ... ['Alice', 200, 2], ... ['Bob', 100, 1], ... ['Bob', 200, 2]], ... columns=['name', 'amount', 'id']) >>> compute(e, data) name amount id 0 Alice 100 1 1 Bob 100 1 """ __slots__ = '_hash', '_child', 'on' def _dshape(self): return datashape.var * self._child.dshape.measure @property def fields(self): return self._child.fields @property def _name(self): return self._child._name def __str__(self): return 'distinct({child}{on})'.format( child=self._child, on=(', ' if self.on else '') + ', '.join(map(str, self.on)) ) @copydoc(Distinct) def distinct(expr, *on): fields = frozenset(expr.fields) _on = [] append = _on.append for n in on: if isinstance(n, Field): if n._child.isidentical(expr): n = n._name else: raise ValueError('{0} is not a field of {1}'.format(n, expr)) if not isinstance(n, _strtypes): raise TypeError('on must be a name or field, not: {0}'.format(n)) elif n not in fields: raise ValueError('{0} is not a field of {1}'.format(n, expr)) append(n) return Distinct(expr, tuple(_on)) class _HeadOrTail(Expr): __slots__ = '_hash', '_child', 'n' def _dshape(self): return self.n * self._child.dshape.subshape[0] def _len(self): return min(self._child._len(), self.n) @property def _name(self): return self._child._name def __str__(self): return '%s.%s(%d)' % (self._child, type(self).__name__.lower(), self.n) class Head(_HeadOrTail): """ First `n` elements of collection Examples -------- >>> from blaze import symbol >>> accounts = symbol('accounts', 'var * {name: string, amount: int}') >>> accounts.head(5).dshape dshape("5 * {name: string, amount: int32}") See Also -------- blaze.expr.collections.Tail """ pass @copydoc(Head) def head(child, n=10): return Head(child, n) class Tail(_HeadOrTail): """ Last `n` elements of collection Examples -------- >>> from blaze import symbol >>> accounts = symbol('accounts', 'var * {name: string, amount: int}') >>> accounts.tail(5).dshape dshape("5 * {name: string, amount: int32}") See Also -------- blaze.expr.collections.Head """ pass @copydoc(Tail) def tail(child, n=10): return Tail(child, n) class Sample(Expr): """Random row-wise sample. Can specify `n` or `frac` for an absolute or fractional number of rows, respectively. Examples -------- >>> from blaze import symbol >>> accounts = symbol('accounts', 'var * {name: string, amount: int}') >>> accounts.sample(n=2).dshape dshape("var * {name: string, amount: int32}") >>> accounts.sample(frac=0.1).dshape dshape("var * {name: string, amount: int32}") """ __slots__ = '_hash', '_child', 'n', 'frac' def _dshape(self): return self._child.dshape def __str__(self): arg = 'n={}'.format(self.n) if self.n is not None else 'frac={}'.format(self.frac) return '%s.sample(%s)' % (self._child, arg) @copydoc(Sample) def sample(child, n=None, frac=None): if n is frac is None: raise TypeError("sample() missing 1 required argument, 'n' or 'frac'.") if n is not None and frac is not None: raise ValueError("n ({}) and frac ({}) cannot both be specified.".format(n, frac)) if n is not None: n = op.index(n) if n < 1: raise ValueError("n must be positive, given {}".format(n)) if frac is not None: frac = float(frac) if not 0.0 <= frac <= 1.0: raise ValueError("sample requires 0 <= frac <= 1.0, given {}".format(frac)) return Sample(child, n, frac) def transform(t, replace=True, **kwargs): """ Add named columns to table >>> from blaze import symbol >>> t = symbol('t', 'var * {x: int, y: int}') >>> transform(t, z=t.x + t.y).fields ['x', 'y', 'z'] """ if replace and set(t.fields).intersection(set(kwargs)): t = t[[c for c in t.fields if c not in kwargs]] args = [t] + [v.label(k) for k, v in sorted(kwargs.items(), key=first)] return merge(*args) def schema_concat(exprs): """ Concatenate schemas together. Supporting both Records and Units In the case of Units, the name is taken from expr.name """ new_fields = [] for c in exprs: schema = c.schema[0] if isinstance(schema, Record): new_fields.extend(schema.fields) elif isinstance(schema, (Unit, Option)): new_fields.append((c._name, schema)) else: raise TypeError("All schemas must have Record or Unit shape." "\nGot %s" % schema) return dshape(Record(new_fields)) class Merge(ElemWise): """ Merge many fields together Examples -------- >>> from blaze import symbol, label >>> accounts = symbol('accounts', 'var * {name: string, x: int, y: real}') >>> merge(accounts.name, z=accounts.x + accounts.y).fields ['name', 'z'] To control the ordering of the fields, use ``label``: >>> merge(label(accounts.name, 'NAME'), label(accounts.x, 'X')).dshape dshape("var * {NAME: string, X: int32}") >>> merge(label(accounts.x, 'X'), label(accounts.name, 'NAME')).dshape dshape("var * {X: int32, NAME: string}") """ __slots__ = '_hash', '_child', 'children' def _schema(self): return schema_concat(self.children) @property def fields(self): return list(tconcat(child.fields for child in self.children)) def _subterms(self): yield self for i in self.children: for node in i._subterms(): yield node def _get_field(self, key): for child in self.children: if key in child.fields: if isscalar(child.dshape.measure): return child else: return child[key] def _project(self, key): if not isinstance(key, (tuple, list)): raise TypeError("Expected tuple or list, got %s" % key) return merge(*[self[c] for c in key]) def _leaves(self): return list(unique(tconcat(i._leaves() for i in self.children))) @copydoc(Merge) def merge(*exprs, **kwargs): if len(exprs) + len(kwargs) == 1: if exprs: return exprs[0] if kwargs: [(k, v)] = kwargs.items() return v.label(k) # Get common sub expression exprs += tuple(label(v, k) for k, v in sorted(kwargs.items(), key=first)) child = common_subexpression(*exprs) result = Merge(child, exprs) if not isdistinct(result.fields): raise ValueError( "Repeated columns found: " + ', '.join( k for k, v in frequencies(result.fields).items() if v > 1 ), ) return result def unpack(l): """ Unpack items from collections of nelements 1 >>> unpack('hello') 'hello' >>> unpack(['hello']) 'hello' """ if isinstance(l, (tuple, list, set)) and len(l) == 1: return next(iter(l)) else: return l class Join(Expr): """ Join two tables on common columns Parameters ---------- lhs, rhs : Expr Expressions to join on_left : str, optional The fields from the left side to join on. If no ``on_right`` is passed, then these are the fields for both sides. on_right : str, optional The fields from the right side to join on. how : {'inner', 'outer', 'left', 'right'} What type of join to perform. suffixes: pair of str The suffixes to be applied to the left and right sides in order to resolve duplicate field names. Examples -------- >>> from blaze import symbol >>> names = symbol('names', 'var * {name: string, id: int}') >>> amounts = symbol('amounts', 'var * {amount: int, id: int}') Join tables based on shared column name >>> joined = join(names, amounts, 'id') Join based on different column names >>> amounts = symbol('amounts', 'var * {amount: int, acctNumber: int}') >>> joined = join(names, amounts, 'id', 'acctNumber') See Also -------- blaze.expr.collections.Merge """ __slots__ = ( '_hash', 'lhs', 'rhs', '_on_left', '_on_right', 'how', 'suffixes' ) __inputs__ = 'lhs', 'rhs' @property def on_left(self): on_left = self._on_left if isinstance(on_left, tuple): return list(on_left) return on_left @property def on_right(self): on_right = self._on_right if isinstance(on_right, tuple): return list(on_right) return on_right def _schema(self): """ Examples -------- >>> from blaze import symbol >>> t = symbol('t', 'var * {name: string, amount: int}') >>> s = symbol('t', 'var * {name: string, id: int}') >>> join(t, s).schema dshape("{name: string, amount: int32, id: int32}") >>> join(t, s, how='left').schema dshape("{name: string, amount: int32, id: ?int32}") Overlapping but non-joined fields append _left, _right >>> a = symbol('a', 'var * {x: int, y: int}') >>> b = symbol('b', 'var * {x: int, y: int}') >>> join(a, b, 'x').fields ['x', 'y_left', 'y_right'] """ option = lambda dt: dt if isinstance(dt, Option) else Option(dt) on_left = self.on_left if not isinstance(on_left, list): on_left = on_left, on_right = self.on_right if not isinstance(on_right, list): on_right = on_right, right_types = keymap( dict(zip(on_right, on_left)).get, self.rhs.dshape.measure.dict, ) joined = ( (name, promote(dt, right_types[name], promote_option=False)) for n, (name, dt) in enumerate(filter( compose(op.contains(on_left), first), self.lhs.dshape.measure.fields, )) ) left = [ (name, dt) for name, dt in zip( self.lhs.fields, types_of_fields(self.lhs.fields, self.lhs) ) if name not in on_left ] right = [ (name, dt) for name, dt in zip( self.rhs.fields, types_of_fields(self.rhs.fields, self.rhs) ) if name not in on_right ] # Handle overlapping but non-joined case, e.g. left_other = set(name for name, dt in left if name not in on_left) right_other = set(name for name, dt in right if name not in on_right) overlap = left_other & right_other left_suffix, right_suffix = self.suffixes left = ((name + left_suffix if name in overlap else name, dt) for name, dt in left) right = ((name + right_suffix if name in overlap else name, dt) for name, dt in right) if self.how in ('right', 'outer'): left = ((name, option(dt)) for name, dt in left) if self.how in ('left', 'outer'): right = ((name, option(dt)) for name, dt in right) return dshape(Record(chain(joined, left, right))) def _dshape(self): # TODO: think if this can be generalized return var * self.schema def types_of_fields(fields, expr): """ Get the types of fields in an expression Examples -------- >>> from blaze import symbol >>> expr = symbol('e', 'var * {x: int64, y: float32}') >>> types_of_fields('y', expr) ctype("float32") >>> types_of_fields(['y', 'x'], expr) (ctype("float32"), ctype("int64")) >>> types_of_fields('x', expr.x) ctype("int64") """ if isinstance(expr.dshape.measure, Record): return get(fields, expr.dshape.measure) else: if isinstance(fields, (tuple, list, set)): assert len(fields) == 1 fields, = fields assert fields == expr._name return expr.dshape.measure @copydoc(Join) def join(lhs, rhs, on_left=None, on_right=None, how='inner', suffixes=('_left', '_right')): if not on_left and not on_right: on_left = on_right = unpack(list(sorted( set(lhs.fields) & set(rhs.fields), key=lhs.fields.index))) if not on_right: on_right = on_left if isinstance(on_left, tuple): on_left = list(on_left) if isinstance(on_right, tuple): on_right = list(on_right) if not on_left or not on_right: raise ValueError( "Can not Join. No shared columns between %s and %s" % (lhs, rhs), ) left_types = listpack(types_of_fields(on_left, lhs)) right_types = listpack(types_of_fields(on_right, rhs)) if len(left_types) != len(right_types): raise ValueError( 'Length of on_left=%d not equal to length of on_right=%d' % ( len(left_types), len(right_types), ), ) for n, promotion in enumerate(map(partial(promote, promote_option=False), left_types, right_types)): if promotion == object_: raise TypeError( 'Schemata of joining columns do not match,' ' no promotion found for %s=%s and %s=%s' % ( on_left[n], left_types[n], on_right[n], right_types[n], ), ) _on_left = tuple(on_left) if isinstance(on_left, list) else on_left _on_right = (tuple(on_right) if isinstance(on_right, list) else on_right) how = how.lower() if how not in ('inner', 'outer', 'left', 'right'): raise ValueError("How parameter should be one of " "\n\tinner, outer, left, right." "\nGot: %s" % how) return Join(lhs, rhs, _on_left, _on_right, how, suffixes) class Concat(Expr): """ Stack tables on common columns Parameters ---------- lhs, rhs : Expr Collections to concatenate axis : int, optional The axis to concatenate on. Examples -------- >>> from blaze import symbol Vertically stack tables: >>> names = symbol('names', '5 * {name: string, id: int32}') >>> more_names = symbol('more_names', '7 * {name: string, id: int32}') >>> stacked = concat(names, more_names) >>> stacked.dshape dshape("12 * {name: string, id: int32}") Vertically stack matrices: >>> mat_a = symbol('a', '3 * 5 * int32') >>> mat_b = symbol('b', '3 * 5 * int32') >>> vstacked = concat(mat_a, mat_b, axis=0) >>> vstacked.dshape dshape("6 * 5 * int32") Horizontally stack matrices: >>> hstacked = concat(mat_a, mat_b, axis=1) >>> hstacked.dshape dshape("3 * 10 * int32") See Also -------- blaze.expr.collections.Merge """ __slots__ = '_hash', 'lhs', 'rhs', 'axis' __inputs__ = 'lhs', 'rhs' def _dshape(self): axis = self.axis ldshape = self.lhs.dshape lshape = ldshape.shape return DataShape( *(lshape[:axis] + ( _shape_add(lshape[axis], self.rhs.dshape.shape[axis]), ) + lshape[axis + 1:] + (ldshape.measure,)) ) def _shape_add(a, b): if isinstance(a, Var) or isinstance(b, Var): return var return Fixed(a.val + b.val) @copydoc(Concat) def concat(lhs, rhs, axis=0): ldshape = lhs.dshape rdshape = rhs.dshape if ldshape.measure != rdshape.measure: raise TypeError( 'Mismatched measures: {l} != {r}'.format( l=ldshape.measure, r=rdshape.measure ), ) lshape = ldshape.shape rshape = rdshape.shape for n, (a, b) in enumerate(zip_longest(lshape, rshape, fillvalue=None)): if n != axis and a != b: raise TypeError( 'Shapes are not equal along axis {n}: {a} != {b}'.format( n=n, a=a, b=b, ), ) if axis < 0 or 0 < len(lshape) <= axis: raise ValueError( "Invalid axis '{a}', must be in range: [0, {n})".format( a=axis, n=len(lshape) ), ) return Concat(lhs, rhs, axis) class IsIn(ElemWise): """Check if an expression contains values from a set. Return a boolean expression indicating whether another expression contains values that are members of a collection. Parameters ---------- expr : Expr Expression whose elements to check for membership in `keys` keys : Sequence Elements to test against. Blaze stores this as a ``frozenset``. Examples -------- Check if a vector contains any of 1, 2 or 3: >>> from blaze import symbol >>> t = symbol('t', '10 * int64') >>> expr = t.isin([1, 2, 3]) >>> expr.dshape dshape("10 * bool") """ __slots__ = '_hash', '_child', '_keys' def _schema(self): return datashape.bool_ def __str__(self): return '%s.%s(%s)' % (self._child, type(self).__name__.lower(), self._keys) @copydoc(IsIn) def isin(expr, keys): if isinstance(keys, Expr): raise TypeError('keys argument cannot be an expression, ' 'it must be an iterable object such as a list, ' 'tuple or set') return IsIn(expr, frozenset(keys)) class Shift(Expr):
@copydoc(Shift) def shift(expr, n): if not isinstance(n, (numbers.Integral, np.integer)): raise TypeError('n must be an integer') return Shift(expr, n) dshape_method_list.extend([(iscollection, set([sort, head, tail, sample])), (lambda ds: len(ds.shape) == 1, set([distinct, shift])), (lambda ds: (len(ds.shape) == 1 and isscalar(getattr(ds.measure, 'key', ds.measure))), set([isin])), (lambda ds: len(ds.shape) == 1 and isscalar(ds.measure), set([isin]))])
""" Shift a column backward or forward by N elements Parameters ---------- expr : Expr The expression to shift. This expression's dshape should be columnar n : int The number of elements to shift by. If n < 0 then shift backward, if n == 0 do nothing, else shift forward. """ __slots__ = '_hash', '_child', 'n' def _schema(self): measure = self._child.schema.measure # if we are not shifting or we are already an Option type then return # the child's schema if not self.n or isinstance(measure, Option): return measure else: return Option(measure) def _dshape(self): return DataShape(*(self._child.dshape.shape + tuple(self.schema))) def __str__(self): return '%s(%s, n=%d)' % ( type(self).__name__.lower(), self._child, self.n )
fcim.rs
#[doc = "Reader of register FCIM"] pub type R = crate::R<u32, super::FCIM>; #[doc = "Writer for register FCIM"] pub type W = crate::W<u32, super::FCIM>; #[doc = "Register FCIM `reset()`'s with value 0"] impl crate::ResetValue for super::FCIM { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `AMASK`"] pub type AMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AMASK`"] pub struct AMASK_W<'a> { w: &'a mut W, } impl<'a> AMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } #[doc = "Reader of field `PMASK`"] pub type PMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PMASK`"] pub struct PMASK_W<'a> { w: &'a mut W, } impl<'a> PMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } #[doc = "Reader of field `EMASK`"] pub type EMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `EMASK`"] pub struct EMASK_W<'a> { w: &'a mut W, } impl<'a> EMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W
#[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } #[doc = "Reader of field `VOLTMASK`"] pub type VOLTMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `VOLTMASK`"] pub struct VOLTMASK_W<'a> { w: &'a mut W, } impl<'a> VOLTMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } #[doc = "Reader of field `INVDMASK`"] pub type INVDMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `INVDMASK`"] pub struct INVDMASK_W<'a> { w: &'a mut W, } impl<'a> INVDMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } #[doc = "Reader of field `ERMASK`"] pub type ERMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `ERMASK`"] pub struct ERMASK_W<'a> { w: &'a mut W, } impl<'a> ERMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } #[doc = "Reader of field `PROGMASK`"] pub type PROGMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PROGMASK`"] pub struct PROGMASK_W<'a> { w: &'a mut W, } impl<'a> PROGMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } impl R { #[doc = "Bit 0 - Access Interrupt Mask"] #[inline(always)] pub fn amask(&self) -> AMASK_R { AMASK_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Programming Interrupt Mask"] #[inline(always)] pub fn pmask(&self) -> PMASK_R { PMASK_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - EEPROM Interrupt Mask"] #[inline(always)] pub fn emask(&self) -> EMASK_R { EMASK_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 9 - VOLT Interrupt Mask"] #[inline(always)] pub fn voltmask(&self) -> VOLTMASK_R { VOLTMASK_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Invalid Data Interrupt Mask"] #[inline(always)] pub fn invdmask(&self) -> INVDMASK_R { INVDMASK_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - ERVER Interrupt Mask"] #[inline(always)] pub fn ermask(&self) -> ERMASK_R { ERMASK_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 13 - PROGVER Interrupt Mask"] #[inline(always)] pub fn progmask(&self) -> PROGMASK_R { PROGMASK_R::new(((self.bits >> 13) & 0x01) != 0) } } impl W { #[doc = "Bit 0 - Access Interrupt Mask"] #[inline(always)] pub fn amask(&mut self) -> AMASK_W { AMASK_W { w: self } } #[doc = "Bit 1 - Programming Interrupt Mask"] #[inline(always)] pub fn pmask(&mut self) -> PMASK_W { PMASK_W { w: self } } #[doc = "Bit 2 - EEPROM Interrupt Mask"] #[inline(always)] pub fn emask(&mut self) -> EMASK_W { EMASK_W { w: self } } #[doc = "Bit 9 - VOLT Interrupt Mask"] #[inline(always)] pub fn voltmask(&mut self) -> VOLTMASK_W { VOLTMASK_W { w: self } } #[doc = "Bit 10 - Invalid Data Interrupt Mask"] #[inline(always)] pub fn invdmask(&mut self) -> INVDMASK_W { INVDMASK_W { w: self } } #[doc = "Bit 11 - ERVER Interrupt Mask"] #[inline(always)] pub fn ermask(&mut self) -> ERMASK_W { ERMASK_W { w: self } } #[doc = "Bit 13 - PROGVER Interrupt Mask"] #[inline(always)] pub fn progmask(&mut self) -> PROGMASK_W { PROGMASK_W { w: self } } }
{ self.bit(false) }
colombia.js
import React from 'react'
<path fill="#ffda44" d="M0 85.337h512v341.326H0z" /> <path fill="#d80027" d="M0 343.096h512v83.567H0z" /> <path fill="#0052b4" d="M0 256h512v87.096H0z" /> </svg> ) export default SvgComponent
const SvgComponent = props => ( <svg viewBox="0 0 512 512" {...props}>
bitspace_sv.ts
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About bitspace</source> <translation>Vad du behöver veta om bitspace</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;bitspace&lt;/b&gt; version</source> <translation>&lt;b&gt;bitspace&lt;/b&gt; version</translation> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2018 BitSpace Developers Copyright © 2014 The bitspace developers</source> <translation>Copyright © 2009-2014 The Bitcoin developers Copyright © 2018 BitSpace Developers Copyright © 2014 The bitspace developers</translation> </message> <message> <location line="+15"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation> Detta är experimentell mjukvara. Distribuerad under mjukvarulicensen MIT/X11, se den medföljande filen COPYING eller http://www.opensource.org/licenses/mit-license.php. Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användning i OpenSSL Toolkit (http://www.openssl.org/) och kryptografisk mjukvara utvecklad av Eric Young ([email protected]) samt UPnP-mjukvara skriven av Thomas Bernard.</translation> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Adressbok</translation> </message> <message> <location line="+22"/> <source>Double-click to edit address or label</source> <translation>Dubbel-klicka för att ändra adressen eller etiketten</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Skapa ny adress</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Kopiera den markerade adressen till systemets Urklipp</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>Ny adress</translation> </message> <message> <location line="-46"/> <source>These are your bitspace addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation>Dessa är dina bitspace adesser för att mottaga betalningsförsändelser. Du kan även använda olika adresser för varje avsändare för att enkelt hålla koll på vem som har skickat en betalning.</translation> </message> <message> <location line="+60"/> <source>&amp;Copy Address</source> <translation>&amp;Kopiera adress</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>Visa &amp;QR kod</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a bitspace address</source> <translation>Signera ett meddelande för att bevisa att du äger bitspace adressen</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Signera &amp;Meddelande</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Ta bort den valda adressen från listan</translation> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified bitspace address</source> <translation>Verifiera ett meddelande för att försäkra dig över att det var signerat av en specifik bitspace adress</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>&amp;Verifiera meddelande</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Radera</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation>Kopiera &amp;etikett</translation> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation>&amp;Editera</translation> </message> <message> <location line="+250"/> <source>Export Address Book Data</source> <translation>Exportera adressboken</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kommaseparerad fil (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Exportera felmeddelanden</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Kunde inte skriva till fil %1</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Etikett</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(Ingen etikett)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Lösenords Dialog</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Ange lösenord</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Nytt lösenord</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Upprepa nytt lösenord</translation> </message> <message> <location line="+33"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation>Avaktiverar &quot;sendmoney&quot; om ditt operativsystem har blivit äventyrat. ger ingen verklig säkerhet.</translation> </message> <message> <location line="+3"/> <source>For staking only</source> <translation>Endast för &quot;staking&quot;</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+35"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Ange plånbokens nya lösenord. &lt;br/&gt; Använd ett lösenord på &lt;b&gt;10 eller fler slumpmässiga tecken,&lt;/b&gt; eller &lt;b&gt;åtta eller fler ord.&lt;/b&gt;</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Kryptera plånbok</translation> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Denna operation behöver din plånboks lösenord för att låsa upp plånboken.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Lås upp plånbok</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Denna operation behöver din plånboks lösenord för att dekryptera plånboken.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Dekryptera plånbok</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Ändra lösenord</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Ange plånbokens gamla och nya lösenord.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Bekräfta kryptering av plånbok</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR COINS&lt;/b&gt;!</source> <translation>Varning: Om du krypterar plånboken och glömmer lösenordet, kommer du att &lt;b&gt;FÖRLORA ALLA COINS&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Är du säker på att du vill kryptera din plånbok?</translation> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation>VIKTIGT: Alla tidigare säkerhetskopior du har gjort av plånbokens fil ska ersättas med den nya genererade, krypterade plånboks filen. Av säkerhetsskäl kommer tidigare säkerhetskopior av den okrypterade plånboks filen blir oanvändbara när du börjar använda en ny, krypterad plånbok.</translation> </message> <message> <location line="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Varning: Caps Lock är påslaget!</translation> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation>Plånboken är krypterad</translation> </message> <message> <location line="-58"/> <source>bitspace will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source> <translation>bitspace plånboken kommer nu att stängas för att slutföra krypteringen: Kom ihåg att även en krypterad plånboks säkerhet kan äventyras genom keyloggers eller dylika malwares.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+44"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Kryptering av plånbok misslyckades</translation> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Kryptering av plånbok misslyckades på grund av ett internt fel. Din plånbok blev inte krypterad.</translation> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation>De angivna lösenorden överensstämmer inte.</translation> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation>Upplåsning av plånbok misslyckades</translation> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Lösenordet för dekryptering av plånbok var felaktig.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Dekryptering av plånbok misslyckades</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Plånbokens lösenord har ändrats.</translation> </message> </context> <context> <name>bitspaceGUI</name> <message> <location filename="../bitspacegui.cpp" line="+282"/> <source>Sign &amp;message...</source> <translation>Signera &amp;meddelande...</translation> </message> <message> <location line="+251"/> <source>Synchronizing with network...</source> <translation>Synkroniserar med nätverk...</translation> </message> <message> <location line="-319"/> <source>&amp;Overview</source> <translation>&amp;Översikt</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Visa översiktsvy av plånbok</translation> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation>&amp;Transaktioner</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Bläddra i transaktionshistorik</translation> </message> <message> <location line="+5"/> <source>&amp;Address Book</source> <translation>&amp;Adress bok</translation> </message> <message> <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation>Editera listan över sparade adresser och deras namn</translation> </message> <message> <location line="-13"/> <source>&amp;Receive coins</source> <translation>&amp;Ta emot coins</translation> </message> <message> <location line="+1"/> <source>Show the list of addresses for receiving payments</source> <translation>Visa adresslista för att mottaga betalningar</translation> </message> <message> <location line="-7"/> <source>&amp;Send coins</source> <translation>&amp;Skicka coins</translation> </message> <message> <location line="+35"/> <source>E&amp;xit</source> <translation>&amp;Avsluta</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Avsluta programmet</translation> </message> <message> <location line="+6"/> <source>Show information about bitspace</source> <translation>Visa information om bitspace</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Om &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Visa information om Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Alternativ...</translation> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation>&amp;Kryptera plånbok...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Säkerhetskopiera plånbok...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Byt Lösenord...</translation> </message> <message numerus="yes"> <location line="+259"/> <source>~%n block(s) remaining</source> <translation><numerusform>~%n block remaining</numerusform><numerusform>~%n block kvar</numerusform></translation> </message> <message> <location line="+6"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation>Laddat ner %1 av %2 block av transaktions-historiken (%3% klart)</translation> </message> <message> <location line="-256"/> <source>&amp;Export...</source> <translation>&amp;Exportera...</translation> </message> <message> <location line="-64"/> <source>Send coins to a bitspace address</source> <translation>Skicka coins till en bitspace adress</translation> </message> <message> <location line="+47"/> <source>Modify configuration options for bitspace</source> <translation>Modifiera konfigurations-alternativ för bitspace</translation> </message> <message> <location line="+18"/> <source>Export the data in the current tab to a file</source> <translation>Exportera datan i tabben till en fil</translation> </message> <message> <location line="-14"/> <source>Encrypt or decrypt wallet</source> <translation>Kryptera eller avkryptera plånbok</translation> </message> <message> <location line="+3"/> <source>Backup wallet to another location</source> <translation>Säkerhetskopiera plånboken till en annan plats</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Byt lösenord för kryptering av plånbok</translation> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation>&amp;Debug fönster</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Öppna debug- och diagnostikkonsolen</translation> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation>&amp;Verifiera meddelande...</translation> </message> <message> <location line="-202"/> <source>bitspace</source> <translation>bitspace</translation> </message> <message> <location line="+0"/> <source>Wallet</source> <translation>Plånbok</translation> </message> <message> <location line="+180"/> <source>&amp;About bitspace</source> <translation>&amp;Om bitspace</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;Visa / Göm</translation> </message> <message> <location line="+9"/> <source>Unlock wallet</source> <translation>Lås upp plånbok</translation> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation>&amp;Lås plånbok</translation> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation>Lås plånbok</translation> </message> <message> <location line="+35"/> <source>&amp;File</source> <translation>&amp;Arkiv</translation> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation>&amp;Inställningar</translation> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation>&amp;Hjälp</translation> </message> <message> <location line="+12"/> <source>Tabs toolbar</source> <translation>Verktygsfält för Tabbar</translation> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation>Verktygsfält för handlingar</translation> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+0"/> <location line="+60"/> <source>bitspace client</source> <translation>bitspace klient</translation> </message> <message numerus="yes"> <location line="+75"/> <source>%n active connection(s) to bitspace network</source> <translation><numerusform>%n aktiv anslutning till bitspace nätverket</numerusform><numerusform>%n aktiva anslutning till bitspace nätverket</numerusform></translation> </message> <message> <location line="+40"/> <source>Downloaded %1 blocks of transaction history.</source> <translation>Laddade ner %1 block av transaktionshistoriken.</translation> </message> <message> <location line="+413"/> <source>Staking.&lt;br&gt;Your weight is %1&lt;br&gt;Network weight is %2&lt;br&gt;Expected time to earn reward is %3</source> <translation>Staking.&lt;br&gt;Din vikt är %1&lt;br&gt;Nätverkets vikt är %2&lt;br&gt;Uppskattad tid för att få belöning är %3</translation> </message> <message> <location line="+6"/> <source>Not staking because wallet is locked</source> <translation>Ingen staking för att plånboken är låst</translation> </message> <message> <location line="+2"/> <source>Not staking because wallet is offline</source> <translation>Ingen staking för att plånboken är offline</translation> </message> <message> <location line="+2"/> <source>Not staking because wallet is syncing</source> <translation>Ingen staking för att plånboken synkroniseras</translation> </message> <message> <location line="+2"/> <source>Not staking because you don&apos;t have mature coins</source> <translation>Ingen staking för att dina coins är ännu inte föråldrade</translation> </message> <message numerus="yes"> <location line="-403"/> <source>%n second(s) ago</source> <translation><numerusform>%n sekund sen</numerusform><numerusform>%n sekunder sen</numerusform></translation> </message> <message> <location line="-312"/> <source>About bitspace card</source> <translation>Om bitspace kortet</translation> </message> <message> <location line="+1"/> <source>Show information about bitspace card</source> <translation>Via information om bitspace kortet</translation> </message> <message> <location line="+18"/> <source>&amp;Unlock Wallet...</source> <translation>Lås &amp;Upp plånboken</translation> </message> <message numerus="yes"> <location line="+297"/> <source>%n minute(s) ago</source> <translation><numerusform>%n minut sen</numerusform><numerusform>%n minuter sen</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation><numerusform>%n timme sen</numerusform><numerusform>%n timmar sen</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation><numerusform>%n dag sen</numerusform><numerusform>%n dagar sen</numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation>Uppdaterad</translation> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation>Hämtar senaste...</translation> </message> <message> <location line="+10"/> <source>Last received block was generated %1.</source> <translation>Senaste mottagna block genererades %1.</translation> </message> <message> <location line="+59"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation>Denna transaktion är över gränsen. Du kan ändå skicka den med en %1 avgift, som går till noderna som processerar din transaktion och hjälper till med att upprätthålla nätverket. Vill du betala denna avgift?</translation> </message> <message> <location line="+5"/> <source>Confirm transaction fee</source> <translation>Bekräfta transaktionsavgiften</translation> </message> <message> <location line="+27"/> <source>Sent transaction</source> <translation>Transaktion skickad</translation> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation>Inkommande transaktion</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Datum: %1 Belopp: %2 Typ: %3 Adress: %4 </translation> </message> <message> <location line="+100"/> <location line="+15"/> <source>URI handling</source> <translation>URI hantering</translation> </message> <message> <location line="-15"/> <location line="+15"/> <source>URI can not be parsed! This can be caused by an invalid bitspace address or malformed URI parameters.</source> <translation>URI:n kan inte tolkas! Detta kan bero på en ogiltig bitspace adress eller felaktiga URI parametrar.</translation> </message> <message> <location line="+18"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Denna plånbok är &lt;b&gt;krypterad&lt;/b&gt; och för närvarande &lt;b&gt;olåst&lt;/b&gt;</translation> </message> <message> <location line="+10"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Denna plånbok är &lt;b&gt;krypterad&lt;/b&gt; och för närvarande &lt;b&gt;låst&lt;/b&gt;</translation> </message> <message> <location line="+25"/> <source>Backup Wallet</source> <translation>Säkerhetskopiera plånbok</translation> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>Plånboksdata (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>Säkerhetskopieringen misslyckades</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>Ett fel uppstod vid sparandet av plånboken till den nya platsen.</translation> </message> <message numerus="yes"> <location line="+76"/> <source>%n second(s)</source> <translation><numerusform>%n sekund</numerusform><numerusform>%n sekunder</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation><numerusform>%n minut</numerusform><numerusform>%n minuter</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation><numerusform>%n timme</numerusform><numerusform>%n timmar</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n dag</numerusform><numerusform>%n dagar</numerusform></translation> </message> <message> <location line="+18"/> <source>Not staking</source> <translation>Ingen staking</translation> </message> <message> <location filename="../bitspace.cpp" line="+109"/> <source>A fatal error occurred. bitspace can no longer continue safely and will quit.</source> <translation>Ett fatalt fel uppstod. bitspace kan inte fortsätta och stänger programmet.</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+90"/> <source>Network Alert</source> <translation>Nätverkslarm</translation> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation>Coin kontroll</translation> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation>Antal:</translation> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation>Bytes:</translation> </message> <message> <location line="+48"/> <source>Amount:</source> <translation>Belopp:</translation> </message> <message> <location line="+32"/> <source>Priority:</source> <translation>Prioritet:</translation> </message> <message> <location line="+48"/> <source>Fee:</source> <translation>Avgift:</translation> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation>Låg utskrift:</translation> </message> <message> <location filename="../coincontroldialog.cpp" line="+551"/> <source>no</source> <translation>nej</translation> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation>Efter avgift:</translation> </message> <message> <location line="+35"/> <source>Change:</source> <translation>Ändra:</translation> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation>välj/avvälj alla</translation> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation>Träd visning</translation> </message> <message> <location line="+16"/> <source>List mode</source> <translation>List visning</translation> </message> <message> <location line="+45"/> <source>Amount</source> <translation>Mängd</translation> </message> <message> <location line="+5"/> <source>Label</source> <translation>etikett</translation> </message> <message> <location line="+5"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation>Bekräftelser</translation> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation>Bekräftad</translation> </message> <message> <location line="+5"/> <source>Priority</source> <translation>Prioritet</translation> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation>Kopiera adress</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Kopiera etikett</translation> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation>Kopiera belopp</translation> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation>Kopiera transaktions ID</translation> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation>Kopiera antal</translation> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation>Kopiera avgift</translation> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation>Kopiera efter avgift</translation> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation>Kopiera bytes</translation> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation>Kopiera prioritet</translation> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation>Kopiera låg utskrift</translation> </message> <message> <location line="+1"/> <source>Copy change</source> <translation>Kopiera förändringarna</translation> </message> <message> <location line="+317"/> <source>highest</source> <translation>högst</translation> </message> <message> <location line="+1"/> <source>high</source> <translation>hög</translation> </message> <message> <location line="+1"/> <source>medium-high</source> <translation>medium-hög</translation> </message> <message> <location line="+1"/> <source>medium</source> <translation>medium</translation> </message> <message> <location line="+4"/> <source>low-medium</source> <translation>låg-medium</translation> </message> <message> <location line="+1"/> <source>low</source> <translation>låg</translation> </message> <message> <location line="+1"/> <source>lowest</source> <translation>lägsta</translation> </message> <message> <location line="+155"/> <source>DUST</source> <translation>STOFT</translation> </message> <message> <location line="+0"/> <source>yes</source> <translation>ja</translation> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is bigger than 10000 bytes. This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input.</source> <translation>Denna label blir röd, om storleken på transaktionen är över 10000 bytes. Detta betyder att en avgift på %1 per kb måste betalas. Kan variera +/- 1 Byte per ingång.</translation> </message> <message> <location line="+1"/> <source>Transactions with higher priority get more likely into a block. This label turns red, if the priority is smaller than &quot;medium&quot;. This means a fee of at least %1 per kb is required.</source> <translation>Transaktioner med en högre prioritet har en större sannolikhet att bli adderat till ett block. Denna label blir röd, om prioriteten är lägre än &quot;medium&quot;. Detta betyder att en avgift på minst %1 krävs.</translation> </message> <message> <location line="+1"/> <source>This label turns red, if any recipient receives an amount smaller than %1. This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST.</source> <translation>Denna label blir röd, om en mottagare får en mängd mindre än %1 Detta betyder att en avgift på minst %2 krävs. Mängder under 0,546 gånger minimiavgiften visas som DUST.</translation> </message> <message> <location line="+1"/> <source>This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required.</source> <translation>Denna label blir röd, om ändringen är mindre än %1. Detta betyder att en avgift på minst %2 krävs.</translation> </message> <message> <location line="+37"/> <location line="+66"/> <source>(no label)</source> <translation>(Ingen etikett)</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation>ändra från %1(%2)</translation> </message> <message> <location line="+1"/> <source>(change)</source> <translation>(ändra)</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Redigera Adress</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Etikett</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>Namnet som kopplats till denna bitspace-adress</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Adress</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>Adressen är kopplad till detta inlägg i adressboken. Denna kan endast ändras för skickande adresser.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation>Ny mottagaradress</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Ny avsändaradress</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Redigera mottagaradress</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Redigera avsändaradress</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Den angivna adressen &quot;%1&quot; finns redan i adressboken.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid bitspace address.</source> <translation>Den inslagna adressen &quot;%1&quot; är inte en giltig bitspace adress.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Plånboken kunde inte låsas upp.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Misslyckades med generering av ny nyckel.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>bitspace-Qt</source> <translation>bitspace-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>version</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Användning:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>Command-line alternativ</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>UI alternativ</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Ställ in språk, t.ex. &quot;de_DE&quot; (förval: systemets språk)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Starta som minimerad</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Visa startscreen vid start (förval: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Alternativ</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Allmänt</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation>Valfri transaktionsavgift per kB som försäkrar att transaktionen behandlas snabbt. De flesta transaktionerna är 1 kB. En avgift på 0,01 är rekommenderad.</translation> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Betala överförings&amp;avgift</translation> </message> <message> <location line="+31"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation>Reserverad mängd deltar inte i stake-processen och kan därför spenderas när som helst.</translation> </message> <message> <location line="+15"/> <source>Reserve</source> <translation>Reservera</translation> </message> <message> <location line="+31"/> <source>Automatically start bitspace after logging in to the system.</source> <translation>Starta bitspace automatiskt vid inloggning.</translation> </message> <message> <location line="+3"/> <source>&amp;Start bitspace on system login</source> <translation>&amp;Starta bitspace vid inloggning</translation> </message> <message> <location line="+7"/> <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation>Koppla ifrån block och adress-databaserna vid nedstängning. Detta betyder att det kan flyttas till en annan datamapp men saktar ner avstängningen. Plånboken är alltid frånkopplad.</translation> </message> <message> <location line="+3"/> <source>&amp;Detach databases at shutdown</source> <translation>Koppla bort &amp;databaserna vid nedkörning</translation> </message> <message> <location line="+21"/> <source>&amp;Network</source> <translation>&amp;Nätverk</translation> </message> <message> <location line="+6"/> <source>Automatically open the bitspace client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Öppna automatiskt bitspace klientens port på routern. Detta fungerar endast om din router stödjer UPnP och det är aktiverat.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Tilldela port med hjälp av &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the bitspace network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Anslut till bitspace nätverket via en SOCKS proxy (t.ex. när du ansluter genom Tor).</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>&amp;Anslut genom en SOCKS proxy:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Proxy-&amp;IP: </translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>Proxyns IP-adress (t.ex. 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Port: </translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Proxyns port (t.ex. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS &amp;Version:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>SOCKS version av proxyn (t.ex. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Fönster</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Visa endast en systemfältsikon vid minimering.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;Minimera till systemfältet istället för aktivitetsfältet</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>Minimera applikationen istället för att stänga ner den när fönstret stängs. Detta innebär att programmet fotrsätter att köras tills du väljer Avsluta i menyn.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>M&amp;inimera vid stängning</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Visa</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>Användargränssnittets &amp;språk: </translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting bitspace.</source> <translation>Användargränssnittets språk kan ställas in här. Inställningen börjar gälla efter omstart av bitspace.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Måttenhet att visa belopp i: </translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Välj en måttenhet att visa när du skickar mynt.</translation> </message> <message> <location line="+9"/> <source>Whether to show bitspace addresses in the transaction list or not.</source> <translation>Om bitspace adresser skall visas i transaktionslistan eller inte.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Visa adresser i transaktionslistan</translation> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation>Om coin kontrollinställningar skall visas eller inte.</translation> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (experts only!)</source> <translation>Visa coin kontrollinställningar (endast avancerade användare!)</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Avbryt</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>&amp;Verkställ</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation>standard</translation> </message> <message> <location line="+149"/> <location line="+9"/> <source>Warning</source> <translation>Varning</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting bitspace.</source> <translation>Inställningen börjar gälla efter omstart av bitspace.</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Den medföljande proxy adressen är ogiltig.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Formulär</translation> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the bitspace network after a connection is established, but this process has not completed yet.</source> <translation>Den visade informationen kan vara gammal. Din plånbok synkroniseras automatiskt med bitspace nätverket efter att en anslutning skapats, men denna process är inte klar än.</translation> </message> <message> <location line="-160"/> <source>Stake:</source> <translation>Stake:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>Obekräftat:</translation> </message> <message> <location line="-107"/> <source>Wallet</source> <translation>Plånbok</translation> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation>Spenderbart:</translation> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation>Ditt tillgängliga saldo</translation> </message> <message> <location line="+71"/> <source>Immature:</source> <translation>Omogen:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Den genererade balansen som ännu inte har mognat</translation> </message> <message> <location line="+20"/> <source>Total:</source> <translation>Totalt:</translation> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation>Ditt nuvarande totala saldo</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Nyligen genomförda transaktioner&lt;/b&gt;</translation> </message> <message> <location line="-108"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>Totala antalet transaktioner inte har blivit bekräftade än och därför inte räknas mot det totala saldot</translation> </message> <message> <location line="-29"/> <source>Total of coins that was staked, and do not yet count toward the current balance</source> <translation>Antal coins som var i stake-processen, och räknas ännu inte till nuvarande saldo</translation> </message> <message> <location filename="../overviewpage.cpp" line="+113"/> <location line="+1"/> <source>out of sync</source> <translation>osynkroniserad</translation> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>QR-Kod Dialog</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Begär Betalning</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Belopp:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Etikett:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Meddelande:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;Spara Som...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Fel vid skapande av QR-kod från URI.</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>Den angivna mängden är felaktig, var vänlig kontrollera.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>URI:n är för lång, försök minska texten för etikett / meddelande.</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>Spara QR-kod</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>PNG Bilder (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Klientnamn</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+348"/> <source>N/A</source> <translation>ej tillgänglig</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Klient-version</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Information</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Använder OpenSSL version</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Uppstartstid</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Nätverk</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Antalet anslutningar</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>På testnet</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Blockkedja</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Aktuellt antal block</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Beräknade totala block</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Sista blocktid</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Öppna</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Kommandoradsalternativ</translation> </message> <message> <location line="+7"/> <source>Show the bitspace-Qt help message to get a list with possible bitspace command-line options.</source> <translation>Visa bitspace-Qt hjälp meddelandet för att få en lista över möjliga bitspace kommandoradsalternativ.</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp;Visa</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Konsol</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Kompileringsdatum</translation> </message> <message> <location line="-104"/> <source>bitspace - Debug window</source> <translation>bitspace - Felsökningsfönster</translation> </message> <message> <location line="+25"/> <source>bitspace Core</source> <translation>bitspace Core</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Debugloggfil</translation> </message> <message> <location line="+7"/> <source>Open the bitspace debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Öppna bitspace felsöknings-loggfilen från nuvarande data mapp. Detta kan kan ta ett par minuter för stora log filer.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Rensa konsollen</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the bitspace RPC console.</source> <translation>Välkommen till bitspace RPC konsoll.</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Använd upp- och ner-pilarna för att navigera i historiken, och &lt;b&gt;Ctrl-L&lt;/b&gt; för att rensa skärmen.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Skriv &lt;b&gt;help&lt;/b&gt; för en översikt av alla kommandon.</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Skicka pengar</translation> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation>Coin kontrollinställningar</translation> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation>Ingångar...</translation> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation>automatiskt vald</translation> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation>Otillräckligt saldo!</translation> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation>Antal:</translation> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation>0</translation> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation>Bytes:</translation> </message> <message> <location line="+51"/> <source>Amount:</source> <translation>Belopp:</translation> </message> <message> <location line="+22"/> <location line="+86"/> <location line="+86"/> <location line="+32"/> <source>0.00 BSX</source> <translation>123.456 BSX {0.00 ?}</translation> </message> <message> <location line="-191"/> <source>Priority:</source> <translation>Prioritet:</translation> </message> <message> <location line="+19"/> <source>medium</source> <translation>mellan</translation> </message> <message> <location line="+32"/> <source>Fee:</source> <translation>Avgift:</translation> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation>Låg utmatning:</translation> </message> <message> <location line="+19"/> <source>no</source> <translation>nej</translation> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation>Efter avgift:</translation> </message> <message> <location line="+35"/> <source>Change</source> <translation>Ändra</translation> </message> <message> <location line="+50"/> <source>custom change address</source> <translation>egen ändringsadress</translation> </message> <message> <location line="+106"/> <source>Send to multiple recipients at once</source> <translation>Skicka till flera mottagare samtidigt</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Lägg till &amp;mottagare</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Ta bort alla transaktionsfält</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Rensa &amp;alla</translation> </message> <message> <location line="+28"/> <source>Balance:</source> <translation>Balans:</translation> </message> <message> <location line="+16"/> <source>123.456 BSX</source> <translation>123.456 BSX</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Bekräfta sändordern</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;Skicka</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a bitspace address (e.g. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</source> <translation>Fyll i en bitspace adress (t.ex. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</translation> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation>Kopiera antal</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Kopiera belopp</translation> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation>Kopiera avgift</translation> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation>Kopiera efter avgift</translation> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation>Kopiera bytes</translation> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation>Kopiera prioritet</translation> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation>Kopiera låg utmatning</translation> </message> <message> <location line="+1"/> <source>Copy change</source> <translation>Kopiera ändring</translation> </message> <message> <location line="+86"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>&lt;b&gt;%1&lt;/b&gt; till %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Bekräfta skickade mynt</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>Är du säker att du vill skicka %1?</translation> </message> <message> <location line="+0"/> <source> and </source> <translation>och</translation> </message> <message> <location line="+29"/> <source>The recipient address is not valid, please recheck.</source> <translation>Mottagarens adress är inte giltig, vänligen kontrollera igen.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Det betalade beloppet måste vara större än 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Värdet överstiger ditt saldo.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Totalvärdet överstiger ditt saldo när transaktionsavgiften %1 är pålagd.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Dubblett av adress funnen, kan bara skicka till varje adress en gång per sändning.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation>Fel: Transaktionen kunde inte skapas.</translation> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Fel: Transaktionen nekades. Detta kan hända om vissa av mynten i din plånbok redan är använda, t.ex om du använder en kopia av wallet.dat och mynten redan var använda i kopia men inte markerade som använda här.</translation> </message> <message> <location line="+251"/> <source>WARNING: Invalid bitspace address</source> <translation>VARNING: Ogiltig bitspace adress</translation> </message> <message> <location line="+13"/> <source>(no label)</source> <translation>(Ingen etikett)</translation> </message> <message> <location line="+4"/> <source>WARNING: unknown change address</source> <translation>VARNING: okänd ändringsadress</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Formulär</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>&amp;Belopp:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Betala &amp;Till:</translation> </message> <message> <location line="+24"/> <location filename="../sendcoinsentry.cpp" line="+25"/> <source>Enter a label for this address to add it to your address book</source> <translation>Ange ett namn för den här adressen och lägg till den i din adressbok</translation> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation>&amp;Etikett:</translation> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</source> <translation>Adressen att skicka betalningen till (t.ex. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</translation> </message> <message> <location line="+10"/> <source>Choose address from address book</source> <translation>Välj adress från adressbok</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Klistra in adress från Urklipp</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation>Ta bort denna mottagare</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a bitspace address (e.g. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</source> <translation>Fyll i en bitspace adress (t.ex. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Signaturer - Signera / Verifiera ett Meddelande</translation> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation>&amp;Signera Meddelande</translation> </message> <message> <location line="-118"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>Du kan signera meddelanden med dina adresser för att bevisa att du äger dem. Var försiktig med vad du signerar eftersom phising-attacker kan försöka få dig att skriva över din identitet till någon annan. Signera bara väldetaljerade påståenden du kan gå i god för.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</source> <translation>Adressen att signera meddelandet med (t.ex. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</translation> </message> <message> <location line="+10"/> <location line="+203"/> <source>Choose an address from the address book</source> <translation>Välj en adress från adressboken</translation> </message> <message> <location line="-193"/> <location line="+203"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation>Klistra in adress från Urklipp</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation>Skriv in meddelandet du vill signera här</translation> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation>Kopiera signaturen till systemets Urklipp</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this bitspace address</source> <translation>Signera meddelandet för att verifiera att du äger denna bitspace adressen</translation> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation>Rensa alla fält</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Rensa &amp;alla</translation> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation>&amp;Verifiera Meddelande</translation> </message> <message> <location line="-64"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>Skriv in din adress, meddelande (se till att du kopierar radbrytningar, mellanslag, tabbar, osv. exakt) och signatur nedan för att verifiera meddelandet. Var noga med att inte läsa in mer i signaturen än vad som finns i det signerade meddelandet, för att undvika att luras av en man-in-the-middle attack.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</source> <translation>Adressen meddelandet var signerad med (t.ex. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified bitspace address</source> <translation>Verifiera meddelandet för att vara säker på att det var signerat med den angivna bitspace adressen</translation> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation>Rensa alla fält</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a bitspace address (e.g. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</source> <translation>Fyll i en bitspace adress (t.ex. bitspaceNpBmRUEiP2Po1K8km2GXcFfwYh)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Klicka &quot;Signera Meddelande&quot; för att få en signatur</translation> </message> <message> <location line="+3"/> <source>Enter bitspace signature</source> <translation>Fyll i bitspace signatur</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Den angivna adressen är ogiltig.</translation> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation>Vad god kontrollera adressen och försök igen.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>Den angivna adressen refererar inte till en nyckel.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Upplåsningen av plånboken avbröts.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Privata nyckel för den angivna adressen är inte tillgänglig.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Signeringen av meddelandet misslyckades.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Meddelandet är signerat.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Signaturen kunde inte avkodas.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Kontrollera signaturen och försök igen.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Signaturen matchade inte meddelandesammanfattningen.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Meddelandet verifikation misslyckades.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Meddelandet är verifierad.</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation>Öppet till %1</translation> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation><numerusform>Öppen för %n block</numerusform><numerusform>Öppen för %n block</numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation>konflikt</translation> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation>%1/nerkopplad</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/obekräftade</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 bekräftelser</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Status</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, sänd genom %n nod</numerusform><numerusform>, sänd genom %n noder</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Källa</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Genererad</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>Från</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Till</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>egen adress</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>etikett</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Kredit</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>mognar om %n block</numerusform><numerusform>mognar om %n fler block</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>inte accepterad</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Belasta</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Transaktionsavgift</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Nettobelopp</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Meddelande</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Kommentar</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>Transaktions-ID</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>Genererad mynt måste mogna i 510 block före de kan användas. När du genererade detta blocket sändes det ut till nätverket för att läggas till i blockkedjan. Om det inte kan läggas till i kedjan kommer dess status att ändras till &quot;Ej accepterat&quot; och det kommer inte gå att använda. Detta kan hända imellanåt om en annan klient genererar ett block inom ett par sekunder från ditt.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Debug information</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transaktion</translation> </message> <message> <location line="+5"/> <source>Inputs</source> <translation>Inputs</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Mängd</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>sant</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>falsk</translation> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation>, har inte lyckats skickas ännu</translation> </message> <message> <location line="+35"/> <source>unknown</source> <translation>okänd</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Transaktionsdetaljer</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Den här panelen visar en detaljerad beskrivning av transaktionen</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Mängd</translation> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation>Öppet till %1</translation> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation>Bekräftad (%1 bekräftelser)</translation> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation><numerusform>Öppet för %n mer block</numerusform><numerusform>Öppet för %n mer block</numerusform></translation> </message> <message> <location line="+6"/> <source>Offline</source> <translation>Nerkopplad</translation> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation>Obekräftad</translation> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation>Bekräftar (%1 av %2 rekommenderade bekräftelser)</translation> </message> <message> <location line="+6"/> <source>Conflicted</source> <translation>Konflikt</translation> </message> <message> <location line="+3"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation>Omogen (%1 bekräftningar, kommer bli tillgänglig efter %2)</translation> </message> <message> <location line="+3"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Det här blocket togs inte emot av några andra noder och kommer antagligen inte att bli godkänt.</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Genererad men inte accepterad</translation> </message> <message> <location line="+42"/> <source>Received with</source> <translation>Mottagen med</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Mottaget från</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Skickad till</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Betalning till dig själv</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Genererade</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(n/a)</translation> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Transaktionsstatus. Håll muspekaren över för att se antal bekräftelser.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Tidpunkt då transaktionen mottogs.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Transaktionstyp.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Transaktionens destinationsadress.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Belopp draget eller tillagt till balans.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation>Alla</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Idag</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Denna vecka</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Denna månad</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Föregående månad</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Det här året</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Period...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Mottagen med</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Skickad till</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Till dig själv</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Genererade</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Övriga</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Sök efter adress eller etikett </translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Minsta mängd</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Kopiera adress</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Kopiera etikett</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Kopiera belopp</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Kopiera transaktions ID</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Ändra etikett</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Visa transaktionsdetaljer</translation> </message> <message> <location line="+144"/> <source>Export Transaction Data</source> <translation>Exportera transaktionsdata</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kommaseparerad fil (*. csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Bekräftad</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Etikett</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Mängd</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Fel vid exportering</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Kan inte skriva till fil %1.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Intervall:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>till</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+206"/> <source>Sending...</source> <translation>Skickar...</translation> </message> </context> <context> <name>bitspace-core</name> <message> <location filename="../bitspacestrings.cpp" line="+33"/> <source>bitspace version</source> <translation>bitspace version</translation> </message> <message> <location line="+1"/> <source>Usage:</source> <translation>Användning:</translation> </message> <message> <location line="+1"/> <source>Send command to -server or bitspaced</source> <translation>Skicka kommando till -server eller bitspaced</translation> </message> <message> <location line="+1"/> <source>List commands</source> <translation>Lista kommandon</translation> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation>Få hjälp med ett kommando</translation> </message> <message> <location line="+2"/> <source>Options:</source> <translation>Inställningar:</translation> </message> <message> <location line="+2"/> <source>Specify configuration file (default: bitspace.conf)</source> <translation>Ange konfigurationsfilen (standard: bitspace.conf)</translation> </message> <message> <location line="+1"/> <source>Specify pid file (default: bitspaced.pid)</source> <translation>Ange pid filen (standard bitspaced.pid)</translation> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation>Ange plånboksfil (inom datakatalogen)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Ange katalog för data</translation> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Sätt databas cache storleken i megabyte (förvalt: 25)</translation> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation>Sätt databas logg storleken i MB (standard: 100)</translation> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 15714 or testnet: 25714)</source> <translation>Lyssna efter anslutningar på &lt;port&gt; (standard: 15714 eller testnät: 25714)</translation> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Ha som mest &lt;n&gt; anslutningar till andra klienter (förvalt: 125)</translation> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Anslut till en nod för att hämta klientadresser, och koppla från</translation> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation>Ange din egen publika adress</translation> </message> <message> <location line="+5"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation>Bind till angiven adress. Använd [host]:port för IPv6</translation> </message> <message> <location line="+2"/> <source>Stake your coins to support network and gain reward (default: 1)</source> <translation>Använd dina coins för stake-processen, du upprätthåller då nätverket och får belöning (förval: 1)</translation> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Tröskelvärde för att koppla ifrån klienter som missköter sig (förvalt: 100)</translation> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Antal sekunder att hindra klienter som missköter sig från att ansluta (förvalt: 86400)</translation> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv4: %s</translation> </message> <message> <location line="+51"/> <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation>Koppla ifrån block och adress databaser. Ökar nedstängningstid (standard: 0)</translation> </message> <message> <location line="+109"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Fel: Transaktionen nekades. Detta kan hända om vissa av mynten i din plånbok redan är använda, t.ex om du använder en kopia av wallet.dat och mynten redan var använda i kopia men inte markerade som använda här.</translation> </message> <message> <location line="-5"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source> <translation>Fel: Transaktionen kräver en transaktionsavgift på min %s på grund av dess storlek, komplexitet eller användning av nyligen mottagna kapital</translation> </message> <message> <location line="-87"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 15715 or testnet: 25715)</source> <translation>Lyssna efter JSON-RPC anslutningar på &lt;port&gt; (standard: 15715 eller testnät: 25715)</translation> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation>Tillåt kommandon från kommandotolken och JSON-RPC-kommandon</translation> </message> <message> <location line="+101"/> <source>Error: Transaction creation failed </source> <translation>Fel: Skapandet av transaktion misslyckades</translation> </message> <message> <location line="-5"/> <source>Error: Wallet locked, unable to create transaction </source> <translation>Fel: Plånboken låst, kan inte utföra transaktion</translation> </message> <message> <location line="-8"/> <source>Importing blockchain data file.</source> <translation>Importerar blockchain data fil.</translation> </message> <message> <location line="+1"/> <source>Importing bootstrap blockchain data file.</source> <translation>Importerar bootstrap blockchain data fil.</translation> </message> <message> <location line="-88"/> <source>Run in the background as a daemon and accept commands</source> <translation>Kör i bakgrunden som tjänst och acceptera kommandon</translation> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation>Använd testnätverket</translation> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Acceptera anslutningar utifrån (förvalt: 1 om ingen -proxy eller -connect)</translation> </message> <message> <location line="-38"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation>Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv6, faller tillbaka till IPV4: %s</translation> </message> <message> <location line="+117"/> <source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source> <translation>Ett fel uppstod vid initialiseringen av databasen %s! För att återställa, SÄKERHETSKOPIERA MAPPEN, radera sedan allt från mappen förutom wallet.dat.</translation> </message> <message> <location line="-20"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>Ställ in max storlek för hög prioritet/lågavgifts transaktioner i bytes (förval: 27000)</translation> </message> <message> <location line="+11"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>Varning: -paytxfee är satt väldigt hög! Detta är avgiften du kommer betala för varje transaktion.</translation> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong bitspace will not work properly.</source> <translation>Varning: Kolla att din dators tid och datum är rätt. bitspace kan inte fungera ordentligt om tiden i datorn är fel.</translation> </message> <message> <location line="-31"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>Varning: fel vid läsning av wallet.dat! Alla nycklar lästes korrekt, men transaktionsdatan eller adressbokens poster kanske saknas eller är felaktiga.</translation> </message> <message> <location line="-18"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation>Varning: wallet.dat korrupt, datan har räddats! Den ursprungliga wallet.dat har sparas som wallet.{timestamp}.bak i %s; om ditt saldo eller transaktioner är felaktiga ska du återställa från en säkerhetskopia.</translation> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Försök att rädda de privata nycklarna från en korrupt wallet.dat</translation> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation>Block skapande inställningar:</translation> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation>Koppla enbart upp till den/de specificerade noden/noder</translation> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Hitta egen IP-adress (förvalt: 1 under lyssning och utan -externalip)</translation> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Misslyckades att lyssna på någon port. Använd -listen=0 om du vill detta.</translation> </message> <message> <location line="-90"/> <source>Find peers using DNS lookup (default: 1)</source> <translation>Hitta andra klienter via DNS uppsökning (standard: 1)</translation> </message> <message> <location line="+5"/> <source>Sync checkpoints policy (default: strict)</source> <translation>Synka kontrollpunkts policy (standard: strict)</translation> </message> <message> <location line="+83"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>Fel -tor adress: &apos;%s&apos;</translation> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation>Fel mängd för -reservebalance=&lt;amount&gt;</translation> </message> <message> <location line="-82"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Maximal buffert för mottagning per anslutning, &lt;n&gt;*1000 byte (förvalt: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Maximal buffert för sändning per anslutning, &lt;n&gt;*1000 byte (förvalt: 5000)</translation> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Anslut enbart till noder i nätverket &lt;net&gt; (IPv4, IPv6 eller Tor)</translation> </message> <message> <location line="+28"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>Skriv ut extra debug information. Betyder alla andra -debug* alternativ </translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>Skriv ut extra nätverks debug information</translation> </message> <message> <location line="+1"/> <source>Prepend debug output with timestamp</source> <translation>Tidstämpla debug utskriften</translation> </message> <message> <location line="+35"/> <source>SSL options: (see the bitspace Wiki for SSL setup instructions)</source> <translation>SSL-inställningar: (se bitspace-wikin för SSL-setup instruktioner)</translation> </message> <message> <location line="-74"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>Välj version av socks proxy (4-5, förval 5)</translation> </message> <message> <location line="+41"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Skicka trace-/debuginformation till terminalen istället för till debug.log</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Skicka trace/debug till debuggern</translation> </message> <message> <location line="+28"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>Sätt största blockstorlek i bytes (förvalt: 250000)</translation> </message> <message> <location line="-1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>Sätt minsta blockstorlek i byte (förvalt: 0)</translation> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Krymp debug.log filen vid klient start (förvalt: 1 vid ingen -debug)</translation> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Ange timeout för uppkoppling i millisekunder (förvalt: 5000)</translation> </message> <message> <location line="+109"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation>Kan inte signera checkpoint, fel checkpointkey? </translation> </message> <message> <location line="-80"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 0)</translation> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 1 under lyssning)</translation> </message> <message> <location line="-25"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>Använd proxy för att nå Tor gömda servicer (standard: samma som -proxy)</translation> </message> <message> <location line="+42"/> <source>Username for JSON-RPC connections</source> <translation>Användarnamn för JSON-RPC-anslutningar</translation> </message> <message> <location line="+47"/> <source>Verifying database integrity...</source> <translation>Verifierar integriteten i databasen...</translation> </message> <message> <location line="+57"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</source> <translation>VARNING: synkroniserad kontrollpunkts brott upptäckt, men hoppades över!</translation> </message> <message> <location line="+1"/> <source>Warning: Disk space is low!</source> <translation>Varning: Lågt skivutrymme</translation> </message> <message> <location line="-2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Varning: denna version är föråldrad, uppgradering krävs!</translation> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat korrupt, räddning misslyckades</translation> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation>Lösenord för JSON-RPC-anslutningar</translation> </message> <message> <location line="-84"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=bitspacerpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;bitspace Alert&quot; [email protected] </source> <translation>%s, du måste sätta rpcpassword i konfigurationsfilen: %s Det är rekommenderat att du använder följande slumpmässiga lösenord: rpcuser=bitspacerpc rpcpassword=%s (du behöver inte komma ihåg detta lösenord) Användarnamnet och lösenordet FÅR INTE vara samma. Om filen inte finns, skapa den med endast ägarrättigheter. Det är också rekommenderat att sätta alertnotify så du blir notifierad om problem; till exempel: alertnotify=echo %%s | mail -s &quot;bitspace Varning&quot; [email protected] </translation> </message> <message> <location line="+51"/> <source>Find peers using internet relay chat (default: 0)</source> <translation>Hitta andra klienter genom internet relay chat (standard: 1) {0)?}</translation> </message> <message> <location line="+5"/> <source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source> <translation>Synkronisera tiden med andra noder. Avaktivera om klockan i ditt sytem är exakt som t.ex. synkroniserad med NTP (förval: 1)</translation> </message> <message> <location line="+15"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation>När transaktioner skapas, ignorera värden som är lägre än detta (standard: 0.01)</translation> </message> <message> <location line="+16"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Tillåt JSON-RPC-anslutningar från specifika IP-adresser</translation> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Skicka kommandon till klient på &lt;ip&gt; (förvalt: 127.0.0.1)</translation> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Exekvera kommando när det bästa blocket ändras (%s i cmd är utbytt av blockhash)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID)</translation> </message> <message> <location line="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation>Kräv bekräftelse för ändring (förval: 0)</translation> </message> <message> <location line="+1"/> <source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source> <translation>Tvinga transaktionsskript att använda kanoniska PUSH operatörer (standard: 1)</translation> </message> <message> <location line="+2"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation>Kör kommando när en relevant alert är mottagen (%s i cmd är ersatt av meddelandet)</translation> </message> <message> <location line="+3"/> <source>Upgrade wallet to latest format</source> <translation>Uppgradera plånboken till senaste formatet</translation> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Sätt storleken på nyckelpoolen till &lt;n&gt; (förvalt: 100)</translation> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Sök i blockkedjan efter saknade plånboks transaktioner</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation>Antal block som kollas vid start (standard: 2500, 0=alla)</translation> </message>
<translation>Hur genomförlig blockverifikationen är (0-6, standard: 1)</translation> </message> <message> <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation>Importera block från en extern blk000?.dat fil</translation> </message> <message> <location line="+8"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Använd OpenSSL (https) för JSON-RPC-anslutningar</translation> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation>Serverns certifikatfil (förvalt: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Serverns privata nyckel (förvalt: server.pem)</translation> </message> <message> <location line="+1"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Godtagbara chiffer (standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+53"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation>Fel: Plånboken öppnad endast för stake-process, kan inte skapa transaktion.</translation> </message> <message> <location line="+18"/> <source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source> <translation>VARNING: Felaktig kontrollpunkt hittad! Visade transaktioner kan vara felaktiga! Du kan behöva uppgradera eller kontakta utvecklarna.</translation> </message> <message> <location line="-158"/> <source>This help message</source> <translation>Det här hjälp medelandet</translation> </message> <message> <location line="+95"/> <source>Wallet %s resides outside data directory %s.</source> <translation>Plånbok %s ligger utanför datamappen %s.</translation> </message> <message> <location line="+1"/> <source>Cannot obtain a lock on data directory %s. bitspace is probably already running.</source> <translation>Kan inte låsa datan i mappen %s. bitspace är kanske redan startad.</translation> </message> <message> <location line="-98"/> <source>bitspace</source> <translation>bitspace</translation> </message> <message> <location line="+140"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Det går inte att binda till %s på den här datorn (bind returnerade felmeddelande %d, %s)</translation> </message> <message> <location line="-130"/> <source>Connect through socks proxy</source> <translation>Koppla genom en socks proxy</translation> </message> <message> <location line="+3"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Tillåt DNS-sökningar för -addnode, -seednode och -connect</translation> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation>Laddar adresser...</translation> </message> <message> <location line="-15"/> <source>Error loading blkindex.dat</source> <translation>Fel vid laddande av blkindex.dat</translation> </message> <message> <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Fel vid inläsningen av wallet.dat: Plånboken är skadad</translation> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of bitspace</source> <translation>Kunde inte ladda wallet.dat: En nyare version av bitspace krävs</translation> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart bitspace to complete</source> <translation>Plånboken måste skrivas om: Starta om bitspace för att slutföra</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation>Fel vid inläsning av plånboksfilen wallet.dat</translation> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Ogiltig -proxy adress: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Okänt nätverk som anges i -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Okänd -socks proxy version begärd: %i</translation> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Kan inte matcha -bind adress: &apos;%s&apos;</translation> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Kan inte matcha -externalip adress: &apos;%s&apos;</translation> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Ogiltigt belopp för -paytxfee=&lt;belopp&gt;:&apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Error: could not start node</source> <translation>Fel: kunde inte starta noden</translation> </message> <message> <location line="+11"/> <source>Sending...</source> <translation>Skickar...</translation> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation>Ogiltig mängd</translation> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation>Otillräckligt med bitspaces</translation> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation>Laddar blockindex...</translation> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Lägg till en nod att koppla upp mot och försök att hålla anslutningen öppen</translation> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. bitspace is probably already running.</source> <translation>Kan inte binda till %s på denna dator. bitspace är sannolikt redan startad.</translation> </message> <message> <location line="-97"/> <source>Fee per KB to add to transactions you send</source> <translation>Avgift per KB som adderas till transaktionen du sänder</translation> </message> <message> <location line="+55"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Fel mängd för -mininput=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+25"/> <source>Loading wallet...</source> <translation>Laddar plånbok...</translation> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation>Kan inte nedgradera plånboken</translation> </message> <message> <location line="+1"/> <source>Cannot initialize keypool</source> <translation>Kan inte initialisera keypool</translation> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation>Kan inte skriva standardadress</translation> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation>Söker igen...</translation> </message> <message> <location line="+5"/> <source>Done loading</source> <translation>Klar med laddning</translation> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation>Att använda %s alternativet</translation> </message> <message> <location line="+14"/> <source>Error</source> <translation>Fel</translation> </message> <message> <location line="+6"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>Du behöver välja ett rpclösensord i konfigurationsfilen: %s Om filen inte existerar, skapa den med filrättigheten endast läsbar för ägaren.</translation> </message> </context> </TS>
<message> <location line="+1"/> <source>How thorough the block verification is (0-6, default: 1)</source>
create_shelters_thumbnails.py
#! /usr/bin/python #-*- coding:utf-8 -* import os import conf from web.models import Shelter, ShelterPicture from bootstrap import db from PIL import Image def create_shelters_thumbnails():
shelters = Shelter.query.all() pictures = ShelterPicture.query.all() for picture in pictures: filepath = os.path.join(conf.SHELTERS_PICTURES_SERVER_PATH, str(picture.shelter_id), picture.file_name) basename, ext = os.path.splitext(picture.file_name) if str(basename.rpartition('_')[2]) == 'thumbnail': continue try: thumbname = basename + '_thumbnail' + ext new_thumbpath = os.path.join(conf.SHELTERS_PICTURES_SERVER_PATH, str(picture.shelter_id), thumbname) if os.path.exists(new_thumbpath): if db.session.query(ShelterPicture).filter_by(file_name=thumbname).first(): continue im = Image.open(filepath) im.thumbnail((300,200), Image.ANTIALIAS) im.save(new_thumbpath, 'JPEG', quality=70, optimize=True, progressive=True) new_picture = ShelterPicture(file_name=thumbname, shelter_id=picture.shelter_id, category_id=picture.category_id, is_main_picture=picture.is_main_picture) db.session.add(new_picture) db.session.commit() except: print("Failed to create thumbnail for shelter {}, file {}".format(picture.shelter_id, picture.file_name)) continue
calendar-month-view.component.js
/** * calendar-month-view.component */ import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, Optional, Output, ViewChild } from '@angular/core'; import { CalendarCell, OwlCalendarBodyComponent } from './calendar-body.component'; import { OWL_DATE_TIME_FORMATS } from './adapter/date-time-format.class'; import { Subscription } from 'rxjs'; import { DOWN_ARROW, END, ENTER, HOME, LEFT_ARROW, PAGE_DOWN, PAGE_UP, RIGHT_ARROW, UP_ARROW } from '@angular/cdk/keycodes'; import { getLocaleFirstDayOfWeek } from '@angular/common'; import * as i0 from "@angular/core"; import * as i1 from "./adapter/date-time-adapter.class"; import * as i2 from "./calendar-body.component"; import * as i3 from "@angular/common"; const DAYS_PER_WEEK = 7; const WEEKS_PER_VIEW = 6; export class
{ constructor(cdRef, dateTimeAdapter, dateTimeFormats) { this.cdRef = cdRef; this.dateTimeAdapter = dateTimeAdapter; this.dateTimeFormats = dateTimeFormats; /** * Whether to hide dates in other months at the start or end of the current month. */ this.hideOtherMonths = false; /** * Define the first day of a week * Sunday: 0 - Saturday: 6 */ this._firstDayOfWeek = getLocaleFirstDayOfWeek(this.dateTimeAdapter.getLocale()); /** * The select mode of the picker; */ this._selectMode = 'single'; this._selecteds = []; this.isDefaultFirstDayOfWeek = true; this.localeSub = Subscription.EMPTY; this.initiated = false; /** * An array to hold all selectedDates' value * the value is the day number in current month */ this.selectedDates = []; /** * Callback to invoke when a new date is selected */ this.selectedChange = new EventEmitter(); /** * Callback to invoke when any date is selected. */ this.userSelection = new EventEmitter(); /** Emits when any date is activated. */ this.pickerMomentChange = new EventEmitter(); } get firstDayOfWeek() { return this._firstDayOfWeek; } set firstDayOfWeek(value) { if (value >= 0 && value <= 6 && value !== this._firstDayOfWeek) { this._firstDayOfWeek = value; this.isDefaultFirstDayOfWeek = false; if (this.initiated) { this.generateWeekDays(); this.generateCalendar(); this.cdRef.markForCheck(); } } } get selectMode() { return this._selectMode; } set selectMode(val) { this._selectMode = val; if (this.initiated) { this.generateCalendar(); this.cdRef.markForCheck(); } } get selected() { return this._selected; } set selected(value) { const oldSelected = this._selected; value = this.dateTimeAdapter.deserialize(value); this._selected = this.getValidDate(value); if (!this.dateTimeAdapter.isSameDay(oldSelected, this._selected)) { this.setSelectedDates(); } } get selecteds() { return this._selecteds; } set selecteds(values) { this._selecteds = values.map(v => { v = this.dateTimeAdapter.deserialize(v); return this.getValidDate(v); }); this.setSelectedDates(); } get pickerMoment() { return this._pickerMoment; } set pickerMoment(value) { const oldMoment = this._pickerMoment; value = this.dateTimeAdapter.deserialize(value); this._pickerMoment = this.getValidDate(value) || this.dateTimeAdapter.now(); this.firstDateOfMonth = this.dateTimeAdapter.createDate(this.dateTimeAdapter.getYear(this._pickerMoment), this.dateTimeAdapter.getMonth(this._pickerMoment), 1); if (!this.isSameMonth(oldMoment, this._pickerMoment) && this.initiated) { this.generateCalendar(); } } get dateFilter() { return this._dateFilter; } set dateFilter(filter) { this._dateFilter = filter; if (this.initiated) { this.generateCalendar(); this.cdRef.markForCheck(); } } get minDate() { return this._minDate; } set minDate(value) { value = this.dateTimeAdapter.deserialize(value); this._minDate = this.getValidDate(value); if (this.initiated) { this.generateCalendar(); this.cdRef.markForCheck(); } } get maxDate() { return this._maxDate; } set maxDate(value) { value = this.dateTimeAdapter.deserialize(value); this._maxDate = this.getValidDate(value); if (this.initiated) { this.generateCalendar(); this.cdRef.markForCheck(); } } get weekdays() { return this._weekdays; } get days() { return this._days; } get activeCell() { if (this.pickerMoment) { return (this.dateTimeAdapter.getDate(this.pickerMoment) + this.firstRowOffset - 1); } return null; } get isInSingleMode() { return this.selectMode === 'single'; } get isInRangeMode() { return (this.selectMode === 'range' || this.selectMode === 'rangeFrom' || this.selectMode === 'rangeTo'); } get owlDTCalendarView() { return true; } ngOnInit() { this.generateWeekDays(); this.localeSub = this.dateTimeAdapter.localeChanges.subscribe(locale => { this.generateWeekDays(); this.generateCalendar(); this.firstDayOfWeek = this.isDefaultFirstDayOfWeek ? getLocaleFirstDayOfWeek(locale) : this.firstDayOfWeek; this.cdRef.markForCheck(); }); } ngAfterContentInit() { this.generateCalendar(); this.initiated = true; } ngOnDestroy() { this.localeSub.unsubscribe(); } /** * Handle a calendarCell selected */ selectCalendarCell(cell) { // Cases in which the date would not be selected // 1, the calendar cell is NOT enabled (is NOT valid) // 2, the selected date is NOT in current picker's month and the hideOtherMonths is enabled if (!cell.enabled || (this.hideOtherMonths && cell.out)) { return; } this.selectDate(cell.value); } /** * Handle a new date selected */ selectDate(date) { const daysDiff = date - 1; const selected = this.dateTimeAdapter.addCalendarDays(this.firstDateOfMonth, daysDiff); this.selectedChange.emit(selected); this.userSelection.emit(); } /** * Handle keydown event on calendar body */ handleCalendarKeydown(event) { let moment; switch (event.keyCode) { // minus 1 day case LEFT_ARROW: moment = this.dateTimeAdapter.addCalendarDays(this.pickerMoment, -1); this.pickerMomentChange.emit(moment); break; // add 1 day case RIGHT_ARROW: moment = this.dateTimeAdapter.addCalendarDays(this.pickerMoment, 1); this.pickerMomentChange.emit(moment); break; // minus 1 week case UP_ARROW: moment = this.dateTimeAdapter.addCalendarDays(this.pickerMoment, -7); this.pickerMomentChange.emit(moment); break; // add 1 week case DOWN_ARROW: moment = this.dateTimeAdapter.addCalendarDays(this.pickerMoment, 7); this.pickerMomentChange.emit(moment); break; // move to first day of current month case HOME: moment = this.dateTimeAdapter.addCalendarDays(this.pickerMoment, 1 - this.dateTimeAdapter.getDate(this.pickerMoment)); this.pickerMomentChange.emit(moment); break; // move to last day of current month case END: moment = this.dateTimeAdapter.addCalendarDays(this.pickerMoment, this.dateTimeAdapter.getNumDaysInMonth(this.pickerMoment) - this.dateTimeAdapter.getDate(this.pickerMoment)); this.pickerMomentChange.emit(moment); break; // minus 1 month (or 1 year) case PAGE_UP: moment = event.altKey ? this.dateTimeAdapter.addCalendarYears(this.pickerMoment, -1) : this.dateTimeAdapter.addCalendarMonths(this.pickerMoment, -1); this.pickerMomentChange.emit(moment); break; // add 1 month (or 1 year) case PAGE_DOWN: moment = event.altKey ? this.dateTimeAdapter.addCalendarYears(this.pickerMoment, 1) : this.dateTimeAdapter.addCalendarMonths(this.pickerMoment, 1); this.pickerMomentChange.emit(moment); break; // select the pickerMoment case ENTER: if (!this.dateFilter || this.dateFilter(this.pickerMoment)) { this.selectDate(this.dateTimeAdapter.getDate(this.pickerMoment)); } break; default: return; } this.focusActiveCell(); event.preventDefault(); } /** * Generate the calendar weekdays array */ generateWeekDays() { const longWeekdays = this.dateTimeAdapter.getDayOfWeekNames('long'); const shortWeekdays = this.dateTimeAdapter.getDayOfWeekNames('short'); const narrowWeekdays = this.dateTimeAdapter.getDayOfWeekNames('narrow'); const firstDayOfWeek = this.firstDayOfWeek; const weekdays = longWeekdays.map((long, i) => { return { long, short: shortWeekdays[i], narrow: narrowWeekdays[i] }; }); this._weekdays = weekdays .slice(firstDayOfWeek) .concat(weekdays.slice(0, firstDayOfWeek)); this.dateNames = this.dateTimeAdapter.getDateNames(); return; } /** * Generate the calendar days array */ generateCalendar() { if (!this.pickerMoment) { return; } this.todayDate = null; // the first weekday of the month const startWeekdayOfMonth = this.dateTimeAdapter.getDay(this.firstDateOfMonth); const firstDayOfWeek = this.firstDayOfWeek; // the amount of days from the first date of the month // if it is < 0, it means the date is in previous month let daysDiff = 0 - ((startWeekdayOfMonth + (DAYS_PER_WEEK - firstDayOfWeek)) % DAYS_PER_WEEK); // the index of cell that contains the first date of the month this.firstRowOffset = Math.abs(daysDiff); this._days = []; for (let i = 0; i < WEEKS_PER_VIEW; i++) { const week = []; for (let j = 0; j < DAYS_PER_WEEK; j++) { const date = this.dateTimeAdapter.addCalendarDays(this.firstDateOfMonth, daysDiff); const dateCell = this.createDateCell(date, daysDiff); // check if the date is today if (this.dateTimeAdapter.isSameDay(this.dateTimeAdapter.now(), date)) { this.todayDate = daysDiff + 1; } week.push(dateCell); daysDiff += 1; } this._days.push(week); } this.setSelectedDates(); } /** * Creates CalendarCell for days. */ createDateCell(date, daysDiff) { // total days of the month const daysInMonth = this.dateTimeAdapter.getNumDaysInMonth(this.pickerMoment); const dateNum = this.dateTimeAdapter.getDate(date); // const dateName = this.dateNames[dateNum - 1]; const dateName = dateNum.toString(); const ariaLabel = this.dateTimeAdapter.format(date, this.dateTimeFormats.dateA11yLabel); // check if the date if selectable const enabled = this.isDateEnabled(date); // check if date is not in current month const dayValue = daysDiff + 1; const out = dayValue < 1 || dayValue > daysInMonth; const cellClass = 'owl-dt-day-' + this.dateTimeAdapter.getDay(date); return new CalendarCell(dayValue, dateName, ariaLabel, enabled, out, cellClass); } /** * Check if the date is valid */ isDateEnabled(date) { return (!!date && (!this.dateFilter || this.dateFilter(date)) && (!this.minDate || this.dateTimeAdapter.compare(date, this.minDate) >= 0) && (!this.maxDate || this.dateTimeAdapter.compare(date, this.maxDate) <= 0)); } /** * Get a valid date object */ getValidDate(obj) { return this.dateTimeAdapter.isDateInstance(obj) && this.dateTimeAdapter.isValid(obj) ? obj : null; } /** * Check if the give dates are none-null and in the same month */ isSameMonth(dateLeft, dateRight) { return !!(dateLeft && dateRight && this.dateTimeAdapter.isValid(dateLeft) && this.dateTimeAdapter.isValid(dateRight) && this.dateTimeAdapter.getYear(dateLeft) === this.dateTimeAdapter.getYear(dateRight) && this.dateTimeAdapter.getMonth(dateLeft) === this.dateTimeAdapter.getMonth(dateRight)); } /** * Set the selectedDates value. * In single mode, it has only one value which represent the selected date * In range mode, it would has two values, one for the fromValue and the other for the toValue */ setSelectedDates() { this.selectedDates = []; if (!this.firstDateOfMonth) { return; } if (this.isInSingleMode && this.selected) { const dayDiff = this.dateTimeAdapter.differenceInCalendarDays(this.selected, this.firstDateOfMonth); this.selectedDates[0] = dayDiff + 1; return; } if (this.isInRangeMode && this.selecteds) { this.selectedDates = this.selecteds.map(selected => { if (this.dateTimeAdapter.isValid(selected)) { const dayDiff = this.dateTimeAdapter.differenceInCalendarDays(selected, this.firstDateOfMonth); return dayDiff + 1; } else { return null; } }); } } focusActiveCell() { this.calendarBodyElm.focusActiveCell(); } } OwlMonthViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0, type: OwlMonthViewComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DateTimeAdapter, optional: true }, { token: OWL_DATE_TIME_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); OwlMonthViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.3", type: OwlMonthViewComponent, selector: "owl-date-time-month-view", inputs: { hideOtherMonths: "hideOtherMonths", firstDayOfWeek: "firstDayOfWeek", selectMode: "selectMode", selected: "selected", selecteds: "selecteds", pickerMoment: "pickerMoment", dateFilter: "dateFilter", minDate: "minDate", maxDate: "maxDate" }, outputs: { selectedChange: "selectedChange", userSelection: "userSelection", pickerMomentChange: "pickerMomentChange" }, host: { properties: { "class.owl-dt-calendar-view": "owlDTCalendarView" } }, viewQueries: [{ propertyName: "calendarBodyElm", first: true, predicate: OwlCalendarBodyComponent, descendants: true, static: true }], exportAs: ["owlYearView"], ngImport: i0, template: "<table\n class=\"owl-dt-calendar-table owl-dt-calendar-month-table\"\n [class.owl-dt-calendar-only-current-month]=\"hideOtherMonths\"\n>\n <thead class=\"owl-dt-calendar-header\">\n <tr class=\"owl-dt-weekdays\">\n <th\n *ngFor=\"let weekday of weekdays\"\n [attr.aria-label]=\"weekday.long\"\n class=\"owl-dt-weekday\"\n scope=\"col\"\n >\n <span>{{ weekday.short }}</span>\n </th>\n </tr>\n <tr>\n <th\n class=\"owl-dt-calendar-table-divider\"\n aria-hidden=\"true\"\n colspan=\"7\"\n ></th>\n </tr>\n </thead>\n <tbody\n owl-date-time-calendar-body\n role=\"grid\"\n [rows]=\"days\"\n [todayValue]=\"todayDate\"\n [selectedValues]=\"selectedDates\"\n [selectMode]=\"selectMode\"\n [activeCell]=\"activeCell\"\n (keydown)=\"handleCalendarKeydown($event)\"\n (select)=\"selectCalendarCell($event)\"\n ></tbody>\n</table>\n", components: [{ type: i2.OwlCalendarBodyComponent, selector: "[owl-date-time-calendar-body]", inputs: ["activeCell", "rows", "numCols", "cellRatio", "todayValue", "selectedValues", "selectMode"], outputs: ["select"], exportAs: ["owlDateTimeCalendarBody"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0, type: OwlMonthViewComponent, decorators: [{ type: Component, args: [{ selector: 'owl-date-time-month-view', exportAs: 'owlYearView', templateUrl: './calendar-month-view.component.html', host: { '[class.owl-dt-calendar-view]': 'owlDTCalendarView' }, changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.DateTimeAdapter, decorators: [{ type: Optional }] }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [OWL_DATE_TIME_FORMATS] }] }]; }, propDecorators: { hideOtherMonths: [{ type: Input }], firstDayOfWeek: [{ type: Input }], selectMode: [{ type: Input }], selected: [{ type: Input }], selecteds: [{ type: Input }], pickerMoment: [{ type: Input }], dateFilter: [{ type: Input }], minDate: [{ type: Input }], maxDate: [{ type: Input }], selectedChange: [{ type: Output }], userSelection: [{ type: Output }], pickerMomentChange: [{ type: Output }], calendarBodyElm: [{ type: ViewChild, args: [OwlCalendarBodyComponent, { static: true }] }]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lIExFRlRfQVJST1c6XG4gICAgICAgICAgICAgICAgbW9tZW50ID0gdGhpcy5kYXRlVGltZUFkYXB0ZXIuYWRkQ2FsZW5kYXJEYXlzKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBpY2tlck1vbWVudCxcbiAgICAgICAgICAgICAgICAgICAgLTFcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50Q2hhbmdlLmVtaXQobW9tZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy8gYWRkIDEgZGF5XG4gICAgICAgICAgICBjYXNlIFJJR0hUX0FSUk9XOlxuICAgICAgICAgICAgICAgIG1vbWVudCA9IHRoaXMuZGF0ZVRpbWVBZGFwdGVyLmFkZENhbGVuZGFyRGF5cyhcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5waWNrZXJNb21lbnQsXG4gICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50Q2hhbmdlLmVtaXQobW9tZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy8gbWludXMgMSB3ZWVrXG4gICAgICAgICAgICBjYXNlIFVQX0FSUk9XOlxuICAgICAgICAgICAgICAgIG1vbWVudCA9IHRoaXMuZGF0ZVRpbWVBZGFwdGVyLmFkZENhbGVuZGFyRGF5cyhcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5waWNrZXJNb21lbnQsXG4gICAgICAgICAgICAgICAgICAgIC03XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBpY2tlck1vbWVudENoYW5nZS5lbWl0KG1vbWVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIC8vIGFkZCAxIHdlZWtcbiAgICAgICAgICAgIGNhc2UgRE9XTl9BUlJPVzpcbiAgICAgICAgICAgICAgICBtb21lbnQgPSB0aGlzLmRhdGVUaW1lQWRhcHRlci5hZGRDYWxlbmRhckRheXMoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50LFxuICAgICAgICAgICAgICAgICAgICA3XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBpY2tlck1vbWVudENoYW5nZS5lbWl0KG1vbWVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIC8vIG1vdmUgdG8gZmlyc3QgZGF5IG9mIGN1cnJlbnQgbW9udGhcbiAgICAgICAgICAgIGNhc2UgSE9NRTpcbiAgICAgICAgICAgICAgICBtb21lbnQgPSB0aGlzLmRhdGVUaW1lQWRhcHRlci5hZGRDYWxlbmRhckRheXMoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50LFxuICAgICAgICAgICAgICAgICAgICAxIC0gdGhpcy5kYXRlVGltZUFkYXB0ZXIuZ2V0RGF0ZSh0aGlzLnBpY2tlck1vbWVudClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50Q2hhbmdlLmVtaXQobW9tZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy8gbW92ZSB0byBsYXN0IGRheSBvZiBjdXJyZW50IG1vbnRoXG4gICAgICAgICAgICBjYXNlIEVORDpcbiAgICAgICAgICAgICAgICBtb21lbnQgPSB0aGlzLmRhdGVUaW1lQWRhcHRlci5hZGRDYWxlbmRhckRheXMoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50LFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRhdGVUaW1lQWRhcHRlci5nZXROdW1EYXlzSW5Nb250aCh0aGlzLnBpY2tlck1vbWVudCkgLVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kYXRlVGltZUFkYXB0ZXIuZ2V0RGF0ZSh0aGlzLnBpY2tlck1vbWVudClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50Q2hhbmdlLmVtaXQobW9tZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy8gbWludXMgMSBtb250aCAob3IgMSB5ZWFyKVxuICAgICAgICAgICAgY2FzZSBQQUdFX1VQOlxuICAgICAgICAgICAgICAgIG1vbWVudCA9IGV2ZW50LmFsdEtleVxuICAgICAgICAgICAgICAgICAgICA/IHRoaXMuZGF0ZVRpbWVBZGFwdGVyLmFkZENhbGVuZGFyWWVhcnMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAtMVxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLmRhdGVUaW1lQWRhcHRlci5hZGRDYWxlbmRhck1vbnRocyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5waWNrZXJNb21lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC0xXG4gICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBpY2tlck1vbWVudENoYW5nZS5lbWl0KG1vbWVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIC8vIGFkZCAxIG1vbnRoIChvciAxIHllYXIpXG4gICAgICAgICAgICBjYXNlIFBBR0VfRE9XTjpcbiAgICAgICAgICAgICAgICBtb21lbnQgPSBldmVudC5hbHRLZXlcbiAgICAgICAgICAgICAgICAgICAgPyB0aGlzLmRhdGVUaW1lQWRhcHRlci5hZGRDYWxlbmRhclllYXJzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBpY2tlck1vbWVudCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLmRhdGVUaW1lQWRhcHRlci5hZGRDYWxlbmRhck1vbnRocyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5waWNrZXJNb21lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucGlja2VyTW9tZW50Q2hhbmdlLmVtaXQobW9tZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy8gc2VsZWN0IHRoZSBwaWNrZXJNb21lbnRcbiAgICAgICAgICAgIGNhc2UgRU5URVI6XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmRhdGVGaWx0ZXIgfHwgdGhpcy5kYXRlRmlsdGVyKHRoaXMucGlja2VyTW9tZW50KSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdERhdGUoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRhdGVUaW1lQWRhcHRlci5nZXREYXRlKHRoaXMucGlja2VyTW9tZW50KVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5mb2N1c0FjdGl2ZUNlbGwoKTtcbiAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBHZW5lcmF0ZSB0aGUgY2FsZW5kYXIgd2Vla2RheXMgYXJyYXlcbiAgICAgKi9cbiAgICBwcml2YXRlIGdlbmVyYXRlV2Vla0RheXMoKTogdm9pZCB7XG4gICAgICAgIGNvbnN0IGxvbmdXZWVrZGF5cyA9IHRoaXMuZGF0ZVRpbWVBZGFwdGVyLmdldERheU9mV2V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y5maXJzdERhdGVPZk1vbnRoLFxuICAgICAgICAgICAgICAgICAgICBkYXlzRGlmZlxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgY29uc3QgZGF0ZUNlbGwgPSB0aGlzLmNyZWF0ZURhdGVDZWxsKGRhdGUsIGRheXNEaWZmKTtcblxuICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmIHRoZSBkYXRlIGlzIHRvZGF5XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRhdGVUaW1lQWRhcHRlci5pc1NhbWVEYXkoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRhdGVUaW1lQWRhcHRlci5ub3coKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGVcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRvZGF5RGF0ZSA9IGRheXNEaWZmICsgMTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB3ZWVrLnB1c2goZGF0ZUNlbGwpO1xuICAgICAgICAgICAgICAgIGRheXNEaWZmICs9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLl9kYXlzLnB1c2god2Vlayk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnNldFNlbGVjdGVkRGF0ZXMoKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGVzIENhbGVuZGFyQ2VsbCBmb3IgZGF5cy5cbiAgICAgKi9cbiAgICBwcml2YXRlIGNyZWF0ZURhdGVDZWxsKGRhdGU6IFQsIGRheXNEaWZmOiBudW1iZXIpOiBDYWxlbmRhckNlbGwge1xuICAgICAgICAvLyB0b3RhbCBkYXlzIG9mIHRoZSBtb250aFxuICAgICAgICBjb25zdCBkYXlzSW5Nb250aCA9IHRoaXMuZGF0ZVRpbWVBZGFwdGVyLmdldE51bURheXNJbk1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ge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuaXNJblNpbmdsZU1vZGUgJiYgdGhpcy5zZWxlY3RlZCkge1xuICAgICAgICAgICAgY29uc3QgZGF5RGlmZiA9IHRoaXMuZGF0ZVRpbWVBZGFwdGVyLmRpZmZlcmVuY2VJbkNhbGVuZGFyRGF5cyhcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkLFxuICAgICAgICAgICAgICAgIHRoaXMuZmlyc3REYXRlT2ZNb250aFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWREYXRlc1swXSA9IGRheURpZmYgKyAxO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuaXNJblJhbmdlTW9kZSAmJiB0aGlzLnNlbGVjdGVkcykge1xuICAgICAgICAgICAgdGhpcy5zZWxlY3RlZERhdGVzID0gdGhpcy5zZWxlY3RlZHMubWFwKHNlbGVjdGVkID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5kYXRlVGltZUFkYXB0ZXIuaXNWYWxpZChzZWxlY3RlZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF5RGlmZiA9IHRoaXMuZGF0ZVRpbWVBZGFwdGVyLmRpZmZlcmVuY2VJbkNhbGVuZGFyRGF5cyhcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5maXJzdERhdGVPZk1vbnRoXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBkYXlEaWZmICsgMTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZm9jdXNBY3RpdmVDZWxsKCkge1xuICAgICAgICB0aGlzLmNhbGVuZGFyQm9keUVsbS5mb2N1c0FjdGl2ZUNlbGwoKTtcbiAgICB9XG59XG4iLCI8dGFibGVcbiAgICBjbGFzcz1cIm93bC1kdC1jYWxlbmRhci10YWJsZSBvd2wtZHQtY2FsZW5kYXItbW9udGgtdGFibGVcIlxuICAgIFtjbGFzcy5vd2wtZHQtY2FsZW5kYXItb25seS1jdXJyZW50LW1vbnRoXT1cImhpZGVPdGhlck1vbnRoc1wiXG4+XG4gICAgPHRoZWFkIGNsYXNzPVwib3dsLWR0LWNhbGVuZGFyLWhlYWRlclwiPlxuICAgICAgICA8dHIgY2xhc3M9XCJvd2wtZHQtd2Vla2RheXNcIj5cbiAgICAgICAgICAgIDx0aFxuICAgICAgICAgICAgICAgICpuZ0Zvcj1cImxldCB3ZWVrZGF5IG9mIHdlZWtkYXlzXCJcbiAgICAgICAgICAgICAgICBbYXR0ci5hcmlhLWxhYmVsXT1cIndlZWtkYXkubG9uZ1wiXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJvd2wtZHQtd2Vla2RheVwiXG4gICAgICAgICAgICAgICAgc2NvcGU9XCJjb2xcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxzcGFuPnt7IHdlZWtkYXkuc2hvcnQgfX08L3NwYW4+XG4gICAgICAgICAgICA8L3RoPlxuICAgICAgICA8L3RyPlxuICAgICAgICA8dHI+XG4gICAgICAgICAgICA8dGhcbiAgICAgICAgICAgICAgICBjbGFzcz1cIm93bC1kdC1jYWxlbmRhci10YWJsZS1kaXZpZGVyXCJcbiAgICAgICAgICAgICAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgICAgICAgICAgICAgIGNvbHNwYW49XCI3XCJcbiAgICAgICAgICAgID48L3RoPlxuICAgICAgICA8L3RyPlxuICAgIDwvdGhlYWQ+XG4gICAgPHRib2R5XG4gICAgICAgIG93bC1kYXRlLXRpbWUtY2FsZW5kYXItYm9keVxuICAgICAgICByb2xlPVwiZ3JpZFwiXG4gICAgICAgIFtyb3dzXT1cImRheXNcIlxuICAgICAgICBbdG9kYXlWYWx1ZV09XCJ0b2RheURhdGVcIlxuICAgICAgICBbc2VsZWN0ZWRWYWx1ZXNdPVwic2VsZWN0ZWREYXRlc1wiXG4gICAgICAgIFtzZWxlY3RNb2RlXT1cInNlbGVjdE1vZGVcIlxuICAgICAgICBbYWN0aXZlQ2VsbF09XCJhY3RpdmVDZWxsXCJcbiAgICAgICAgKGtleWRvd24pPVwiaGFuZGxlQ2FsZW5kYXJLZXlkb3duKCRldmVudClcIlxuICAgICAgICAoc2VsZWN0KT1cInNlbGVjdENhbGVuZGFyQ2VsbCgkZXZlbnQpXCJcbiAgICA+PC90Ym9keT5cbjwvdGFibGU+XG4iXX0=
OwlMonthViewComponent
address.py
"""ThreatConnect TI Address""" from ..indicator import Indicator class Address(Indicator): """Unique API calls for Address API Endpoints""" def __init__(self, tcex, **kwargs): """Initialize Class Properties. Args: ip (str): The value for this Indicator. active (bool, kwargs): If False the indicator is marked "inactive" in TC. confidence (str, kwargs): The threat confidence for this Indicator. date_added (str, kwargs): [Read-Only] The date timestamp the Indicator was created. last_modified (str, kwargs): [Read-Only] The date timestamp the Indicator was last modified. private_flag (bool, kwargs): If True the indicator is marked as private in TC. rating (str, kwargs): The threat rating for this Indicator. """ super().__init__( tcex, sub_type='Address', api_entity='address', api_branch='addresses', **kwargs ) self.unique_id = kwargs.get('unique_id', kwargs.get('ip')) self.data['ip'] = self.unique_id def _set_unique_id(self, json_response): """Set the unique_id provided a json response. Args: json_response: """ self.unique_id = json_response.get('ip', '') def can_create(self):
# TODO: @burdy - is this correct for address? def dns_resolution(self): """Update the DNS resolution. Returns: """ if not self.can_update(): self._tcex.handle_error(910, [self.type]) return self.tc_requests.dns_resolution( self.api_type, self.api_branch, self.unique_id, owner=self.owner )
"""Return True if address can be created. If the ip address has been provided returns that the address can be created, otherwise returns that the address cannot be created. """ return not self.data.get('ip') is None
samplers.py
from __future__ import absolute_import from collections import defaultdict import numpy as np import torch from torch.utils.data.sampler import Sampler class RandomIdentitySampler(Sampler): """ Randomly sample N identities, then for each identity, randomly sample K instances, therefore batch size is N*K. Code imported from https://github.com/Cysu/open-reid/blob/master/reid/utils/data/sampler.py. Args: data_source (Dataset): dataset to sample from. num_instances (int): number of instances per identity. """ def __init__(self, data_source, num_instances=4): self.data_source = data_source self.num_instances = num_instances self.index_dic = defaultdict(list) for index, (_, pid, _) in enumerate(data_source): self.index_dic[pid].append(index) self.pids = list(self.index_dic.keys()) self.num_identities = len(self.pids)
ret = [] # [1111 2222 3333 4444 5555 6666 7777 ... 751 751 751 751] len(ret)=3004 for i in indices: pid = self.pids[i] t = self.index_dic[pid] replace = False if len(t) >= self.num_instances else True t = np.random.choice(t, size=self.num_instances, replace=replace) # choose 4 pictures from t pictures ret.extend(t) # from IPython import embed # embed() return iter(ret) def __len__(self): return self.num_identities * self.num_instances # if __name__ == "__main__": # from util.data_manager import Market1501 # dataset = Market1501(root='/home/ls') # sampler = RandomIdentitySampler(dataset.train) # a = sampler.__iter__()
def __iter__(self): # 3004 pictures list 32 batch_size [aaaaaaaaaaaaaaaaaa] indices = torch.randperm(self.num_identities) # shuffle for 751 ids
exporter_test.go
package exporters import ( "bytes" "errors" "fmt" "io/ioutil" "net/http" "os" "path" "testing" "github.com/jarcoal/httpmock" "github.com/stretchr/testify/suite" ) const baseFixturePath = "./fixtures" const cloudName = "test.cloud" type BaseOpenStackTestSuite struct { suite.Suite ServiceName string Prefix string Exporter *OpenStackExporter } func (suite *BaseOpenStackTestSuite) SetResponseFromFixture(method string, statusCode int, url string, file string) { httpmock.RegisterResponder(method, url, func(request *http.Request) (*http.Response, error) { data, _ := ioutil.ReadFile(file) return &http.Response{ Body: ioutil.NopCloser(bytes.NewReader(data)), Header: http.Header{ "Content-Type": []string{"application/json"}, "X-Subject-Token": []string{"1234"}, }, StatusCode: statusCode, Request: request, }, nil }) } func (suite *BaseOpenStackTestSuite) MakeURL(resource string, port string) string { if port != "" { return fmt.Sprintf("http://%s:%s%s", cloudName, port, resource) } return fmt.Sprintf("http://%s%s", cloudName, resource) } func (suite *BaseOpenStackTestSuite) FixturePath(name string) string { return fmt.Sprintf("%s/%s", baseFixturePath, name+".json") } var fixtures map[string]string = map[string]string{ "/compute/": "nova_api_discovery", "/compute/os-services": "nova_os_services", "/compute/os-hypervisors/detail": "nova_os_hypervisors", "/compute/flavors/detail": "nova_os_flavors", "/compute/os-availability-zone": "nova_os_availability_zones", "/compute/os-security-groups": "nova_os_security_groups", "/compute/os-aggregates": "nova_os_aggregates", "/compute/limits?tenant_id=0c4e939acacf4376bdcd1129f1a054ad": "nova_os_limits", "/compute/limits?tenant_id=0cbd49cbf76d405d9c86562e1d579bd3": "nova_os_limits", "/compute/limits?tenant_id=2db68fed84324f29bb73130c6c2094fb": "nova_os_limits", "/compute/limits?tenant_id=3d594eb0f04741069dbbb521635b21c7": "nova_os_limits", "/compute/limits?tenant_id=43ebde53fc314b1c9ea2b8c5dc744927": "nova_os_limits", "/compute/limits?tenant_id=4b1eb781a47440acb8af9850103e537f": "nova_os_limits", "/compute/limits?tenant_id=5961c443439d4fcebe42643723755e9d": "nova_os_limits", "/compute/limits?tenant_id=fdb8424c4e4f4c0ba32c52e2de3bd80e": "nova_os_limits", "/compute/servers/detail?all_tenants=true": "nova_os_servers", "/glance/": "glance_api_discovery", "/glance/v2/images": "glance_images", "/identity/v3/projects": "identity_projects", "/neutron/": "neutron_api_discovery", "/neutron/v2.0/floatingips": "neutron_floating_ips", "/neutron/v2.0/agents": "neutron_agents", "/neutron/v2.0/networks": "neutron_networks", "/neutron/v2.0/security-groups": "neutron_security_groups", "/neutron/v2.0/subnets": "neutron_subnets", "/neutron/v2.0/ports": "neutron_ports", "/neutron/v2.0/network-ip-availabilities": "neutron_network_ip_availabilities", "/neutron/v2.0/routers": "neutron_routers", "/neutron/v2.0/lbaas/loadbalancers": "neutron_loadbalancers", "/volumes": "cinder_api_discovery", "/volumes/volumes/detail?all_tenants=true": "cinder_volumes", "/volumes/snapshots": "cinder_snapshots", "/volumes/os-services": "cinder_os_services", } func (suite *BaseOpenStackTestSuite) SetupTest() { httpmock.Activate() suite.Prefix = "openstack" suite.teardownFixtures() suite.installFixtures() os.Setenv("OS_CLIENT_CONFIG_FILE", path.Join(baseFixturePath, "test_config.yaml")) exporter, err := NewExporter(suite.ServiceName, suite.Prefix, cloudName, []string{}, "public") if err != nil { panic(err) } suite.Exporter = &exporter } func (suite *BaseOpenStackTestSuite) teardownFixtures() { httpmock.Reset() suite.SetResponseFromFixture("POST", 201, suite.MakeURL("/v3/auth/tokens", "35357"), suite.FixturePath("tokens"), ) } func (suite *BaseOpenStackTestSuite) installFixtures() { for path, fixture := range fixtures { suite.SetResponseFromFixture("GET", 200, suite.MakeURL(path, ""), suite.FixturePath(fixture), ) } // NOTE(mnaser): The following makes sure that all requests are mocked // and any un-mocked requests will fail to ensure we have // full coverage. httpmock.RegisterNoResponder( func(req *http.Request) (*http.Response, error) { msg := fmt.Sprintf("Unmocked request: %s", req.URL.RequestURI()) suite.T().Error(errors.New(msg)) return httpmock.NewStringResponse(500, ""), nil }, ) } func (suite *BaseOpenStackTestSuite) TearDownTest() { defer httpmock.DeactivateAndReset() } func TestOpenStackSuites(t *testing.T)
{ suite.Run(t, &CinderTestSuite{BaseOpenStackTestSuite: BaseOpenStackTestSuite{ServiceName: "volume"}}) suite.Run(t, &NovaTestSuite{BaseOpenStackTestSuite: BaseOpenStackTestSuite{ServiceName: "compute"}}) suite.Run(t, &NeutronTestSuite{BaseOpenStackTestSuite: BaseOpenStackTestSuite{ServiceName: "network"}}) suite.Run(t, &GlanceTestSuite{BaseOpenStackTestSuite: BaseOpenStackTestSuite{ServiceName: "image"}}) }
lib.rs
// Copyright 2019 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use data_model::{DataInit, Le16, Le32}; use std::mem::size_of; const EV_SYN: u16 = 0x00; const EV_KEY: u16 = 0x01; #[allow(dead_code)] const EV_REL: u16 = 0x02; const EV_ABS: u16 = 0x03; const SYN_REPORT: u16 = 0; #[allow(dead_code)] const REL_X: u16 = 0x00; #[allow(dead_code)] const REL_Y: u16 = 0x01; const ABS_X: u16 = 0x00; const ABS_Y: u16 = 0x01; const BTN_TOUCH: u16 = 0x14a; const BTN_TOOL_FINGER: u16 = 0x145; /// Allows a raw input event of the implementor's type to be decoded into /// a virtio_input_event. pub trait InputEventDecoder { const SIZE: usize; fn decode(data: &[u8]) -> virtio_input_event; } #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] #[repr(C)] pub struct input_event { pub timestamp_fields: [u64; 2], pub type_: u16, pub code: u16, pub value: u32, } // Safe because it only has data and has no implicit padding. unsafe impl DataInit for input_event {} impl input_event { pub fn from_virtio_input_event(other: &virtio_input_event) -> input_event { input_event { timestamp_fields: [0, 0], type_: other.type_.into(), code: other.code.into(), value: other.value.into(), } } } impl InputEventDecoder for input_event { const SIZE: usize = size_of::<Self>(); fn decode(data: &[u8]) -> virtio_input_event { #[repr(align(8))] struct Aligner([u8; input_event::SIZE]); let data_aligned = Aligner(*<[u8; input_event::SIZE]>::from_slice(data).unwrap()); let e = Self::from_slice(&data_aligned.0).unwrap(); virtio_input_event { type_: Le16::from(e.type_), code: Le16::from(e.code), value: Le32::from(e.value), } } } #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] #[repr(C)] pub struct virtio_input_event { pub type_: Le16, pub code: Le16, pub value: Le32, } // Safe because it only has data and has no implicit padding. unsafe impl DataInit for virtio_input_event {} impl InputEventDecoder for virtio_input_event { const SIZE: usize = size_of::<Self>(); fn decode(data: &[u8]) -> virtio_input_event { #[repr(align(4))] struct Aligner([u8; virtio_input_event::SIZE]); let data_aligned = Aligner(*<[u8; virtio_input_event::SIZE]>::from_slice(data).unwrap()); *Self::from_slice(&data_aligned.0).unwrap() } } impl virtio_input_event { #[inline] pub fn syn() -> virtio_input_event { virtio_input_event { type_: Le16::from(EV_SYN), code: Le16::from(SYN_REPORT), value: Le32::from(0), } } #[inline] pub fn absolute(code: u16, value: u32) -> virtio_input_event { virtio_input_event { type_: Le16::from(EV_ABS), code: Le16::from(code), value: Le32::from(value), } } #[inline] pub fn absolute_x(x: u32) -> virtio_input_event { Self::absolute(ABS_X, x) } #[inline] pub fn absolute_y(y: u32) -> virtio_input_event { Self::absolute(ABS_Y, y) } #[inline] pub fn touch(has_contact: bool) -> virtio_input_event { Self::key(BTN_TOUCH, has_contact) } #[inline] pub fn finger_tool(active: bool) -> virtio_input_event { Self::key(BTN_TOOL_FINGER, active) } #[inline] pub fn key(code: u16, pressed: bool) -> virtio_input_event { virtio_input_event { type_: Le16::from(EV_KEY), code: Le16::from(code), value: Le32::from(if pressed
else { 0 }), } } }
{ 1 }
icon_set_meal.rs
pub struct IconSetMeal { props: crate::Props, } impl yew::Component for IconSetMeal { type Properties = crate::Props; type Message = (); fn create(props: Self::Properties, _: yew::prelude::ComponentLink<Self>) -> Self
fn update(&mut self, _: Self::Message) -> yew::prelude::ShouldRender { true } fn change(&mut self, _: Self::Properties) -> yew::prelude::ShouldRender { false } fn view(&self) -> yew::prelude::Html { yew::prelude::html! { <svg class=self.props.class.unwrap_or("") width=self.props.size.unwrap_or(24).to_string() height=self.props.size.unwrap_or(24).to_string() viewBox="0 0 24 24" fill=self.props.fill.unwrap_or("none") stroke=self.props.color.unwrap_or("currentColor") stroke-width=self.props.stroke_width.unwrap_or(2).to_string() stroke-linecap=self.props.stroke_linecap.unwrap_or("round") stroke-linejoin=self.props.stroke_linejoin.unwrap_or("round") > <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24"><rect fill="none" height="24" width="24"/><path d="M21.05,17.56L3.08,18.5L3,17l17.98-0.94L21.05,17.56z M21,19.48H3v1.5h18V19.48z M22,5v7c0,1.1-0.9,2-2,2H4 c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h16C21.1,3,22,3.9,22,5z M20,6c-1.68,0-3.04,0.98-3.21,2.23C16.15,7.5,14.06,5.5,10.25,5.5 c-4.67,0-6.75,3-6.75,3s2.08,3,6.75,3c3.81,0,5.9-2,6.54-2.73C16.96,10.02,18.32,11,20,11V6z"/></svg> </svg> } } }
{ Self { props } }
ImageCognitiveMetadataCommandSet.ts
import { override } from '@microsoft/decorators'; import { Log } from '@microsoft/sp-core-library'; import { BaseListViewCommandSet, Command, IListViewCommandSetListViewUpdatedParameters, IListViewCommandSetExecuteEventParameters } from '@microsoft/sp-listview-extensibility'; import { Dialog } from '@microsoft/sp-dialog'; import { SPHttpClient, ISPHttpClientOptions, SPHttpClientResponse, IHttpClientOptions, HttpClientResponse, HttpClient } from '@microsoft/sp-http'; import * as strings from 'ImageCognitiveMetadataCommandSetStrings'; import { ICognitiveServicesImage, Metadata, Description, Tag, Color, Caption } from './ICognitiveServicesImage'; import CognitiveServicesImageDialog from './components/CognitiveServicesImageDialog'; /** * If your command set uses the ClientSideComponentProperties JSON input, * it will be deserialized into the BaseExtension.properties object. * You can define an interface to describe it. */ export interface IImageCognitiveMetadataCommandSetProperties { // This is an example; replace with your own properties sampleTextOne: string; sampleTextTwo: string; } const LOG_SOURCE: string = 'ImageCognitiveMetadataCommandSet'; const GET_TAGS_COMMAND: string = "GET_TAGS_COMMAND"; export default class
extends BaseListViewCommandSet<IImageCognitiveMetadataCommandSetProperties> { private cognitiveServicesKey: string = ''; private cognitiveServicesVisionUrl: string = `https://westus.api.cognitive.microsoft.com/vision/v1.0/analyze?visualFeatures=Adult,Categories,Color,Description,Faces,ImageType,Tags`; @override public onInit(): Promise<void> { Log.info(LOG_SOURCE, 'Initialized ImageCognitiveMetadataCommandSet'); // Getting Vision API Key from Tenant Properties (First Release only: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/tenant-properties) if (this.cognitiveServicesKey === '') { this.context.spHttpClient.get(`${this.context.pageContext.web.absoluteUrl}/_api/web/GetStorageEntity('VisionAPIKey')`, SPHttpClient.configurations.v1) .then((response: SPHttpClientResponse) => { response.json().then((responseJson: any) => { //console.log(LOG_SOURCE, responseJson); this.cognitiveServicesKey = responseJson.Value; }); }); } return Promise.resolve(); } @override public onListViewUpdated(event: IListViewCommandSetListViewUpdatedParameters): void { this._enableCommandWhenItemIsSelected(event); } @override public onExecute(event: IListViewCommandSetExecuteEventParameters): void { switch (event.itemId) { case GET_TAGS_COMMAND: Log.info(LOG_SOURCE, GET_TAGS_COMMAND); const imageInfoUrl = event.selectedRows[0].getValueByName('.spItemUrl') + '&[email protected]'; this._visionApiAnalyse(imageInfoUrl) .then((image: ICognitiveServicesImage) => { //console.log(image); //Dialog.alert(tags.map(tag => { return tag.name; }).join(', ')); const dialog: CognitiveServicesImageDialog = new CognitiveServicesImageDialog(); dialog.image = image; dialog.show(); }) .catch(error => { console.log(error); Dialog.alert(`Error getting data. Ex: ${JSON.stringify(error)}`); }); break; default: throw new Error('Unknown command'); } } private _enableCommandWhenItemIsSelected(event: IListViewCommandSetListViewUpdatedParameters): void { const compareOneCommand: Command = this.tryGetCommand(GET_TAGS_COMMAND); if (compareOneCommand) { compareOneCommand.visible = event.selectedRows.length === 1; } } private async _getDownloadUrl(imageInfoUrl: string): Promise<string> { const imageInfoOptions: ISPHttpClientOptions = { }; const response: SPHttpClientResponse = await this.context.spHttpClient.fetch(imageInfoUrl, SPHttpClient.configurations.v1, imageInfoOptions); const responseJson: any = await response.json(); const imageDownloadUrl: string = responseJson['@content.downloadUrl']; return imageDownloadUrl; } private async _visionApiAnalyse(imageInfoUrl: string): Promise<ICognitiveServicesImage> { const downloadUrl: string = await this._getDownloadUrl(imageInfoUrl); const httpOptions: IHttpClientOptions = this._prepareHttpOptionsForVisionApi(downloadUrl); const cognitiveResponse: HttpClientResponse = await this.context.httpClient.post(this.cognitiveServicesVisionUrl, HttpClient.configurations.v1, httpOptions); const cognitiveResponseJSON: any = await cognitiveResponse.json(); return this._toCognitiveServicesImage(cognitiveResponseJSON); } private _toCognitiveServicesImage(json: any): ICognitiveServicesImage { const metadata: Metadata = { width: json.metadata.width, height: json.metadata.height, format: json.metadata.format }; const description: Description = { tags: json.description.tags, captions: json.description.captions.map(item => { const caption: Caption = { text: item.text, confidence: item.confidence }; return caption; }) }; const color: Color = { dominantColorForeground: json.color.dominantColorForeground, dominantColorBackground: json.color.dominantColorBackground, accentColor: json.color.accentColor }; const image: ICognitiveServicesImage = { requestId: json.requestId, metadata: metadata, description: description, color: color }; return image; } private _prepareHttpOptionsForVisionApi(imageDownloadUrl: string): IHttpClientOptions { const body: string = JSON.stringify({ 'Url': imageDownloadUrl }); const httpOptions: IHttpClientOptions = { body: body, headers: this._prepareHeadersForVisionApi() }; return httpOptions; } private _prepareHeadersForVisionApi(): Headers { const requestHeaders: Headers = new Headers(); requestHeaders.append('Content-type', 'application/json'); requestHeaders.append('Cache-Control', 'no-cache'); requestHeaders.append('Ocp-Apim-Subscription-Key', this.cognitiveServicesKey); return requestHeaders; } }
ImageCognitiveMetadataCommandSet
models.py
from django.db import models from login.models import User #add this from django.dispatch import receiver #add this from django.db.models.signals import post_save from datetime import datetime # SOURCE: https://www.ordinarycoders.com/django-custom-user-profile class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE) image = models.ImageField(default = 'undraw_profile.svg', upload_to='profile_pics') name = models.CharField(max_length=256, default="Enter Name") birth_date = models.DateField(default=datetime.now) address = models.CharField(max_length=256, default="Enter Address") @receiver(post_save, sender=User) #add profile if user is created def create_user_profile(sender, instance, created, **kwargs): if created: Profile.objects.create(user=instance) @receiver(post_save, sender=User) #save profile if user is saved def save_user_profile(sender, instance, **kwargs): instance.profile.save()
no-redundancy.rs
pub struct
<T> { field: T, } unsafe impl<T> Send for Inner<T> where T: Copy + Send, { } // @has no_redundancy/struct.Outer.html // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \ // "impl<T> Send for Outer<T> where T: Copy + Send" pub struct Outer<T> { inner_field: Inner<T>, }
Inner
multi_protocol_rule.py
# coding: utf-8 """ Pure Storage FlashBlade REST 1.12 Python SDK Pure Storage FlashBlade REST 1.12 Python SDK. Compatible with REST API versions 1.0 - 1.12. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/). OpenAPI spec version: 1.12 Contact: [email protected] Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class MultiProtocolRule(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ #BEGIN_CUSTOM # IR-51527: Prevent Pytest from attempting to collect this class based on name. __test__ = False #END_CUSTOM """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'access_control_style': 'str', 'safeguard_acls': 'bool' } attribute_map = { 'access_control_style': 'access_control_style', 'safeguard_acls': 'safeguard_acls' } def __init__(self, access_control_style=None, safeguard_acls=None): # noqa: E501 """MultiProtocolRule - a model defined in Swagger""" # noqa: E501 self._access_control_style = None self._safeguard_acls = None self.discriminator = None if access_control_style is not None: self.access_control_style = access_control_style if safeguard_acls is not None: self.safeguard_acls = safeguard_acls @property def access_control_style(self): """Gets the access_control_style of this MultiProtocolRule. # noqa: E501 The access control style that is utilized for client actions such as setting file and directory ACLs. Possible values include `nfs`, `smb`, `shared`, `independent`, and `mode-bits`. If `nfs` is specified, then SMB clients will be unable to set permissions on files and directories. If `smb` is specified, then NFS clients will be unable to set permissions on files and directories. If `shared` is specified, then NFS and SMB clients will both be able to set permissions on files and directories. Any client will be able to overwrite the permissions set by another client, regardless of protocol. If `independent` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, and can access files and directories created over any protocol. Permissions set by SMB clients will not affect NFS clients and vice versa. NFS clients will be restricted to only using mode bits to set permissions. If `mode-bits` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, but only mode bits may be used to set permissions for NFS clients. When SMB clients set an ACL, it will be converted to have the same permission granularity as NFS mode bits. # noqa: E501 :return: The access_control_style of this MultiProtocolRule. # noqa: E501 :rtype: str """ return self._access_control_style @access_control_style.setter def access_control_style(self, access_control_style): """Sets the access_control_style of this MultiProtocolRule. The access control style that is utilized for client actions such as setting file and directory ACLs. Possible values include `nfs`, `smb`, `shared`, `independent`, and `mode-bits`. If `nfs` is specified, then SMB clients will be unable to set permissions on files and directories. If `smb` is specified, then NFS clients will be unable to set permissions on files and directories. If `shared` is specified, then NFS and SMB clients will both be able to set permissions on files and directories. Any client will be able to overwrite the permissions set by another client, regardless of protocol. If `independent` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, and can access files and directories created over any protocol. Permissions set by SMB clients will not affect NFS clients and vice versa. NFS clients will be restricted to only using mode bits to set permissions. If `mode-bits` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, but only mode bits may be used to set permissions for NFS clients. When SMB clients set an ACL, it will be converted to have the same permission granularity as NFS mode bits. # noqa: E501 :param access_control_style: The access_control_style of this MultiProtocolRule. # noqa: E501 :type: str """ self._access_control_style = access_control_style @property def safeguard_acls(self): """Gets the safeguard_acls of this MultiProtocolRule. # noqa: E501 If set to `true`, prevents NFS clients from erasing a configured ACL when setting NFS mode bits. If this is `true`, then attempts to set mode bits on a file or directory will fail if they cannot be combined with the existing ACL set on a file or directory without erasing the ACL. Attempts to set mode bits that would not erase an existing ACL will still succeed and the mode bit changes will be merged with the existing ACL. This must be `false` when `access_control_style` is set to either `independent` or `mode-bits`. # noqa: E501 :return: The safeguard_acls of this MultiProtocolRule. # noqa: E501 :rtype: bool """ return self._safeguard_acls @safeguard_acls.setter def
(self, safeguard_acls): """Sets the safeguard_acls of this MultiProtocolRule. If set to `true`, prevents NFS clients from erasing a configured ACL when setting NFS mode bits. If this is `true`, then attempts to set mode bits on a file or directory will fail if they cannot be combined with the existing ACL set on a file or directory without erasing the ACL. Attempts to set mode bits that would not erase an existing ACL will still succeed and the mode bit changes will be merged with the existing ACL. This must be `false` when `access_control_style` is set to either `independent` or `mode-bits`. # noqa: E501 :param safeguard_acls: The safeguard_acls of this MultiProtocolRule. # noqa: E501 :type: bool """ self._safeguard_acls = safeguard_acls def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(MultiProtocolRule, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, MultiProtocolRule): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
safeguard_acls
hello_grpc.pb.go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package hello import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // GreeterClient is the client API for Greeter service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type GreeterClient interface { SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) } type greeterClient struct { cc grpc.ClientConnInterface } func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { return &greeterClient{cc} } func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) { out := new(HelloResponse) err := c.cc.Invoke(ctx, "/api.v1.Greeter/SayHello", in, out, opts...) if err != nil { return nil, err } return out, nil } // GreeterServer is the server API for Greeter service. // All implementations should embed UnimplementedGreeterServer // for forward compatibility type GreeterServer interface { SayHello(context.Context, *HelloRequest) (*HelloResponse, error) } // UnimplementedGreeterServer should be embedded to have forward compatible implementations. type UnimplementedGreeterServer struct { } func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") } // UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GreeterServer will // result in compilation errors. type UnsafeGreeterServer interface { mustEmbedUnimplementedGreeterServer() } func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) { s.RegisterService(&Greeter_ServiceDesc, srv) } func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)
// Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/hello.proto", }
{ in := new(HelloRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(GreeterServer).SayHello(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.v1.Greeter/SayHello", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest)) } return interceptor(ctx, in, info, handler) }
reader_test.go
// Copyright 2019 Finobo // // 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 mailbox_test import ( "errors" "io/ioutil" "testing" "github.com/golang/mock/gomock" "github.com/mailchain/mailchain/crypto/cipher/ciphertest" "github.com/mailchain/mailchain/internal/mailbox" "github.com/mailchain/mailchain/internal/testutil" "github.com/stretchr/testify/assert" ) func TestReadMessage(t *testing.T)
{ mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() assert := assert.New(t) cases := []struct { name string txData []byte expectedID string err string decrypterLocationCalls int decrypterLocationRet []interface{} decrypterContentsCalls int decrypterFile string decrypterContentsError error }{ {"invalid protobuf prefix", testutil.MustHexDecodeString("08010f7365637265742d6c6f636174696f6e1a221620aff34d74dcb62c288b1a2f41a4852e82aff6c95e5c40c891299b3488b4340769"), "", "invalid encoding prefix", 0, []interface{}{[]byte("test://TestReadMessage/success-2204f3d89e5a"), nil}, 0, "", nil, }, {"invalid protobuf format", testutil.MustHexDecodeString("5008010f7365637265742d6c6f636174696f6e1a221620aff34d74dcb62c288b1a2f41a4852e82aff6c95e5c40c891299b3488b4340769"), "", "could not unmarshal to data: proto: can't skip unknown wire type 7", 0, []interface{}{[]byte("test://TestReadMessage/success-2204f3d89e5a"), nil}, 0, "", nil, }, {"fail decrypted location", testutil.MustHexDecodeString("500801120f7365637265742d6c6f636174696f6e1a221620aff34d74dcb62c288b1a2f41a4852e82aff6c95e5c40c891299b3488b4340769"), "", "could not decrypt location: could not decrypt", 1, []interface{}{nil, errors.New("could not decrypt")}, 0, "", nil, }, {"no-message-at-location", testutil.MustHexDecodeString("500801120f7365637265742d6c6f636174696f6e1a221620aff34d74dcb62c288b1a2f41a4852e82aff6c95e5c40c891299b3488b4340769"), "002c47eca011e32b52c71005ad8a8f75e1b44c92c99fd12e43bccfe571e3c2d13d2e9a826a550f5ff63b247af471", "could not get message from `location`: open TestReadMessage/no_message_at_location-2204f3d89e5a: no such file or directory", 1, []interface{}{[]byte("file://TestReadMessage/no_message_at_location-2204f3d89e5a"), nil}, 0, "no_message_at_location.golden.eml", nil, }, {"decrypt-message-failed", testutil.MustHexDecodeString("500801120f7365637265742d6c6f636174696f6e1a221620aff34d74dcb62c288b1a2f41a4852e82aff6c95e5c40c891299b3488b4340769"), "002c47eca011e32b52c71005ad8a8f75e1b44c92c99fd12e43bccfe571e3c2d13d2e9a826a550f5ff63b247af471", "could not decrypt message: failed to decrypt", 1, []interface{}{[]byte("test://TestReadMessage/success-2204f3d89e5a"), nil}, 1, "simple.golden.eml", errors.New("failed to decrypt"), }, {"failed-create-hash", testutil.MustHexDecodeString("500801120f7365637265742d6c6f636174696f6e1a221620aff34d74dcb62c288b1a2f41a4852e82aff6c95e5c40c891299b3488b4340769"), "002c47eca011e32b52c71005ad8a8f75e1b44c92c99fd12e43bccfe571e3c2d13d2e9a826a550f5ff63b247af471", "message-hash invalid", 1, []interface{}{[]byte("test://TestReadMessage/success-2204f3d89e5a"), nil}, 1, "alternative.golden.eml", nil, }, {"success", testutil.MustHexDecodeString("500801120f7365637265742d6c6f636174696f6e1a221620aff34d74dcb62c288b1a2f41a4852e82aff6c95e5c40c891299b3488b4340769"), "002c47eca011e32b52c71005ad8a8f75e1b44c92c99fd12e43bccfe571e3c2d13d2e9a826a550f5ff63b247af471", "", 1, []interface{}{[]byte("test://TestReadMessage/success-2204f3d89e5a"), nil}, 1, "simple.golden.eml", nil, }, } for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { decrypter := ciphertest.NewMockDecrypter(mockCtrl) decrypter.EXPECT().Decrypt(gomock.Any()).Return(tc.decrypterLocationRet...).Times(tc.decrypterLocationCalls) decrypted, _ := ioutil.ReadFile("./testdata/" + tc.decrypterFile) decrypter.EXPECT().Decrypt(gomock.Any()).Return(decrypted, tc.decrypterContentsError).Times(tc.decrypterContentsCalls) actual, err := mailbox.ReadMessage(tc.txData, decrypter) _ = actual if tc.err == "" { assert.NoError(err) assert.Equal(tc.expectedID, actual.ID.HexString()) } if tc.err != "" { assert.EqualError(err, tc.err) } }) } }
main.rs
use kosem_server::http_server::run_server; #[actix_rt::main] async fn
() -> Result<(), String> { flexi_logger::Logger::with_env_or_str("warn") .start().map_err(|e| format!("{}", e))?; let mut settings = config::Config::default(); settings.merge(config::File::with_name("KosemServer.toml")).map_err(|e| format!("{}", e))?; let config = settings.try_into().map_err(|e| e.to_string())?; // log::warn!("{:?}", settings.try_into::<server_config::ServerConfig>()); run_server(config).await; Ok(()) }
main
upload.go
// Copyright 2018-2020 CERN // // 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. // // In applying this license, CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. package localfs import ( "context" "encoding/json" "io" "io/ioutil" "os" "path/filepath" userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/errtypes" "github.com/cs3org/reva/pkg/storage/utils/chunking" "github.com/cs3org/reva/pkg/user" "github.com/google/uuid" "github.com/pkg/errors" tusd "github.com/tus/tusd/pkg/handler" ) var defaultFilePerm = os.FileMode(0664) func (fs *localfs) Upload(ctx context.Context, ref *provider.Reference, r io.ReadCloser) error { upload, err := fs.GetUpload(ctx, ref.GetPath()) if err != nil { // Upload corresponding to this ID was not found. // Assume that this corresponds to the resource path to which the file has to be uploaded. // Set the length to 0 and set SizeIsDeferred to true metadata := map[string]string{"sizedeferred": "true"} uploadID, err := fs.InitiateUpload(ctx, ref, 0, metadata) if err != nil { return err } if upload, err = fs.GetUpload(ctx, uploadID); err != nil { return errors.Wrap(err, "localfs: error retrieving upload") } } uploadInfo := upload.(*fileUpload) p := uploadInfo.info.Storage["InternalDestination"] ok, err := chunking.IsChunked(p) if err != nil { return errors.Wrap(err, "localfs: error checking path") } if ok { var assembledFile string p, assembledFile, err = fs.chunkHandler.WriteChunk(p, r) if err != nil { return err } if p == "" { if err = uploadInfo.Terminate(ctx); err != nil { return errors.Wrap(err, "localfs: error removing auxiliary files") } return errtypes.PartialContent(ref.String()) } uploadInfo.info.Storage["InternalDestination"] = p fd, err := os.Open(assembledFile) if err != nil { return errors.Wrap(err, "localfs: error opening assembled file") } defer fd.Close() defer os.RemoveAll(assembledFile) r = fd } if _, err := uploadInfo.WriteChunk(ctx, 0, r); err != nil { return errors.Wrap(err, "localfs: error writing to binary file") } return uploadInfo.FinishUpload(ctx) } // InitiateUpload returns an upload id that can be used for uploads with tus // It resolves the resource and then reuses the NewUpload function // Currently requires the uploadLength to be set // TODO to implement LengthDeferrerDataStore make size optional // TODO read optional content for small files in this request func (fs *localfs) InitiateUpload(ctx context.Context, ref *provider.Reference, uploadLength int64, metadata map[string]string) (uploadID string, err error) { np, err := fs.resolve(ctx, ref) if err != nil { return "", errors.Wrap(err, "localfs: error resolving reference") } info := tusd.FileInfo{ MetaData: tusd.MetaData{ "filename": filepath.Base(np), "dir": filepath.Dir(np), }, Size: uploadLength, } if metadata != nil { if metadata["mtime"] != "" { info.MetaData["mtime"] = metadata["mtime"] } if _, ok := metadata["sizedeferred"]; ok
} upload, err := fs.NewUpload(ctx, info) if err != nil { return "", err } info, _ = upload.GetInfo(ctx) return info.ID, nil } // UseIn tells the tus upload middleware which extensions it supports. func (fs *localfs) UseIn(composer *tusd.StoreComposer) { composer.UseCore(fs) composer.UseTerminater(fs) // TODO composer.UseConcater(fs) // TODO composer.UseLengthDeferrer(fs) } // NewUpload creates a new upload using the size as the file's length. To determine where to write the binary data // the Fileinfo metadata must contain a dir and a filename. // returns a unique id which is used to identify the upload. The properties Size and MetaData will be filled. func (fs *localfs) NewUpload(ctx context.Context, info tusd.FileInfo) (upload tusd.Upload, err error) { log := appctx.GetLogger(ctx) log.Debug().Interface("info", info).Msg("localfs: NewUpload") fn := info.MetaData["filename"] if fn == "" { return nil, errors.New("localfs: missing filename in metadata") } info.MetaData["filename"] = filepath.Clean(info.MetaData["filename"]) dir := info.MetaData["dir"] if dir == "" { return nil, errors.New("localfs: missing dir in metadata") } info.MetaData["dir"] = filepath.Clean(info.MetaData["dir"]) np := fs.wrap(ctx, filepath.Join(info.MetaData["dir"], info.MetaData["filename"])) log.Debug().Interface("info", info).Msg("localfs: resolved filename") info.ID = uuid.New().String() binPath, err := fs.getUploadPath(ctx, info.ID) if err != nil { return nil, errors.Wrap(err, "localfs: error resolving upload path") } usr := user.ContextMustGetUser(ctx) info.Storage = map[string]string{ "Type": "LocalStore", "BinPath": binPath, "InternalDestination": np, "Idp": usr.Id.Idp, "UserId": usr.Id.OpaqueId, "UserName": usr.Username, "LogLevel": log.GetLevel().String(), } // Create binary file with no content file, err := os.OpenFile(binPath, os.O_CREATE|os.O_WRONLY, defaultFilePerm) if err != nil { return nil, err } defer file.Close() u := &fileUpload{ info: info, binPath: binPath, infoPath: binPath + ".info", fs: fs, ctx: ctx, } if !info.SizeIsDeferred && info.Size == 0 { log.Debug().Interface("info", info).Msg("localfs: finishing upload for empty file") // no need to create info file and finish directly err := u.FinishUpload(ctx) if err != nil { return nil, err } return u, nil } // writeInfo creates the file by itself if necessary err = u.writeInfo() if err != nil { return nil, err } return u, nil } func (fs *localfs) getUploadPath(ctx context.Context, uploadID string) (string, error) { return filepath.Join(fs.conf.Uploads, uploadID), nil } // GetUpload returns the Upload for the given upload id func (fs *localfs) GetUpload(ctx context.Context, id string) (tusd.Upload, error) { binPath, err := fs.getUploadPath(ctx, id) if err != nil { return nil, err } infoPath := binPath + ".info" info := tusd.FileInfo{} data, err := ioutil.ReadFile(infoPath) if err != nil { return nil, err } if err := json.Unmarshal(data, &info); err != nil { return nil, err } stat, err := os.Stat(binPath) if err != nil { return nil, err } info.Offset = stat.Size() u := &userpb.User{ Id: &userpb.UserId{ Idp: info.Storage["Idp"], OpaqueId: info.Storage["UserId"], }, Username: info.Storage["UserName"], } ctx = user.ContextSetUser(ctx, u) return &fileUpload{ info: info, binPath: binPath, infoPath: infoPath, fs: fs, ctx: ctx, }, nil } type fileUpload struct { // info stores the current information about the upload info tusd.FileInfo // infoPath is the path to the .info file infoPath string // binPath is the path to the binary file (which has no extension) binPath string // only fs knows how to handle metadata and versions fs *localfs // a context with a user ctx context.Context } // GetInfo returns the FileInfo func (upload *fileUpload) GetInfo(ctx context.Context) (tusd.FileInfo, error) { return upload.info, nil } // GetReader returns an io.Reader for the upload func (upload *fileUpload) GetReader(ctx context.Context) (io.Reader, error) { return os.Open(upload.binPath) } // WriteChunk writes the stream from the reader to the given offset of the upload func (upload *fileUpload) WriteChunk(ctx context.Context, offset int64, src io.Reader) (int64, error) { file, err := os.OpenFile(upload.binPath, os.O_WRONLY|os.O_APPEND, defaultFilePerm) if err != nil { return 0, err } defer file.Close() n, err := io.Copy(file, src) // If the HTTP PATCH request gets interrupted in the middle (e.g. because // the user wants to pause the upload), Go's net/http returns an io.ErrUnexpectedEOF. // However, for OwnCloudStore it's not important whether the stream has ended // on purpose or accidentally. if err != nil { if err != io.ErrUnexpectedEOF { return n, err } } upload.info.Offset += n err = upload.writeInfo() return n, err } // writeInfo updates the entire information. Everything will be overwritten. func (upload *fileUpload) writeInfo() error { data, err := json.Marshal(upload.info) if err != nil { return err } return ioutil.WriteFile(upload.infoPath, data, defaultFilePerm) } // FinishUpload finishes an upload and moves the file to the internal destination func (upload *fileUpload) FinishUpload(ctx context.Context) error { np := upload.info.Storage["InternalDestination"] // TODO check etag with If-Match header // if destination exists //if _, err := os.Stat(np); err == nil { // the local storage does not store metadata // the fileid is based on the path, so no we do not need to copy it to the new file // the local storage does not track revisions //} // if destination exists if _, err := os.Stat(np); err == nil { // create revision if err := upload.fs.archiveRevision(upload.ctx, np); err != nil { return err } } err := os.Rename(upload.binPath, np) if err != nil { return err } // only delete the upload if it was successfully written to the fs if err := os.Remove(upload.infoPath); err != nil { if !os.IsNotExist(err) { log := appctx.GetLogger(ctx) log.Err(err).Interface("info", upload.info).Msg("localfs: could not delete upload info") } } // TODO: set mtime if specified in metadata // metadata propagation is left to the storage implementation return err } // To implement the termination extension as specified in https://tus.io/protocols/resumable-upload.html#termination // - the storage needs to implement AsTerminatableUpload // - the upload needs to implement Terminate // AsTerminatableUpload returns a a TerminatableUpload func (fs *localfs) AsTerminatableUpload(upload tusd.Upload) tusd.TerminatableUpload { return upload.(*fileUpload) } // Terminate terminates the upload func (upload *fileUpload) Terminate(ctx context.Context) error { if err := os.Remove(upload.infoPath); err != nil { return err } if err := os.Remove(upload.binPath); err != nil { return err } return nil }
{ info.SizeIsDeferred = true }
game.model.ts
export class Game {
activityId: string; }
roleId: string; emojiId: string; emojiName: string; gameName: string;
test_poetcli.py
from pytest import raises from poetcli.main import PoetCLITest def test_poetcli(): # test poetcli without any subcommands or arguments with PoetCLITest() as app: app.run() assert app.exit_code == 0 def
(): # test that debug mode is functional argv = ['--debug'] with PoetCLITest(argv=argv) as app: app.run() assert app.debug is True def test_create_poem(): argv = [] with PoetCLITest(argv=argv) as app: app.run() output = app.last_rendered assert output is None
test_poetcli_debug
mod.rs
//! Futures. use Poll; use task; mod option; pub use self::option::FutureOption; #[path = "result.rs"] mod result_; pub use self::result_::{result, ok, err, FutureResult}; #[cfg(feature = "either")] mod either; /// A future represents an asychronous computation that may fail. /// /// A future is like a `Result` value that may not have finished computing /// yet. This kind of "asynchronous value" makes it possible for a thread to /// continue doing useful work while it waits for the value to become available. /// /// The ergonomics and implementation of the `Future` trait are very similar to /// the `Iterator` trait in that there is just one method you need to /// implement, but you get a whole lot of others for free as a result. These /// other methods allow you to chain together large computations based on /// futures, which will automatically handle asynchrony for you. /// /// # The `poll` method /// /// The core method of future, `poll`, *attempts* to resolve the future into a /// final value. This method does not block if the value is not ready. Instead, /// the current task is scheduled to be woken up when it's possible to make /// further progress by `poll`ing again. The wake up is performed using /// `cx.waker()`, a handle for waking up the current task. /// /// When using a future, you generally won't call `poll` directly, but instead /// use combinators to build up asynchronous computations. A complete /// computation can then be spawned onto an /// [executor](../futures_core/executor/trait.Executor.html) as a new, independent /// task that will automatically be `poll`ed to completion. /// /// # Combinators /// /// Like iterators, futures provide a large number of combinators to work with /// futures to express computations in a much more natural method than /// scheduling a number of callbacks. As with iterators, the combinators are /// zero-cost: they compile away. You can find the combinators in the /// [future-util](https://docs.rs/futures-util) crate. pub trait Future { /// A successful value type Item; /// An error type Error; /// Attempt to resolve the future to a final value, registering /// the current task for wakeup if the value is not yet available. /// /// # Return value /// /// This function returns: /// /// - `Ok(Async::Pending)` if the future is not ready yet /// - `Ok(Async::Ready(val))` with the result `val` of this future if it finished /// successfully. /// - `Err(err)` if the future is finished but resolved to an error `err`. /// /// Once a future has finished, clients should not `poll` it again. /// /// When a future is not ready yet, `poll` returns /// [`Async::Pending`](::Async). The future will *also* register the /// interest of the current task in the value being produced. For example, /// if the future represents the availability of data on a socket, then the /// task is recorded so that when data arrives, it is woken up (via /// [`cx.waker()`](::task::Context::waker). Once a task has been woken up, /// it should attempt to `poll` the future again, which may or may not /// produce a final value. /// /// Note that if `Pending` is returned it only means that the *current* task /// (represented by the argument `cx`) will receive a notification. Tasks /// from previous calls to `poll` will *not* receive notifications. /// /// # Runtime characteristics /// /// Futures alone are *inert*; they must be *actively* `poll`ed to make /// progress, meaning that each time the current task is woken up, it should /// actively re-`poll` pending futures that it still has an interest in. /// Usually this is done by building up a large computation as a single /// future (using combinators), then spawning that future as a *task* onto /// an [executor](../futures_core/executor/trait.Executor.html). Executors /// ensure that each task is `poll`ed every time a future internal to that /// task is ready to make progress. /// /// The `poll` function is not called repeatedly in a tight loop for /// futures, but only whenever the future itself is ready, as signaled via /// [`cx.waker()`](::task::Context::waker). If you're familiar with the /// `poll(2)` or `select(2)` syscalls on Unix it's worth noting that futures /// typically do *not* suffer the same problems of "all wakeups must poll /// all events"; they are more like `epoll(4)`. /// /// An implementation of `poll` should strive to return quickly, and must /// *never* block. Returning quickly prevents unnecessarily clogging up /// threads or event loops. If it is known ahead of time that a call to /// `poll` may end up taking awhile, the work should be offloaded to a /// thread pool (or something similar) to ensure that `poll` can return /// quickly. /// /// # Errors /// /// This future may have failed to finish the computation, in which case /// the `Err` variant will be returned with an appropriate payload of an /// error. /// /// # Panics /// /// Once a future has completed (returned `Ready` or `Err` from `poll`), /// then any future calls to `poll` may panic, block forever, or otherwise /// cause bad behavior. The `Future` trait itself provides no guarantees /// about the behavior of `poll` after a future has completed. /// /// Callers who may call `poll` too many times may want to consider using /// the `fuse` adaptor which defines the behavior of `poll`, but comes with /// a little bit of extra cost. fn poll(&mut self, cx: &mut task::Context) -> Poll<Self::Item, Self::Error>; } impl<'a, F: ?Sized + Future> Future for &'a mut F { type Item = F::Item; type Error = F::Error; fn poll(&mut self, cx: &mut task::Context) -> Poll<Self::Item, Self::Error> { (**self).poll(cx) } } if_std! { impl<F: ?Sized + Future> Future for ::std::boxed::Box<F> { type Item = F::Item; type Error = F::Error; fn poll(&mut self, cx: &mut task::Context) -> Poll<Self::Item, Self::Error> { (**self).poll(cx) } } #[cfg(feature = "nightly")] impl<F: ?Sized + Future> Future for ::std::boxed::PinBox<F> { type Item = F::Item; type Error = F::Error; fn poll(&mut self, cx: &mut task::Context) -> Poll<Self::Item, Self::Error> { unsafe { ::core::mem::Pin::get_mut(&mut self.as_pin()).poll(cx) } } } impl<F: Future> Future for ::std::panic::AssertUnwindSafe<F> { type Item = F::Item; type Error = F::Error; fn poll(&mut self, cx: &mut task::Context) -> Poll<F::Item, F::Error> { self.0.poll(cx) } } } /// Types that can be converted into a future. /// /// This trait is very similar to the `IntoIterator` trait. pub trait IntoFuture { /// The future that this type can be converted into. type Future: Future<Item=Self::Item, Error=Self::Error>; /// The item that the future may resolve with. type Item; /// The error that the future may resolve with. type Error; /// Consumes this object and produces a future. fn into_future(self) -> Self::Future; } impl<F> IntoFuture for F where F: Future { type Future = Self; type Item = <Self as Future>::Item; type Error = <Self as Future>::Error; fn
(self) -> Self { self } }
into_future
multi_parts_upload_object.go
package cos import ( "bytes" "context" "errors" "fmt" "io/ioutil" "net/http" "net/url" "os" "strings" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/tencentyun/cos-go-sdk-v5" ) type CosTestSuite struct { suite.Suite VariableThatShouldStartAtFive int // CI client Client *cos.Client // Copy source client CClient *cos.Client // test_object TestObject string // special_file_name SepFileName string } var ( UploadID string PartETag string ) // 初始化分片上传 func (s *CosTestSuite) initMultiUpload() { client := s.Client //.cssg-snippet-body-start:[init-multi-upload] name := "exampleobject" // 可选opt,如果不是必要操作,建议上传文件时不要给单个文件设置权限,避免达到限制。若不设置默认继承桶的权限。 v, _, err := client.Object.InitiateMultipartUpload(context.Background(), name, nil) if err != nil { panic(err) } UploadID = v.UploadID //.cssg-snippet-body-end } // 列出所有未完成的分片上传任务 func (s *CosTestSuite) listMultiUpload() { client := s.Client //.cssg-snippet-body-start:[list-multi-upload] _, _, err := client.Bucket.ListMultipartUploads(context.Background(), nil) if err != nil { panic(err) } //.cssg-snippet-body-end } // 上传一个分片 func (s *CosTestSuite) uploadPart() { client := s.Client //.cssg-snippet-body-start:[upload-part] // 注意,上传分块的块数最多10000块 key := "exampleobject" f := strings.NewReader("test hello") // opt可选 resp, err := client.Object.UploadPart( context.Background(), key, UploadID, 1, f, nil, ) if err != nil { panic(err) } PartETag = resp.Header.Get("ETag") //.cssg-snippet-body-end } // 列出已上传的分片 func (s *CosTestSuite) listParts() { client := s.Client //.cssg-snippet-body-start:[list-parts] key := "exampleobject" _, _, err := client.Object.ListParts(context.Background(), key, UploadID, nil) if err != nil { panic(err) } //.cssg-snippet-body-end } // 完成分片上传任务 func (s *CosTestSuite) completeMultiUpload() { client := s.Client //.cssg-snippet-body-start:[complete-multi-upload] // 完成分块上传 key := "exampleobject" uploadID := UploadID opt := &cos.CompleteMultipartUploadOptions{} opt.Parts = append(opt.Parts, cos.Object{ PartNumber: 1, ETag: PartETag}, ) _, _, err := client.Object.CompleteMultipartUpload( context.Background(), key, uploadID, opt, ) if err != nil { panic(err) } //.cssg-snippet-body-end } //.cssg-methods-pragma func TestCOSTestSuite(t *testing.T) { suite.Run(t, new(CosTestSuite)) } func (s *CosTestSuite) TestMultiPartsUploadObject() { // 将 examplebucket-1250000000 和 ap-guangzhou 修改为真实的信息 u, _ := url.Parse("https://examplebucket-12500000
hou.myqcloud.com") b := &cos.BaseURL{BucketURL: u} c := cos.NewClient(b, &http.Client{ Transport: &cos.AuthorizationTransport{ SecretID: os.Getenv("COS_KEY"), SecretKey: os.Getenv("COS_SECRET"), }, }) s.Client = c // 初始化分片上传 s.initMultiUpload() // 列出所有未完成的分片上传任务 s.listMultiUpload() // 上传一个分片 s.uploadPart() // 列出已上传的分片 s.listParts() // 完成分片上传任务 s.completeMultiUpload() //.cssg-methods-pragma }
00.cos.ap-guangz
backend-test.js
const { describe, it } = require('mocha'); const { expect } = require('chai'); const { SodiumPlus, X25519SecretKey, X25519PublicKey } = require('../index'); let sodium; describe('Backend', () => { it('crypto_box_keypair_from_secretkey_and_publickey', async function () { if (!sodium) sodium = await SodiumPlus.auto(); let a = Buffer.alloc(32); let b = Buffer.alloc(32); let c = Buffer.alloc(31); let d = await sodium.crypto_box_keypair_from_secretkey_and_publickey( new X25519SecretKey(a), new X25519PublicKey(b) ); expect(64).to.be.equal(d.buffer.length); expect(() => { sodium.crypto_box_keypair_from_secretkey_and_publickey( new X25519SecretKey(c), new X25519PublicKey(b) ) .then(() => {}) .catch((e) => { throw e }); }).to.throw('X25519 secret keys must be 32 bytes long'); expect(() => { sodium.crypto_box_keypair_from_secretkey_and_publickey( new X25519SecretKey(a), new X25519PublicKey(c) )
.then(() => {}) .catch((e) => { throw e }); }).to.throw('X25519 public keys must be 32 bytes long'); }); });
input_latest_events.go
// Copyright 2017 Vector Creations Ltd // Copyright 2018 New Vector Ltd // Copyright 2019-2020 The Matrix.org Foundation C.I.C. // // 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 input import ( "bytes" "context" "fmt" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/state" "github.com/matrix-org/dendrite/roomserver/storage/shared" "github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/sirupsen/logrus" ) // updateLatestEvents updates the list of latest events for this room in the database and writes the // event to the output log. // The latest events are the events that aren't referenced by another event in the database: // // Time goes down the page. 1 is the m.room.create event (root). // // 1 After storing 1 the latest events are {1} // | After storing 2 the latest events are {2} // 2 After storing 3 the latest events are {3} // / \ After storing 4 the latest events are {3,4} // 3 4 After storing 5 the latest events are {5,4} // | | After storing 6 the latest events are {5,6} // 5 6 <--- latest After storing 7 the latest events are {6,7} // | // 7 <----- latest // // Can only be called once at a time func (r *Inputer) updateLatestEvents( ctx context.Context, roomInfo *types.RoomInfo, stateAtEvent types.StateAtEvent, event gomatrixserverlib.Event, sendAsServer string, transactionID *api.TransactionID, rewritesState bool, ) (err error) { updater, err := r.DB.GetLatestEventsForUpdate(ctx, *roomInfo) if err != nil { return fmt.Errorf("r.DB.GetLatestEventsForUpdate: %w", err) } succeeded := false defer sqlutil.EndTransactionWithCheck(updater, &succeeded, &err) u := latestEventsUpdater{ ctx: ctx, api: r, updater: updater, roomInfo: roomInfo, stateAtEvent: stateAtEvent, event: event, sendAsServer: sendAsServer, transactionID: transactionID, rewritesState: rewritesState, } if err = u.doUpdateLatestEvents(); err != nil { return fmt.Errorf("u.doUpdateLatestEvents: %w", err) } succeeded = true return } // latestEventsUpdater tracks the state used to update the latest events in the // room. It mostly just ferries state between the various function calls. // The state could be passed using function arguments, but it becomes impractical // when there are so many variables to pass around. type latestEventsUpdater struct { ctx context.Context api *Inputer updater *shared.LatestEventsUpdater roomInfo *types.RoomInfo stateAtEvent types.StateAtEvent event gomatrixserverlib.Event transactionID *api.TransactionID rewritesState bool // Which server to send this event as. sendAsServer string // The eventID of the event that was processed before this one. lastEventIDSent string // The latest events in the room after processing this event. latest []types.StateAtEventAndReference // The state entries removed from and added to the current state of the // room as a result of processing this event. They are sorted lists. removed []types.StateEntry added []types.StateEntry // The state entries that are removed and added to recover the state before // the event being processed. They are sorted lists. stateBeforeEventRemoves []types.StateEntry stateBeforeEventAdds []types.StateEntry // The snapshots of current state before and after processing this event oldStateNID types.StateSnapshotNID newStateNID types.StateSnapshotNID } func (u *latestEventsUpdater) doUpdateLatestEvents() error { u.lastEventIDSent = u.updater.LastEventIDSent() u.oldStateNID = u.updater.CurrentStateSnapshotNID() // If we are doing a regular event update then we will get the // previous latest events to use as a part of the calculation. If // we are overwriting the latest events because we have a complete // state snapshot from somewhere else, e.g. a federated room join, // then start with an empty set - none of the forward extremities // that we knew about before matter anymore. oldLatest := []types.StateAtEventAndReference{} if !u.stateAtEvent.Overwrite { oldLatest = u.updater.LatestEvents() } // If the event has already been written to the output log then we // don't need to do anything, as we've handled it already.
return nil } // Work out what the latest events are. This will include the new // event if it is not already referenced. if err := u.calculateLatest( oldLatest, types.StateAtEventAndReference{ EventReference: u.event.EventReference(), StateAtEvent: u.stateAtEvent, }, ); err != nil { return fmt.Errorf("u.calculateLatest: %w", err) } // Now that we know what the latest events are, it's time to get the // latest state. if err := u.latestState(); err != nil { return fmt.Errorf("u.latestState: %w", err) } // If we need to generate any output events then here's where we do it. // TODO: Move this! updates, err := u.api.updateMemberships(u.ctx, u.updater, u.removed, u.added) if err != nil { return fmt.Errorf("u.api.updateMemberships: %w", err) } update, err := u.makeOutputNewRoomEvent() if err != nil { return fmt.Errorf("u.makeOutputNewRoomEvent: %w", err) } updates = append(updates, *update) // Send the event to the output logs. // We do this inside the database transaction to ensure that we only mark an event as sent if we sent it. // (n.b. this means that it's possible that the same event will be sent twice if the transaction fails but // the write to the output log succeeds) // TODO: This assumes that writing the event to the output log is synchronous. It should be possible to // send the event asynchronously but we would need to ensure that 1) the events are written to the log in // the correct order, 2) that pending writes are resent across restarts. In order to avoid writing all the // necessary bookkeeping we'll keep the event sending synchronous for now. if err = u.api.WriteOutputEvents(u.event.RoomID(), updates); err != nil { return fmt.Errorf("u.api.WriteOutputEvents: %w", err) } if err = u.updater.SetLatestEvents(u.roomInfo.RoomNID, u.latest, u.stateAtEvent.EventNID, u.newStateNID); err != nil { return fmt.Errorf("u.updater.SetLatestEvents: %w", err) } if err = u.updater.MarkEventAsSent(u.stateAtEvent.EventNID); err != nil { return fmt.Errorf("u.updater.MarkEventAsSent: %w", err) } return nil } func (u *latestEventsUpdater) latestState() error { var err error roomState := state.NewStateResolution(u.api.DB, *u.roomInfo) // Get a list of the current latest events. This may or may not // include the new event from the input path, depending on whether // it is a forward extremity or not. latestStateAtEvents := make([]types.StateAtEvent, len(u.latest)) for i := range u.latest { latestStateAtEvents[i] = u.latest[i].StateAtEvent } // Takes the NIDs of the latest events and creates a state snapshot // of the state after the events. The snapshot state will be resolved // using the correct state resolution algorithm for the room. u.newStateNID, err = roomState.CalculateAndStoreStateAfterEvents( u.ctx, latestStateAtEvents, ) if err != nil { return fmt.Errorf("roomState.CalculateAndStoreStateAfterEvents: %w", err) } // If we are overwriting the state then we should make sure that we // don't send anything out over federation again, it will very likely // be a repeat. if u.stateAtEvent.Overwrite { u.sendAsServer = "" } // Now that we have a new state snapshot based on the latest events, // we can compare that new snapshot to the previous one and see what // has changed. This gives us one list of removed state events and // another list of added ones. Replacing a value for a state-key tuple // will result one removed (the old event) and one added (the new event). u.removed, u.added, err = roomState.DifferenceBetweeenStateSnapshots( u.ctx, u.oldStateNID, u.newStateNID, ) if err != nil { return fmt.Errorf("roomState.DifferenceBetweenStateSnapshots: %w", err) } if !u.stateAtEvent.Overwrite && len(u.removed) > len(u.added) { // This really shouldn't happen. // TODO: What is ultimately the best way to handle this situation? logrus.Errorf( "Invalid state delta on event %q wants to remove %d state but only add %d state (between state snapshots %d and %d)", u.event.EventID(), len(u.removed), len(u.added), u.oldStateNID, u.newStateNID, ) u.added = u.added[:0] u.removed = u.removed[:0] u.newStateNID = u.oldStateNID return nil } // Also work out the state before the event removes and the event // adds. u.stateBeforeEventRemoves, u.stateBeforeEventAdds, err = roomState.DifferenceBetweeenStateSnapshots( u.ctx, u.newStateNID, u.stateAtEvent.BeforeStateSnapshotNID, ) if err != nil { return fmt.Errorf("roomState.DifferenceBetweeenStateSnapshots: %w", err) } return nil } // calculateLatest works out the new set of forward extremities. Returns // true if the new event is included in those extremites, false otherwise. func (u *latestEventsUpdater) calculateLatest( oldLatest []types.StateAtEventAndReference, newEvent types.StateAtEventAndReference, ) error { var newLatest []types.StateAtEventAndReference // First of all, let's see if any of the existing forward extremities // now have entries in the previous events table. If they do then we // will no longer include them as forward extremities. for _, l := range oldLatest { referenced, err := u.updater.IsReferenced(l.EventReference) if err != nil { logrus.WithError(err).Errorf("Failed to retrieve event reference for %q", l.EventID) return fmt.Errorf("u.updater.IsReferenced (old): %w", err) } else if !referenced { newLatest = append(newLatest, l) } } // Then check and see if our new event is already included in that set. // This ordinarily won't happen but it covers the edge-case that we've // already seen this event before and it's a forward extremity, so rather // than adding a duplicate, we'll just return the set as complete. for _, l := range newLatest { if l.EventReference.EventID == newEvent.EventReference.EventID && bytes.Equal(l.EventReference.EventSHA256, newEvent.EventReference.EventSHA256) { // We've already referenced this new event so we can just return // the newly completed extremities at this point. u.latest = newLatest return nil } } // At this point we've processed the old extremities, and we've checked // that our new event isn't already in that set. Therefore now we can // check if our *new* event is a forward extremity, and if it is, add // it in. referenced, err := u.updater.IsReferenced(newEvent.EventReference) if err != nil { logrus.WithError(err).Errorf("Failed to retrieve event reference for %q", newEvent.EventReference.EventID) return fmt.Errorf("u.updater.IsReferenced (new): %w", err) } else if !referenced || len(newLatest) == 0 { newLatest = append(newLatest, newEvent) } u.latest = newLatest return nil } func (u *latestEventsUpdater) makeOutputNewRoomEvent() (*api.OutputEvent, error) { latestEventIDs := make([]string, len(u.latest)) for i := range u.latest { latestEventIDs[i] = u.latest[i].EventID } ore := api.OutputNewRoomEvent{ Event: u.event.Headered(u.roomInfo.RoomVersion), RewritesState: u.rewritesState, LastSentEventID: u.lastEventIDSent, LatestEventIDs: latestEventIDs, TransactionID: u.transactionID, } eventIDMap, err := u.stateEventMap() if err != nil { return nil, err } for _, entry := range u.added { ore.AddsStateEventIDs = append(ore.AddsStateEventIDs, eventIDMap[entry.EventNID]) } for _, entry := range u.removed { ore.RemovesStateEventIDs = append(ore.RemovesStateEventIDs, eventIDMap[entry.EventNID]) } for _, entry := range u.stateBeforeEventRemoves { ore.StateBeforeRemovesEventIDs = append(ore.StateBeforeRemovesEventIDs, eventIDMap[entry.EventNID]) } for _, entry := range u.stateBeforeEventAdds { ore.StateBeforeAddsEventIDs = append(ore.StateBeforeAddsEventIDs, eventIDMap[entry.EventNID]) } ore.SendAsServer = u.sendAsServer // include extra state events if they were added as nearly every downstream component will care about it // and we'd rather not have them all hit QueryEventsByID at the same time! if len(ore.AddsStateEventIDs) > 0 { var err error if ore.AddStateEvents, err = u.extraEventsForIDs(u.roomInfo.RoomVersion, ore.AddsStateEventIDs); err != nil { return nil, fmt.Errorf("failed to load add_state_events from db: %w", err) } } // State is rewritten if the input room event HasState and we actually produced a delta on state events. // Without this check, /get_missing_events which produce events with associated (but not complete) state // will incorrectly purge the room and set it to no state. TODO: This is likely flakey, as if /gme produced // a state conflict res which just so happens to include 2+ events we might purge the room state downstream. ore.RewritesState = len(ore.AddsStateEventIDs) > 1 return &api.OutputEvent{ Type: api.OutputTypeNewRoomEvent, NewRoomEvent: &ore, }, nil } // extraEventsForIDs returns the full events for the event IDs given, but does not include the current event being // updated. func (u *latestEventsUpdater) extraEventsForIDs(roomVersion gomatrixserverlib.RoomVersion, eventIDs []string) ([]gomatrixserverlib.HeaderedEvent, error) { var extraEventIDs []string for _, e := range eventIDs { if e == u.event.EventID() { continue } extraEventIDs = append(extraEventIDs, e) } if len(extraEventIDs) == 0 { return nil, nil } extraEvents, err := u.api.DB.EventsFromIDs(u.ctx, extraEventIDs) if err != nil { return nil, err } var h []gomatrixserverlib.HeaderedEvent for _, e := range extraEvents { h = append(h, e.Headered(roomVersion)) } return h, nil } // retrieve an event nid -> event ID map for all events that need updating func (u *latestEventsUpdater) stateEventMap() (map[types.EventNID]string, error) { var stateEventNIDs []types.EventNID var allStateEntries []types.StateEntry allStateEntries = append(allStateEntries, u.added...) allStateEntries = append(allStateEntries, u.removed...) allStateEntries = append(allStateEntries, u.stateBeforeEventRemoves...) allStateEntries = append(allStateEntries, u.stateBeforeEventAdds...) for _, entry := range allStateEntries { stateEventNIDs = append(stateEventNIDs, entry.EventNID) } stateEventNIDs = stateEventNIDs[:util.SortAndUnique(eventNIDSorter(stateEventNIDs))] return u.api.DB.EventIDs(u.ctx, stateEventNIDs) } type eventNIDSorter []types.EventNID func (s eventNIDSorter) Len() int { return len(s) } func (s eventNIDSorter) Less(i, j int) bool { return s[i] < s[j] } func (s eventNIDSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
if hasBeenSent, err := u.updater.HasEventBeenSent(u.stateAtEvent.EventNID); err != nil { return fmt.Errorf("u.updater.HasEventBeenSent: %w", err) } else if hasBeenSent {
index.ts
import puppeteer, { Page, Browser } from 'puppeteer' import treeKill from 'tree-kill'; import blockedHostsList from './blocked-hosts'; import { getDurationInDays, formatDate, getCleanText, getLocationFromText, statusLog, getHostname } from './utils' import { SessionExpired } from './errors'; export interface Location { city: string | null; province: string | null; country: string | null } interface RawProfile { fullName: string | null; title: string | null; location: string | null; photo: string | null; description: string | null; url: string; } export interface Profile { fullName: string | null; title: string | null; location: Location | null; photo: string | null; description: string | null; url: string; } interface RawExperience { title: string | null; company: string | null; employmentType: string | null; location: string | null; startDate: string | null; endDate: string | null; endDateIsPresent: boolean; description: string | null; } export interface Experience { title: string | null; company: string | null; employmentType: string | null; location: Location | null; startDate: string | null; endDate: string | null; endDateIsPresent: boolean; durationInDays: number | null; description: string | null; } interface RawEducation { schoolName: string | null; degreeName: string | null; fieldOfStudy: string | null; startDate: string | null; endDate: string | null; } export interface Education { schoolName: string | null; degreeName: string | null; fieldOfStudy: string | null; startDate: string | null; endDate: string | null; durationInDays: number | null; } interface RawVolunteerExperience { title: string | null; company: string | null; startDate: string | null; endDate: string | null; endDateIsPresent: boolean; description: string | null; } export interface VolunteerExperience { title: string | null;
startDate: string | null; endDate: string | null; endDateIsPresent: boolean; durationInDays: number | null; description: string | null; } export interface Skill { skillName: string | null; endorsementCount: number | null; } interface ScraperUserDefinedOptions { /** * The LinkedIn `li_at` session cookie value. Get this value by logging in to LinkedIn with the account you want to use for scraping. * Open your browser's Dev Tools and find the cookie with the name `li_at`. Use that value here. * * This script uses a known session cookie of a successful login into LinkedIn, instead of an e-mail and password to set you logged in. * I did this because LinkedIn has security measures by blocking login requests from unknown locations or requiring you to fill in Captcha's upon login. * So, if you run this from a server and try to login with an e-mail address and password, your login could be blocked. * By using a known session, we prevent this from happening and allows you to use this scraper on any server on any location. * * You probably need to get a new session cookie value when the scraper logs show it's not logged in anymore. */ sessionCookieValue: string; /** * Set to true if you want to keep the scraper session alive. This results in faster recurring scrapes. * But keeps your memory usage high. * * Default: `false` */ keepAlive?: boolean; /** * Set a custom user agent if you like. * * Default: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36` */ userAgent?: string; /** * Use a custom timeout to set the maximum time you want to wait for the scraper * to do his job. * * Default: `10000` (10 seconds) */ timeout?: number; /** * Start the scraper in headless mode, or not. * * Default: `true` */ headless?: boolean; } interface ScraperOptions { sessionCookieValue: string; keepAlive: boolean; userAgent: string; timeout: number; headless: boolean; } async function autoScroll(page: Page) { await page.evaluate(() => { return new Promise((resolve, reject) => { var totalHeight = 0; var distance = 500; var timer = setInterval(() => { var scrollHeight = document.body.scrollHeight; window.scrollBy(0, distance); totalHeight += distance; if (totalHeight >= scrollHeight) { clearInterval(timer); resolve(); } }, 100); }); }); } export class LinkedInProfileScraper { readonly options: ScraperOptions = { sessionCookieValue: '', keepAlive: false, timeout: 10000, userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', headless: true } private browser: Browser | null = null; constructor(userDefinedOptions: ScraperUserDefinedOptions) { const logSection = 'constructing'; const errorPrefix = 'Error during setup.'; if (!userDefinedOptions.sessionCookieValue) { throw new Error(`${errorPrefix} Option "sessionCookieValue" is required.`); } if (userDefinedOptions.sessionCookieValue && typeof userDefinedOptions.sessionCookieValue !== 'string') { throw new Error(`${errorPrefix} Option "sessionCookieValue" needs to be a string.`); } if (userDefinedOptions.userAgent && typeof userDefinedOptions.userAgent !== 'string') { throw new Error(`${errorPrefix} Option "userAgent" needs to be a string.`); } if (userDefinedOptions.keepAlive !== undefined && typeof userDefinedOptions.keepAlive !== 'boolean') { throw new Error(`${errorPrefix} Option "keepAlive" needs to be a boolean.`); } if (userDefinedOptions.timeout !== undefined && typeof userDefinedOptions.timeout !== 'number') { throw new Error(`${errorPrefix} Option "timeout" needs to be a number.`); } if (userDefinedOptions.headless !== undefined && typeof userDefinedOptions.headless !== 'boolean') { throw new Error(`${errorPrefix} Option "headless" needs to be a boolean.`); } this.options = Object.assign(this.options, userDefinedOptions); statusLog(logSection, `Using options: ${JSON.stringify(this.options)}`); } public updateSessionCookie = (cookie: string) => { this.options.sessionCookieValue = cookie; } /** * Method to load Puppeteer in memory so we can re-use the browser instance. */ public setup = async () => { const logSection = 'setup' try { statusLog(logSection, `Launching puppeteer in the ${this.options.headless ? 'background' : 'foreground'}...`) this.browser = await puppeteer.launch({ headless: this.options.headless, args: [ ...(this.options.headless ? '---single-process' : '---start-maximized'), '--no-sandbox', '--disable-setuid-sandbox', "--proxy-server='direct://", '--proxy-bypass-list=*', '--disable-dev-shm-usage', '--disable-accelerated-2d-canvas', '--disable-gpu', '--disable-features=site-per-process', '--enable-features=NetworkService', '--allow-running-insecure-content', '--enable-automation', '--disable-background-timer-throttling', '--disable-backgrounding-occluded-windows', '--disable-renderer-backgrounding', '--disable-web-security', '--autoplay-policy=user-gesture-required', '--disable-background-networking', '--disable-breakpad', '--disable-client-side-phishing-detection', '--disable-component-update', '--disable-default-apps', '--disable-domain-reliability', '--disable-extensions', '--disable-features=AudioServiceOutOfProcess', '--disable-hang-monitor', '--disable-ipc-flooding-protection', '--disable-notifications', '--disable-offer-store-unmasked-wallet-cards', '--disable-popup-blocking', '--disable-print-preview', '--disable-prompt-on-repost', '--disable-speech-api', '--disable-sync', '--disk-cache-size=33554432', '--hide-scrollbars', '--ignore-gpu-blacklist', '--metrics-recording-only', '--mute-audio', '--no-default-browser-check', '--no-first-run', '--no-pings', '--no-zygote', '--password-store=basic', '--use-gl=swiftshader', '--use-mock-keychain' ], timeout: this.options.timeout }) statusLog(logSection, 'Puppeteer launched!') await this.checkIfLoggedIn(); statusLog(logSection, 'Done!') } catch (err) { // Kill Puppeteer await this.close(); statusLog(logSection, 'An error occurred during setup.') throw err } }; /** * Create a Puppeteer page with some extra settings to speed up the crawling process. */ private createPage = async (): Promise<Page> => { const logSection = 'setup page' if (!this.browser) { throw new Error('Browser not set.'); } // Important: Do not block "stylesheet", makes the crawler not work for LinkedIn const blockedResources = ['image', 'media', 'font', 'texttrack', 'object', 'beacon', 'csp_report', 'imageset']; try { const page = await this.browser.newPage() // Use already open page // This makes sure we don't have an extra open tab consuming memory const firstPage = (await this.browser.pages())[0]; await firstPage.close(); // Method to create a faster Page // From: https://github.com/shirshak55/scrapper-tools/blob/master/src/fastPage/index.ts#L113 const session = await page.target().createCDPSession() await page.setBypassCSP(true) await session.send('Page.enable'); await session.send('Page.setWebLifecycleState', { state: 'active', }); statusLog(logSection, `Blocking the following resources: ${blockedResources.join(', ')}`) // A list of hostnames that are trackers // By blocking those requests we can speed up the crawling // This is kinda what a normal adblocker does, but really simple const blockedHosts = this.getBlockedHosts(); const blockedResourcesByHost = ['script', 'xhr', 'fetch', 'document'] statusLog(logSection, `Should block scripts from ${Object.keys(blockedHosts).length} unwanted hosts to speed up the crawling.`); // Block loading of resources, like images and css, we dont need that await page.setRequestInterception(true); page.on('request', (req) => { if (blockedResources.includes(req.resourceType())) { return req.abort() } const hostname = getHostname(req.url()); // Block all script requests from certain host names if (blockedResourcesByHost.includes(req.resourceType()) && hostname && blockedHosts[hostname] === true) { statusLog('blocked script', `${req.resourceType()}: ${hostname}: ${req.url()}`); return req.abort(); } return req.continue() }) await page.setUserAgent(this.options.userAgent) await page.setViewport({ width: 1200, height: 720 }) statusLog(logSection, `Setting session cookie using cookie: ${process.env.LINKEDIN_SESSION_COOKIE_VALUE}`) await page.setCookie({ 'name': 'li_at', 'value': this.options.sessionCookieValue, 'domain': '.www.linkedin.com' }) statusLog(logSection, 'Session cookie set!') statusLog(logSection, 'Done!') return page; } catch (err) { // Kill Puppeteer await this.close(); statusLog(logSection, 'An error occurred during page setup.') statusLog(logSection, err.message) throw err } }; /** * Method to block know hosts that have some kind of tracking. * By blocking those hosts we speed up the crawling. * * More info: http://winhelp2002.mvps.org/hosts.htm */ private getBlockedHosts = (): object => { const blockedHostsArray = blockedHostsList.split('\n'); let blockedHostsObject = blockedHostsArray.reduce((prev, curr) => { const frags = curr.split(' '); if (frags.length > 1 && frags[0] === '0.0.0.0') { prev[frags[1].trim()] = true; } return prev; }, {}); blockedHostsObject = { ...blockedHostsObject, 'static.chartbeat.com': true, 'scdn.cxense.com': true, 'api.cxense.com': true, 'www.googletagmanager.com': true, 'connect.facebook.net': true, 'platform.twitter.com': true, 'tags.tiqcdn.com': true, 'dev.visualwebsiteoptimizer.com': true, 'smartlock.google.com': true, 'cdn.embedly.com': true } return blockedHostsObject; } /** * Method to complete kill any Puppeteer process still active. * Freeing up memory. */ public close = (page?: Page): Promise<void> => { return new Promise(async (resolve, reject) => { const loggerPrefix = 'close'; if (page) { try { statusLog(loggerPrefix, 'Closing page...'); await page.close(); statusLog(loggerPrefix, 'Closed page!'); } catch (err) { reject(err) } } if (this.browser) { try { statusLog(loggerPrefix, 'Closing browser...'); await this.browser.close(); statusLog(loggerPrefix, 'Closed browser!'); const browserProcessPid = this.browser.process().pid; // Completely kill the browser process to prevent zombie processes // https://docs.browserless.io/blog/2019/03/13/more-observations.html#tip-2-when-you-re-done-kill-it-with-fire if (browserProcessPid) { statusLog(loggerPrefix, `Killing browser process pid: ${browserProcessPid}...`); treeKill(browserProcessPid, 'SIGKILL', (err) => { if (err) { return reject(`Failed to kill browser process pid: ${browserProcessPid}`); } statusLog(loggerPrefix, `Killed browser pid: ${browserProcessPid} Closed browser.`); resolve() }); } } catch (err) { reject(err); } } return resolve() }) } /** * Simple method to check if the session is still active. */ public checkIfLoggedIn = async () => { const logSection = 'checkIfLoggedIn'; const page = await this.createPage(); statusLog(logSection, 'Checking if we are still logged in...') // Go to the login page of LinkedIn // If we do not get redirected and stay on /login, we are logged out // If we get redirect to /feed, we are logged in await page.goto('https://www.linkedin.com/login', { waitUntil: 'networkidle2', timeout: this.options.timeout }) const url = page.url() const isLoggedIn = !url.endsWith('/login') await page.close(); if (isLoggedIn) { statusLog(logSection, 'All good. We are still logged in.') } else { const errorMessage = 'Bad news, we are not logged in! Your session seems to be expired. Use your browser to login again with your LinkedIn credentials and extract the "li_at" cookie value for the "sessionCookieValue" option.'; statusLog(logSection, errorMessage) throw new SessionExpired(errorMessage) } }; /** * Method to scrape a user profile. */ public run = async (profileUrl: string) => { const logSection = 'run' const scraperSessionId = new Date().getTime(); if (!this.browser) { throw new Error('Browser is not set. Please run the setup method first.') } if (!profileUrl) { throw new Error('No profileUrl given.') } if (!profileUrl.includes('linkedin.com/')) { throw new Error('The given URL to scrape is not a linkedin.com url.') } try { // Eeach run has it's own page const page = await this.createPage(); statusLog(logSection, `Navigating to LinkedIn profile: ${profileUrl}`, scraperSessionId) await page.goto(profileUrl, { // Use "networkidl2" here and not "domcontentloaded". // As with "domcontentloaded" some elements might not be loaded correctly, resulting in missing data. waitUntil: 'networkidle2', timeout: this.options.timeout }); statusLog(logSection, 'LinkedIn profile page loaded!', scraperSessionId) statusLog(logSection, 'Getting all the LinkedIn profile data by scrolling the page to the bottom, so all the data gets loaded into the page...', scraperSessionId) await autoScroll(page); statusLog(logSection, 'Parsing data...', scraperSessionId) // Only click the expanding buttons when they exist const expandButtonsSelectors = [ '.pv-profile-section.pv-about-section .lt-line-clamp__more', // About '#experience-section .pv-profile-section__see-more-inline.link', // Experience '.pv-profile-section.education-section button.pv-profile-section__see-more-inline', // Education '.pv-skill-categories-section [data-control-name="skill_details"]', // Skills ]; const seeMoreButtonsSelectors = ['.pv-entity__description .lt-line-clamp__line.lt-line-clamp__line--last .lt-line-clamp__more[href="#"]', '.lt-line-clamp__more[href="#"]:not(.lt-line-clamp__ellipsis--dummy)'] statusLog(logSection, 'Expanding all sections by clicking their "See more" buttons', scraperSessionId) for (const buttonSelector of expandButtonsSelectors) { try { if (await page.$(buttonSelector) !== null) { statusLog(logSection, `Clicking button ${buttonSelector}`, scraperSessionId) await page.click(buttonSelector); } } catch (err) { statusLog(logSection, `Could not find or click expand button selector "${buttonSelector}". So we skip that one.`, scraperSessionId) } } // To give a little room to let data appear. Setting this to 0 might result in "Node is detached from document" errors await page.waitFor(100); statusLog(logSection, 'Expanding all descriptions by clicking their "See more" buttons', scraperSessionId) for (const seeMoreButtonSelector of seeMoreButtonsSelectors) { const buttons = await page.$$(seeMoreButtonSelector) for (const button of buttons) { if (button) { try { statusLog(logSection, `Clicking button ${seeMoreButtonSelector}`, scraperSessionId) await button.click() } catch (err) { statusLog(logSection, `Could not find or click see more button selector "${button}". So we skip that one.`, scraperSessionId) } } } } statusLog(logSection, 'Parsing profile data...', scraperSessionId) const rawUserProfileData: RawProfile = await page.evaluate(() => { const profileSection = document.querySelector('.pv-top-card') const url = window.location.href const fullNameElement = profileSection?.querySelector('.pv-top-card--list li:first-child') const fullName = fullNameElement?.textContent || null const titleElement = profileSection?.querySelector('h2') const title = titleElement?.textContent || null const locationElement = profileSection?.querySelector('.pv-top-card--list.pv-top-card--list-bullet.mt1 li:first-child') const location = locationElement?.textContent || null const photoElement = profileSection?.querySelector('.pv-top-card__photo') || profileSection?.querySelector('.profile-photo-edit__preview') const photo = photoElement?.getAttribute('src') || null const descriptionElement = document.querySelector('.pv-about__summary-text .lt-line-clamp__raw-line') // Is outside "profileSection" const description = descriptionElement?.textContent || null return { fullName, title, location, photo, description, url } as RawProfile }) // Convert the raw data to clean data using our utils // So we don't have to inject our util methods inside the browser context, which is too damn difficult using TypeScript const userProfile: Profile = { ...rawUserProfileData, fullName: getCleanText(rawUserProfileData.fullName), title: getCleanText(rawUserProfileData.title), location: rawUserProfileData.location ? getLocationFromText(rawUserProfileData.location) : null, description: getCleanText(rawUserProfileData.description), } statusLog(logSection, `Got user profile data: ${JSON.stringify(userProfile)}`, scraperSessionId) statusLog(logSection, `Parsing experiences data...`, scraperSessionId) const rawExperiencesData: RawExperience[] = await page.$$eval('#experience-section ul > .ember-view', (nodes) => { let data: RawExperience[] = [] // Using a for loop so we can use await inside of it for (const node of nodes) { const titleElement = node.querySelector('h3'); const title = titleElement?.textContent || null const employmentTypeElement = node.querySelector('span.pv-entity__secondary-title'); const employmentType = employmentTypeElement?.textContent || null const companyElement = node.querySelector('.pv-entity__secondary-title'); const companyElementClean = companyElement && companyElement?.querySelector('span') ? companyElement?.removeChild(companyElement.querySelector('span') as Node) && companyElement : companyElement || null; const company = companyElementClean?.textContent || null const descriptionElement = node.querySelector('.pv-entity__description'); const description = descriptionElement?.textContent || null const dateRangeElement = node.querySelector('.pv-entity__date-range span:nth-child(2)'); const dateRangeText = dateRangeElement?.textContent || null const startDatePart = dateRangeText?.split('–')[0] || null; const startDate = startDatePart?.trim() || null; const endDatePart = dateRangeText?.split('–')[1] || null; const endDateIsPresent = endDatePart?.trim().toLowerCase() === 'present' || false; const endDate = (endDatePart && !endDateIsPresent) ? endDatePart.trim() : 'Present'; const locationElement = node.querySelector('.pv-entity__location span:nth-child(2)'); const location = locationElement?.textContent || null; data.push({ title, company, employmentType, location, startDate, endDate, endDateIsPresent, description }) } return data; }); // Convert the raw data to clean data using our utils // So we don't have to inject our util methods inside the browser context, which is too damn difficult using TypeScript const experiences: Experience[] = rawExperiencesData.map((rawExperience) => { const startDate = formatDate(rawExperience.startDate); const endDate = formatDate(rawExperience.endDate) || null; const endDateIsPresent = rawExperience.endDateIsPresent; const durationInDaysWithEndDate = (startDate && endDate && !endDateIsPresent) ? getDurationInDays(startDate, endDate) : null const durationInDaysForPresentDate = (endDateIsPresent && startDate) ? getDurationInDays(startDate, new Date()) : null const durationInDays = endDateIsPresent ? durationInDaysForPresentDate : durationInDaysWithEndDate; return { ...rawExperience, title: getCleanText(rawExperience.title), company: getCleanText(rawExperience.company), employmentType: getCleanText(rawExperience.employmentType), location: rawExperience?.location ? getLocationFromText(rawExperience.location) : null, startDate, endDate, endDateIsPresent, durationInDays, description: getCleanText(rawExperience.description) } }) statusLog(logSection, `Got experiences data: ${JSON.stringify(experiences)}`, scraperSessionId) statusLog(logSection, `Parsing education data...`, scraperSessionId) let rawEducationData: RawEducation[] = await page.$$eval('#education-section ul > .ember-view', (nodes) => { // Note: the $$eval context is the browser context. // So custom methods you define in this file are not available within this $$eval. let data: RawEducation[] = [] for (const node of nodes) { const schoolNameElement = node.querySelector('h3.pv-entity__school-name'); const schoolName = schoolNameElement?.textContent || null; const degreeNameElement = node.querySelector('.pv-entity__degree-name .pv-entity__comma-item'); const degreeName = degreeNameElement?.textContent || null; const fieldOfStudyElement = node.querySelector('.pv-entity__fos .pv-entity__comma-item'); const fieldOfStudy = fieldOfStudyElement?.textContent || null; // const gradeElement = node.querySelector('.pv-entity__grade .pv-entity__comma-item'); // const grade = (gradeElement && gradeElement.textContent) ? window.getCleanText(fieldOfStudyElement.textContent) : null; const dateRangeElement = node.querySelectorAll('.pv-entity__dates time'); const startDatePart = dateRangeElement && dateRangeElement[0]?.textContent || null; const startDate = startDatePart || null const endDatePart = dateRangeElement && dateRangeElement[1]?.textContent || null; const endDate = endDatePart || null data.push({ schoolName, degreeName, fieldOfStudy, startDate, endDate }) } return data }); const rawCertificationData: RawEducation[] = await page.$$eval('#certifications-section ul > .ember-view', (nodes) => { let data: RawEducation[] = [] for (const node of nodes) { const schoolNameElement = node.querySelector('.pv-certifications__summary-info > p:nth-child(1) > span:nth-child(2)'); const schoolName = schoolNameElement?.textContent || null; data.push({ schoolName, degreeName: null, fieldOfStudy: null, startDate: null, endDate: null }) } return data }) statusLog(logSection, `Got certification data: ${JSON.stringify(rawCertificationData)}`, scraperSessionId) rawEducationData = rawEducationData.concat(rawCertificationData) // Convert the raw data to clean data using our utils // So we don't have to inject our util methods inside the browser context, which is too damn difficult using TypeScript const education: Education[] = rawEducationData.map(rawEducation => { const startDate = formatDate(rawEducation.startDate) const endDate = formatDate(rawEducation.endDate) return { ...rawEducation, schoolName: getCleanText(rawEducation.schoolName), degreeName: getCleanText(rawEducation.degreeName), fieldOfStudy: getCleanText(rawEducation.fieldOfStudy), startDate, endDate, durationInDays: getDurationInDays(startDate, endDate), } }) statusLog(logSection, `Got education data: ${JSON.stringify(education)}`, scraperSessionId) statusLog(logSection, `Parsing volunteer experience data...`, scraperSessionId) const rawVolunteerExperiences: RawVolunteerExperience[] = await page.$$eval('.pv-profile-section.volunteering-section ul > li.ember-view', (nodes) => { // Note: the $$eval context is the browser context. // So custom methods you define in this file are not available within this $$eval. let data: RawVolunteerExperience[] = [] for (const node of nodes) { const titleElement = node.querySelector('.pv-entity__summary-info h3'); const title = titleElement?.textContent || null; const companyElement = node.querySelector('.pv-entity__summary-info span.pv-entity__secondary-title'); const company = companyElement?.textContent || null; const dateRangeElement = node.querySelector('.pv-entity__date-range span:nth-child(2)'); const dateRangeText = dateRangeElement?.textContent || null const startDatePart = dateRangeText?.split('–')[0] || null; const startDate = startDatePart?.trim() || null; const endDatePart = dateRangeText?.split('–')[1] || null; const endDateIsPresent = endDatePart?.trim().toLowerCase() === 'present' || false; const endDate = (endDatePart && !endDateIsPresent) ? endDatePart.trim() : 'Present'; const descriptionElement = node.querySelector('.pv-entity__description') const description = descriptionElement?.textContent || null; data.push({ title, company, startDate, endDate, endDateIsPresent, description }) } return data }); // Convert the raw data to clean data using our utils // So we don't have to inject our util methods inside the browser context, which is too damn difficult using TypeScript const volunteerExperiences: VolunteerExperience[] = rawVolunteerExperiences.map(rawVolunteerExperience => { const startDate = formatDate(rawVolunteerExperience.startDate) const endDate = formatDate(rawVolunteerExperience.endDate) return { ...rawVolunteerExperience, title: getCleanText(rawVolunteerExperience.title), company: getCleanText(rawVolunteerExperience.company), description: getCleanText(rawVolunteerExperience.description), startDate, endDate, durationInDays: getDurationInDays(startDate, endDate), } }) statusLog(logSection, `Got volunteer experience data: ${JSON.stringify(volunteerExperiences)}`, scraperSessionId) statusLog(logSection, `Parsing skills data...`, scraperSessionId) const skills: Skill[] = await page.$$eval('.pv-skill-categories-section ol > .ember-view', nodes => { // Note: the $$eval context is the browser context. // So custom methods you define in this file are not available within this $$eval. return nodes.map((node) => { const skillName = node.querySelector('.pv-skill-category-entity__name-text'); const endorsementCount = node.querySelector('.pv-skill-category-entity__endorsement-count'); return { skillName: (skillName) ? skillName.textContent?.trim() : null, endorsementCount: (endorsementCount) ? parseInt(endorsementCount.textContent?.trim() || '0') : 0 } as Skill; }) as Skill[] }); statusLog(logSection, `Got skills data: ${JSON.stringify(skills)}`, scraperSessionId) statusLog(logSection, `Done! Returned profile details for: ${profileUrl}`, scraperSessionId) if (!this.options.keepAlive) { statusLog(logSection, 'Not keeping the session alive.') await this.close(page) statusLog(logSection, 'Done. Puppeteer is closed.') } else { statusLog(logSection, 'Done. Puppeteer is being kept alive in memory.') // Only close the current page, we do not need it anymore await page.close() } return { userProfile, experiences, education, volunteerExperiences, skills } } catch (err) { // Kill Puppeteer await this.close() statusLog(logSection, 'An error occurred during a run.') // Throw the error up, allowing the user to handle this error himself. throw err; } } }
company: string | null;
CreateWorldTemplateCommand.ts
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { FinalizeHandlerArguments, Handler, HandlerExecutionContext, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, SerdeContext as __SerdeContext, } from "@aws-sdk/types"; import { CreateWorldTemplateRequest, CreateWorldTemplateResponse } from "../models/models_0"; import { deserializeAws_restJson1CreateWorldTemplateCommand, serializeAws_restJson1CreateWorldTemplateCommand, } from "../protocols/Aws_restJson1"; import { RoboMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RoboMakerClient"; export interface CreateWorldTemplateCommandInput extends CreateWorldTemplateRequest {} export interface CreateWorldTemplateCommandOutput extends CreateWorldTemplateResponse, __MetadataBearer {} /** * <p>Creates a world template.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RoboMakerClient, CreateWorldTemplateCommand } from "@aws-sdk/client-robomaker"; // ES Modules import * // const { RoboMakerClient, CreateWorldTemplateCommand } = require("@aws-sdk/client-robomaker"); // CommonJS import * const client = new RoboMakerClient(config); * const command = new CreateWorldTemplateCommand(input); * const response = await client.send(command); * ``` * * @see {@link CreateWorldTemplateCommandInput} for command's `input` shape. * @see {@link CreateWorldTemplateCommandOutput} for command's `response` shape. * @see {@link RoboMakerClientResolvedConfig | config} for command's `input` shape. * */ export class CreateWorldTemplateCommand extends $Command< CreateWorldTemplateCommandInput, CreateWorldTemplateCommandOutput, RoboMakerClientResolvedConfig > { // Start section: command_properties // End section: command_properties constructor(readonly input: CreateWorldTemplateCommandInput) { // Start section: command_constructor super(); // End section: command_constructor } /** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: RoboMakerClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<CreateWorldTemplateCommandInput, CreateWorldTemplateCommandOutput> { this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "RoboMakerClient"; const commandName = "CreateWorldTemplateCommand"; const handlerExecutionContext: HandlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: CreateWorldTemplateRequest.filterSensitiveLog, outputFilterSensitiveLog: CreateWorldTemplateResponse.filterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve( (request: FinalizeHandlerArguments<any>) => requestHandler.handle(request.request as __HttpRequest, options || {}), handlerExecutionContext ); } private serialize(input: CreateWorldTemplateCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_restJson1CreateWorldTemplateCommand(input, context);
} // Start section: command_body_extra // End section: command_body_extra }
} private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateWorldTemplateCommandOutput> { return deserializeAws_restJson1CreateWorldTemplateCommand(output, context);
wait.go
package wait import ( "context" "fmt" log "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors"
"github.com/argoproj/argo/v2/workflow/executor/common" ) func UntilTerminated(ctx context.Context, kubernetesInterface kubernetes.Interface, namespace, podName, containerID string) error { log.Infof("Waiting for container %s to be terminated", containerID) podInterface := kubernetesInterface.CoreV1().Pods(namespace) listOptions := metav1.ListOptions{FieldSelector: "metadata.name=" + podName} for { done, err := untilTerminatedAux(ctx, podInterface, containerID, listOptions) if done { return err } } } func untilTerminatedAux(ctx context.Context, podInterface v1.PodInterface, containerID string, listOptions metav1.ListOptions) (bool, error) { for { timedOut, done, err := doWatch(ctx, podInterface, containerID, listOptions) if !timedOut { return done, err } log.Infof("Pod watch timed out, restarting watch on %s", containerID) } } func doWatch(ctx context.Context, podInterface v1.PodInterface, containerID string, listOptions metav1.ListOptions) (bool, bool, error) { w, err := podInterface.Watch(ctx, listOptions) if err != nil { return false, true, fmt.Errorf("could not watch pod: %w", err) } defer w.Stop() for event := range w.ResultChan() { pod, ok := event.Object.(*corev1.Pod) if !ok { return false, false, apierrors.FromObject(event.Object) } for _, s := range pod.Status.ContainerStatuses { if common.GetContainerID(&s) == containerID && s.State.Terminated != nil { return false, true, nil } } listOptions.ResourceVersion = pod.ResourceVersion } return true, false, nil }
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" v1 "k8s.io/client-go/kubernetes/typed/core/v1"
test_group.py
from infynipy.models.group import ReferrerGroup from .. import IntegrationTest, vcrr class TestReferrerGroup(IntegrationTest): @vcrr.use_cassette def test_referrer_group_get_multiple(self):
@vcrr.use_cassette def test_referrer_group_create(self): data = { "group_name": "Test3 Group", "broker_id": 20041 } group_id = self.infynity.referrer_group(data=data).create() assert isinstance(group_id, str)
for group in self.infynity.referrer_groups: assert isinstance(group, ReferrerGroup)
clientmodel_client_creation_response.py
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # justice-iam-service (5.10.1) # pylint: disable=duplicate-code # pylint: disable=line-too-long # pylint: disable=missing-function-docstring # pylint: disable=missing-module-docstring # pylint: disable=too-many-arguments # pylint: disable=too-many-branches # pylint: disable=too-many-instance-attributes # pylint: disable=too-many-lines # pylint: disable=too-many-locals # pylint: disable=too-many-public-methods # pylint: disable=too-many-return-statements # pylint: disable=too-many-statements # pylint: disable=unused-import from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from ....core import Model from ..models.accountcommon_permission import AccountcommonPermission class ClientmodelClientCreationResponse(Model): """Clientmodel client creation response (clientmodel.ClientCreationResponse) Properties: client_id: (ClientId) REQUIRED str client_name: (ClientName) REQUIRED str client_permissions: (ClientPermissions) REQUIRED List[AccountcommonPermission] namespace: (Namespace) REQUIRED str redirect_uri: (RedirectUri) REQUIRED str """ # region fields client_id: str # REQUIRED client_name: str # REQUIRED client_permissions: List[AccountcommonPermission] # REQUIRED namespace: str # REQUIRED redirect_uri: str # REQUIRED # endregion fields # region with_x methods def with_client_id(self, value: str) -> ClientmodelClientCreationResponse: self.client_id = value return self def
(self, value: str) -> ClientmodelClientCreationResponse: self.client_name = value return self def with_client_permissions(self, value: List[AccountcommonPermission]) -> ClientmodelClientCreationResponse: self.client_permissions = value return self def with_namespace(self, value: str) -> ClientmodelClientCreationResponse: self.namespace = value return self def with_redirect_uri(self, value: str) -> ClientmodelClientCreationResponse: self.redirect_uri = value return self # endregion with_x methods # region to methods def to_dict(self, include_empty: bool = False) -> dict: result: dict = {} if hasattr(self, "client_id"): result["ClientId"] = str(self.client_id) elif include_empty: result["ClientId"] = "" if hasattr(self, "client_name"): result["ClientName"] = str(self.client_name) elif include_empty: result["ClientName"] = "" if hasattr(self, "client_permissions"): result["ClientPermissions"] = [i0.to_dict(include_empty=include_empty) for i0 in self.client_permissions] elif include_empty: result["ClientPermissions"] = [] if hasattr(self, "namespace"): result["Namespace"] = str(self.namespace) elif include_empty: result["Namespace"] = "" if hasattr(self, "redirect_uri"): result["RedirectUri"] = str(self.redirect_uri) elif include_empty: result["RedirectUri"] = "" return result # endregion to methods # region static methods @classmethod def create( cls, client_id: str, client_name: str, client_permissions: List[AccountcommonPermission], namespace: str, redirect_uri: str, ) -> ClientmodelClientCreationResponse: instance = cls() instance.client_id = client_id instance.client_name = client_name instance.client_permissions = client_permissions instance.namespace = namespace instance.redirect_uri = redirect_uri return instance @classmethod def create_from_dict(cls, dict_: dict, include_empty: bool = False) -> ClientmodelClientCreationResponse: instance = cls() if not dict_: return instance if "ClientId" in dict_ and dict_["ClientId"] is not None: instance.client_id = str(dict_["ClientId"]) elif include_empty: instance.client_id = "" if "ClientName" in dict_ and dict_["ClientName"] is not None: instance.client_name = str(dict_["ClientName"]) elif include_empty: instance.client_name = "" if "ClientPermissions" in dict_ and dict_["ClientPermissions"] is not None: instance.client_permissions = [AccountcommonPermission.create_from_dict(i0, include_empty=include_empty) for i0 in dict_["ClientPermissions"]] elif include_empty: instance.client_permissions = [] if "Namespace" in dict_ and dict_["Namespace"] is not None: instance.namespace = str(dict_["Namespace"]) elif include_empty: instance.namespace = "" if "RedirectUri" in dict_ and dict_["RedirectUri"] is not None: instance.redirect_uri = str(dict_["RedirectUri"]) elif include_empty: instance.redirect_uri = "" return instance @classmethod def create_many_from_dict(cls, dict_: dict, include_empty: bool = False) -> Dict[str, ClientmodelClientCreationResponse]: return {k: cls.create_from_dict(v, include_empty=include_empty) for k, v in dict_} if dict_ else {} @classmethod def create_many_from_list(cls, list_: list, include_empty: bool = False) -> List[ClientmodelClientCreationResponse]: return [cls.create_from_dict(i, include_empty=include_empty) for i in list_] if list_ else [] @classmethod def create_from_any(cls, any_: any, include_empty: bool = False, many: bool = False) -> Union[ClientmodelClientCreationResponse, List[ClientmodelClientCreationResponse], Dict[Any, ClientmodelClientCreationResponse]]: if many: if isinstance(any_, dict): return cls.create_many_from_dict(any_, include_empty=include_empty) elif isinstance(any_, list): return cls.create_many_from_list(any_, include_empty=include_empty) else: raise ValueError() else: return cls.create_from_dict(any_, include_empty=include_empty) @staticmethod def get_field_info() -> Dict[str, str]: return { "ClientId": "client_id", "ClientName": "client_name", "ClientPermissions": "client_permissions", "Namespace": "namespace", "RedirectUri": "redirect_uri", } @staticmethod def get_required_map() -> Dict[str, bool]: return { "ClientId": True, "ClientName": True, "ClientPermissions": True, "Namespace": True, "RedirectUri": True, } # endregion static methods
with_client_name
pack_test.go
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you 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 v1 import ( "testing" "github.com/golang/protobuf/ptypes/wrappers" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" csov1 "github.com/elastic/harp/api/gen/go/cso/v1" ) var cmpOpts = []cmp.Option{ cmpopts.IgnoreUnexported(wrappers.StringValue{}), cmpopts.IgnoreUnexported(csov1.Secret{}), cmpopts.IgnoreUnexported(csov1.Meta{}), cmpopts.IgnoreUnexported(csov1.Secret_Meta{}), cmpopts.IgnoreUnexported(csov1.Secret_Infrastructure{}), cmpopts.IgnoreUnexported(csov1.Secret_Platform{}), cmpopts.IgnoreUnexported(csov1.Secret_Product{}), cmpopts.IgnoreUnexported(csov1.Secret_Application{}), cmpopts.IgnoreUnexported(csov1.Secret_Artifact{}), cmpopts.IgnoreUnexported(csov1.Infrastructure{}), cmpopts.IgnoreUnexported(csov1.Platform{}), cmpopts.IgnoreUnexported(csov1.Product{}), cmpopts.IgnoreUnexported(csov1.Application{}), cmpopts.IgnoreUnexported(csov1.Artifact{}), cmp.FilterPath( func(p cmp.Path) bool { return p.String() == "Value" }, cmp.Ignore()), } func
(t *testing.T) { testCases := []struct { desc string path string value interface{} expected *csov1.Secret wantErr bool }{ { desc: "Empty path", path: "", wantErr: true, }, { desc: "Invalid path", path: "/toto", wantErr: true, }, { desc: "Meta path", path: "meta/cso/revision", value: map[string]interface{}{ "rev": "6", }, wantErr: false, expected: &csov1.Secret{ RingLevel: csov1.RingLevel_RING_LEVEL_META, Path: &csov1.Secret_Meta{ Meta: &csov1.Meta{ Key: "cso/revision", }, }, }, }, { desc: "Infra path", path: "infra/aws/security/us-east-1/rds/adminconsole/root_creds", value: map[string]interface{}{ "user": "foo", "password": "bar", }, wantErr: false, expected: &csov1.Secret{ RingLevel: csov1.RingLevel_RING_LEVEL_INFRASTRUCTURE, Path: &csov1.Secret_Infrastructure{ Infrastructure: &csov1.Infrastructure{ CloudProvider: "aws", AccountId: "security", Region: "us-east-1", ServiceName: "rds", Key: "adminconsole/root_creds", }, }, }, }, { desc: "Platform path", path: "platform/dev/customer-1/us-east-1/adminconsole/database/creds", value: map[string]interface{}{ "user": "foo", "password": "bar", }, wantErr: false, expected: &csov1.Secret{ RingLevel: csov1.RingLevel_RING_LEVEL_PLATFORM, Path: &csov1.Secret_Platform{ Platform: &csov1.Platform{ Stage: csov1.QualityLevel_QUALITY_LEVEL_DEV, Name: "customer-1", Region: "us-east-1", ServiceName: "adminconsole", Key: "database/creds", }, }, }, }, { desc: "Product path", path: "product/ece/v1.0.0/server/http/jwt_hmac", value: map[string]interface{}{ "user": "foo", "password": "bar", }, wantErr: false, expected: &csov1.Secret{ RingLevel: csov1.RingLevel_RING_LEVEL_PRODUCT, Path: &csov1.Secret_Product{ Product: &csov1.Product{ Name: "ece", Version: "v1.0.0", ComponentName: "server", Key: "http/jwt_hmac", }, }, }, }, { desc: "Application path", path: "app/dev/customer-1/ece/v1.0.0/server/http/jwt_hmac", value: map[string]interface{}{ "user": "foo", "password": "bar", }, wantErr: false, expected: &csov1.Secret{ RingLevel: csov1.RingLevel_RING_LEVEL_APPLICATION, Path: &csov1.Secret_Application{ Application: &csov1.Application{ Stage: csov1.QualityLevel_QUALITY_LEVEL_DEV, PlatformName: "customer-1", ProductName: "ece", ProductVersion: "v1.0.0", ComponentName: "server", Key: "http/jwt_hmac", }, }, }, }, { desc: "Artifact path", path: "artifact/docker/sha256:fab2dded59dd0c2894dd9dbae71418f565be5bd0d8fd82365c16aec41c7e367f/attestations/snyk_report", value: map[string]interface{}{ "user": "foo", "password": "bar", }, wantErr: false, expected: &csov1.Secret{ RingLevel: csov1.RingLevel_RING_LEVEL_ARTIFACT, Path: &csov1.Secret_Artifact{ Artifact: &csov1.Artifact{ Type: "docker", Id: "sha256:fab2dded59dd0c2894dd9dbae71418f565be5bd0d8fd82365c16aec41c7e367f", Key: "attestations/snyk_report", }, }, }, }, } for _, tC := range testCases { t.Run(tC.desc, func(t *testing.T) { got, err := Pack(tC.path, tC.value) if (err != nil) != tC.wantErr { t.Errorf("error: got %v, but not error expected", err) } if tC.wantErr { return } if diff := cmp.Diff(got, tC.expected, cmpOpts...); diff != "" { t.Errorf("%q. Pack():\n-got/+want\ndiff %s", tC.desc, diff) } }) } }
TestCso_Pack
endpoint_test.go
package catalog import ( "context" "net" "testing" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/golang/mock/gomock" "github.com/google/uuid" access "github.com/servicemeshinterface/smi-sdk-go/pkg/apis/access/v1alpha3" tassert "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" testclient "k8s.io/client-go/kubernetes/fake" "github.com/openservicemesh/osm/pkg/configurator" "github.com/openservicemesh/osm/pkg/constants" "github.com/openservicemesh/osm/pkg/endpoint" "github.com/openservicemesh/osm/pkg/identity" "github.com/openservicemesh/osm/pkg/k8s" "github.com/openservicemesh/osm/pkg/service" "github.com/openservicemesh/osm/pkg/smi" "github.com/openservicemesh/osm/pkg/tests" ) var _ = Describe("Test catalog functions", func() { mc := newFakeMeshCatalog() Context("Testing ListEndpointsForService()", func() { It("lists endpoints for a given service", func() { actual := mc.listEndpointsForService(tests.BookstoreV1Service) expected := []endpoint.Endpoint{ tests.Endpoint, } Expect(actual).To(Equal(expected)) }) }) Context("Testing getDNSResolvableServiceEndpoints()", func() { It("returns the endpoint for the service", func() { actual := mc.getDNSResolvableServiceEndpoints(tests.BookstoreV1Service) expected := []endpoint.Endpoint{ tests.Endpoint, } Expect(actual).To(Equal(expected)) }) }) }) func TestListAllowedUpstreamEndpointsForService(t *testing.T) { assert := tassert.New(t)
testCases := []struct { name string proxyIdentity identity.ServiceIdentity upstreamSvc service.MeshService trafficTargets []*access.TrafficTarget services []service.MeshService outboundServices map[identity.ServiceIdentity][]service.MeshService outboundServiceEndpoints map[service.MeshService][]endpoint.Endpoint permissiveMode bool expectedEndpoints []endpoint.Endpoint }{ { name: `Traffic target defined for bookstore ServiceAccount. This service account has only bookstore-v1 service on it. Hence endpoints returned for bookstore-v1`, proxyIdentity: tests.BookbuyerServiceIdentity, upstreamSvc: tests.BookstoreV1Service, trafficTargets: []*access.TrafficTarget{&tests.TrafficTarget}, services: []service.MeshService{tests.BookstoreV1Service}, outboundServices: map[identity.ServiceIdentity][]service.MeshService{ tests.BookstoreServiceIdentity: {tests.BookstoreV1Service}, }, outboundServiceEndpoints: map[service.MeshService][]endpoint.Endpoint{ tests.BookstoreV1Service: {tests.Endpoint}, }, permissiveMode: false, expectedEndpoints: []endpoint.Endpoint{tests.Endpoint}, }, { name: `Traffic target defined for bookstore ServiceAccount. This service account has bookstore-v1 bookstore-v2 services, but bookstore-v2 pod has service account bookstore-v2. Hence no endpoints returned for bookstore-v2`, proxyIdentity: tests.BookbuyerServiceIdentity, upstreamSvc: tests.BookstoreV2Service, trafficTargets: []*access.TrafficTarget{&tests.TrafficTarget}, services: []service.MeshService{tests.BookstoreV1Service, tests.BookstoreV2Service}, outboundServices: map[identity.ServiceIdentity][]service.MeshService{ tests.BookstoreServiceIdentity: {tests.BookstoreV1Service, tests.BookstoreV2Service}, }, outboundServiceEndpoints: map[service.MeshService][]endpoint.Endpoint{ tests.BookstoreV1Service: {tests.Endpoint}, tests.BookstoreV2Service: {endpoint.Endpoint{ IP: net.ParseIP("9.9.9.9"), Port: endpoint.Port(tests.ServicePort), }}, }, permissiveMode: false, expectedEndpoints: []endpoint.Endpoint{}, }, { name: `Traffic target defined for bookstore ServiceAccount. This service account has bookstore-v1 bookstore-v2 services, since bookstore-v2 pod has service account bookstore-v2 which is allowed in the traffic target. Hence endpoints returned for bookstore-v2`, proxyIdentity: tests.BookbuyerServiceIdentity, upstreamSvc: tests.BookstoreV2Service, trafficTargets: []*access.TrafficTarget{&tests.TrafficTarget, &tests.BookstoreV2TrafficTarget}, services: []service.MeshService{tests.BookstoreV1Service, tests.BookstoreV2Service}, outboundServices: map[identity.ServiceIdentity][]service.MeshService{ tests.BookstoreServiceIdentity: {tests.BookstoreV1Service}, tests.BookstoreV2ServiceIdentity: {tests.BookstoreV2Service}, }, outboundServiceEndpoints: map[service.MeshService][]endpoint.Endpoint{ tests.BookstoreV1Service: {tests.Endpoint}, tests.BookstoreV2Service: {endpoint.Endpoint{ IP: net.ParseIP("9.9.9.9"), Port: endpoint.Port(tests.ServicePort), }}, }, permissiveMode: false, expectedEndpoints: []endpoint.Endpoint{{ IP: net.ParseIP("9.9.9.9"), Port: endpoint.Port(tests.ServicePort), }}, }, { name: `Permissive mode should return all endpoints for a service without filtering them`, proxyIdentity: tests.BookbuyerServiceIdentity, upstreamSvc: tests.BookstoreV2Service, outboundServiceEndpoints: map[service.MeshService][]endpoint.Endpoint{ tests.BookstoreV2Service: { { IP: net.ParseIP("1.1.1.1"), Port: 80, }, { IP: net.ParseIP("2.2.2.2"), Port: 80, }, }, }, permissiveMode: true, expectedEndpoints: []endpoint.Endpoint{ { IP: net.ParseIP("1.1.1.1"), Port: 80, }, { IP: net.ParseIP("2.2.2.2"), Port: 80, }, }, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { mockCtrl := gomock.NewController(t) kubeClient := testclient.NewSimpleClientset() defer mockCtrl.Finish() mockConfigurator := configurator.NewMockConfigurator(mockCtrl) mockKubeController := k8s.NewMockController(mockCtrl) mockEndpointProvider := endpoint.NewMockProvider(mockCtrl) mockServiceProvider := service.NewMockProvider(mockCtrl) mockMeshSpec := smi.NewMockMeshSpec(mockCtrl) mc := MeshCatalog{ kubeController: mockKubeController, meshSpec: mockMeshSpec, endpointsProviders: []endpoint.Provider{mockEndpointProvider}, serviceProviders: []service.Provider{mockServiceProvider}, configurator: mockConfigurator, } mockConfigurator.EXPECT().IsPermissiveTrafficPolicyMode().Return(tc.permissiveMode).AnyTimes() for svc, endpoints := range tc.outboundServiceEndpoints { mockEndpointProvider.EXPECT().ListEndpointsForService(svc).Return(endpoints).AnyTimes() } if tc.permissiveMode { actual := mc.ListAllowedUpstreamEndpointsForService(tc.proxyIdentity, tc.upstreamSvc) assert.ElementsMatch(actual, tc.expectedEndpoints) return } mockMeshSpec.EXPECT().ListTrafficTargets().Return(tc.trafficTargets).AnyTimes() mockEndpointProvider.EXPECT().GetID().Return("fake").AnyTimes() for sa, services := range tc.outboundServices { for _, svc := range services { k8sService := tests.NewServiceFixture(svc.Name, svc.Namespace, map[string]string{}) mockKubeController.EXPECT().GetService(svc).Return(k8sService).AnyTimes() } mockServiceProvider.EXPECT().GetServicesForServiceIdentity(sa).Return(services).AnyTimes() } var pods []*v1.Pod for serviceIdentity, services := range tc.outboundServices { // TODO(draychev): use ServiceIdentity in the rest of the tests [https://github.com/openservicemesh/osm/issues/2218] sa := serviceIdentity.ToK8sServiceAccount() for _, svc := range services { podlabels := map[string]string{ constants.AppLabel: tests.SelectorValue, constants.SidecarUniqueIDLabelName: uuid.New().String(), } pod := tests.NewPodFixture(tests.Namespace, svc.Name, sa.Name, podlabels) podEndpoints := tc.outboundServiceEndpoints[svc] var podIps []v1.PodIP for _, ep := range podEndpoints { podIps = append(podIps, v1.PodIP{IP: ep.IP.String()}) } pod.Status.PodIPs = podIps pod.Spec.ServiceAccountName = sa.Name _, err := kubeClient.CoreV1().Pods(tests.Namespace).Create(context.TODO(), &pod, metav1.CreateOptions{}) assert.Nil(err) pods = append(pods, &pod) } } mockKubeController.EXPECT().ListPods().Return(pods).AnyTimes() for sa, services := range tc.outboundServices { for _, svc := range services { podEndpoints := tc.outboundServiceEndpoints[svc] mockEndpointProvider.EXPECT().ListEndpointsForIdentity(sa).Return(podEndpoints).AnyTimes() } } actual := mc.ListAllowedUpstreamEndpointsForService(tc.proxyIdentity, tc.upstreamSvc) assert.ElementsMatch(actual, tc.expectedEndpoints) }) } }
loss_fn.py
__all__ = ["loss_fn"]
def loss_fn(preds, targets) -> torch.Tensor: return preds["loss"]
from icevision.imports import *
monitor.py
import os,sys import numpy as np # tensorboardX from tensorboardX import SummaryWriter from .visualizer import Visualizer class Logger(object): def __init__(self, log_path='', log_opt=[1,1,0], batch_size=1): self.n = batch_size self.reset() # tensorboardX self.log_tb = None self.do_print = log_opt[0]==1 if log_opt[1] > 0: self.log_tb = SummaryWriter(log_path) # txt self.log_txt = None if log_opt[2] > 0: self.log_txt = open(log_path+'/log.txt','w') # unbuffered, write instantly def reset(self): self.val = 0 self.sum = 0 self.count = 0 def update(self, val): self.val = val self.sum += val * self.n self.count += self.n def output(self,iter_total, lr): avg = self.sum / self.count if self.do_print: print('[Iteration %d] train_loss=%0.4f lr=%.5f' % (iter_total, avg, lr)) if self.log_tb is not None: self.log_tb.add_scalar('Loss', avg, iter_total) if self.log_txt is not None: self.log_txt.write("[Volume %d] train_loss=%0.4f lr=%.5f\n" % (iter_total, avg, lr)) self.log_txt.flush() return avg class Monitor(object):
"""Computes and stores the average and current value""" def __init__(self, log_path='', log_opt=[1,1,0,1], vis_opt=[0,8], iter_num=[10,100]): # log_opt: do_tb, do_txt, batch_size, log_iteration # vis_opt: vis_type, vis_iteration self.logger = Logger(log_path, log_opt[:3], log_opt[3]) self.vis = Visualizer(vis_opt[0], vis_opt[1]) self.log_iter, self.vis_iter = iter_num self.do_vis = False if self.logger.log_tb is None else True def update(self, scheduler, iter_total, loss, lr=0.1): do_vis = False self.logger.update(loss) if (iter_total+1) % self.log_iter == 0: avg = self.logger.output(iter_total, lr) self.logger.reset() if (iter_total+1) % self.vis_iter == 0: scheduler.step(avg) do_vis = self.do_vis return do_vis def visualize(self, volume, label, output, iter_total): self.vis.visualize(volume, label, output, iter_total, self.logger.log_tb) def reset(self): self.logger.reset()
app.js
const http = require('http'); const fs = require("fs"); const crypto = require("crypto"); const hostname = '127.0.0.1'; const port = 3000; const build_file = 'global_build_number.txt'; const version_file = 'version_number.txt'; var hash = crypto.randomBytes(20).toString('hex'); var oldHash = crypto.randomBytes(20).toString('hex'); var checkHash = crypto.randomBytes(20).toString('hex'); const increment_global_build_number = () => { try { let data = fs.readFileSync(build_file, 'utf8'); let incremented = Number(data) + 1; fs.writeFileSync(build_file, incremented); console.log(`Build number is now: ${incremented}`); return { code: 200, value: incremented }; } catch(e) { console.log('R/W error build_number:', e.stack); return { code: 500, value: -1 }; } } const is_bigger = (new_version_number, old_version_number) => { const acceptable_prefix = ['a','b'] let old_pre; let new_pre; let old_n = old_version_number.split('.').map((element) => { if (isNaN(element)) { old_pre = element.slice(0,1); return parseInt(element.slice(1)); } else return parseInt(element); }); let new_n = new_version_number.split('.').map((element) => { if (isNaN(element)) { new_pre = element.slice(0,1); return parseInt(element.slice(1)); } else return parseInt(element); }); if (acceptable_prefix.includes(old_pre)) { if (old_pre === new_pre) {} else if (old_pre === 'a' && new_pre === 'b' && new_n[0] === 1 && new_n[1] === 0 && new_n[2] === 0) return true; else if (old_pre === 'b' && !new_pre && new_n[0] === 1 && new_n[1] === 0 && new_n[2] === 0) return true; else return false; } // Check that if first element is incremented the rest of the elements are zero if (new_n[0] === old_n[0] + 1 && new_n[1] === 0 && new_n[2] === 0) { return true; } // Check that if second element is incremented the last element is zero else if (new_n[0] === old_n[0] && new_n[1] === old_n[1] + 1 && new_n[2] === 0) { return true; } // Check that if none of the two first elements are incremented the third is else if (new_n[0] === old_n[0] && new_n[1] === old_n[1] && new_n[2] === old_n[2] + 1) { return true; } // Else fail else return false; } const check_version_number = (new_version_number) => { try { let old_version_number = fs.readFileSync(version_file, 'utf8'); if (is_bigger(new_version_number, old_version_number)) { console.log(`New version number is valid: ${new_version_number}`); checkHash = crypto.createHash('sha256').update(hash + new_version_number).digest('hex') oldHash = hash; hash = crypto.randomBytes(20).toString('hex'); return { code: 200, value: new_version_number, key: checkHash } } else { console.log(`New version number is not valid: ${new_version_number}, is still ${old_version_number}`); return { code: 300, value: old_version_number, key: -1 } } } catch (e) { console.log('R/W error check_version_number:', e.stack); return { code: 500, value: -1, key: -1 }; } } const increase_version_number = (new_version_number, key) => { try { let old_version_number = fs.readFileSync(version_file, 'utf8'); if (is_bigger(new_version_number, old_version_number) && key == checkHash && crypto.createHash('sha256').update(oldHash + new_version_number).digest('hex') == checkHash) { checkHash = crypto.randomBytes(20).toString('hex'); fs.writeFileSync(version_file, new_version_number); console.log(`New version number: ${new_version_number}`); return { code: 200, value: new_version_number } } else {
console.log(`Failed to update version number to ${new_version_number}, is still ${old_version_number}`); return { code: 300, value: old_version_number } } } catch (e) { console.log('R/W error increase_version_number:', e.stack); return { code: 500, value: -1 }; } } const server = http.createServer((req, res) => { if (req.method == 'GET') { let build_increment = increment_global_build_number(); res.statusCode = build_increment.code; res.setHeader('Content-Type', 'text/plain'); res.end(`{ "build": "${build_increment.value}" }`); } else if (req.method == 'POST') { let body = ''; req.on('data', chunk => { body += chunk.toString(); }); req.on('end', () => { let json; try { json = JSON.parse(body).version_number } catch (e) { console.log("Failed to parse the json") } let new_version = check_version_number(json) res.statusCode = new_version.code; res.setHeader('Content-Type', 'text/plain'); res.end(`{ "version": "${new_version.value}", "key": "${new_version.key}" }`); }); } else if (req.method == 'PUT') { let body = ''; req.on('data', chunk => { body += chunk.toString(); }); req.on('end', () => { let json; try { json = JSON.parse(body) } catch (e) { console.log("Failed to parse the json") } let new_version = increase_version_number(json.version_number, json.key) res.statusCode = new_version.code; res.setHeader('Content-Type', 'text/plain'); res.end(`{ "version": "${new_version.value}" }`); }); } }); server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`); });
factories.py
# -*- coding: utf-8 -*- """Amavis factories.""" from __future__ import unicode_literals import datetime import time import factory from . import models from .utils import smart_bytes SPAM_BODY = """X-Envelope-To: <{rcpt}> X-Envelope-To-Blocked: <{rcpt}> X-Quarantine-ID: <nq6ekd4wtXZg> X-Spam-Flag: YES X-Spam-Score: 1000.985 X-Spam-Level: **************************************************************** X-Spam-Status: Yes, score=1000.985 tag=2 tag2=6.31 kill=6.31 tests=[ALL_TRUSTED=-1, GTUBE=1000, PYZOR_CHECK=1.985] autolearn=no autolearn_force=no Received: from demo.modoboa.org ([127.0.0.1]) by localhost (demo.modoboa.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nq6ekd4wtXZg for <[email protected]>; Thu, 9 Nov 2017 15:59:52 +0100 (CET) Received: from demo.modoboa.org (localhost [127.0.0.1]) by demo.modoboa.org (Postfix) with ESMTP for <[email protected]>; Thu, 9 Nov 2017 15:59:52 +0100 (CET) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: Sample message From: {sender} To: {rcpt} Message-ID: <[email protected]> Date: Thu, 09 Nov 2017 15:59:52 +0100 This is the GTUBE, the Generic Test for Unsolicited Bulk Email If your spam filter supports it, the GTUBE provides a test by which you can verify that the filter is installed correctly and is detecting incoming spam. You can send yourself a test mail containing the following string of characters (in upper case and with no white spaces and line breaks): XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X You should send this test mail from an account outside of your network. """ VIRUS_BODY = """Subject: Virus Test Message (EICAR) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Disposition: inline Date: Sun, 06 Nov 2011 10:08:18 -0800 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This is a virus test message. It contains an attached file 'eicar.com', which contains the EICAR virus <http://eicar.org/86-0-Intended-use.html> test pattern. --huq684BweRXVnRxX Content-Type: application/x-msdos-program Content-Disposition: attachment; filename="eicar.com" Content-Transfer-Encoding: quoted-printable X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*=0A --huq684BweRXVnRxX-- """ class MaddrFactory(factory.django.DjangoModelFactory): """Factory for Maddr.""" class Meta: model = models.Maddr django_get_or_create = ("email", ) id = factory.Sequence(lambda n: n) # NOQA:A003 email = factory.Sequence(lambda n: "user_{}@domain.test".format(n)) domain = "test.domain" class MsgsFactory(factory.django.DjangoModelFactory):
class MsgrcptFactory(factory.django.DjangoModelFactory): """Factory for Msgrcpt.""" class Meta: model = models.Msgrcpt rseqnum = 1 is_local = "Y" bl = "N" wl = "N" mail = factory.SubFactory(MsgsFactory) rid = factory.SubFactory(MaddrFactory) class QuarantineFactory(factory.django.DjangoModelFactory): """Factory for Quarantine.""" class Meta: model = models.Quarantine chunk_ind = 1 mail = factory.SubFactory(MsgsFactory) def create_quarantined_msg(rcpt, sender, rs, body, **kwargs): """Create a quarantined msg.""" msgrcpt = MsgrcptFactory( rs=rs, rid__email=rcpt, rid__domain="com.test", # FIXME mail__sid__email=smart_bytes(sender), mail__sid__domain="", # FIXME **kwargs ) QuarantineFactory( mail=msgrcpt.mail, mail_text=smart_bytes(SPAM_BODY.format(rcpt=rcpt, sender=sender)) ) return msgrcpt def create_spam(rcpt, sender="[email protected]", rs=" "): """Create a spam.""" body = SPAM_BODY.format(rcpt=rcpt, sender=sender) body += "fóó bár" return create_quarantined_msg( rcpt, sender, rs, body, bspam_level=999.0, content="S") def create_virus(rcpt, sender="[email protected]", rs=" "): """Create a virus.""" return create_quarantined_msg(rcpt, sender, rs, VIRUS_BODY, content="V")
"""Factory for Mailaddr.""" class Meta: model = models.Msgs mail_id = factory.Sequence(lambda n: "mailid{}".format(n)) secret_id = factory.Sequence(lambda n: smart_bytes("id{}".format(n))) sid = factory.SubFactory(MaddrFactory) client_addr = "127.0.0.1" originating = "Y" dsn_sent = "N" subject = factory.Sequence(lambda n: "Test message {}".format(n)) time_num = factory.LazyAttribute(lambda o: int(time.time())) time_iso = factory.LazyAttribute( lambda o: datetime.datetime.fromtimestamp(o.time_num).isoformat()) size = 100
view-model.ts
import { Model } from './model'; import { Callable, Commands, Commandable, Constructor, MethodOf, PropertyOf, RuntimeDecorator, isCallable, $evaluable, } from '../reflectable'; import { $reference, getProperty, isReference } from '../property'; import { $observable } from '../observable'; /** * View-Model input default value property decorator handle. */ export type Defaults<T extends ViewModel = ViewModel> = RuntimeDecorator<T, [any]>; /** * View-Model input default value property decorator. */ export type DefaultDecorator = { /** * Defines a default value for a View-Model input. * @param value - The default value. * @example * ```typescript * class SomeComponent extends Component { * @Input @Default(true) active!: boolean; * } * ``` */ (value: unknown): <T extends ViewModel, K extends PropertyOf<T>>(type: T, property: K) => void; }; /** * View-Model input property decorator handle. */ export type Inputs<T extends ViewModel = ViewModel> = RuntimeDecorator<T, [any]>; /** * View-Model input property decorator. */ export type InputDecorator = { /** * Links the decorated View-Model property with a Model property. * @param property - The Model property name. * @example * class SomeComponent extends Component { * Input('color') background!: string; * } */ <M, K extends keyof M, VM extends ViewModel<{ [_ in keyof M]+?: M[K] }>>(property: keyof M): < T extends VM, P extends PropertyOf<T> >( type: T, property: P, ) => void; /** * Links the decorated View-Model property with the same Model property. * @example * class SomeComponent extends Component { * Input color!: string; * } */ <T extends ViewModel, K extends PropertyOf<T>>(type: T, property: K & keyof ModelOf<T>): void; }; type ModelOf<T extends ViewModel> = T extends ViewModel<infer U> ? U : never; /** * The View-Model encapsulating a Model. */ export interface ViewModel<T = any> { /**
readonly props: T; } function link<T, U extends ViewModel<T>>(model: Model<T>, property: keyof typeof model, vm: U, target: keyof U): void { const reference = $reference(model, property); const value = model[property]; if (isReference(value)) { Object.defineProperty(model, property, reference); } const observable = isCallable(value) ? $observable($evaluable(model as T, property)).call() : $observable(reference.object, reference.property); Object.defineProperty(reference.object, reference.property, observable); if (!getProperty(vm, target)) { Object.defineProperty(vm, target, reference); } } /** * Base View-Model implementation mixin. * The implementation handles input properties and command methods decorators. * @param commands - Command method decorator handle. * @param defaults - View-Model input default value property decorator handle. * @param inputs - View-Model input property decorator handle. */ export function ViewModelMixin(commands: Commands, defaults: Defaults, inputs: Inputs) { return <T extends Constructor<ViewModel & Commandable>>(Super: T) => // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore class ViewModel<U> extends Super { /** * @param props - The Model. */ constructor(props: Model<U>) { super(props); const values = defaults.getDecorated(this); Object.entries(inputs.getDecorated(this)).forEach(([target, [property = target]]) => { if (props[property as keyof U] === undefined && target in values) { // eslint-disable-next-line no-param-reassign [props[property as keyof U]] = values[target as keyof typeof values]!; } link(props, property as keyof U, this, target as keyof this); }); Object.entries(commands.getDecorated(this)) .filter(([property]) => !!props[property as keyof typeof props]) .forEach(([property, [command = property]]) => this.on(command as MethodOf<this>, props[property as keyof typeof props] as Callable), ); } }; }
* The Model. */
client.go
package proto import ( "github.com/erikh/go-transport" "github.com/pkg/errors" ) // NewClient constructs a client from the host and certificate parameters. func NewClient(host, ca, certName, key string) (DNSControlClient, error)
{ cert, err := transport.LoadCert(ca, certName, key, "") if err != nil { return nil, errors.Wrap(err, "while loading client certificate") } cc, err := transport.GRPCDial(cert, host) if err != nil { return nil, errors.Wrap(err, "while configuring grpc client") } return NewDNSControlClient(cc), nil }
collect.rs
//! Collects and records trace data. pub use tracing_core::collect::*; #[cfg(feature = "std")] #[cfg_attr(docsrs, doc(cfg(feature = "std")))] pub use tracing_core::dispatch::DefaultGuard; /// Sets this collector as the default for the duration of a closure. /// /// The default collector is used when creating a new [`Span`] or /// [`Event`], _if no span is currently executing_. If a span is currently /// executing, new spans or events are dispatched to the collector that /// tagged that span, instead. /// /// [`Span`]: super::span::Span /// [`Collect`]: super::collect::Collect /// [`Event`]: tracing_core::Event #[cfg(feature = "std")] #[cfg_attr(docsrs, doc(cfg(feature = "std")))] pub fn with_default<T, C>(collector: C, f: impl FnOnce() -> T) -> T where C: Collect + Send + Sync + 'static, { crate::dispatch::with_default(&crate::Dispatch::new(collector), f) } /// Sets this collector as the global default for the duration of the entire program. /// Will be used as a fallback if no thread-local collector has been set in a thread (using `with_default`.) /// /// Can only be set once; subsequent attempts to set the global default will fail. /// Returns whether the initialization was successful. /// /// Note: Libraries should *NOT* call `set_global_default()`! That will cause conflicts when /// executables try to set them later. /// /// [span]: super::span #[cfg(feature = "alloc")] #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))] pub fn set_global_default<C>(collector: C) -> Result<(), SetGlobalDefaultError> where C: Collect + Send + Sync + 'static, { crate::dispatch::set_global_default(crate::Dispatch::new(collector)) } /// Sets the collector as the default for the duration of the lifetime of the /// returned [`DefaultGuard`] /// /// The default collector is used when creating a new [`Span`] or /// [`Event`], _if no span is currently executing_. If a span is currently /// executing, new spans or events are dispatched to the collector that /// tagged that span, instead. /// /// [`Span`]: super::span::Span /// [`Event`]: tracing_core::Event #[cfg(feature = "std")] #[cfg_attr(docsrs, doc(cfg(feature = "std")))] #[must_use = "Dropping the guard unregisters the collector."] pub fn set_default<C>(collector: C) -> DefaultGuard where C: Collect + Send + Sync + 'static,
pub use tracing_core::dispatch::SetGlobalDefaultError;
{ crate::dispatch::set_default(&crate::Dispatch::new(collector)) }
client_test.go
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 gxetcd import ( "net/url" "os" "path" "reflect" "strings" "testing" "time" ) import ( "github.com/coreos/etcd/embed" "github.com/coreos/etcd/mvcc/mvccpb" perrors "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/connectivity" ) const defaultEtcdV3WorkDir = "/tmp/default-dubbo-go-remote.etcd" // tests dataset var tests = []struct { input struct { k string v string } }{ {input: struct { k string v string }{k: "name", v: "scott.wang"}}, {input: struct { k string v string }{k: "namePrefix", v: "prefix.scott.wang"}}, {input: struct { k string v string }{k: "namePrefix1", v: "prefix1.scott.wang"}}, {input: struct { k string v string }{k: "age", v: "27"}}, } // test dataset prefix const prefix = "name" type ClientTestSuite struct { suite.Suite etcdConfig struct { name string endpoints []string timeout time.Duration heartbeat int } etcd *embed.Etcd client *Client } // start etcd server func (suite *ClientTestSuite) SetupSuite() { t := suite.T() DefaultListenPeerURLs := "http://localhost:2382" DefaultListenClientURLs := "http://localhost:2381" lpurl, _ := url.Parse(DefaultListenPeerURLs) lcurl, _ := url.Parse(DefaultListenClientURLs) cfg := embed.NewConfig() cfg.LPUrls = []url.URL{*lpurl} cfg.LCUrls = []url.URL{*lcurl} cfg.Dir = defaultEtcdV3WorkDir e, err := embed.StartEtcd(cfg) if err != nil { t.Fatal(err) } select { case <-e.Server.ReadyNotify(): t.Log("Server is ready!") case <-time.After(60 * time.Second): e.Server.Stop() // trigger a shutdown t.Logf("Server took too long to start!") } suite.etcd = e return } // stop etcd server func (suite *ClientTestSuite) TearDownSuite() { suite.etcd.Close() if err := os.RemoveAll(defaultEtcdV3WorkDir); err != nil { suite.FailNow(err.Error()) } } func (suite *ClientTestSuite) setUpClient() *Client { c, err := NewClient(suite.etcdConfig.name, suite.etcdConfig.endpoints, suite.etcdConfig.timeout, suite.etcdConfig.heartbeat) if err != nil { suite.T().Fatal(err) } return c } // set up a client for suite func (suite *ClientTestSuite) SetupTest() { c := suite.setUpClient() c.CleanKV() suite.client = c return } func (suite *ClientTestSuite) TestClientClose() { c := suite.client t := suite.T() defer c.Close() if c.rawClient.ActiveConnection().GetState() != connectivity.Ready { t.Fatal(suite.client.rawClient.ActiveConnection().GetState()) } } func (suite *ClientTestSuite) TestClientValid() { c := suite.client t := suite.T() if !c.Valid() { t.Fatal("client is not valid") } c.Close() if suite.client.Valid() != false { t.Fatal("client is valid") } } func (suite *ClientTestSuite) TestClientDone() { c := suite.client go func() { time.Sleep(2 * time.Second) c.Close() }() c.Wait.Wait() if c.Valid() { suite.T().Fatal("client should be invalid then") } } func (suite *ClientTestSuite) TestClientCreateKV() { tests := tests c := suite.client t := suite.T() defer suite.client.Close() for _, tc := range tests { k := tc.input.k v := tc.input.v expect := tc.input.v if err := c.Create(k, v); err != nil { t.Fatal(err) } value, err := c.Get(k) if err != nil { t.Fatal(err) } if value != expect { t.Fatalf("expect %v but get %v", expect, value) } } } func (suite *ClientTestSuite) TestClientDeleteKV() { tests := tests c := suite.client t := suite.T() defer c.Close() for _, tc := range tests { k := tc.input.k v := tc.input.v expect := ErrKVPairNotFound if err := c.Create(k, v); err != nil { t.Fatal(err) } if err := c.Delete(k); err != nil { t.Fatal(err) } _, err := c.Get(k) if perrors.Cause(err) == expect { continue } if err != nil { t.Fatal(err) } } } func (suite *ClientTestSuite) TestClientGetChildrenKVList() { tests := tests c := suite.client t := suite.T() var expectKList []string var expectVList []string for _, tc := range tests { k := tc.input.k v := tc.input.v if strings.Contains(k, prefix) { expectKList = append(expectKList, k) expectVList = append(expectVList, v) } if err := c.Create(k, v); err != nil { t.Fatal(err) } } kList, vList, err := c.GetChildrenKVList(prefix) if err != nil { t.Fatal(err) } if reflect.DeepEqual(expectKList, kList) && reflect.DeepEqual(expectVList, vList) { return } t.Fatalf("expect keylist %v but got %v expect valueList %v but got %v ", expectKList, kList, expectVList, vList) } func (suite *ClientTestSuite) TestClientWatch() { tests := tests c := suite.client t := suite.T() go func() { time.Sleep(time.Second) for _, tc := range tests { k := tc.input.k v := tc.input.v if err := c.Create(k, v); err != nil { assert.Error(t, err) } if err := c.delete(k); err != nil { assert.Error(t, err) } } c.Close() }() wc, err := c.watch(prefix) if err != nil { assert.Error(t, err) } events := make([]mvccpb.Event, 0) var eCreate, eDelete mvccpb.Event for e := range wc { for _, event := range e.Events { events = append(events, (mvccpb.Event)(*event)) if event.Type == mvccpb.PUT { eCreate = (mvccpb.Event)(*event) } if event.Type == mvccpb.DELETE { eDelete = (mvccpb.Event)(*event) } t.Logf("type IsCreate %v k %s v %s", event.IsCreate(), event.Kv.Key, event.Kv.Value) } } assert.Equal(t, 2, len(events)) assert.Contains(t, events, eCreate) assert.Contains(t, events, eDelete) } func (suite *ClientTestSuite) TestClientRegisterTemp() { c := suite.client observeC := suite.setUpClient() t := suite.T() go func() { time.Sleep(2 * time.Second) err := c.RegisterTemp("scott/wang", "test") if err != nil { assert.Error(t, err) } c.Close() }() completePath := path.Join("scott", "wang") wc, err := observeC.watch(completePath) if err != nil { assert.Error(t, err) } events := make([]mvccpb.Event, 0) var eCreate, eDelete mvccpb.Event for e := range wc { for _, event := range e.Events { events = append(events, (mvccpb.Event)(*event)) if event.Type == mvccpb.DELETE { eDelete = (mvccpb.Event)(*event) t.Logf("complete key (%s) is delete", completePath) observeC.Close() break } eCreate = (mvccpb.Event)(*event) t.Logf("type IsCreate %v k %s v %s", event.IsCreate(), event.Kv.Key, event.Kv.Value) } } assert.Equal(t, 2, len(events)) assert.Contains(t, events, eCreate) assert.Contains(t, events, eDelete) } func TestClientSuite(t *testing.T)
{ suite.Run(t, &ClientTestSuite{ etcdConfig: struct { name string endpoints []string timeout time.Duration heartbeat int }{ name: "test", endpoints: []string{"localhost:2381"}, timeout: time.Second, heartbeat: 1, }, }) }
mixins.py
""" Mixins classes for use with Filters and Factors. """ from textwrap import dedent from numpy import ( array, full, recarray, vstack, ) from pandas import NaT as pd_NaT from catalyst.errors import ( WindowLengthNotPositive, UnsupportedDataType, NoFurtherDataError, ) from catalyst.utils.control_flow import nullctx from catalyst.utils.input_validation import expect_types from catalyst.utils.sharedoc import ( format_docstring, PIPELINE_ALIAS_NAME_DOC, PIPELINE_DOWNSAMPLING_FREQUENCY_DOC, ) from catalyst.utils.pandas_utils import nearest_unequal_elements from .downsample_helpers import ( select_sampling_indices, expect_downsample_frequency, ) from .sentinels import NotSpecified from .term import Term class PositiveWindowLengthMixin(object): """ Validation mixin enforcing that a Term gets a positive WindowLength """ def _validate(self): super(PositiveWindowLengthMixin, self)._validate() if not self.windowed: raise WindowLengthNotPositive(window_length=self.window_length) class SingleInputMixin(object): """ Validation mixin enforcing that a Term gets a length-1 inputs list. """ def _validate(self): super(SingleInputMixin, self)._validate() num_inputs = len(self.inputs) if num_inputs != 1: raise ValueError( "{typename} expects only one input, " "but received {num_inputs} instead.".format( typename=type(self).__name__, num_inputs=num_inputs ) ) class StandardOutputs(object): """ Validation mixin enforcing that a Term cannot produce non-standard outputs. """ def _validate(self): super(StandardOutputs, self)._validate() if self.outputs is not NotSpecified: raise ValueError( "{typename} does not support custom outputs," " but received custom outputs={outputs}.".format( typename=type(self).__name__, outputs=self.outputs, ) ) class RestrictedDTypeMixin(object): """ Validation mixin enforcing that a term has a specific dtype. """ ALLOWED_DTYPES = NotSpecified def _validate(self): super(RestrictedDTypeMixin, self)._validate() assert self.ALLOWED_DTYPES is not NotSpecified, ( "ALLOWED_DTYPES not supplied on subclass " "of RestrictedDTypeMixin: %s." % type(self).__name__ ) if self.dtype not in self.ALLOWED_DTYPES: raise UnsupportedDataType( typename=type(self).__name__, dtype=self.dtype, ) class
(object): """ Mixin for user-defined rolling-window Terms. Implements `_compute` in terms of a user-defined `compute` function, which is mapped over the input windows. Used by CustomFactor, CustomFilter, CustomClassifier, etc. """ ctx = nullctx() def __new__(cls, inputs=NotSpecified, outputs=NotSpecified, window_length=NotSpecified, mask=NotSpecified, dtype=NotSpecified, missing_value=NotSpecified, ndim=NotSpecified, **kwargs): unexpected_keys = set(kwargs) - set(cls.params) if unexpected_keys: raise TypeError( "{termname} received unexpected keyword " "arguments {unexpected}".format( termname=cls.__name__, unexpected={k: kwargs[k] for k in unexpected_keys}, ) ) return super(CustomTermMixin, cls).__new__( cls, inputs=inputs, outputs=outputs, window_length=window_length, mask=mask, dtype=dtype, missing_value=missing_value, ndim=ndim, **kwargs ) def compute(self, today, assets, out, *arrays): """ Override this method with a function that writes a value into `out`. """ raise NotImplementedError() def _allocate_output(self, windows, shape): """ Allocate an output array whose rows should be passed to `self.compute`. The resulting array must have a shape of ``shape``. If we have standard outputs (i.e. self.outputs is NotSpecified), the default is an empty ndarray whose dtype is ``self.dtype``. If we have an outputs tuple, the default is an empty recarray with ``self.outputs`` as field names. Each field will have dtype ``self.dtype``. This can be overridden to control the kind of array constructed (e.g. to produce a LabelArray instead of an ndarray). """ missing_value = self.missing_value outputs = self.outputs if outputs is not NotSpecified: out = recarray( shape, formats=[self.dtype.str] * len(outputs), names=outputs, ) out[:] = missing_value else: out = full(shape, missing_value, dtype=self.dtype) return out def _format_inputs(self, windows, column_mask): inputs = [] for input_ in windows: window = next(input_) if window.shape[1] == 1: # Do not mask single-column inputs. inputs.append(window) else: inputs.append(window[:, column_mask]) return inputs def _compute(self, windows, dates, assets, mask): """ Call the user's `compute` function on each window with a pre-built output array. """ format_inputs = self._format_inputs compute = self.compute params = self.params ndim = self.ndim shape = (len(mask), 1) if ndim == 1 else mask.shape out = self._allocate_output(windows, shape) with self.ctx: for idx, date in enumerate(dates): # Never apply a mask to 1D outputs. out_mask = array([True]) if ndim == 1 else mask[idx] # Mask our inputs as usual. inputs_mask = mask[idx] masked_assets = assets[inputs_mask] out_row = out[idx][out_mask] inputs = format_inputs(windows, inputs_mask) compute(date, masked_assets, out_row, *inputs, **params) out[idx][out_mask] = out_row return out def short_repr(self): return type(self).__name__ + '(%d)' % self.window_length class LatestMixin(SingleInputMixin): """ Mixin for behavior shared by Custom{Factor,Filter,Classifier}. """ window_length = 1 def compute(self, today, assets, out, data): out[:] = data[-1] def _validate(self): super(LatestMixin, self)._validate() if self.inputs[0].dtype != self.dtype: raise TypeError( "{name} expected an input of dtype {expected}, " "but got {actual} instead.".format( name=type(self).__name__, expected=self.dtype, actual=self.inputs[0].dtype, ) ) class AliasedMixin(SingleInputMixin): """ Mixin for aliased terms. """ def __new__(cls, term, name): return super(AliasedMixin, cls).__new__( cls, inputs=(term,), outputs=term.outputs, window_length=0, name=name, dtype=term.dtype, missing_value=term.missing_value, ndim=term.ndim, window_safe=term.window_safe, ) def _init(self, name, *args, **kwargs): self.name = name return super(AliasedMixin, self)._init(*args, **kwargs) @classmethod def _static_identity(cls, name, *args, **kwargs): return ( super(AliasedMixin, cls)._static_identity(*args, **kwargs), name, ) def _compute(self, inputs, dates, assets, mask): return inputs[0] def __repr__(self): return '{type}({inner_type}(...), name={name!r})'.format( type=type(self).__name__, inner_type=type(self.inputs[0]).__name__, name=self.name, ) def short_repr(self): return self.name @classmethod def make_aliased_type(cls, other_base): """ Factory for making Aliased{Filter,Factor,Classifier}. """ docstring = dedent( """ A {t} that names another {t}. Parameters ---------- term : {t} {{name}} """ ).format(t=other_base.__name__) doc = format_docstring( owner_name=other_base.__name__, docstring=docstring, formatters={'name': PIPELINE_ALIAS_NAME_DOC}, ) return type( 'Aliased' + other_base.__name__, (cls, other_base), {'__doc__': doc, '__module__': other_base.__module__}, ) class DownsampledMixin(StandardOutputs): """ Mixin for behavior shared by Downsampled{Factor,Filter,Classifier} A downsampled term is a wrapper around the "real" term that performs actual computation. The downsampler is responsible for calling the real term's `compute` method at selected intervals and forward-filling the computed values. Downsampling is not currently supported for terms with multiple outputs. """ # There's no reason to take a window of a downsampled term. The whole # point is that you're re-using the same result multiple times. window_safe = False @expect_types(term=Term) @expect_downsample_frequency def __new__(cls, term, frequency): return super(DownsampledMixin, cls).__new__( cls, inputs=term.inputs, outputs=term.outputs, window_length=term.window_length, mask=term.mask, frequency=frequency, wrapped_term=term, dtype=term.dtype, missing_value=term.missing_value, ndim=term.ndim, ) def _init(self, frequency, wrapped_term, *args, **kwargs): self._frequency = frequency self._wrapped_term = wrapped_term return super(DownsampledMixin, self)._init(*args, **kwargs) @classmethod def _static_identity(cls, frequency, wrapped_term, *args, **kwargs): return ( super(DownsampledMixin, cls)._static_identity(*args, **kwargs), frequency, wrapped_term, ) def compute_extra_rows(self, all_dates, start_date, end_date, min_extra_rows): """ Ensure that min_extra_rows pushes us back to a computation date. Parameters ---------- all_dates : pd.DatetimeIndex The trading sessions against which ``self`` will be computed. start_date : pd.Timestamp The first date for which final output is requested. end_date : pd.Timestamp The last date for which final output is requested. min_extra_rows : int The minimum number of extra rows required of ``self``, as determined by other terms that depend on ``self``. Returns ------- extra_rows : int The number of extra rows to compute. This will be the minimum number of rows required to make our computed start_date fall on a recomputation date. """ try: current_start_pos = all_dates.get_loc(start_date) - min_extra_rows if current_start_pos < 0: raise NoFurtherDataError( initial_message="Insufficient data to compute Pipeline:", first_date=all_dates[0], lookback_start=start_date, lookback_length=min_extra_rows, ) except KeyError: before, after = nearest_unequal_elements(all_dates, start_date) raise ValueError( "Pipeline start_date {start_date} is not in calendar.\n" "Latest date before start_date is {before}.\n" "Earliest date after start_date is {after}.".format( start_date=start_date, before=before, after=after, ) ) # Our possible target dates are all the dates on or before the current # starting position. # TODO: Consider bounding this below by self.window_length candidates = all_dates[:current_start_pos + 1] # Choose the latest date in the candidates that is the start of a new # period at our frequency. choices = select_sampling_indices(candidates, self._frequency) # If we have choices, the last choice is the first date if the # period containing current_start_date. Choose it. new_start_date = candidates[choices[-1]] # Add the difference between the new and old start dates to get the # number of rows for the new start_date. new_start_pos = all_dates.get_loc(new_start_date) assert new_start_pos <= current_start_pos, \ "Computed negative extra rows!" return min_extra_rows + (current_start_pos - new_start_pos) def _compute(self, inputs, dates, assets, mask): """ Compute by delegating to self._wrapped_term._compute on sample dates. On non-sample dates, forward-fill from previously-computed samples. """ to_sample = dates[select_sampling_indices(dates, self._frequency)] assert to_sample[0] == dates[0], \ "Misaligned sampling dates in %s." % type(self).__name__ real_compute = self._wrapped_term._compute # Inputs will contain different kinds of values depending on whether or # not we're a windowed computation. # If we're windowed, then `inputs` is a list of iterators of ndarrays. # If we're not windowed, then `inputs` is just a list of ndarrays. # There are two things we care about doing with the input: # 1. Preparing an input to be passed to our wrapped term. # 2. Skipping an input if we're going to use an already-computed row. # We perform these actions differently based on the expected kind of # input, and we encapsulate these actions with closures so that we # don't clutter the code below with lots of branching. if self.windowed: # If we're windowed, inputs are stateful AdjustedArrays. We don't # need to do any preparation before forwarding to real_compute, but # we need to call `next` on them if we want to skip an iteration. def prepare_inputs(): return inputs def skip_this_input(): for w in inputs: next(w) else: # If we're not windowed, inputs are just ndarrays. We need to # slice out a single row when forwarding to real_compute, but we # don't need to do anything to skip an input. def prepare_inputs(): # i is the loop iteration variable below. return [a[[i]] for a in inputs] def skip_this_input(): pass results = [] samples = iter(to_sample) next_sample = next(samples) for i, compute_date in enumerate(dates): if next_sample == compute_date: results.append( real_compute( prepare_inputs(), dates[i:i + 1], assets, mask[i:i + 1], ) ) try: next_sample = next(samples) except StopIteration: # No more samples to take. Set next_sample to Nat, which # compares False with any other datetime. next_sample = pd_NaT else: skip_this_input() # Copy results from previous sample period. results.append(results[-1]) # We should have exhausted our sample dates. try: next_sample = next(samples) except StopIteration: pass else: raise AssertionError("Unconsumed sample date: %s" % next_sample) # Concatenate stored results. return vstack(results) @classmethod def make_downsampled_type(cls, other_base): """ Factory for making Downsampled{Filter,Factor,Classifier}. """ docstring = dedent( """ A {t} that defers to another {t} at lower-than-daily frequency. Parameters ---------- term : {t} {{frequency}} """ ).format(t=other_base.__name__) doc = format_docstring( owner_name=other_base.__name__, docstring=docstring, formatters={'frequency': PIPELINE_DOWNSAMPLING_FREQUENCY_DOC}, ) return type( 'Downsampled' + other_base.__name__, (cls, other_base,), {'__doc__': doc, '__module__': other_base.__module__}, )
CustomTermMixin
deprecations.rs
#![deny(deprecated)] use pyo3::prelude::*; #[pyclass] #[text_signature = "()"] struct TestClass { num: u32, } #[pymethods] impl TestClass { #[classattr] #[name = "num"] const DEPRECATED_NAME_CONSTANT: i32 = 0; #[name = "num"] #[text_signature = "()"] fn deprecated_name_pymethod(&self) { } #[staticmethod] #[name = "custom_static"] #[text_signature = "()"] fn deprecated_name_staticmethod() {} } #[pyclass] struct DeprecatedCall; #[pymethods] impl DeprecatedCall { #[call] fn deprecated_call(&self) {} } #[pyfunction] #[name = "foo"] #[text_signature = "()"] fn deprecated_name_pyfunction() { } #[pymodule(deprecated_module_name)] fn
(_py: Python, m: &PyModule) -> PyResult<()> { #[pyfn(m, "some_name")] #[text_signature = "()"] fn deprecated_name_pyfn() { } Ok(()) } fn main() { }
my_module
managed_cluster_types_gen.go
// Code generated by azure-service-operator-codegen. DO NOT EDIT. // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. package v1alpha1api20210501storage import ( "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" ) // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" // +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" //Storage version of v1alpha1api20210501.ManagedCluster //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/resourceDefinitions/managedClusters type ManagedCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ManagedClusters_Spec `json:"spec,omitempty"` Status ManagedCluster_Status `json:"status,omitempty"` } var _ conditions.Conditioner = &ManagedCluster{} // GetConditions returns the conditions of the resource func (managedCluster *ManagedCluster) GetConditions() conditions.Conditions { return managedCluster.Status.Conditions } // SetConditions sets the conditions on the resource status func (managedCluster *ManagedCluster) SetConditions(conditions conditions.Conditions) { managedCluster.Status.Conditions = conditions } var _ genruntime.KubernetesResource = &ManagedCluster{} // AzureName returns the Azure name of the resource func (managedCluster *ManagedCluster) AzureName() string { return managedCluster.Spec.AzureName } // GetAPIVersion returns the ARM API version of the resource. This is always "2021-05-01" func (managedCluster ManagedCluster) GetAPIVersion() string { return "2021-05-01" } // GetResourceKind returns the kind of the resource func (managedCluster *ManagedCluster) GetResourceKind() genruntime.ResourceKind { return genruntime.ResourceKindNormal } // GetSpec returns the specification of this resource func (managedCluster *ManagedCluster) GetSpec() genruntime.ConvertibleSpec { return &managedCluster.Spec } // GetStatus returns the status of this resource func (managedCluster *ManagedCluster) GetStatus() genruntime.ConvertibleStatus { return &managedCluster.Status } // GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerService/managedClusters" func (managedCluster *ManagedCluster) GetType() string { return "Microsoft.ContainerService/managedClusters" } // NewEmptyStatus returns a new empty (blank) status func (managedCluster *ManagedCluster) NewEmptyStatus() genruntime.ConvertibleStatus { return &ManagedCluster_Status{} } // Owner returns the ResourceReference of the owner, or nil if there is no owner func (managedCluster *ManagedCluster) Owner() *genruntime.ResourceReference { group, kind := genruntime.LookupOwnerGroupKind(managedCluster.Spec) return &genruntime.ResourceReference{ Group: group, Kind: kind, Namespace: managedCluster.Namespace, Name: managedCluster.Spec.Owner.Name, } } // SetStatus sets the status of this resource func (managedCluster *ManagedCluster) SetStatus(status genruntime.ConvertibleStatus) error { // If we have exactly the right type of status, assign it if st, ok := status.(*ManagedCluster_Status); ok { managedCluster.Status = *st return nil } // Convert status to required version var st ManagedCluster_Status err := status.ConvertStatusTo(&st) if err != nil { return errors.Wrap(err, "failed to convert status") } managedCluster.Status = st return nil } // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (managedCluster *ManagedCluster) OriginalGVK() *schema.GroupVersionKind { return &schema.GroupVersionKind{ Group: GroupVersion.Group, Version: managedCluster.Spec.OriginalVersion, Kind: "ManagedCluster", } } // +kubebuilder:object:root=true //Storage version of v1alpha1api20210501.ManagedCluster //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/resourceDefinitions/managedClusters type ManagedClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ManagedCluster `json:"items"` } //Storage version of v1alpha1api20210501.ManagedCluster_Status type ManagedCluster_Status struct { AadProfile *ManagedClusterAADProfile_Status `json:"aadProfile,omitempty"` AddonProfiles *v1.JSON `json:"addonProfiles,omitempty"` AgentPoolProfiles []ManagedClusterAgentPoolProfile_Status `json:"agentPoolProfiles,omitempty"` ApiServerAccessProfile *ManagedClusterAPIServerAccessProfile_Status `json:"apiServerAccessProfile,omitempty"` AutoScalerProfile *ManagedClusterProperties_Status_AutoScalerProfile `json:"autoScalerProfile,omitempty"` AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile_Status `json:"autoUpgradeProfile,omitempty"` AzurePortalFQDN *string `json:"azurePortalFQDN,omitempty"` Conditions []conditions.Condition `json:"conditions,omitempty"` DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"` DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"` DnsPrefix *string `json:"dnsPrefix,omitempty"` EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"` EnableRBAC *bool `json:"enableRBAC,omitempty"` ExtendedLocation *ExtendedLocation_Status `json:"extendedLocation,omitempty"` Fqdn *string `json:"fqdn,omitempty"` FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"` HttpProxyConfig *ManagedClusterHTTPProxyConfig_Status `json:"httpProxyConfig,omitempty"` Id *string `json:"id,omitempty"` Identity *ManagedClusterIdentity_Status `json:"identity,omitempty"` IdentityProfile *v1.JSON `json:"identityProfile,omitempty"` KubernetesVersion *string `json:"kubernetesVersion,omitempty"` LinuxProfile *ContainerServiceLinuxProfile_Status `json:"linuxProfile,omitempty"` Location *string `json:"location,omitempty"` MaxAgentPools *int `json:"maxAgentPools,omitempty"` Name *string `json:"name,omitempty"` NetworkProfile *ContainerServiceNetworkProfile_Status `json:"networkProfile,omitempty"` NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` PodIdentityProfile *ManagedClusterPodIdentityProfile_Status `json:"podIdentityProfile,omitempty"` PowerState *PowerState_Status `json:"powerState,omitempty"` PrivateFQDN *string `json:"privateFQDN,omitempty"` PrivateLinkResources []PrivateLinkResource_Status `json:"privateLinkResources,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ServicePrincipalProfile *ManagedClusterServicePrincipalProfile_Status `json:"servicePrincipalProfile,omitempty"` Sku *ManagedClusterSKU_Status `json:"sku,omitempty"` Tags map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` WindowsProfile *ManagedClusterWindowsProfile_Status `json:"windowsProfile,omitempty"` } var _ genruntime.ConvertibleStatus = &ManagedCluster_Status{} // ConvertStatusFrom populates our ManagedCluster_Status from the provided source func (managedClusterStatus *ManagedCluster_Status) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { if source == managedClusterStatus { return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") } return source.ConvertStatusTo(managedClusterStatus) } // ConvertStatusTo populates the provided destination from our ManagedCluster_Status func (managedClusterStatus *ManagedCluster_Status) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { if destination == managedClusterStatus { return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") } return destination.ConvertStatusFrom(managedClusterStatus) } //Storage version of v1alpha1api20210501.ManagedClusters_Spec type ManagedClusters_Spec struct { AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` AddonProfiles map[string]ManagedClusterAddonProfile `json:"addonProfiles,omitempty"` AgentPoolProfiles []ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` ApiServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"` AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"` // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Pattern="^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$" //AzureName: The name of the resource in Azure. This is often the same as the name //of the resource in Kubernetes but it doesn't have to be. AzureName string `json:"azureName"` DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"` //DiskEncryptionSetIDReference: This is of the form: //'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' DiskEncryptionSetIDReference *genruntime.ResourceReference `armReference:"DiskEncryptionSetID" json:"diskEncryptionSetIDReference,omitempty"` DnsPrefix *string `json:"dnsPrefix,omitempty"` EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"` EnableRBAC *bool `json:"enableRBAC,omitempty"` ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"` HttpProxyConfig *ManagedClusterHTTPProxyConfig `json:"httpProxyConfig,omitempty"` Identity *ManagedClusterIdentity `json:"identity,omitempty"` IdentityProfile map[string]Componentsqit0Etschemasmanagedclusterpropertiespropertiesidentityprofileadditionalproperties `json:"identityProfile,omitempty"` KubernetesVersion *string `json:"kubernetesVersion,omitempty"` LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"` Location *string `json:"location,omitempty"` NetworkProfile *ContainerServiceNetworkProfile `json:"networkProfile,omitempty"` NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` OriginalVersion string `json:"originalVersion"` // +kubebuilder:validation:Required Owner genruntime.KnownResourceReference `group:"microsoft.resources.azure.com" json:"owner" kind:"ResourceGroup"` PodIdentityProfile *ManagedClusterPodIdentityProfile `json:"podIdentityProfile,omitempty"` PrivateLinkResources []PrivateLinkResource `json:"privateLinkResources,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` Sku *ManagedClusterSKU `json:"sku,omitempty"` Tags map[string]string `json:"tags,omitempty"` WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"` } var _ genruntime.ConvertibleSpec = &ManagedClusters_Spec{} // ConvertSpecFrom populates our ManagedClusters_Spec from the provided source func (managedClustersSpec *ManagedClusters_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { if source == managedClustersSpec { return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") } return source.ConvertSpecTo(managedClustersSpec) } // ConvertSpecTo populates the provided destination from our ManagedClusters_Spec func (managedClustersSpec *ManagedClusters_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { if destination == managedClustersSpec
return destination.ConvertSpecFrom(managedClustersSpec) } //Storage version of v1alpha1api20210501.Componentsqit0Etschemasmanagedclusterpropertiespropertiesidentityprofileadditionalproperties //Generated from: //https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/Componentsqit0etschemasmanagedclusterpropertiespropertiesidentityprofileadditionalproperties type Componentsqit0Etschemasmanagedclusterpropertiespropertiesidentityprofileadditionalproperties struct { ClientId *string `json:"clientId,omitempty"` ObjectId *string `json:"objectId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` //ResourceReference: The resource ID of the user assigned identity. ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceLinuxProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ContainerServiceLinuxProfile type ContainerServiceLinuxProfile struct { AdminUsername *string `json:"adminUsername,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Ssh *ContainerServiceSshConfiguration `json:"ssh,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceLinuxProfile_Status type ContainerServiceLinuxProfile_Status struct { AdminUsername *string `json:"adminUsername,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Ssh *ContainerServiceSshConfiguration_Status `json:"ssh,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceNetworkProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ContainerServiceNetworkProfile type ContainerServiceNetworkProfile struct { DnsServiceIP *string `json:"dnsServiceIP,omitempty"` DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"` LoadBalancerSku *string `json:"loadBalancerSku,omitempty"` NetworkMode *string `json:"networkMode,omitempty"` NetworkPlugin *string `json:"networkPlugin,omitempty"` NetworkPolicy *string `json:"networkPolicy,omitempty"` OutboundType *string `json:"outboundType,omitempty"` PodCidr *string `json:"podCidr,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ServiceCidr *string `json:"serviceCidr,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceNetworkProfile_Status type ContainerServiceNetworkProfile_Status struct { DnsServiceIP *string `json:"dnsServiceIP,omitempty"` DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` LoadBalancerProfile *ManagedClusterLoadBalancerProfile_Status `json:"loadBalancerProfile,omitempty"` LoadBalancerSku *string `json:"loadBalancerSku,omitempty"` NetworkMode *string `json:"networkMode,omitempty"` NetworkPlugin *string `json:"networkPlugin,omitempty"` NetworkPolicy *string `json:"networkPolicy,omitempty"` OutboundType *string `json:"outboundType,omitempty"` PodCidr *string `json:"podCidr,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ServiceCidr *string `json:"serviceCidr,omitempty"` } //Storage version of v1alpha1api20210501.ExtendedLocation //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ExtendedLocation type ExtendedLocation struct { Name *string `json:"name,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Type *string `json:"type,omitempty"` } //Storage version of v1alpha1api20210501.ExtendedLocation_Status type ExtendedLocation_Status struct { Name *string `json:"name,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Type *string `json:"type,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAADProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterAADProfile type ManagedClusterAADProfile struct { AdminGroupObjectIDs []string `json:"adminGroupObjectIDs,omitempty"` ClientAppID *string `json:"clientAppID,omitempty"` EnableAzureRBAC *bool `json:"enableAzureRBAC,omitempty"` Managed *bool `json:"managed,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ServerAppID *string `json:"serverAppID,omitempty"` ServerAppSecret *string `json:"serverAppSecret,omitempty"` TenantID *string `json:"tenantID,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAADProfile_Status type ManagedClusterAADProfile_Status struct { AdminGroupObjectIDs []string `json:"adminGroupObjectIDs,omitempty"` ClientAppID *string `json:"clientAppID,omitempty"` EnableAzureRBAC *bool `json:"enableAzureRBAC,omitempty"` Managed *bool `json:"managed,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ServerAppID *string `json:"serverAppID,omitempty"` ServerAppSecret *string `json:"serverAppSecret,omitempty"` TenantID *string `json:"tenantID,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAPIServerAccessProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterAPIServerAccessProfile type ManagedClusterAPIServerAccessProfile struct { AuthorizedIPRanges []string `json:"authorizedIPRanges,omitempty"` EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"` EnablePrivateClusterPublicFQDN *bool `json:"enablePrivateClusterPublicFQDN,omitempty"` PrivateDNSZone *string `json:"privateDNSZone,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAPIServerAccessProfile_Status type ManagedClusterAPIServerAccessProfile_Status struct { AuthorizedIPRanges []string `json:"authorizedIPRanges,omitempty"` EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"` EnablePrivateClusterPublicFQDN *bool `json:"enablePrivateClusterPublicFQDN,omitempty"` PrivateDNSZone *string `json:"privateDNSZone,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAddonProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterAddonProfile type ManagedClusterAddonProfile struct { Config map[string]string `json:"config,omitempty"` Enabled *bool `json:"enabled,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAgentPoolProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterAgentPoolProfile type ManagedClusterAgentPoolProfile struct { AvailabilityZones []string `json:"availabilityZones,omitempty"` Count *int `json:"count,omitempty"` EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"` EnableFIPS *bool `json:"enableFIPS,omitempty"` EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"` GpuInstanceProfile *string `json:"gpuInstanceProfile,omitempty"` KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"` KubeletDiskType *string `json:"kubeletDiskType,omitempty"` LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"` MaxCount *int `json:"maxCount,omitempty"` MaxPods *int `json:"maxPods,omitempty"` MinCount *int `json:"minCount,omitempty"` Mode *string `json:"mode,omitempty"` Name *string `json:"name,omitempty"` NodeLabels map[string]string `json:"nodeLabels,omitempty"` //NodePublicIPPrefixIDReference: This is of the form: ///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} NodePublicIPPrefixIDReference *genruntime.ResourceReference `armReference:"NodePublicIPPrefixID" json:"nodePublicIPPrefixIDReference,omitempty"` NodeTaints []string `json:"nodeTaints,omitempty"` OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` OsDiskSizeGB *int `json:"osDiskSizeGB,omitempty"` OsDiskType *string `json:"osDiskType,omitempty"` OsSKU *string `json:"osSKU,omitempty"` OsType *string `json:"osType,omitempty"` //PodSubnetIDReference: If omitted, pod IPs are statically assigned on the node //subnet (see vnetSubnetID for more details). This is of the form: ///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} PodSubnetIDReference *genruntime.ResourceReference `armReference:"PodSubnetID" json:"podSubnetIDReference,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"` ScaleSetEvictionPolicy *string `json:"scaleSetEvictionPolicy,omitempty"` ScaleSetPriority *string `json:"scaleSetPriority,omitempty"` SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` Tags map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` VmSize *string `json:"vmSize,omitempty"` //VnetSubnetIDReference: If this is not specified, a VNET and subnet will be //generated and used. If no podSubnetID is specified, this applies to nodes and //pods, otherwise it applies to just nodes. This is of the form: ///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} VnetSubnetIDReference *genruntime.ResourceReference `armReference:"VnetSubnetID" json:"vnetSubnetIDReference,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAgentPoolProfile_Status type ManagedClusterAgentPoolProfile_Status struct { AvailabilityZones []string `json:"availabilityZones,omitempty"` Count *int `json:"count,omitempty"` EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"` EnableFIPS *bool `json:"enableFIPS,omitempty"` EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"` GpuInstanceProfile *string `json:"gpuInstanceProfile,omitempty"` KubeletConfig *KubeletConfig_Status `json:"kubeletConfig,omitempty"` KubeletDiskType *string `json:"kubeletDiskType,omitempty"` LinuxOSConfig *LinuxOSConfig_Status `json:"linuxOSConfig,omitempty"` MaxCount *int `json:"maxCount,omitempty"` MaxPods *int `json:"maxPods,omitempty"` MinCount *int `json:"minCount,omitempty"` Mode *string `json:"mode,omitempty"` Name *string `json:"name,omitempty"` NodeImageVersion *string `json:"nodeImageVersion,omitempty"` NodeLabels map[string]string `json:"nodeLabels,omitempty"` NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"` NodeTaints []string `json:"nodeTaints,omitempty"` OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` OsDiskSizeGB *int `json:"osDiskSizeGB,omitempty"` OsDiskType *string `json:"osDiskType,omitempty"` OsSKU *string `json:"osSKU,omitempty"` OsType *string `json:"osType,omitempty"` PodSubnetID *string `json:"podSubnetID,omitempty"` PowerState *PowerState_Status `json:"powerState,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"` ScaleSetEvictionPolicy *string `json:"scaleSetEvictionPolicy,omitempty"` ScaleSetPriority *string `json:"scaleSetPriority,omitempty"` SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` Tags map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` UpgradeSettings *AgentPoolUpgradeSettings_Status `json:"upgradeSettings,omitempty"` VmSize *string `json:"vmSize,omitempty"` VnetSubnetID *string `json:"vnetSubnetID,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAutoUpgradeProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterAutoUpgradeProfile type ManagedClusterAutoUpgradeProfile struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` UpgradeChannel *string `json:"upgradeChannel,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterAutoUpgradeProfile_Status type ManagedClusterAutoUpgradeProfile_Status struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` UpgradeChannel *string `json:"upgradeChannel,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterHTTPProxyConfig //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterHTTPProxyConfig type ManagedClusterHTTPProxyConfig struct { HttpProxy *string `json:"httpProxy,omitempty"` HttpsProxy *string `json:"httpsProxy,omitempty"` NoProxy []string `json:"noProxy,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` TrustedCa *string `json:"trustedCa,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterHTTPProxyConfig_Status type ManagedClusterHTTPProxyConfig_Status struct { HttpProxy *string `json:"httpProxy,omitempty"` HttpsProxy *string `json:"httpsProxy,omitempty"` NoProxy []string `json:"noProxy,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` TrustedCa *string `json:"trustedCa,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterIdentity //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterIdentity type ManagedClusterIdentity struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Type *string `json:"type,omitempty"` UserAssignedIdentities map[string]v1.JSON `json:"userAssignedIdentities,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterIdentity_Status type ManagedClusterIdentity_Status struct { PrincipalId *string `json:"principalId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` TenantId *string `json:"tenantId,omitempty"` Type *string `json:"type,omitempty"` UserAssignedIdentities map[string]ManagedClusterIdentity_Status_UserAssignedIdentities `json:"userAssignedIdentities,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentityProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterPodIdentityProfile type ManagedClusterPodIdentityProfile struct { AllowNetworkPluginKubenet *bool `json:"allowNetworkPluginKubenet,omitempty"` Enabled *bool `json:"enabled,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` UserAssignedIdentities []ManagedClusterPodIdentity `json:"userAssignedIdentities,omitempty"` UserAssignedIdentityExceptions []ManagedClusterPodIdentityException `json:"userAssignedIdentityExceptions,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentityProfile_Status type ManagedClusterPodIdentityProfile_Status struct { AllowNetworkPluginKubenet *bool `json:"allowNetworkPluginKubenet,omitempty"` Enabled *bool `json:"enabled,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` UserAssignedIdentities []ManagedClusterPodIdentity_Status `json:"userAssignedIdentities,omitempty"` UserAssignedIdentityExceptions []ManagedClusterPodIdentityException_Status `json:"userAssignedIdentityExceptions,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPropertiesAutoScalerProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterPropertiesAutoScalerProfile type ManagedClusterPropertiesAutoScalerProfile struct { BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"` Expander *string `json:"expander,omitempty"` MaxEmptyBulkDelete *string `json:"max-empty-bulk-delete,omitempty"` MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"` MaxNodeProvisionTime *string `json:"max-node-provision-time,omitempty"` MaxTotalUnreadyPercentage *string `json:"max-total-unready-percentage,omitempty"` NewPodScaleUpDelay *string `json:"new-pod-scale-up-delay,omitempty"` OkTotalUnreadyCount *string `json:"ok-total-unready-count,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"` ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"` ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"` ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"` ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"` ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"` ScanInterval *string `json:"scan-interval,omitempty"` SkipNodesWithLocalStorage *string `json:"skip-nodes-with-local-storage,omitempty"` SkipNodesWithSystemPods *string `json:"skip-nodes-with-system-pods,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterProperties_Status_AutoScalerProfile type ManagedClusterProperties_Status_AutoScalerProfile struct { BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"` Expander *string `json:"expander,omitempty"` MaxEmptyBulkDelete *string `json:"max-empty-bulk-delete,omitempty"` MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"` MaxNodeProvisionTime *string `json:"max-node-provision-time,omitempty"` MaxTotalUnreadyPercentage *string `json:"max-total-unready-percentage,omitempty"` NewPodScaleUpDelay *string `json:"new-pod-scale-up-delay,omitempty"` OkTotalUnreadyCount *string `json:"ok-total-unready-count,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"` ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"` ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"` ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"` ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"` ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"` ScanInterval *string `json:"scan-interval,omitempty"` SkipNodesWithLocalStorage *string `json:"skip-nodes-with-local-storage,omitempty"` SkipNodesWithSystemPods *string `json:"skip-nodes-with-system-pods,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterSKU //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterSKU type ManagedClusterSKU struct { Name *string `json:"name,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Tier *string `json:"tier,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterSKU_Status type ManagedClusterSKU_Status struct { Name *string `json:"name,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Tier *string `json:"tier,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterServicePrincipalProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterServicePrincipalProfile type ManagedClusterServicePrincipalProfile struct { ClientId *string `json:"clientId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Secret *string `json:"secret,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterServicePrincipalProfile_Status type ManagedClusterServicePrincipalProfile_Status struct { ClientId *string `json:"clientId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Secret *string `json:"secret,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterWindowsProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterWindowsProfile type ManagedClusterWindowsProfile struct { AdminPassword *string `json:"adminPassword,omitempty"` AdminUsername *string `json:"adminUsername,omitempty"` EnableCSIProxy *bool `json:"enableCSIProxy,omitempty"` LicenseType *string `json:"licenseType,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterWindowsProfile_Status type ManagedClusterWindowsProfile_Status struct { AdminPassword *string `json:"adminPassword,omitempty"` AdminUsername *string `json:"adminUsername,omitempty"` EnableCSIProxy *bool `json:"enableCSIProxy,omitempty"` LicenseType *string `json:"licenseType,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.PowerState_Status type PowerState_Status struct { Code *string `json:"code,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.PrivateLinkResource //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/PrivateLinkResource type PrivateLinkResource struct { GroupId *string `json:"groupId,omitempty"` Name *string `json:"name,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` //Reference: The ID of the private link resource. Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` RequiredMembers []string `json:"requiredMembers,omitempty"` Type *string `json:"type,omitempty"` } //Storage version of v1alpha1api20210501.PrivateLinkResource_Status type PrivateLinkResource_Status struct { GroupId *string `json:"groupId,omitempty"` Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` PrivateLinkServiceID *string `json:"privateLinkServiceID,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` RequiredMembers []string `json:"requiredMembers,omitempty"` Type *string `json:"type,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceSshConfiguration //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ContainerServiceSshConfiguration type ContainerServiceSshConfiguration struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` PublicKeys []ContainerServiceSshPublicKey `json:"publicKeys,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceSshConfiguration_Status type ContainerServiceSshConfiguration_Status struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` PublicKeys []ContainerServiceSshPublicKey_Status `json:"publicKeys,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterIdentity_Status_UserAssignedIdentities type ManagedClusterIdentity_Status_UserAssignedIdentities struct { ClientId *string `json:"clientId,omitempty"` PrincipalId *string `json:"principalId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfile //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterLoadBalancerProfile type ManagedClusterLoadBalancerProfile struct { AllocatedOutboundPorts *int `json:"allocatedOutboundPorts,omitempty"` EffectiveOutboundIPs []ResourceReference `json:"effectiveOutboundIPs,omitempty"` IdleTimeoutInMinutes *int `json:"idleTimeoutInMinutes,omitempty"` ManagedOutboundIPs *ManagedClusterLoadBalancerProfileManagedOutboundIPs `json:"managedOutboundIPs,omitempty"` OutboundIPPrefixes *ManagedClusterLoadBalancerProfileOutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"` OutboundIPs *ManagedClusterLoadBalancerProfileOutboundIPs `json:"outboundIPs,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfile_Status type ManagedClusterLoadBalancerProfile_Status struct { AllocatedOutboundPorts *int `json:"allocatedOutboundPorts,omitempty"` EffectiveOutboundIPs []ResourceReference_Status `json:"effectiveOutboundIPs,omitempty"` IdleTimeoutInMinutes *int `json:"idleTimeoutInMinutes,omitempty"` ManagedOutboundIPs *ManagedClusterLoadBalancerProfile_Status_ManagedOutboundIPs `json:"managedOutboundIPs,omitempty"` OutboundIPPrefixes *ManagedClusterLoadBalancerProfile_Status_OutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"` OutboundIPs *ManagedClusterLoadBalancerProfile_Status_OutboundIPs `json:"outboundIPs,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentity //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterPodIdentity type ManagedClusterPodIdentity struct { BindingSelector *string `json:"bindingSelector,omitempty"` Identity *UserAssignedIdentity `json:"identity,omitempty"` Name *string `json:"name,omitempty"` Namespace *string `json:"namespace,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentityException //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterPodIdentityException type ManagedClusterPodIdentityException struct { Name *string `json:"name,omitempty"` Namespace *string `json:"namespace,omitempty"` PodLabels map[string]string `json:"podLabels,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentityException_Status type ManagedClusterPodIdentityException_Status struct { Name *string `json:"name,omitempty"` Namespace *string `json:"namespace,omitempty"` PodLabels map[string]string `json:"podLabels,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentity_Status type ManagedClusterPodIdentity_Status struct { BindingSelector *string `json:"bindingSelector,omitempty"` Identity *UserAssignedIdentity_Status `json:"identity,omitempty"` Name *string `json:"name,omitempty"` Namespace *string `json:"namespace,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ProvisioningInfo *ManagedClusterPodIdentity_Status_ProvisioningInfo `json:"provisioningInfo,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceSshPublicKey //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ContainerServiceSshPublicKey type ContainerServiceSshPublicKey struct { KeyData *string `json:"keyData,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ContainerServiceSshPublicKey_Status type ContainerServiceSshPublicKey_Status struct { KeyData *string `json:"keyData,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfileManagedOutboundIPs //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterLoadBalancerProfileManagedOutboundIPs type ManagedClusterLoadBalancerProfileManagedOutboundIPs struct { Count *int `json:"count,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfileOutboundIPPrefixes //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterLoadBalancerProfileOutboundIPPrefixes type ManagedClusterLoadBalancerProfileOutboundIPPrefixes struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` PublicIPPrefixes []ResourceReference `json:"publicIPPrefixes,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfileOutboundIPs //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ManagedClusterLoadBalancerProfileOutboundIPs type ManagedClusterLoadBalancerProfileOutboundIPs struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` PublicIPs []ResourceReference `json:"publicIPs,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfile_Status_ManagedOutboundIPs type ManagedClusterLoadBalancerProfile_Status_ManagedOutboundIPs struct { Count *int `json:"count,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfile_Status_OutboundIPPrefixes type ManagedClusterLoadBalancerProfile_Status_OutboundIPPrefixes struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` PublicIPPrefixes []ResourceReference_Status `json:"publicIPPrefixes,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterLoadBalancerProfile_Status_OutboundIPs type ManagedClusterLoadBalancerProfile_Status_OutboundIPs struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` PublicIPs []ResourceReference_Status `json:"publicIPs,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentity_Status_ProvisioningInfo type ManagedClusterPodIdentity_Status_ProvisioningInfo struct { Error *ManagedClusterPodIdentityProvisioningError_Status `json:"error,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ResourceReference //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/ResourceReference type ResourceReference struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` //Reference: The fully qualified Azure resource id. Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` } //Storage version of v1alpha1api20210501.ResourceReference_Status type ResourceReference_Status struct { Id *string `json:"id,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.UserAssignedIdentity //Generated from: https://schema.management.azure.com/schemas/2021-05-01/Microsoft.ContainerService.json#/definitions/UserAssignedIdentity type UserAssignedIdentity struct { ClientId *string `json:"clientId,omitempty"` ObjectId *string `json:"objectId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` //ResourceReference: The resource ID of the user assigned identity. ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"` } //Storage version of v1alpha1api20210501.UserAssignedIdentity_Status type UserAssignedIdentity_Status struct { ClientId *string `json:"clientId,omitempty"` ObjectId *string `json:"objectId,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` ResourceId *string `json:"resourceId,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentityProvisioningError_Status type ManagedClusterPodIdentityProvisioningError_Status struct { Error *ManagedClusterPodIdentityProvisioningErrorBody_Status `json:"error,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentityProvisioningErrorBody_Status type ManagedClusterPodIdentityProvisioningErrorBody_Status struct { Code *string `json:"code,omitempty"` Details []ManagedClusterPodIdentityProvisioningErrorBody_Status_Unrolled `json:"details,omitempty"` Message *string `json:"message,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Target *string `json:"target,omitempty"` } //Storage version of v1alpha1api20210501.ManagedClusterPodIdentityProvisioningErrorBody_Status_Unrolled type ManagedClusterPodIdentityProvisioningErrorBody_Status_Unrolled struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` Target *string `json:"target,omitempty"` } func init() { SchemeBuilder.Register(&ManagedCluster{}, &ManagedClusterList{}) }
{ return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") }
csvCreator.js
/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v15.0.0 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); var context_1 = require("./context/context"); var gridSerializer_1 = require("./gridSerializer"); var downloader_1 = require("./downloader"); var columnController_1 = require("./columnController/columnController"); var valueService_1 = require("./valueService/valueService"); var gridOptionsWrapper_1 = require("./gridOptionsWrapper"); var constants_1 = require("./constants"); var utils_1 = require("./utils"); var LINE_SEPARATOR = '\r\n'; var CsvSerializingSession = (function (_super) { __extends(CsvSerializingSession, _super); function CsvSerializingSession(columnController, valueService, gridOptionsWrapper, processCellCallback, processHeaderCallback, suppressQuotes, columnSeparator) { var _this = _super.call(this, columnController, valueService, gridOptionsWrapper, processCellCallback, processHeaderCallback) || this; _this.suppressQuotes = suppressQuotes; _this.columnSeparator = columnSeparator; _this.result = ''; _this.lineOpened = false; return _this; } CsvSerializingSession.prototype.prepare = function (columnsToExport) { }; CsvSerializingSession.prototype.addCustomHeader = function (customHeader) { if (!customHeader) return; this.result += customHeader + LINE_SEPARATOR; }; CsvSerializingSession.prototype.addCustomFooter = function (customFooter) { if (!customFooter) return; this.result += customFooter + LINE_SEPARATOR; }; CsvSerializingSession.prototype.onNewHeaderGroupingRow = function () { if (this.lineOpened) this.result += LINE_SEPARATOR; return { onColumn: this.onNewHeaderGroupingRowColumn.bind(this) }; }; CsvSerializingSession.prototype.onNewHeaderGroupingRowColumn = function (header, index, span) { if (index != 0) { this.result += this.columnSeparator; } this.result += header; for (var i = 1; i <= span; i++) { this.result += this.columnSeparator + this.putInQuotes("", this.suppressQuotes); } this.lineOpened = true; }; CsvSerializingSession.prototype.onNewHeaderRow = function () { if (this.lineOpened) this.result += LINE_SEPARATOR; return { onColumn: this.onNewHeaderRowColumn.bind(this) }; }; CsvSerializingSession.prototype.onNewHeaderRowColumn = function (column, index, node) { if (index != 0) { this.result += this.columnSeparator; } this.result += this.putInQuotes(this.extractHeaderValue(column), this.suppressQuotes); this.lineOpened = true; }; CsvSerializingSession.prototype.onNewBodyRow = function () { if (this.lineOpened) this.result += LINE_SEPARATOR; return { onColumn: this.onNewBodyRowColumn.bind(this) }; }; CsvSerializingSession.prototype.onNewBodyRowColumn = function (column, index, node) { if (index != 0) { this.result += this.columnSeparator; } this.result += this.putInQuotes(this.extractRowCellValue(column, index, constants_1.Constants.EXPORT_TYPE_CSV, node), this.suppressQuotes); this.lineOpened = true; }; CsvSerializingSession.prototype.putInQuotes = function (value, suppressQuotes) { if (suppressQuotes) { return value; } if (value === null || value === undefined) { return '""'; } var stringValue; if (typeof value === 'string') { stringValue = value; } else if (typeof value.toString === 'function') { stringValue = value.toString(); } else { console.warn('unknown value type during csv conversion'); stringValue = ''; } // replace each " with "" (ie two sets of double quotes is how to do double quotes in csv) var valueEscaped = stringValue.replace(/"/g, "\"\""); return '"' + valueEscaped + '"'; }; CsvSerializingSession.prototype.parse = function () { return this.result; }; return CsvSerializingSession; }(gridSerializer_1.BaseGridSerializingSession)); exports.CsvSerializingSession = CsvSerializingSession; var BaseCreator = (function () { function
() { } BaseCreator.prototype.setBeans = function (beans) { this.beans = beans; }; BaseCreator.prototype.export = function (userParams) { if (this.isExportSuppressed()) { console.warn("ag-grid: Export canceled. Export is not allowed as per your configuration."); return ""; } var _a = this.getMergedParamsAndData(userParams), mergedParams = _a.mergedParams, data = _a.data; var fileNamePresent = mergedParams && mergedParams.fileName && mergedParams.fileName.length !== 0; var fileName = fileNamePresent ? mergedParams.fileName : this.getDefaultFileName(); if (fileName.indexOf(".") === -1) { fileName = fileName + "." + this.getDefaultFileExtension(); } this.beans.downloader.download(fileName, data, this.getMimeType()); return data; }; BaseCreator.prototype.getData = function (params) { return this.getMergedParamsAndData(params).data; }; BaseCreator.prototype.getMergedParamsAndData = function (userParams) { var mergedParams = this.mergeDefaultParams(userParams); var data = this.beans.gridSerializer.serialize(this.createSerializingSession(mergedParams), mergedParams); return { mergedParams: mergedParams, data: data }; }; BaseCreator.prototype.mergeDefaultParams = function (userParams) { var baseParams = this.beans.gridOptionsWrapper.getDefaultExportParams(); var params = {}; utils_1._.assign(params, baseParams); utils_1._.assign(params, userParams); return params; }; return BaseCreator; }()); exports.BaseCreator = BaseCreator; var CsvCreator = (function (_super) { __extends(CsvCreator, _super); function CsvCreator() { return _super !== null && _super.apply(this, arguments) || this; } CsvCreator.prototype.postConstruct = function () { this.setBeans({ downloader: this.downloader, gridSerializer: this.gridSerializer, gridOptionsWrapper: this.gridOptionsWrapper }); }; CsvCreator.prototype.exportDataAsCsv = function (params) { return this.export(params); }; CsvCreator.prototype.getDataAsCsv = function (params) { return this.getData(params); }; CsvCreator.prototype.getMimeType = function () { return "text/csv;charset=utf-8;"; }; CsvCreator.prototype.getDefaultFileName = function () { return 'export.csv'; }; CsvCreator.prototype.getDefaultFileExtension = function () { return 'csv'; }; CsvCreator.prototype.createSerializingSession = function (params) { return new CsvSerializingSession(this.columnController, this.valueService, this.gridOptionsWrapper, params ? params.processCellCallback : null, params ? params.processHeaderCallback : null, params && params.suppressQuotes, (params && params.columnSeparator) || ','); }; CsvCreator.prototype.isExportSuppressed = function () { return this.gridOptionsWrapper.isSuppressCsvExport(); }; __decorate([ context_1.Autowired('columnController'), __metadata("design:type", columnController_1.ColumnController) ], CsvCreator.prototype, "columnController", void 0); __decorate([ context_1.Autowired('valueService'), __metadata("design:type", valueService_1.ValueService) ], CsvCreator.prototype, "valueService", void 0); __decorate([ context_1.Autowired('downloader'), __metadata("design:type", downloader_1.Downloader) ], CsvCreator.prototype, "downloader", void 0); __decorate([ context_1.Autowired('gridSerializer'), __metadata("design:type", gridSerializer_1.GridSerializer) ], CsvCreator.prototype, "gridSerializer", void 0); __decorate([ context_1.Autowired('gridOptionsWrapper'), __metadata("design:type", gridOptionsWrapper_1.GridOptionsWrapper) ], CsvCreator.prototype, "gridOptionsWrapper", void 0); __decorate([ context_1.PostConstruct, __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0) ], CsvCreator.prototype, "postConstruct", null); CsvCreator = __decorate([ context_1.Bean('csvCreator') ], CsvCreator); return CsvCreator; }(BaseCreator)); exports.CsvCreator = CsvCreator;
BaseCreator
interfaces.go
package batchapi // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import (
"context" "github.com/Azure/azure-sdk-for-go/services/batch/2017-05-01.5.0/batch" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/gofrs/uuid" ) // ApplicationClientAPI contains the set of methods on the ApplicationClient type. type ApplicationClientAPI interface { Get(ctx context.Context, applicationID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationSummary, err error) List(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultPage, err error) ListComplete(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultIterator, err error) } var _ ApplicationClientAPI = (*batch.ApplicationClient)(nil) // PoolClientAPI contains the set of methods on the PoolClient type. type PoolClientAPI interface { Add(ctx context.Context, pool batch.PoolAddParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Delete(ctx context.Context, poolID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) DisableAutoScale(ctx context.Context, poolID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) EnableAutoScale(ctx context.Context, poolID string, poolEnableAutoScaleParameter batch.PoolEnableAutoScaleParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) EvaluateAutoScale(ctx context.Context, poolID string, poolEvaluateAutoScaleParameter batch.PoolEvaluateAutoScaleParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AutoScaleRun, err error) Exists(ctx context.Context, poolID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, poolID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudPool, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultPage, err error) ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultIterator, err error) ListUsageMetrics(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultPage, err error) ListUsageMetricsComplete(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultIterator, err error) Patch(ctx context.Context, poolID string, poolPatchParameter batch.PoolPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) RemoveNodes(ctx context.Context, poolID string, nodeRemoveParameter batch.NodeRemoveParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Resize(ctx context.Context, poolID string, poolResizeParameter batch.PoolResizeParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) StopResize(ctx context.Context, poolID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) UpdateProperties(ctx context.Context, poolID string, poolUpdatePropertiesParameter batch.PoolUpdatePropertiesParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpgradeOS(ctx context.Context, poolID string, poolUpgradeOSParameter batch.PoolUpgradeOSParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) } var _ PoolClientAPI = (*batch.PoolClient)(nil) // AccountClientAPI contains the set of methods on the AccountClient type. type AccountClientAPI interface { ListNodeAgentSkus(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultPage, err error) ListNodeAgentSkusComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultIterator, err error) } var _ AccountClientAPI = (*batch.AccountClient)(nil) // JobClientAPI contains the set of methods on the JobClient type. type JobClientAPI interface { Add(ctx context.Context, job batch.JobAddParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Delete(ctx context.Context, jobID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Disable(ctx context.Context, jobID string, jobDisableParameter batch.JobDisableParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Enable(ctx context.Context, jobID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJob, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.JobStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListFromJobSchedule(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) ListFromJobScheduleComplete(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListPreparationAndReleaseTaskStatus(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultPage, err error) ListPreparationAndReleaseTaskStatusComplete(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultIterator, err error) Patch(ctx context.Context, jobID string, jobPatchParameter batch.JobPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, jobTerminateParameter *batch.JobTerminateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, jobUpdateParameter batch.JobUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) } var _ JobClientAPI = (*batch.JobClient)(nil) // CertificateClientAPI contains the set of methods on the CertificateClient type. type CertificateClientAPI interface { Add(ctx context.Context, certificate batch.CertificateAddParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) CancelDeletion(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Delete(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, thumbprintAlgorithm string, thumbprint string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.Certificate, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultPage, err error) ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultIterator, err error) } var _ CertificateClientAPI = (*batch.CertificateClient)(nil) // FileClientAPI contains the set of methods on the FileClient type. type FileClientAPI interface { DeleteFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, recursive *bool, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) DeleteFromTask(ctx context.Context, jobID string, taskID string, filePath string, recursive *bool, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) GetFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ocpRange string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.ReadCloser, err error) GetFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ocpRange string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.ReadCloser, err error) GetPropertiesFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) GetPropertiesFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) ListFromComputeNode(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) ListFromComputeNodeComplete(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) ListFromTask(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) ListFromTaskComplete(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) } var _ FileClientAPI = (*batch.FileClient)(nil) // JobScheduleClientAPI contains the set of methods on the JobScheduleClient type. type JobScheduleClientAPI interface { Add(ctx context.Context, cloudJobSchedule batch.JobScheduleAddParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Delete(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Disable(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Enable(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Exists(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobScheduleID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJobSchedule, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultPage, err error) ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultIterator, err error) Patch(ctx context.Context, jobScheduleID string, jobSchedulePatchParameter batch.JobSchedulePatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobScheduleID string, jobScheduleUpdateParameter batch.JobScheduleUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) } var _ JobScheduleClientAPI = (*batch.JobScheduleClient)(nil) // TaskClientAPI contains the set of methods on the TaskClient type. type TaskClientAPI interface { Add(ctx context.Context, jobID string, task batch.TaskAddParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) AddCollection(ctx context.Context, jobID string, taskCollection batch.TaskAddCollectionParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.TaskAddCollectionResult, err error) Delete(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, taskID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudTask, err error) List(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultPage, err error) ListComplete(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultIterator, err error) ListSubtasks(ctx context.Context, jobID string, taskID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListSubtasksResult, err error) Reactivate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, taskID string, taskUpdateParameter batch.TaskUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) } var _ TaskClientAPI = (*batch.TaskClient)(nil) // ComputeNodeClientAPI contains the set of methods on the ComputeNodeClient type. type ComputeNodeClientAPI interface { AddUser(ctx context.Context, poolID string, nodeID string, userParameter batch.ComputeNodeUser, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) DeleteUser(ctx context.Context, poolID string, nodeID string, userName string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) DisableScheduling(ctx context.Context, poolID string, nodeID string, nodeDisableSchedulingParameter *batch.NodeDisableSchedulingParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) EnableScheduling(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, poolID string, nodeID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNode, err error) GetRemoteDesktop(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ReadCloser, err error) GetRemoteLoginSettings(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeGetRemoteLoginSettingsResult, err error) List(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultPage, err error) ListComplete(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultIterator, err error) Reboot(ctx context.Context, poolID string, nodeID string, nodeRebootParameter *batch.NodeRebootParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Reimage(ctx context.Context, poolID string, nodeID string, nodeReimageParameter *batch.NodeReimageParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpdateUser(ctx context.Context, poolID string, nodeID string, userName string, nodeUpdateUserParameter batch.NodeUpdateUserParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) } var _ ComputeNodeClientAPI = (*batch.ComputeNodeClient)(nil)
build-pipeline.py
# Copyright 2020 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. import json template = """ # Verify the latest-ci version from the {{branch}} branch of kops # Runs a small subset of the e2e tests. # Publishes the version to latest-ci-updown-green on success. - interval: 60m name: {{name}} decorate: true decoration_config: timeout: 45m labels: preset-service-account: "true" preset-aws-ssh: "true" preset-aws-credential: "true" spec: containers: - image: {{e2e_image}} command: - runner.sh - kubetest args: # Generic e2e test args - --up - --test - --down - --dump=$(ARTIFACTS) - --timeout=45m - --gcp-service-account=$(E2E_GOOGLE_APPLICATION_CREDENTIALS) # kops-specific test args - --deployment=kops - --provider=aws - --cluster={{name}}.test-cncf-aws.k8s.io - --kops-ssh-user={{ssh_user}} - --kops-nodes=4 - --extract={{extract}} - --kops-state=s3://k8s-kops-prow/ - --kops-ssh-key=$(AWS_SSH_PRIVATE_KEY_FILE) - --kops-ssh-public-key=$(AWS_SSH_PUBLIC_KEY_FILE) - --kops-publish=gs://k8s-staging-kops/kops/releases/markers/{{branch}}/latest-ci-updown-green.txt - --kops-version=https://storage.googleapis.com/k8s-staging-kops/kops/releases/markers/{{branch}}/latest-ci.txt #- --kops-kubernetes-version should be inferred by kubetest from --extract #- --kops-zone should be randomized by kubetest # Specific test args - --test_args=--ginkgo.focus=\\[k8s.io\\]\\sNetworking.*\\[Conformance\\] --ginkgo.skip=\\[Slow\\]|\\[Serial\\] - --ginkgo-parallel annotations: testgrid-dashboards: sig-cluster-lifecycle-kops, google-aws, kops-misc, kops-k8s-{{k8s_version}} testgrid-tab-name: {{tab}} """ def build_tests(branch, k8s_version, ssh_user): def expand(s):
subs['k8s_version'] = k8s_version if branch: subs['branch'] = branch return s.format(**subs) if branch == 'master': extract = "release/latest-1.19" e2e_image = "gcr.io/k8s-testimages/kubekins-e2e:v20200713-e9b3d9d-1.19" else: extract = expand("release/stable-{k8s_version}") # Hack to stop the autobumper getting confused e2e_image = "gcr.io/k8s-testimages/kubekins-e2e:v20200713-e9b3d9d-1.18" e2e_image = e2e_image[:-4] + k8s_version tab = expand('kops-pipeline-updown-{branch}') # Names must be valid pod and DNS names name = expand('e2e-kops-pipeline-updown-kops{branch}') name = name.replace('.', '') y = template y = y.replace('{{extract}}', extract) y = y.replace('{{e2e_image}}', e2e_image) y = y.replace('{{k8s_version}}', k8s_version) y = y.replace('{{name}}', name) y = y.replace('{{ssh_user}}', ssh_user) y = y.replace('{{tab}}', tab) if branch == 'master': y = y.replace('{{branch}}', "master") else: y = y.replace('{{branch}}', "release-" + branch) spec = { 'branch': branch, 'k8s_version': k8s_version, } jsonspec = json.dumps(spec, sort_keys=True) print("") print("# " + jsonspec) print(y.strip()) branches = [ "master", "1.16", "1.17", "1.18", ] def generate(): print("# Test scenarios generated by build-pipeline.py (do not manually edit)") print("periodics:") for branch in branches: k8s_version = "1.19" if branch == "master" else branch ssh_user = "admin" if branch in ("1.16", "1.17") else "ubuntu" build_tests(branch=branch, k8s_version=k8s_version, ssh_user=ssh_user) generate()
subs = {} if k8s_version:
yolo_v4.py
import numpy as np import tensorflow as tf slim = tf.contrib.slim _BATCH_NORM_DECAY = 0.9 _BATCH_NORM_EPSILON = 1e-05 _LEAKY_RELU = 0.1 _ANCHORS = [(12, 16), (19, 36), (40, 28), (36, 75), (76, 55), (72, 146), (142, 110), (192, 243), (459, 401)] @tf.contrib.framework.add_arg_scope def _fixed_padding(inputs, kernel_size, *args, mode='CONSTANT', **kwargs): """ Pads the input along the spatial dimensions independently of input size. Args: inputs: A tensor of size [batch, channels, height_in, width_in] or [batch, height_in, width_in, channels] depending on data_format. kernel_size: The kernel to be used in the conv2d or max_pool2d operation. Should be a positive integer. data_format: The input format ('NHWC' or 'NCHW'). mode: The mode for tf.pad. Returns: A tensor with the same format as the input with the data either intact (if kernel_size == 1) or padded (if kernel_size > 1). """ pad_total = kernel_size - 1 pad_beg = pad_total // 2 pad_end = pad_total - pad_beg if kwargs['data_format'] == 'NCHW': padded_inputs = tf.pad(inputs, [[0, 0], [0, 0], [pad_beg, pad_end], [pad_beg, pad_end]], mode=mode) else: padded_inputs = tf.pad(inputs, [[0, 0], [pad_beg, pad_end], [pad_beg, pad_end], [0, 0]], mode=mode) return padded_inputs def _conv2d_fixed_padding(inputs, filters, kernel_size, strides=1): if strides > 1: inputs = _fixed_padding(inputs, kernel_size) inputs = slim.conv2d(inputs, filters, kernel_size, stride=strides, padding=('SAME' if strides == 1 else 'VALID')) return inputs def _yolo_res_Block(inputs,in_channels,res_num,data_format,double_ch=False): out_channels = in_channels if double_ch: out_channels = in_channels * 2 net = _conv2d_fixed_padding(inputs,in_channels*2,kernel_size=3,strides=2) route = _conv2d_fixed_padding(net,out_channels,kernel_size=1) net = _conv2d_fixed_padding(net,out_channels,kernel_size=1) for _ in range(res_num): tmp=net net = _conv2d_fixed_padding(net,in_channels,kernel_size=1) net = _conv2d_fixed_padding(net,out_channels,kernel_size=3) #shortcut net = tmp+net net=_conv2d_fixed_padding(net,out_channels,kernel_size=1) #concat net=tf.concat([net,route],axis=1 if data_format == 'NCHW' else 3) net=_conv2d_fixed_padding(net,in_channels*2,kernel_size=1) return net def _yolo_conv_block(net,in_channels,a,b): for _ in range(a): out_channels=in_channels/2 net = _conv2d_fixed_padding(net,out_channels,kernel_size=1) net = _conv2d_fixed_padding(net,in_channels,kernel_size=3) out_channels=in_channels for _ in range(b): out_channels=out_channels/2 net = _conv2d_fixed_padding(net,out_channels,kernel_size=1) return net def _spp_block(inputs, data_format='NCHW'): return tf.concat([slim.max_pool2d(inputs, 13, 1, 'SAME'), slim.max_pool2d(inputs, 9, 1, 'SAME'), slim.max_pool2d(inputs, 5, 1, 'SAME'), inputs], axis=1 if data_format == 'NCHW' else 3) def _upsample(inputs, out_shape, data_format='NCHW'): # tf.image.resize_nearest_neighbor accepts input in format NHWC if data_format == 'NCHW': inputs = tf.transpose(inputs, [0, 2, 3, 1]) if data_format == 'NCHW': new_height = out_shape[2] new_width = out_shape[3] else: new_height = out_shape[1] new_width = out_shape[2]
if data_format == 'NCHW': inputs = tf.transpose(inputs, [0, 3, 1, 2]) inputs = tf.identity(inputs, name='upsampled') return inputs def csp_darknet53(inputs,data_format,batch_norm_params): """ Builds CSPDarknet-53 model.activation_fn=lambda x: tf.nn.leaky_relu(x, alpha=_LEAKY_RELU) """ with slim.arg_scope([slim.conv2d], normalizer_fn=slim.batch_norm, normalizer_params=batch_norm_params, biases_initializer=None, activation_fn=lambda x:x* tf.math.tanh(tf.math.softplus(x))): net = _conv2d_fixed_padding(inputs,32,kernel_size=3) #downsample #res1 net=_yolo_res_Block(net,32,1,data_format,double_ch=True) #res2 net = _yolo_res_Block(net,64,2,data_format) #res8 net = _yolo_res_Block(net,128,8,data_format) #features of 54 layer up_route_54=net #res8 net = _yolo_res_Block(net,256,8,data_format) #featyres of 85 layer up_route_85=net #res4 net=_yolo_res_Block(net,512,4,data_format) with slim.arg_scope([slim.conv2d], normalizer_fn=slim.batch_norm, normalizer_params=batch_norm_params, biases_initializer=None, activation_fn=lambda x: tf.nn.leaky_relu(x, alpha=_LEAKY_RELU)): ######## net = _yolo_conv_block(net,1024,1,1) net=_spp_block(net,data_format=data_format) net=_conv2d_fixed_padding(net,512,kernel_size=1) net = _conv2d_fixed_padding(net, 1024, kernel_size=3) net = _conv2d_fixed_padding(net, 512, kernel_size=1) #features of 116 layer route_3=net net = _conv2d_fixed_padding(net,256,kernel_size=1) upsample_size = up_route_85.get_shape().as_list() net = _upsample(net, upsample_size, data_format) route= _conv2d_fixed_padding(up_route_85,256,kernel_size=1) net = tf.concat([route,net], axis=1 if data_format == 'NCHW' else 3) net = _yolo_conv_block(net,512,2,1) #features of 126 layer route_2=net net = _conv2d_fixed_padding(net,128,kernel_size=1) upsample_size = up_route_54.get_shape().as_list() net = _upsample(net, upsample_size, data_format) route= _conv2d_fixed_padding(up_route_54,128,kernel_size=1) net = tf.concat([route,net], axis=1 if data_format == 'NCHW' else 3) net = _yolo_conv_block(net,256,2,1) #features of 136 layer route_1 = net return route_1, route_2, route_3 def _get_size(shape, data_format): if len(shape) == 4: shape = shape[1:] return shape[1:3] if data_format == 'NCHW' else shape[0:2] def _detection_layer(inputs, num_classes, anchors, img_size, data_format): num_anchors = len(anchors) predictions = slim.conv2d(inputs, num_anchors * (5 + num_classes), 1, stride=1, normalizer_fn=None, activation_fn=None, biases_initializer=tf.zeros_initializer()) shape = predictions.get_shape().as_list() grid_size = _get_size(shape, data_format) dim = grid_size[0] * grid_size[1] bbox_attrs = 5 + num_classes if data_format == 'NCHW': predictions = tf.reshape( predictions, [-1, num_anchors * bbox_attrs, dim]) predictions = tf.transpose(predictions, [0, 2, 1]) predictions = tf.reshape(predictions, [-1, num_anchors * dim, bbox_attrs]) stride = (img_size[0] // grid_size[0], img_size[1] // grid_size[1]) anchors = [(a[0] / stride[0], a[1] / stride[1]) for a in anchors] box_centers, box_sizes, confidence, classes = tf.split( predictions, [2, 2, 1, num_classes], axis=-1) box_centers = tf.nn.sigmoid(box_centers) confidence = tf.nn.sigmoid(confidence) grid_x = tf.range(grid_size[0], dtype=tf.float32) grid_y = tf.range(grid_size[1], dtype=tf.float32) a, b = tf.meshgrid(grid_x, grid_y) x_offset = tf.reshape(a, (-1, 1)) y_offset = tf.reshape(b, (-1, 1)) x_y_offset = tf.concat([x_offset, y_offset], axis=-1) x_y_offset = tf.reshape(tf.tile(x_y_offset, [1, num_anchors]), [1, -1, 2]) box_centers = box_centers + x_y_offset box_centers = box_centers * stride anchors = tf.tile(anchors, [dim, 1]) box_sizes = tf.exp(box_sizes) * anchors box_sizes = box_sizes * stride detections = tf.concat([box_centers, box_sizes, confidence], axis=-1) classes = tf.nn.sigmoid(classes) predictions = tf.concat([detections, classes], axis=-1) return predictions def yolo_v4(inputs, num_classes, is_training=False, data_format='NCHW', reuse=False): """ Creates YOLO v4 model. :param inputs: a 4-D tensor of size [batch_size, height, width, channels]. Dimension batch_size may be undefined. The channel order is RGB. :param num_classes: number of predicted classes. :param is_training: whether is training or not. :param data_format: data format NCHW or NHWC. :param reuse: whether or not the network and its variables should be reused. :param with_spp: whether or not is using spp layer. :return: """ # it will be needed later on img_size = inputs.get_shape().as_list()[1:3] # transpose the inputs to NCHW if data_format == 'NCHW': inputs = tf.transpose(inputs, [0, 3, 1, 2]) # normalize values to range [0..1] inputs = inputs / 255 # set batch norm params batch_norm_params = { 'decay': _BATCH_NORM_DECAY, 'epsilon': _BATCH_NORM_EPSILON, 'scale': True, 'is_training': is_training, 'fused': None, # Use fused batch norm if possible. } # Set activation_fn and parameters for conv2d, batch_norm. with slim.arg_scope([slim.conv2d, slim.batch_norm, _fixed_padding], data_format=data_format, reuse=reuse): #weights_regularizer=slim.l2_regularizer(weight_decay) #weights_initializer=tf.truncated_normal_initializer(0.0, 0.01) with tf.variable_scope('cspdarknet-53'): route_1, route_2, route_3 = csp_darknet53(inputs,data_format,batch_norm_params) with slim.arg_scope([slim.conv2d], normalizer_fn=slim.batch_norm, normalizer_params=batch_norm_params, biases_initializer=None, activation_fn=lambda x: tf.nn.leaky_relu(x, alpha=_LEAKY_RELU)): with tf.variable_scope('yolo-v4'): #features of y1 net = _conv2d_fixed_padding(route_1,256,kernel_size=3) detect_1 = _detection_layer( net, num_classes, _ANCHORS[0:3], img_size, data_format) detect_1 = tf.identity(detect_1, name='detect_1') #features of y2 net = _conv2d_fixed_padding(route_1, 256, kernel_size=3,strides=2) net=tf.concat([net,route_2], axis=1 if data_format == 'NCHW' else 3) net=_yolo_conv_block(net,512,2,1) route_147 =net net = _conv2d_fixed_padding(net,512,kernel_size=3) detect_2 = _detection_layer( net, num_classes, _ANCHORS[3:6], img_size, data_format) detect_2 = tf.identity(detect_2, name='detect_2') # features of y3 net=_conv2d_fixed_padding(route_147,512,strides=2,kernel_size=3) net = tf.concat([net, route_3], axis=1 if data_format == 'NCHW' else 3) net = _yolo_conv_block(net,1024,3,0) detect_3 = _detection_layer( net, num_classes, _ANCHORS[6:9], img_size, data_format) detect_3 = tf.identity(detect_3, name='detect_3') detections = tf.concat([detect_1, detect_2, detect_3], axis=1) detections = tf.identity(detections, name='detections') return detections
inputs = tf.image.resize_nearest_neighbor(inputs, (new_height, new_width)) # back to NCHW if needed
cluster.go
// Copyright © 2018 Heptio // 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 envoy import ( "crypto/sha1" "crypto/sha256" "fmt" "strconv" "strings" "time" v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" envoy_cluster "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster" "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" envoy_type "github.com/envoyproxy/go-control-plane/envoy/type" "github.com/gogo/protobuf/types" "github.com/heptio/contour/internal/dag" ) // Cluster creates new v2.Cluster from service. func Cluster(s dag.Service) *v2.Cluster { switch s := s.(type) { case *dag.HTTPService: return httpCluster(s) case *dag.TCPService: return cluster(s) default: panic(fmt.Sprintf("unsupported Service: %T", s)) } } func httpCluster(service *dag.HTTPService) *v2.Cluster { c := cluster(&service.TCPService) switch service.Protocol { case "tls": c.TlsContext = UpstreamTLSContext() case "h2": c.TlsContext = UpstreamTLSContext("h2") fallthrough case "h2c": c.Http2ProtocolOptions = &core.Http2ProtocolOptions{} } return c } func cluster(service *dag.TCPService) *v2.Cluster { c := &v2.Cluster{ Name: Clustername(service), AltStatName: altStatName(service), ClusterDiscoveryType: ClusterDiscoveryType(v2.Cluster_EDS), EdsClusterConfig: edsconfig("contour", service), ConnectTimeout: 250 * time.Millisecond, LbPolicy: lbPolicy(service.LoadBalancerStrategy), CommonLbConfig: ClusterCommonLBConfig(), HealthChecks: edshealthcheck(service), } // Drain connections immediately if using healthchecks and the endpoint is known to be removed if service.HealthCheck != nil { c.DrainConnectionsOnHostRemoval = true } if anyPositive(service.MaxConnections, service.MaxPendingRequests, service.MaxRequests, service.MaxRetries) { c.CircuitBreakers = &envoy_cluster.CircuitBreakers{ Thresholds: []*envoy_cluster.CircuitBreakers_Thresholds{{ MaxConnections: u32nil(service.MaxConnections), MaxPendingRequests: u32nil(service.MaxPendingRequests), MaxRequests: u32nil(service.MaxRequests), MaxRetries: u32nil(service.MaxRetries), }}, } } return c } func edsconfig(cluster string, service *dag.TCPService) *v2.Cluster_EdsClusterConfig { name := []string{ service.Namespace, service.Name, service.ServicePort.Name, } if name[2] == "" { name = name[:2] } return &v2.Cluster_EdsClusterConfig{ EdsConfig: ConfigSource(cluster), ServiceName: strings.Join(name, "/"), } } func lbPolicy(strategy string) v2.Cluster_LbPolicy { switch strategy { case "WeightedLeastRequest": return v2.Cluster_LEAST_REQUEST case "RingHash": return v2.Cluster_RING_HASH case "Maglev": return v2.Cluster_MAGLEV case "Random": return v2.Cluster_RANDOM default: return v2.Cluster_ROUND_ROBIN } } func edshealthcheck(s *dag.TCPService) []*core.HealthCheck { if s.HealthCheck == nil { return nil } return []*core.HealthCheck{ healthCheck(s), } } // Clustername returns the name of the CDS cluster for this service. func Clustername(service *dag.TCPService) string { buf := service.LoadBalancerStrategy if hc := service.HealthCheck; hc != nil { if hc.TimeoutSeconds > 0 { buf += (time.Duration(hc.TimeoutSeconds) * time.Second).String() } if hc.IntervalSeconds > 0 { buf += (time.Duration(hc.IntervalSeconds) * time.Second).String() } if hc.UnhealthyThresholdCount > 0 { buf += strconv.Itoa(int(hc.UnhealthyThresholdCount)) } if hc.HealthyThresholdCount > 0 { buf += strconv.Itoa(int(hc.HealthyThresholdCount)) } buf += hc.Path } hash := sha1.Sum([]byte(buf)) ns := service.Namespace name := service.Name return hashname(60, ns, name, strconv.Itoa(int(service.Port)), fmt.Sprintf("%x", hash[:5])) } // altStatName generates an alternative stat name for the service // using format ns_name_port func altStatName(service *dag.TCPService) string { return strings.Join([]string{service.Namespace, service.Name, strconv.Itoa(int(service.Port))}, "_") } // hashname takes a lenth l and a varargs of strings s and returns a string whose length // which does not exceed l. Internally s is joined with strings.Join(s, "/"). If the // combined length exceeds l then hashname truncates each element in s, starting from the // end using a hash derived from the contents of s (not the current element). This process // continues until the length of s does not exceed l, or all elements have been truncated. // In which case, the entire string is replaced with a hash not exceeding the length of l. func hashname(l int, s ...string) string { const shorthash = 6 // the length of the shorthash r := strings.Join(s, "/") if l > len(r) { // we're under the limit, nothing to do return r } hash := fmt.Sprintf("%x", sha256.Sum256([]byte(r))) for n := len(s) - 1; n >= 0; n-- { s[n] = truncate(l/len(s), s[n], hash[:shorthash]) r = strings.Join(s, "/") if l > len(r) { return r } } // truncated everything, but we're still too long // just return the hash truncated to l. return hash[:min(len(hash), l)] } // truncate truncates s to l length by replacing the // end of s with -suffix. func truncate(l int, s, suffix string) string { if l >= len(s) { // under the limit, nothing to do return s } if l <= len(suffix) { // easy case, just return the start of the suffix return suffix[:min(l, len(suffix))] } return s[:l-len(suffix)-1] + "-" + suffix } func min(a, b int) int {
// anyPositive indicates if any of the values provided are greater than zero. func anyPositive(first int, rest ...int) bool { if first > 0 { return true } for _, v := range rest { if v > 0 { return true } } return false } // u32nil creates a *types.UInt32Value containing v. // u32nil returns nil if v is zero. func u32nil(val int) *types.UInt32Value { switch val { case 0: return nil default: return u32(val) } } func ClusterCommonLBConfig() *v2.Cluster_CommonLbConfig { return &v2.Cluster_CommonLbConfig{ HealthyPanicThreshold: &envoy_type.Percent{ // Disable HealthyPanicThreshold Value: 0, }, } } // ConfigSource returns a *core.ConfigSource for cluster. func ConfigSource(cluster string) *core.ConfigSource { return &core.ConfigSource{ ConfigSourceSpecifier: &core.ConfigSource_ApiConfigSource{ ApiConfigSource: &core.ApiConfigSource{ ApiType: core.ApiConfigSource_GRPC, GrpcServices: []*core.GrpcService{{ TargetSpecifier: &core.GrpcService_EnvoyGrpc_{ EnvoyGrpc: &core.GrpcService_EnvoyGrpc{ ClusterName: cluster, }, }, }}, }, }, } } func ClusterDiscoveryType(t v2.Cluster_DiscoveryType) *v2.Cluster_Type { return &v2.Cluster_Type{Type: t} }
if a > b { return b } return a }
actions.js
import * as utils from './utils' // ------------------------------------ // Constants // ------------------------------------ export const GENERATE_EQUATION = 'GENERATE_EQUATION' export const SET_FORMULA = 'SET_FORMULA' export const SET_EQUATION = 'SET_EQUATION' export const ADD_ERROR = 'ADD_ERROR' export const SET_ANSWER = 'SET_ANSWER' export const SET_ANSWER0 = 'SET_ANSWER0' export const SET_ANSWER1 = 'SET_ANSWER1' export const SET_ANSWER2 = 'SET_ANSWER2' export const SET_ANSWER3 = 'SET_ANSWER3' export const VALIDATE_ANSWER = 'VALIDATE_ANSWER' export const SET_ANSWER_DEFAULT = 'SET_ANSWER_DEFAULT' export const SET_DIFFICULTY = 'SET_DIFFICULTY' export const SET_OPERATOR = 'SET_OPERATOR' export const SET_BC = 'SET_BC' export const SET_BC_DEFAULT = 'SET_BC_DEFAULT' // ------------------------------------ // Actions // ------------------------------------ export const generateEquation = () => (dispatch, getState) => { let { config } = getState() utils.generateEquation(config, (error, equation) => { if (error) { dispatch({ type: ADD_ERROR, payload: error }) } else { dispatch({ type: SET_FORMULA, payload: equation.formula }) dispatch({
}) dispatch({ type: SET_ANSWER_DEFAULT, payload: utils.padArray([], equation.columnCount) }) dispatch({ type: SET_BC_DEFAULT, payload: utils.padArray([], equation.columnCount) }) dispatch({ type: VALIDATE_ANSWER, payload: false }) } }) } export const onDifficultyLevelChange = (level) => (dispatch) => { dispatch({ type: SET_DIFFICULTY, payload: level }) } export const onOperatorChange = (type) => (dispatch) => { dispatch({ type: SET_OPERATOR, payload: type }) } export const onAnswerChanged = (obj) => (dispatch, getState) => { dispatch({ type: 'SET_ANSWER', payload: obj }) const state = getState() const isValid = state.equation.results === utils.convertArrayToNumber(state.answer) dispatch({ type: VALIDATE_ANSWER, payload: isValid }) } export const onBCChanged = (obj) => (dispatch, getState) => { dispatch({ type: SET_BC, payload: obj }) }
type: SET_EQUATION, payload: equation
asset.py
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2020 Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ import io from .errors import DiscordException from .errors import InvalidArgument from . import utils VALID_STATIC_FORMATS = frozenset({"jpeg", "jpg", "webp", "png"}) VALID_AVATAR_FORMATS = VALID_STATIC_FORMATS | {"gif"} class Asset: """Represents a CDN asset on Discord. .. container:: operations .. describe:: str(x) Returns the URL of the CDN asset. .. describe:: len(x) Returns the length of the CDN asset's URL. .. describe:: bool(x) Checks if the Asset has a URL. .. describe:: x == y Checks if the asset is equal to another asset. .. describe:: x != y Checks if the asset is not equal to another asset. .. describe:: hash(x) Returns the hash of the asset. """ __slots__ = ('_state', '_url') BASE = 'https://cdn.discordapp.com' def __init__(self, state, url=None): self._state = state self._url = url @classmethod def _from_avatar(cls, state, user, *, format=None, static_format='webp', size=1024): if not utils.valid_icon_size(size): raise InvalidArgument("size must be a power of 2 between 16 and 4096") if format is not None and format not in VALID_AVATAR_FORMATS: raise InvalidArgument("format must be None or one of {}".format(VALID_AVATAR_FORMATS)) if format == "gif" and not user.is_avatar_animated(): raise InvalidArgument("non animated avatars do not support gif format") if static_format not in VALID_STATIC_FORMATS: raise InvalidArgument("static_format must be one of {}".format(VALID_STATIC_FORMATS)) if user.avatar is None: return user.default_avatar_url if format is None: format = 'gif' if user.is_avatar_animated() else static_format return cls(state, '/avatars/{0.id}/{0.avatar}.{1}?size={2}'.format(user, format, size)) @classmethod def _from_icon(cls, state, object, path): if object.icon is None: return cls(state) url = '/{0}-icons/{1.id}/{1.icon}.jpg'.format(path, object) return cls(state, url) @classmethod def _from_cover_image(cls, state, obj): if obj.cover_image is None: return cls(state) url = '/app-assets/{0.id}/store/{0.cover_image}.jpg'.format(obj) return cls(state, url) @classmethod def _from_guild_image(cls, state, id, hash, key, *, format='webp', size=1024): if not utils.valid_icon_size(size): raise InvalidArgument("size must be a power of 2 between 16 and 4096") if format not in VALID_STATIC_FORMATS: raise InvalidArgument("format must be one of {}".format(VALID_STATIC_FORMATS)) if hash is None: return cls(state) url = '/{key}/{0}/{1}.{2}?size={3}' return cls(state, url.format(id, hash, format, size, key=key)) @classmethod def _from_guild_icon(cls, state, guild, *, format=None, static_format='webp', size=1024): if not utils.valid_icon_size(size): raise InvalidArgument("size must be a power of 2 between 16 and 4096") if format is not None and format not in VALID_AVATAR_FORMATS: raise InvalidArgument("format must be one of {}".format(VALID_AVATAR_FORMATS)) if format == "gif" and not guild.is_icon_animated(): raise InvalidArgument("non animated guild icons do not support gif format") if static_format not in VALID_STATIC_FORMATS: raise InvalidArgument("static_format must be one of {}".format(VALID_STATIC_FORMATS)) if guild.icon is None: return cls(state) if format is None: format = 'gif' if guild.is_icon_animated() else static_format return cls(state, '/icons/{0.id}/{0.icon}.{1}?size={2}'.format(guild, format, size)) def __str__(self): return self.BASE + self._url if self._url is not None else '' def __len__(self): if self._url: return len(self.BASE + self._url) return 0 def __bool__(self): return self._url is not None def __repr__(self): return '<Asset url={0._url!r}>'.format(self) def __eq__(self, other):
def __ne__(self, other): return not self.__eq__(other) def __hash__(self): return hash(self._url) async def read(self): """|coro| Retrieves the content of this asset as a :class:`bytes` object. .. warning:: :class:`PartialEmoji` won't have a connection state if user created, and a URL won't be present if a custom image isn't associated with the asset, e.g. a guild with no custom icon. .. versionadded:: 1.1 Raises ------ DiscordException There was no valid URL or internal connection state. HTTPException Downloading the asset failed. NotFound The asset was deleted. Returns ------- :class:`bytes` The content of the asset. """ if not self._url: raise DiscordException('Invalid asset (no URL provided)') if self._state is None: raise DiscordException('Invalid state (no ConnectionState provided)') return await self._state.http.get_from_cdn(self.BASE + self._url) async def save(self, fp, *, seek_begin=True): """|coro| Saves this asset into a file-like object. Parameters ---------- fp: Union[BinaryIO, :class:`os.PathLike`] Same as in :meth:`Attachment.save`. seek_begin: :class:`bool` Same as in :meth:`Attachment.save`. Raises ------ DiscordException There was no valid URL or internal connection state. HTTPException Downloading the asset failed. NotFound The asset was deleted. Returns -------- :class:`int` The number of bytes written. """ data = await self.read() if isinstance(fp, io.IOBase) and fp.writable(): written = fp.write(data) if seek_begin: fp.seek(0) return written else: with open(fp, 'wb') as f: return f.write(data)
return isinstance(other, Asset) and self._url == other._url
colors.js
export default { text: "#263238", faded: "#8a9094", primary: "#5bb7db", danger: "#D94238", warning: "#f4c20d", success: "#1E9A57", contentBackground: "#f8f8f8", border: "#aaaaaa",
white: "#ffffff", blue: "#304FFE", };
bing-cluster-layer.js
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ import { BingConversions } from '../../services/bing/bing-conversions'; import { Marker } from '../marker'; import { BingSpiderClusterMarker } from './bing-spider-cluster-marker'; import { BingMarker } from './bing-marker'; /** * Concrete implementation of a clustering layer for the Bing Map Provider. * * @export */ export class BingClusterLayer { /** * Creates a new instance of the BingClusterLayer class. * * \@memberof BingClusterLayer * @param {?} _layer Microsoft.Maps.ClusterLayer. Native Bing Cluster Layer supporting the cluster layer. * @param {?} _maps MapService. MapService implementation to leverage for the layer. * */ constructor(_layer, _maps) { this._layer = _layer; this._maps = _maps; this._isClustering = true; this._markers = new Array(); this._markerLookup = new Map(); this._pendingMarkers = new Array(); this._spiderMarkers = new Array(); this._spiderMarkerLookup = new Map(); this._useSpiderCluster = false; this._mapclicks = 0; this._events = new Array(); this._currentZoom = 0; this._spiderOptions = { circleSpiralSwitchover: 9, collapseClusterOnMapChange: false, collapseClusterOnNthClick: 1, invokeClickOnHover: true, minCircleLength: 60, minSpiralAngleSeperation: 25, spiralDistanceFactor: 5, stickStyle: { strokeColor: 'black', strokeThickness: 2 }, stickHoverStyle: { strokeColor: 'red' }, markerSelected: null, markerUnSelected: null }; this._currentCluster = null; } /** * Get the native primitive underneath the abstraction layer.
*/ get NativePrimitve() { return this._layer; } /** * Adds an event listener for the layer. * * \@memberof BingClusterLayer * @param {?} eventType string. Type of event to add (click, mouseover, etc). You can use any event that the underlying native * layer supports. * @param {?} fn function. Handler to call when the event occurs. * * @return {?} */ AddListener(eventType, fn) { Microsoft.Maps.Events.addHandler(this._layer, eventType, (e) => { fn(e); }); } /** * Adds an entity to the layer. Use this method with caution as it will * trigger a recaluation of the clusters (and associated markers if approprite) for * each invocation. If you use this method to add many markers to the cluster, use * * \@memberof BingClusterLayer * @param {?} entity Marker. Entity to add to the layer. * * @return {?} */ AddEntity(entity) { /** @type {?} */ let isMarker = entity instanceof Marker; isMarker = entity instanceof BingMarker || isMarker; if (isMarker) { if (entity.IsFirst) { this.StopClustering(); } } if (entity.NativePrimitve && entity.Location) { if (this._isClustering) { /** @type {?} */ const p = this._layer.getPushpins(); p.push(entity.NativePrimitve); this._layer.setPushpins(p); this._markers.push(entity); } else { this._pendingMarkers.push(entity); } this._markerLookup.set(entity.NativePrimitve, entity); } if (isMarker) { if (entity.IsLast) { this.StartClustering(); } } } /** * Adds a number of markers to the layer. * * \@memberof BingClusterLayer * @param {?} entities Array<Marker>. Entities to add to the layer. * * @return {?} */ AddEntities(entities) { if (entities != null && Array.isArray(entities) && entities.length !== 0) { /** @type {?} */ const e = entities.map(p => { this._markerLookup.set(p.NativePrimitve, p); return p.NativePrimitve; }); if (this._isClustering) { /** @type {?} */ const p = this._layer.getPushpins(); p.push(...e); this._layer.setPushpins(p); this._markers.push(...entities); } else { this._pendingMarkers.push(...entities); } } } /** * Initializes spider behavior for the clusering layer (when a cluster maker is clicked, it explodes into a spider of the * individual underlying pins. * * \@memberof BingClusterLayer * @param {?=} options ISpiderClusterOptions. Optional. Options governing the behavior of the spider. * * @return {?} */ InitializeSpiderClusterSupport(options) { if (this._useSpiderCluster) { return; } /** @type {?} */ const m = (/** @type {?} */ (this._maps)).MapInstance; this._useSpiderCluster = true; this._spiderLayer = new Microsoft.Maps.Layer(); this._currentZoom = m.getZoom(); this.SetSpiderOptions(options); m.layers.insert(this._spiderLayer); this._events.push(Microsoft.Maps.Events.addHandler(m, 'click', e => this.OnMapClick(e))); this._events.push(Microsoft.Maps.Events.addHandler(m, 'viewchangestart', e => this.OnMapViewChangeStart(e))); this._events.push(Microsoft.Maps.Events.addHandler(m, 'viewchangeend', e => this.OnMapViewChangeEnd(e))); this._events.push(Microsoft.Maps.Events.addHandler(this._layer, 'click', e => this.OnLayerClick(e))); this._events.push(Microsoft.Maps.Events.addHandler(this._spiderLayer, 'click', e => this.OnLayerClick(e))); this._events.push(Microsoft.Maps.Events.addHandler(this._spiderLayer, 'mouseover', e => this.OnSpiderMouseOver(e))); this._events.push(Microsoft.Maps.Events.addHandler(this._spiderLayer, 'mouseout', e => this.OnSpiderMouseOut(e))); } /** * Deletes the clustering layer. * * \@memberof BingClusterLayer * @return {?} */ Delete() { if (this._useSpiderCluster) { this._spiderLayer.clear(); (/** @type {?} */ (this._maps)).MapPromise.then(m => { m.layers.remove(this._spiderLayer); this._spiderLayer = null; }); this._events.forEach(e => Microsoft.Maps.Events.removeHandler(e)); this._events.splice(0); this._useSpiderCluster = false; } this._markers.splice(0); this._spiderMarkers.splice(0); this._pendingMarkers.splice(0); this._markerLookup.clear(); this._maps.DeleteLayer(this); } /** * Returns the abstract marker used to wrap the Bing Pushpin. * * \@memberof BingClusterLayer * @param {?} pin * @return {?} Marker. The abstract marker object representing the pushpin. * */ GetMarkerFromBingMarker(pin) { /** @type {?} */ const m = this._markerLookup.get(pin); return m; } /** * Returns the options governing the behavior of the layer. * * \@memberof BingClusterLayer * @return {?} IClusterOptions. The layer options. * */ GetOptions() { /** @type {?} */ const o = this._layer.getOptions(); /** @type {?} */ const options = { id: 0, gridSize: o.gridSize, layerOffset: o.layerOffset, clusteringEnabled: o.clusteringEnabled, callback: o.callback, clusteredPinCallback: o.clusteredPinCallback, visible: o.visible, zIndex: o.zIndex }; return options; } /** * Returns the visibility state of the layer. * * \@memberof BingClusterLayer * @return {?} Boolean. True is the layer is visible, false otherwise. * */ GetVisible() { return this._layer.getOptions().visible; } /** * Returns the abstract marker used to wrap the Bing Pushpin. * * \@memberof BingClusterLayer * @param {?} pin * @return {?} - The abstract marker object representing the pushpin. * */ GetSpiderMarkerFromBingMarker(pin) { /** @type {?} */ const m = this._spiderMarkerLookup.get(pin); return m; } /** * Removes an entity from the cluster layer. * * \@memberof BingClusterLayer * @param {?} entity Marker - Entity to be removed from the layer. * * @return {?} */ RemoveEntity(entity) { if (entity.NativePrimitve && entity.Location) { /** @type {?} */ const j = this._markers.indexOf(entity); /** @type {?} */ const k = this._pendingMarkers.indexOf(entity); if (j > -1) { this._markers.splice(j, 1); } if (k > -1) { this._pendingMarkers.splice(k, 1); } if (this._isClustering) { /** @type {?} */ const p = this._layer.getPushpins(); /** @type {?} */ const i = p.indexOf(entity.NativePrimitve); if (i > -1) { p.splice(i, 1); this._layer.setPushpins(p); } } this._markerLookup.delete(entity.NativePrimitve); } } /** * Sets the entities for the cluster layer. * * \@memberof BingClusterLayer * @param {?} entities Array<Marker> containing * the entities to add to the cluster. This replaces any existing entities. * * @return {?} */ SetEntities(entities) { /** @type {?} */ const p = new Array(); this._markers.splice(0); this._markerLookup.clear(); entities.forEach((e) => { if (e.NativePrimitve && e.Location) { this._markers.push(e); this._markerLookup.set(e.NativePrimitve, e); p.push(/** @type {?} */ (e.NativePrimitve)); } }); this._layer.setPushpins(p); } /** * Sets the options for the cluster layer. * * \@memberof BingClusterLayer * @param {?} options IClusterOptions containing the options enumeration controlling the layer behavior. The supplied options * are merged with the default/existing options. * * @return {?} */ SetOptions(options) { /** @type {?} */ const o = BingConversions.TranslateClusterOptions(options); this._layer.setOptions(o); if (options.spiderClusterOptions) { this.SetSpiderOptions(options.spiderClusterOptions); } } /** * Toggles the cluster layer visibility. * * \@memberof BingClusterLayer * @param {?} visible Boolean true to make the layer visible, false to hide the layer. * * @return {?} */ SetVisible(visible) { /** @type {?} */ const o = this._layer.getOptions(); o.visible = visible; this._layer.setOptions(o); } /** * Start to actually cluster the entities in a cluster layer. This method should be called after the initial set of entities * have been added to the cluster. This method is used for performance reasons as adding an entitiy will recalculate all clusters. * As such, StopClustering should be called before adding many entities and StartClustering should be called once adding is * complete to recalculate the clusters. * * \@memberof BingClusterLayer * @return {?} */ StartClustering() { if (this._isClustering) { return; } /** @type {?} */ const p = new Array(); this._markers.forEach(e => { if (e.NativePrimitve && e.Location) { p.push(/** @type {?} */ (e.NativePrimitve)); } }); this._pendingMarkers.forEach(e => { if (e.NativePrimitve && e.Location) { p.push(/** @type {?} */ (e.NativePrimitve)); } }); this._layer.setPushpins(p); this._markers = this._markers.concat(this._pendingMarkers.splice(0)); this._isClustering = true; } /** * Stop to actually cluster the entities in a cluster layer. * This method is used for performance reasons as adding an entitiy will recalculate all clusters. * As such, StopClustering should be called before adding many entities and StartClustering should be called once adding is * complete to recalculate the clusters. * * \@memberof BingClusterLayer * @return {?} */ StopClustering() { if (!this._isClustering) { return; } this._isClustering = false; } /** * Creates a copy of a pushpins basic options. * * \@memberof BingClusterLayer * @param {?} pin Pushpin to copy options from. * @return {?} - A copy of a pushpins basic options. * */ GetBasicPushpinOptions(pin) { return /** @type {?} */ ({ anchor: pin.getAnchor(), color: pin.getColor(), cursor: pin.getCursor(), icon: pin.getIcon(), roundClickableArea: pin.getRoundClickableArea(), subTitle: pin.getSubTitle(), text: pin.getText(), textOffset: pin.getTextOffset(), title: pin.getTitle() }); } /** * Hides the spider cluster and resotres the original pin. * * \@memberof BingClusterLayer * @return {?} */ HideSpiderCluster() { this._mapclicks = 0; if (this._currentCluster) { this._spiderLayer.clear(); this._spiderMarkers.splice(0); this._spiderMarkerLookup.clear(); this._currentCluster = null; this._mapclicks = -1; if (this._spiderOptions.markerUnSelected) { this._spiderOptions.markerUnSelected(); } } } /** * Click event handler for when a shape in the cluster layer is clicked. * * \@memberof BingClusterLayer * @param {?} e The mouse event argurment from the click event. * * @return {?} */ OnLayerClick(e) { if (e.primitive instanceof Microsoft.Maps.ClusterPushpin) { /** @type {?} */ const cp = /** @type {?} */ (e.primitive); /** @type {?} */ const showNewCluster = cp !== this._currentCluster; this.HideSpiderCluster(); if (showNewCluster) { this.ShowSpiderCluster(/** @type {?} */ (e.primitive)); } } else { /** @type {?} */ const pin = /** @type {?} */ (e.primitive); if (pin.metadata && pin.metadata.isClusterMarker) { /** @type {?} */ const m = this.GetSpiderMarkerFromBingMarker(pin); /** @type {?} */ const p = m.ParentMarker; /** @type {?} */ const ppin = p.NativePrimitve; if (this._spiderOptions.markerSelected) { this._spiderOptions.markerSelected(p, new BingMarker(this._currentCluster, null, null)); } if (Microsoft.Maps.Events.hasHandler(ppin, 'click')) { Microsoft.Maps.Events.invoke(ppin, 'click', e); } this._mapclicks = 0; } else { if (this._spiderOptions.markerSelected) { this._spiderOptions.markerSelected(this.GetMarkerFromBingMarker(pin), null); } if (Microsoft.Maps.Events.hasHandler(pin, 'click')) { Microsoft.Maps.Events.invoke(pin, 'click', e); } } } } /** * Delegate handling the click event on the map (outside a spider cluster). Depending on the * spider options, closes the cluster or increments the click counter. * * \@memberof BingClusterLayer * @param {?} e - Mouse event * * @return {?} */ OnMapClick(e) { if (this._mapclicks === -1) { return; } else if (++this._mapclicks >= this._spiderOptions.collapseClusterOnNthClick) { this.HideSpiderCluster(); } else { // do nothing as this._mapclicks has already been incremented above } } /** * Delegate handling the map view changed end event. Hides the spider cluster if the zoom level has changed. * * \@memberof BingClusterLayer * @param {?} e - Mouse event. * * @return {?} */ OnMapViewChangeEnd(e) { /** @type {?} */ const z = (/** @type {?} */ (e.target)).getZoom(); /** @type {?} */ const hasZoomChanged = (z !== this._currentZoom); this._currentZoom = z; if (hasZoomChanged) { this.HideSpiderCluster(); } } /** * Delegate handling the map view change start event. Depending on the spider options, hides the * the exploded spider or does nothing. * * \@memberof BingClusterLayer * @param {?} e - Mouse event. * * @return {?} */ OnMapViewChangeStart(e) { if (this._spiderOptions.collapseClusterOnMapChange) { this.HideSpiderCluster(); } } /** * Delegate invoked on mouse out on an exploded spider marker. Resets the hover style on the stick. * * @param {?} e - Mouse event. * @return {?} */ OnSpiderMouseOut(e) { /** @type {?} */ const pin = /** @type {?} */ (e.primitive); if (pin instanceof Microsoft.Maps.Pushpin && pin.metadata && pin.metadata.isClusterMarker) { /** @type {?} */ const m = this.GetSpiderMarkerFromBingMarker(pin); m.Stick.setOptions(this._spiderOptions.stickStyle); } } /** * Invoked on mouse over on an exploded spider marker. Sets the hover style on the stick. Also invokes the click event * on the underlying original marker dependent on the spider options. * * @param {?} e - Mouse event. * @return {?} */ OnSpiderMouseOver(e) { /** @type {?} */ const pin = /** @type {?} */ (e.primitive); if (pin instanceof Microsoft.Maps.Pushpin && pin.metadata && pin.metadata.isClusterMarker) { /** @type {?} */ const m = this.GetSpiderMarkerFromBingMarker(pin); m.Stick.setOptions(this._spiderOptions.stickHoverStyle); if (this._spiderOptions.invokeClickOnHover) { /** @type {?} */ const p = m.ParentMarker; /** @type {?} */ const ppin = p.NativePrimitve; if (Microsoft.Maps.Events.hasHandler(ppin, 'click')) { Microsoft.Maps.Events.invoke(ppin, 'click', e); } } } } /** * Sets the options for spider behavior. * * \@memberof BingClusterLayer * @param {?} options ISpiderClusterOptions containing the options enumeration controlling the spider cluster behavior. The supplied options * are merged with the default/existing options. * * @return {?} */ SetSpiderOptions(options) { if (options) { if (typeof options.circleSpiralSwitchover === 'number') { this._spiderOptions.circleSpiralSwitchover = options.circleSpiralSwitchover; } if (typeof options.collapseClusterOnMapChange === 'boolean') { this._spiderOptions.collapseClusterOnMapChange = options.collapseClusterOnMapChange; } if (typeof options.collapseClusterOnNthClick === 'number') { this._spiderOptions.collapseClusterOnNthClick = options.collapseClusterOnNthClick; } if (typeof options.invokeClickOnHover === 'boolean') { this._spiderOptions.invokeClickOnHover = options.invokeClickOnHover; } if (typeof options.minSpiralAngleSeperation === 'number') { this._spiderOptions.minSpiralAngleSeperation = options.minSpiralAngleSeperation; } if (typeof options.spiralDistanceFactor === 'number') { this._spiderOptions.spiralDistanceFactor = options.spiralDistanceFactor; } if (typeof options.minCircleLength === 'number') { this._spiderOptions.minCircleLength = options.minCircleLength; } if (options.stickHoverStyle) { this._spiderOptions.stickHoverStyle = options.stickHoverStyle; } if (options.stickStyle) { this._spiderOptions.stickStyle = options.stickStyle; } if (options.markerSelected) { this._spiderOptions.markerSelected = options.markerSelected; } if (options.markerUnSelected) { this._spiderOptions.markerUnSelected = options.markerUnSelected; } if (typeof options.visible === 'boolean') { this._spiderOptions.visible = options.visible; } this.SetOptions(/** @type {?} */ (options)); } } /** * Expands a cluster into it's open spider layout. * * \@memberof BingClusterLayer * @param {?} cluster The cluster to show in it's open spider layout.. * * @return {?} */ ShowSpiderCluster(cluster) { this.HideSpiderCluster(); this._currentCluster = cluster; if (cluster && cluster.containedPushpins) { /** @type {?} */ const m = (/** @type {?} */ (this._maps)).MapInstance; /** @type {?} */ const pins = cluster.containedPushpins; /** @type {?} */ const center = cluster.getLocation(); /** @type {?} */ const centerPoint = /** @type {?} */ (m.tryLocationToPixel(center, Microsoft.Maps.PixelReference.control)); /** @type {?} */ let stick; /** @type {?} */ let angle = 0; /** @type {?} */ const makeSpiral = pins.length > this._spiderOptions.circleSpiralSwitchover; /** @type {?} */ let legPixelLength; /** @type {?} */ let stepAngle; /** @type {?} */ let stepLength; if (makeSpiral) { legPixelLength = this._spiderOptions.minCircleLength / Math.PI; stepLength = 2 * Math.PI * this._spiderOptions.spiralDistanceFactor; } else { stepAngle = 2 * Math.PI / pins.length; legPixelLength = (this._spiderOptions.spiralDistanceFactor / stepAngle / Math.PI / 2) * pins.length; if (legPixelLength < this._spiderOptions.minCircleLength) { legPixelLength = this._spiderOptions.minCircleLength; } } for (let i = 0, len = pins.length; i < len; i++) { // Calculate spider pin location. if (!makeSpiral) { angle = stepAngle * i; } else { angle += this._spiderOptions.minSpiralAngleSeperation / legPixelLength + i * 0.0005; legPixelLength += stepLength / angle; } /** @type {?} */ const point = new Microsoft.Maps.Point(centerPoint.x + legPixelLength * Math.cos(angle), centerPoint.y + legPixelLength * Math.sin(angle)); /** @type {?} */ const loc = /** @type {?} */ (m.tryPixelToLocation(point, Microsoft.Maps.PixelReference.control)); // Create stick to pin. stick = new Microsoft.Maps.Polyline([center, loc], this._spiderOptions.stickStyle); this._spiderLayer.add(stick); /** @type {?} */ const pin = new Microsoft.Maps.Pushpin(loc); pin.metadata = pins[i].metadata || {}; pin.metadata.isClusterMarker = true; pin.setOptions(this.GetBasicPushpinOptions(pins[i])); this._spiderLayer.add(pin); /** @type {?} */ const spiderMarker = new BingSpiderClusterMarker(pin, null, this._spiderLayer); spiderMarker.Stick = stick; spiderMarker.ParentMarker = /** @type {?} */ (this.GetMarkerFromBingMarker(pins[i])); this._spiderMarkers.push(spiderMarker); this._spiderMarkerLookup.set(pin, spiderMarker); } this._mapclicks = 0; } } } if (false) { /** @type {?} */ BingClusterLayer.prototype._isClustering; /** @type {?} */ BingClusterLayer.prototype._markers; /** @type {?} */ BingClusterLayer.prototype._markerLookup; /** @type {?} */ BingClusterLayer.prototype._pendingMarkers; /** @type {?} */ BingClusterLayer.prototype._spiderMarkers; /** @type {?} */ BingClusterLayer.prototype._spiderMarkerLookup; /** @type {?} */ BingClusterLayer.prototype._useSpiderCluster; /** @type {?} */ BingClusterLayer.prototype._mapclicks; /** @type {?} */ BingClusterLayer.prototype._spiderLayer; /** @type {?} */ BingClusterLayer.prototype._events; /** @type {?} */ BingClusterLayer.prototype._currentZoom; /** @type {?} */ BingClusterLayer.prototype._spiderOptions; /** @type {?} */ BingClusterLayer.prototype._currentCluster; /** @type {?} */ BingClusterLayer.prototype._layer; /** @type {?} */ BingClusterLayer.prototype._maps; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluZy1jbHVzdGVyLWxheWVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci1tYXBzLyIsInNvdXJjZXMiOlsic3JjL21vZGVscy9iaW5nL2JpbmctY2x1c3Rlci1sYXllci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBRUEsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO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biAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX21hcmtlckxvb2t1cC5zZXQoZW50aXR5Lk5hdGl2ZVByaW1pdHZlLCBlbnRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc01hcmtlcikge1xuICAgICAgICAgICAgaWYgKGVudGl0eS5Jc0xhc3QpIHtcbiAgICAgICAgICAgICAgICB0aGlzLlN0YXJ0Q2x1c3RlcmluZygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQWRkcyBhIG51bWJlciBvZiBtYXJrZXJzIHRvIHRoZSBsYXllci5cbiAgICAgKlxuICAgICAqIEBwYXJhbSBlbnRpdGllcyBBcnJheTxNYXJrZXI+LiBFbnRpdGllcyB0byBhZGQgdG8gdGhlIGxheWVyLlxuICAgICAqXG4gICAgICogQG1lbWJlcm9mIEJpbmdDbHVzdGVyTGF5ZXJcbiAgICAgKi9cbiAgICBwdWJsaWMgQWRkRW50aXRpZXMoZW50aXRpZXM6IEFycmF5PE1hcmtlcj4pOiB2b2lkIHtcbiAgICAgICAgaWYgKGVudGl0aWVzICE9IG51bGwgJiYgQXJyYXkuaXNBcnJheShlbnRpdGllcykgJiYgZW50aXRpZXMubGVuZ3RoICE9PSAwICkge1xuICAgICAgICAgICAgY29uc3QgZTogQXJyYXk8TWljcm9zb2Z0Lk1hcHMuUHVzaHBpbj4gPSBlbnRpdGllcy5tYXAocCA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5fbWFya2VyTG9va3VwLnNldChwLk5hdGl2ZVByaW1pdHZlLCBwKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcC5OYXRpdmVQcmltaXR2ZTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKHRoaXMuX2lzQ2x1c3RlcmluZykge1xuICAgICAgICAgICAgICAgIGNvbnN0IHA6IEFycmF5PE1pY3Jvc29mdC5NYXBzLlB1c2hwaW4+ID0gd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XJzLnNwbGljZShrLCAxKTsgfVxuICAgICAgICAgICAgaWYgKHRoaXMuX2lzQ2x1c3RlcmluZykge1xuICAgICAgICAgICAgICAgIGNvbnN0IHA6IEFycmF5PE1pY3Jvc29mdC5NYXBzLlB1c2hwaW4+ID0gdGhpcy5fbGF5ZXIuZ2V0UHVzaHBpbnMoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBpOiBudW1iZXIgPSBwLmluZGV4T2YoZW50aXR5Lk5hdGl2ZVByaW1pdHZlKTtcbiAgICAgICAgICAgICAgICBpZiAoaSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHAuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9sYXllci5zZXRQdXNocGlucyhwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLl9tYXJrZXJMb29rdXAuZGVsZXRlKGVudGl0eS5OYXRpdmVQcmltaXR2ZSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBTZXRzIHRoZSBlbnRpdGllcyBmb3IgdGhlIGNsdXN0ZXIgbGF5ZXIuXG4gICAgICpcbiAgICAgKiBAcGFyYW0gZW50aXRpZXMgQXJyYXk8TWFya2VyPiBjb250YWluaW5nXG4gICAgICogdGhlIGVudGl0aWVzIHRvIGFkZCB0byB0aGUgY2x1c3Rlci4gVGhpcyByZXBsYWNlcyBhbnkgZXhpc3RpbmcgZW50aXRpZXMuXG4gICAgICpcbiAgICAgKiBAbWVtYmVyb2YgQmluZ0NsdXN0ZXJMYXllclxuICAgICAqL1xuICAgIHB1YmxpYyBTZXRFbnRpdGllcyhlbnRpdGllczogQXJyYXk8TWFya2VyPik6IHZvaWQge1xuICAgICAgICBjb25zdCBwOiBBcnJheTxNaWNyb3NvZnQuTWFwcy5QdXNocGluPiA9IG5ldyBBcnJheTxNaWNyb3NvZnQuTWFwcy5QdXNocGluPigpO1xuICAgICAgICB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Y2tPbkhvdmVyID0gb3B0aW9ucy5pbnZva2VDbGlja09uSG92ZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMubWluU3BpcmFsQW5nbGVTZXBlcmF0aW9uID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NwaWRlck9wdGlvbnMubWluU3BpcmFsQW5nbGVTZXBlcmF0aW9uID0gb3B0aW9ucy5taW5TcGlyYWxBbmdsZVNlcGVyYXRpb247XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuc3BpcmFsRGlzdGFuY2VGYWN0b3IgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc3BpZGVyT3B0aW9ucy5zcGlyYWxEaXN0YW5jZUZhY3RvciA9IG9wdGlvbnMuc3BpcmFsRGlzdGFuY2VGYWN0b3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMubWluQ2lyY2xlTGVuZ3RoID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NwaWRlck9wdGlvbnMubWluQ2lyY2xlTGVuZ3RoID0gb3B0aW9ucy5taW5DaXJjbGVMZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAob3B0aW9ucy5zdGlja0hvdmVyU3R5bGUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9zcGlkZXJPcHRpb25zLnN0aWNrSG92ZXJTdHlsZSA9IG9wdGlvbnMuc3RpY2tIb3ZlclN0eWxlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG9wdGlvbnMuc3RpY2tTdHlsZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NwaWRlck9wdGlvbnMuc3RpY2tTdHlsZSA9IG9wdGlvbnMuc3RpY2tTdHlsZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICA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Lk1hcHMuUHVzaHBpbihsb2MpO1xuICAgICAgICAgICAgICAgIHBpbi5tZXRhZGF0YSA9IHBpbnNbaV0ubWV0YWRhdGEgfHwge307XG4gICAgICAgICAgICAgICAgcGluLm1ldGFkYXRhLmlzQ2x1c3Rlck1hcmtlciA9IHRydWU7XG4gICAgICAgICAgICAgICAgcGluLnNldE9wdGlvbnModGhpcy5HZXRCYXNpY1B1c2hwaW5PcHRpb25zKHBpbnNbaV0pKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9zcGlkZXJMYXllci5hZGQocGluKTtcblxuICAgICAgICAgICAgICAgIGNvbnN0IHNwaWRlck1hcmtlcjogQmluZ1NwaWRlckNsdXN0ZXJNYXJrZXIgPSBuZXcgQmluZ1NwaWRlckNsdXN0ZXJNYXJrZXIocGluLCBudWxsLCB0aGlzLl9zcGlkZXJMYXllcik7XG4gICAgICAgICAgICAgICAgc3BpZGVyTWFya2VyLlN0aWNrID0gc3RpY2s7XG4gICAgICAgICAgICAgICAgc3BpZGVyTWFya2VyLlBhcmVudE1hcmtlciA9IDxCaW5nTWFya2VyPnRoaXMuR2V0TWFya2VyRnJvbUJpbmdNYXJrZXIocGluc1tpXSk7XG4gICAgICAgICAgICAgICAgdGhpcy5fc3BpZGVyTWFya2Vycy5wdXNoKHNwaWRlck1hcmtlcik7XG4gICAgICAgICAgICAgICAgdGhpcy5fc3BpZGVyTWFya2VyTG9va3VwLnNldChwaW4sIHNwaWRlck1hcmtlcik7XG5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX21hcGNsaWNrcyA9IDA7XG4gICAgICAgIH1cbiAgICB9XG5cbn1cbiJdfQ==
* * \@memberof BingClusterLayer * @return {?} Microsoft.Maps.ClusterLayer. *
cli.rs
extern crate assert_cmd; extern crate assert_fs; extern crate predicates; use std::process; use assert_cmd::prelude::*; use assert_fs::prelude::*; use predicates::prelude::*; #[test] pub fn invalid_calls() { process::Command::cargo_bin("sb") .unwrap() .assert() .failure() .stderr(predicate::str::contains("requires a subcommand").from_utf8()); process::Command::cargo_bin("sb") .unwrap() .arg("--nonexistent-argument") .assert() .failure() .stderr(predicate::str::contains("--nonexistent-argument").from_utf8()); } #[test] pub fn log_levels_trace()
#[test] pub fn log_levels_trace_alias() { let project_root = assert_fs::TempDir::new().unwrap(); project_root .copy_from("tests/fixtures/example", &["*"]) .unwrap(); process::Command::cargo_bin("sb") .unwrap() .args(&["build", "--trace"]) .current_dir(project_root.path()) .assert() .success() .stderr(predicate::str::contains("TRACE").from_utf8()) .stderr(predicate::str::contains("DEBUG").from_utf8()) .stderr(predicate::str::contains("INFO").from_utf8()); project_root.close().unwrap(); } #[test] pub fn log_levels_debug() { let project_root = assert_fs::TempDir::new().unwrap(); project_root .copy_from("tests/fixtures/example", &["*"]) .unwrap(); process::Command::cargo_bin("sb") .unwrap() .args(&["build", "-L", "debug"]) .current_dir(project_root.path()) .assert() .success() .stderr(predicate::str::contains("[trace]").not().from_utf8()) .stderr(predicate::str::contains("[debug]").from_utf8()) .stderr(predicate::str::contains("[info]").from_utf8()); project_root.close().unwrap(); } #[test] pub fn log_levels_info() { let project_root = assert_fs::TempDir::new().unwrap(); project_root .copy_from("tests/fixtures/example", &["*"]) .unwrap(); process::Command::cargo_bin("sb") .unwrap() .args(&["build", "-L", "info"]) .current_dir(project_root.path()) .assert() .success() .stderr(predicate::str::contains("[trace]").not().from_utf8()) .stderr(predicate::str::contains("[debug]").not().from_utf8()) .stderr(predicate::str::contains("[info]").from_utf8()); project_root.close().unwrap(); } #[test] pub fn log_levels_silent() { let project_root = assert_fs::TempDir::new().unwrap(); project_root .copy_from("tests/fixtures/example", &["*"]) .unwrap(); process::Command::cargo_bin("sb") .unwrap() .args(&["build", "--silent"]) .current_dir(project_root.path()) .assert() .success() .stdout(predicate::str::is_empty().from_utf8()) .stderr(predicate::str::is_empty().from_utf8()); project_root.close().unwrap(); } #[test] pub fn clean() { let project_root = assert_fs::TempDir::new().unwrap(); project_root .copy_from("tests/fixtures/example", &["*"]) .unwrap(); let dest = project_root.child("_dest"); dest.assert(predicate::path::missing()); process::Command::cargo_bin("sb") .unwrap() .args(&["build", "--trace", "-d", "_dest"]) .current_dir(project_root.path()) .assert() .success(); dest.assert(predicate::path::exists()); process::Command::cargo_bin("sb") .unwrap() .args(&["clean", "--trace", "-d", "_dest"]) .current_dir(project_root.path()) .assert() .success(); dest.assert(predicate::path::missing()); project_root.close().unwrap(); } #[test] pub fn clean_empty() { let project_root = assert_fs::TempDir::new().unwrap(); project_root .copy_from("tests/fixtures/example", &["*"]) .unwrap(); let dest = project_root.child("_dest"); dest.assert(predicate::path::missing()); process::Command::cargo_bin("sb") .unwrap() .args(&["clean", "--trace", "-d", "_dest"]) .current_dir(project_root.path()) .assert() .success(); dest.assert(predicate::path::missing()); project_root.close().unwrap(); } #[test] pub fn init_project_can_build() { let project_root = assert_fs::TempDir::new().unwrap(); let dest = project_root.child("_dest"); dest.assert(predicate::path::missing()); process::Command::cargo_bin("sb") .unwrap() .args(&["init", "--trace"]) .current_dir(project_root.path()) .assert() .success(); dest.assert(predicate::path::missing()); process::Command::cargo_bin("sb") .unwrap() .args(&["build", "--trace", "-d", "_dest", "--drafts"]) .current_dir(project_root.path()) .assert() .success(); dest.assert(predicate::path::exists()); project_root.close().unwrap(); }
{ let project_root = assert_fs::TempDir::new().unwrap(); project_root .copy_from("tests/fixtures/example", &["*"]) .unwrap(); process::Command::cargo_bin("sb") .unwrap() .args(&["build", "-L", "trace"]) .current_dir(project_root.path()) .assert() .success() .stderr(predicate::str::contains("TRACE").from_utf8()) .stderr(predicate::str::contains("DEBUG").from_utf8()) .stderr(predicate::str::contains("INFO").from_utf8()); project_root.close().unwrap(); }
client.go
package questdb import ( "bufio" "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "database/sql" "encoding/base64" "errors" "fmt" "github.com/fatih/pool" "math/big" "net" "time" _ "github.com/lib/pq" ) // Config is a struct which holds Client's config fields type Config struct { ILPHost string ILPAuthPrivateKey string ILPAuthKid string ILPPoolMaxSize uint ILPWriteTimeout uint PGConnStr string } // Client struct represents a QuestDB client connection. This encompasses the InfluxDB Line // protocol net.TCPConn as well as the Postgres wire *sql.DB connection. Methods on this // client are primarily used to read/write data to QuestDB. type Client struct { config Config // ilpConn is the TCP connection which allows Client to write data to QuestDB
ilpConn *net.TCPConn ilpPool pool.Pool // pgSqlDB is the Postgres SQL DB connection which allows to read/query data from QuestDB pgSqlDB *sql.DB } // Default func returns a *Client with the default config as specified by QuestDB docs func Default() *Client { return &Client{ config: Config{ ILPHost: "localhost:9009", ILPAuthPrivateKey: "", ILPAuthKid: "", ILPPoolMaxSize: 5, ILPWriteTimeout: 1, PGConnStr: "postgresql://admin:quest@localhost:8812/qdb?sslmode=disable", }, } } // New func returns a *Client and an optional error given a Config func New(config Config) (*Client, error) { return &Client{ config: config, }, nil } var ( ErrILPNetDial = errors.New("could not dial ilp host") ErrILPNetTCPAddrResolve = errors.New("could not resolve ilp host address") ErrPGOpen = errors.New("could not open postgres db") ) // Connect func dials and connects both the Influx line protocol TCP connection as well // as the underlying sql PG database connection. func (c *Client) Connect() error { factory := func() (net.Conn, error) { tcpAddr, err := net.ResolveTCPAddr("tcp4", c.config.ILPHost) if err != nil { return nil, fmt.Errorf("%w: %v", ErrILPNetTCPAddrResolve, err) } conn, err := net.DialTCP("tcp", nil, tcpAddr) if err != nil { return nil, fmt.Errorf("%w: %v", ErrILPNetDial, err) } if c.config.ILPAuthPrivateKey != "" { if c.config.ILPAuthKid == "" { return nil, fmt.Errorf("cannot authenticate ilp without 'ILPAuthKid' set in config") } // Parse and create private key keyRaw, err := base64.RawURLEncoding.DecodeString(c.config.ILPAuthPrivateKey) if err != nil { return nil, fmt.Errorf("could not base64 decode ilp private key: %w", err) } key := new(ecdsa.PrivateKey) key.PublicKey.Curve = elliptic.P256() key.PublicKey.X, key.PublicKey.Y = key.PublicKey.Curve.ScalarBaseMult(keyRaw) key.D = new(big.Int).SetBytes(keyRaw) // send key ID reader := bufio.NewReader(conn) _, err = conn.Write([]byte(c.config.ILPAuthKid + "\n")) if err != nil { return nil, fmt.Errorf("could not write to ilp tcp conn: %w", err) } raw, err := reader.ReadBytes('\n') if err != nil { return nil, fmt.Errorf("could not read from ilp conn: %w", err) } // Remove the `\n` is last position raw = raw[:len(raw)-1] // Hash the challenge with sha256 hash := crypto.SHA256.New() hash.Write(raw) hashed := hash.Sum(nil) a, b, err := ecdsa.Sign(rand.Reader, key, hashed) if err != nil { return nil, fmt.Errorf("could not ecdsa sign key: %w", err) } stdSig := append(a.Bytes(), b.Bytes()...) _, err = conn.Write([]byte(base64.StdEncoding.EncodeToString(stdSig) + "\n")) if err != nil { return nil, fmt.Errorf("could not write to ilp tcp conn: %w", err) } } return conn, nil } //c.ilpConn = conn p, err := pool.NewChannelPool(1, int(c.config.ILPPoolMaxSize), factory) if err != nil { return fmt.Errorf("%w: %v", ErrILPNetDial, err) } c.ilpPool = p db, err := sql.Open("postgres", c.config.PGConnStr) if err != nil { return fmt.Errorf("%w: %v", ErrPGOpen, err) } c.pgSqlDB = db return nil } // Close func closes both the Influx line protocol TCP connection as well as // the PG sql database connection func (c *Client) Close() error { errs := []error{} if err := c.pgSqlDB.Close(); err != nil { errs = append(errs, fmt.Errorf("could not close pg sql db: %w", err)) } //if err := c.ilpConn.Close(); err != nil { // errs = append(errs, fmt.Errorf("could not close ilp tcp conn: %w", err)) //} c.ilpPool.Close() errStr := "" for i, err := range errs { if i > 0 { errStr += " " } errStr += fmt.Sprintf("%d: %s;", i, err) } if errStr != "" { return fmt.Errorf("%s", errStr) } return nil } // WriteMessage func takes a message and writes it to the underlying InfluxDB line protocol func (c *Client) WriteMessage(message []byte) error { conn, err := c.ilpPool.Get() if err != nil { return err } defer conn.Close() conn.SetWriteDeadline(time.Now().Add(time.Duration(c.config.ILPWriteTimeout) * time.Second)) _, err = conn.Write(message) if err != nil { if pc, ok := conn.(*pool.PoolConn); ok { pc.MarkUnusable() pc.Close() } return err } return nil } // Write takes a valid struct with qdb tags and writes it to the underlying InfluxDB line protocol func (c *Client) Write(a interface{}) error { m, err := NewModel(a) if err != nil { return err } line := m.MarshalLine() conn, err := c.ilpPool.Get() if err != nil { return err } defer conn.Close() conn.SetWriteDeadline(time.Now().Add(time.Duration(c.config.ILPWriteTimeout) * time.Second)) _, err = conn.Write(line) //_, err = c.ilpConn.Write(line) if err != nil { if pc, ok := conn.(*pool.PoolConn); ok { pc.MarkUnusable() pc.Close() } return err } return nil } // DB func returns the underlying *sql.DB struct for DB operations over the Postgres wire protocol func (c *Client) DB() *sql.DB { return c.pgSqlDB } // CreateTableIfNotExists func takes a valid 'qdb' tagged struct v and attempts to create the table // (via the PG wire) in QuestDB and returns an possible error func (c *Client) CreateTableIfNotExists(v interface{}) error { // make model from v model, err := NewModel(v) if err != nil { return fmt.Errorf("could not make new model: %w", err) } // execute create table if not exists statement _, err = c.DB().Exec(model.CreateTableIfNotExistStatement()) if err != nil { return fmt.Errorf("could not execute sql statement: %w", err) } return nil }
step_1_check_inner.rs
use crate::*; use observability::tracing; use super::{CheckResult, SimpleBloomMod}; impl SimpleBloomMod { pub(super) async fn step_1_check_inner(&self) -> KitsuneP2pResult<CheckResult> { let (not_ready, tgt) = self.inner.share_mut(|i, _| { // first, if we don't have any local agents, there's // no point in doing any gossip logic let not_ready = i.local_agents.is_empty(); let tgt = i.initiate_tgt.clone(); Ok((not_ready, tgt)) })?; if not_ready { return Ok(CheckResult::NotReady); } // next, check to see if we should time out any current initiate_tgt if let Some(initiate_tgt) = tgt { if let Some(metric) = self.get_metric_info(initiate_tgt.agents().clone()).await? { if metric.was_err || metric.last_touch.elapsed()?.as_millis() as u32 > self.tuning_params.gossip_peer_on_success_next_gossip_delay_ms // give us a little leeway... we don't // need to be too agressive with timing out // this loop * 2 { tracing::warn!("gossip timeout on initiate tgt {:?}", initiate_tgt); self.inner.share_mut(|i, _| { i.initiate_tgt = None; Ok(()) })?; } else { // we're still processing the current initiate... // don't bother syncing locally return Ok(CheckResult::SkipSyncAndInitiate); } } else { // erm... we have an initate tgt, // but we've never seen them?? // this must be a logic error. unreachable!() } } // TODO: clean up ugly locking here let needs_sync = self.inner.share_mut(|i, _| { Ok(i.initiate_tgt.is_none() && i.last_initiate_check.elapsed().as_millis() as u32 > self.tuning_params.gossip_loop_iteration_delay_ms) })?; if needs_sync
else { Ok(CheckResult::SkipSyncAndInitiate) } } }
{ Ok(CheckResult::SyncAndInitiate) }
read.rs
//! Deserialization code. use std::io::{self, Read}; use std::mem::size_of; use byteorder::ReadBytesExt; use byteorder::NativeEndian as E; use super::{ SIGNATURE, FORMAT, VERSION, DATA, TEST_INT, TEST_NUMBER, Int, Size, Instruction, Integer, Number, Constant, Upvalue, LocalVar, Debug, Function, }; /// Deserialize bytecode into a `Function`. pub fn read_file<R: Read>(read: R) -> io::Result<Function> { let mut reader = Reader { out: read }; try!(reader.read_header()); try!(reader.out.read_u8()); // discard upvals header reader.read_function() } struct Reader<R: Read> { out: R, } fn invalid<T, S: Into<Box<::std::error::Error + Send + Sync>>>(s: S) -> io::Result<T> { Err(io::Error::new(io::ErrorKind::InvalidInput, s)) } macro_rules! check { ($get:expr, $want:expr, $note:expr) => {{ let get = $get; let want = $want; if get != want { return Err(io::Error::new(io::ErrorKind::InvalidInput, format!( "invalid {}, expected {:?} but got {:?}", $note, want, get, ))); } }} } impl<R: Read> Reader<R> { fn read_all(&mut self, mut buf: &mut [u8]) -> io::Result<()> { let mut start = 0; let len = buf.len(); while start < len { let n = try!(self.out.read(&mut buf[start..])); if n == 0 { return invalid("unexpected EOF"); } start += n; } Ok(()) } fn read_header(&mut self) -> io::Result<()> { let mut buffer = [0u8; 6]; try!(self.read_all(&mut buffer[..4])); check!(&buffer[..4], SIGNATURE, "signature"); check!(try!(self.out.read_u8()), VERSION, "version"); check!(try!(self.out.read_u8()), FORMAT, "format"); try!(self.read_all(&mut buffer)); check!(&buffer, DATA, "test data"); check!(try!(self.out.read_u8()), size_of::<Int>() as u8, "sizeof(int)"); check!(try!(self.out.read_u8()), size_of::<Size>() as u8, "sizeof(size_t)"); check!(try!(self.out.read_u8()), size_of::<Instruction>() as u8, "sizeof(Instruction)"); check!(try!(self.out.read_u8()), size_of::<Integer>() as u8, "sizeof(Integer)");
} fn read_function(&mut self) -> io::Result<Function> { Ok(Function { source: try!(self.read_string()), line_start: try!(self.out.read_i32::<E>()), line_end: try!(self.out.read_i32::<E>()), num_params: try!(self.out.read_u8()), is_vararg: try!(self.out.read_u8()) != 0, max_stack_size: try!(self.out.read_u8()), code: try!(self.read_vec(|this| Ok(try!(this.out.read_u32::<E>())))), constants: try!(self.read_vec(|this| Ok(match try!(this.out.read_u8()) { 0x00 => Constant::Nil, 0x01 => Constant::Boolean(try!(this.out.read_u8()) != 0), 0x03 => Constant::Float(try!(this.out.read_f64::<E>())), 0x13 => Constant::Int(try!(this.out.read_i64::<E>())), 0x04 => Constant::ShortString(try!(this.read_string())), 0x14 => Constant::LongString(try!(this.read_string())), o => return invalid(format!("unknown constant type {}", o)), }))), upvalues: try!(self.read_vec(|this| { let stack = try!(this.out.read_u8()); let idx = try!(this.out.read_u8()); Ok(match stack { 0 => Upvalue::Outer(idx), _ => Upvalue::Stack(idx), }) })), protos: try!(self.read_vec(|this| this.read_function())), debug: Debug { lineinfo: try!(self.read_vec(|this| Ok(try!(this.out.read_i32::<E>())))), localvars: try!(self.read_vec(|this| Ok(LocalVar { name: try!(this.read_string()), start_pc: try!(this.out.read_i32::<E>()), end_pc: try!(this.out.read_i32::<E>()), }))), upvalues: try!(self.read_vec(|this| this.read_string())), }, }) } #[inline] fn read_vec<F, T>(&mut self, f: F) -> io::Result<Vec<T>> where F: Fn(&mut Self) -> io::Result<T> { let len = try!(self.out.read_u32::<E>()); (0..len).map(|_| f(self)).collect() } fn read_string(&mut self) -> io::Result<String> { let first = try!(self.out.read_u8()); if first == 0 { Ok(String::new()) } else { let len = if first < 0xff { first as usize } else { try!(self.out.read_u32::<E>()) as usize } - 1; let mut buffer = vec![0u8; len]; try!(self.read_all(&mut buffer)); // TODO: May need to return a Vec<u8> rather than String match String::from_utf8(buffer) { Ok(s) => Ok(s), Err(_) => invalid("not utf8"), } } } }
check!(try!(self.out.read_u8()), size_of::<Number>() as u8, "sizeof(Number)"); check!(try!(self.out.read_i64::<E>()), TEST_INT, "test integer"); check!(try!(self.out.read_f64::<E>()), TEST_NUMBER, "test number"); Ok(())
platforms.specs.ts
import { expect } from "chai"; import fetchMock from "fetch-mock"; import { RestAPI } from "../../src/api/RestAPI"; import { Platforms } from "../../src/resources/Platforms"; import { generateFixture as generatePlatform } from "../fixtures/platforms"; import { testEndpoint } from "../utils"; describe("Platforms", () => { let api: RestAPI; let platforms: Platforms; const recordData = generatePlatform(); beforeEach(() => { api = new RestAPI({ endpoint: testEndpoint }); platforms = new Platforms(api); }); afterEach(() => { fetchMock.restore(); }); context("GET /platform", () => { it("should get response", async () => { fetchMock.getOnce(`${testEndpoint}/platform`, { status: 200, body: recordData, headers: { "Content-Type": "application/json" }, });
await expect(platforms.getConfiguration()).to.eventually.eql(recordData); }); }); });
lib.rs
mod utils; use wasm_bindgen::prelude::*; // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
// allocator. #[cfg(feature = "wee_alloc")] #[global_allocator] static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_namespace = console)] fn log(a: &str); } macro_rules! console_log { ($($t:tt)*) => (log(&format_args!($($t)*).to_string())) } #[wasm_bindgen] pub fn fib(n: i64) -> i64 { if n <= 1 { return n } fib(n - 1) + fib(n - 2) }
application.py
import json from geventwebsocket import WebSocketApplication from controllers.controller import Controller from services.browserquest import BrowserQuestImpl class
(WebSocketApplication): browserquest = BrowserQuestImpl() def __init__(self, *args, **kwargs): super(BrowserQuestApplication, self).__init__(*args, **kwargs) self.connection = None self.environ = {} def on_open(self): self.ws.send("go") self.connection = self.ws def on_message(self, message): if message is None: return print "data:", message request_data = json.loads(message) method_descriptor = self.browserquest.DESCRIPTOR.methods[request_data[0]] request_class = self.browserquest.GetRequestClass(method_descriptor) request = request_class() for index in xrange(1, len(request_data)): field_descriptor = request_class.DESCRIPTOR.fields_by_number[index] if field_descriptor.label == 3: # repeated TODO: only WHO enter this field = getattr(request, field_descriptor.name) field.extend(request_data[index:]) break else: setattr(request, field_descriptor.name, request_data[index]) controller = Controller() controller.connection = self.connection controller.environ = self.environ self.browserquest.CallMethod(method_descriptor, controller, request, None) def on_close(self, reason): self.connection = None print reason
BrowserQuestApplication
__init__.py
__version__ = '3.1.2'
main.go
package main import ( "github.com/tamoore/dada/internal/config" "github.com/tamoore/dada/internal/setup" "github.com/tamoore/dada/internal/util" ) func addNextInstallStep(queue *util.ConcreteQueue, packageManager string) *setup.InstallStep { stepName, hasNext := queue.Pop() step := &setup.InstallStep{} step.SetName(stepName.(string)) step.SetPackageManager(packageManager) if hasNext { nextStep := addNextInstallStep(queue, packageManager) step.SetNext(nextStep) } return step } func main() { c := make(chan config.Product) go config.Start(c) configProduct := <-c installStack := &util.ConcreteQueue{} installMap := make(map[string]bool)
for _, program := range configProduct.Dependencies { installMap[program] = false installStack.Push(program) } step := addNextInstallStep(installStack, configProduct.PackageManager) step.Execute(installMap) }
synd_enc_32.rs
#[doc = "Register `SYND_ENC_32` reader"] pub struct R(crate::R<SYND_ENC_32_SPEC>); impl core::ops::Deref for R { type Target = crate::R<SYND_ENC_32_SPEC>; #[inline(always)] fn
(&self) -> &Self::Target { &self.0 } } impl From<crate::R<SYND_ENC_32_SPEC>> for R { #[inline(always)] fn from(reader: crate::R<SYND_ENC_32_SPEC>) -> Self { R(reader) } } #[doc = "Synd 32 bit Encoded Syndrome\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [synd_enc_32](index.html) module"] pub struct SYND_ENC_32_SPEC; impl crate::RegisterSpec for SYND_ENC_32_SPEC { type Ux = u32; } #[doc = "`read()` method returns [synd_enc_32::R](R) reader structure"] impl crate::Readable for SYND_ENC_32_SPEC { type Reader = R; } #[doc = "`reset()` method sets SYND_ENC_32 to value 0"] impl crate::Resettable for SYND_ENC_32_SPEC { #[inline(always)] fn reset_value() -> Self::Ux { 0 } }
deref
models.rs
//! A module defining serde models for the extended JSON representations of the various BSON types. use chrono::Utc; use serde::{ de::{Error, Unexpected}, Deserialize, Serialize, }; use crate::{extjson, oid, spec::BinarySubtype, Bson}; #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Int32 { #[serde(rename = "$numberInt")] value: String, } impl Int32 { pub(crate) fn parse(self) -> extjson::de::Result<i32> { let i: i32 = self.value.parse().map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(self.value.as_str()), &"expected i32 as a string", ) })?; Ok(i) } } #[derive(Deserialize, Serialize)] #[serde(deny_unknown_fields)] pub(crate) struct Int64 { #[serde(rename = "$numberLong")] value: String, } impl Int64 { pub(crate) fn parse(self) -> extjson::de::Result<i64> { let i: i64 = self.value.parse().map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(self.value.as_str()), &"expected i64 as a string", ) })?; Ok(i) } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Double { #[serde(rename = "$numberDouble")] value: String, } impl Double { pub(crate) fn parse(self) -> extjson::de::Result<f64> { match self.value.as_str() { "Infinity" => Ok(std::f64::INFINITY), "-Infinity" => Ok(std::f64::NEG_INFINITY), "NaN" => Ok(std::f64::NAN), other => { let d: f64 = other.parse().map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(other), &"expected bson double as string", ) })?; Ok(d) } } } } #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct ObjectId { #[serde(rename = "$oid")] oid: String, } impl ObjectId { pub(crate) fn parse(self) -> extjson::de::Result<oid::ObjectId> { let oid = oid::ObjectId::parse_str(self.oid.as_str())?; Ok(oid) } } impl From<crate::oid::ObjectId> for ObjectId { fn from(id: crate::oid::ObjectId) -> Self { Self { oid: id.to_hex() } } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Symbol { #[serde(rename = "$symbol")] pub(crate) value: String, } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Regex { #[serde(rename = "$regularExpression")] body: RegexBody, } #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct RegexBody { pub(crate) pattern: String, pub(crate) options: String, } impl Regex { pub(crate) fn parse(self) -> crate::Regex { let mut chars: Vec<_> = self.body.options.chars().collect(); chars.sort_unstable(); let options: String = chars.into_iter().collect(); crate::Regex { pattern: self.body.pattern, options, } } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Binary { #[serde(rename = "$binary")] pub(crate) body: BinaryBody, } #[derive(Deserialize, Serialize)] #[serde(deny_unknown_fields)] pub(crate) struct BinaryBody { pub(crate) base64: String, #[serde(rename = "subType")] pub(crate) subtype: String, } impl Binary { pub(crate) fn parse(self) -> extjson::de::Result<crate::Binary> { let bytes = base64::decode(self.body.base64.as_str()).map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(self.body.base64.as_str()), &"base64 encoded bytes", ) })?; let subtype = hex::decode(self.body.subtype.as_str()).map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(self.body.subtype.as_str()), &"hexadecimal number as a string", ) })?; if subtype.len() == 1 { Ok(crate::Binary { bytes, subtype: subtype[0].into(), }) } else { Err(extjson::de::Error::invalid_value( Unexpected::Bytes(subtype.as_slice()), &"one byte subtype", )) } } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Uuid { #[serde(rename = "$uuid")] value: String, } impl Uuid { pub(crate) fn parse(self) -> extjson::de::Result<crate::Binary> { let uuid = uuid::Uuid::parse_str(&self.value).map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(&self.value), &"$uuid value does not follow RFC 4122 format regarding length and hyphens", ) })?; Ok(crate::Binary { subtype: BinarySubtype::Uuid, bytes: uuid.as_bytes().to_vec(), }) } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct JavaScriptCodeWithScope { #[serde(rename = "$code")] pub(crate) code: String, #[serde(rename = "$scope")] #[serde(default)] pub(crate) scope: Option<serde_json::Map<String, serde_json::Value>>, } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Timestamp { #[serde(rename = "$timestamp")] body: TimestampBody, } #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct TimestampBody { #[serde(serialize_with = "crate::serde_helpers::serialize_u32_as_i64")] pub(crate) t: u32, #[serde(serialize_with = "crate::serde_helpers::serialize_u32_as_i64")] pub(crate) i: u32, } impl Timestamp { pub(crate) fn parse(self) -> crate::Timestamp { crate::Timestamp { time: self.body.t, increment: self.body.i, } } } #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct DateTime { #[serde(rename = "$date")] pub(crate) body: DateTimeBody, } #[derive(Deserialize, Serialize)] #[serde(untagged)] pub(crate) enum DateTimeBody { Canonical(Int64), Relaxed(String), } impl DateTimeBody { pub(crate) fn from_millis(m: i64) -> Self { DateTimeBody::Canonical(Int64 { value: m.to_string(), }) } } impl DateTime { pub(crate) fn parse(self) -> extjson::de::Result<crate::DateTime> { match self.body { DateTimeBody::Canonical(date) => { let date = date.parse()?; Ok(crate::DateTime::from_millis(date)) } DateTimeBody::Relaxed(date) => { let datetime: chrono::DateTime<Utc> = chrono::DateTime::parse_from_rfc3339(date.as_str()) .map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(date.as_str()), &"rfc3339 formatted utc datetime", ) })? .into(); Ok(crate::DateTime::from_chrono(datetime)) } } } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct MinKey { #[serde(rename = "$minKey")] pub(crate) value: u8, } impl MinKey { pub(crate) fn parse(self) -> extjson::de::Result<Bson> { if self.value == 1 { Ok(Bson::MinKey) } else { Err(extjson::de::Error::invalid_value( Unexpected::Unsigned(self.value as u64), &"value of $minKey should always be 1", )) } } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct MaxKey { #[serde(rename = "$maxKey")] pub(crate) value: u8, } impl MaxKey { pub(crate) fn parse(self) -> extjson::de::Result<Bson> { if self.value == 1 { Ok(Bson::MaxKey) } else { Err(extjson::de::Error::invalid_value( Unexpected::Unsigned(self.value as u64), &"value of $maxKey should always be 1", )) } } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct DbPointer { #[serde(rename = "$dbPointer")] body: DbPointerBody, } #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct DbPointerBody { #[serde(rename = "$ref")] pub(crate) ref_ns: String, #[serde(rename = "$id")] pub(crate) id: ObjectId, } impl DbPointer { pub(crate) fn parse(self) -> extjson::de::Result<crate::DbPointer> { Ok(crate::DbPointer { namespace: self.body.ref_ns, id: self.body.id.parse()?, }) } } #[cfg(feature = "decimal128")] #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Decimal128 { #[serde(rename = "$numberDecimal")] value: String, } #[cfg(feature = "decimal128")] impl Decimal128 { pub(crate) fn parse(self) -> extjson::de::Result<crate::Decimal128> { let decimal128: crate::Decimal128 = self.value.parse().map_err(|_| { extjson::de::Error::invalid_value( Unexpected::Str(self.value.as_str()), &"decimal128 value as a string", ) })?; Ok(decimal128) } } #[derive(Deserialize)] #[serde(deny_unknown_fields)] pub(crate) struct Undefined { #[serde(rename = "$undefined")] pub(crate) value: bool, } impl Undefined { pub(crate) fn parse(self) -> extjson::de::Result<Bson>
}
{ if self.value { Ok(Bson::Undefined) } else { Err(extjson::de::Error::invalid_value( Unexpected::Bool(false), &"$undefined should always be true", )) } }
p_iadabot.py
""" Very stupid bot to indicate the quantities of ingredients to prepare the desired number of piadines Mother"s recipe for 16 piadine: FLOUR: 700g LARD: 100g MILK: 175g WATER: 175g SWEETS YEAST: 15g SALT: q.s. HONEY: q.s. """ class
: def __init__(self, name, quantity): self.name = name self.quantity = quantity wheat = Ingredient("Farina", 700/16) lard = Ingredient("Strutto", 100/16) milk = Ingredient("Latte", 175/16) water = Ingredient("Farina", 175/16) yeast = Ingredient("Lievito per dolci non vanigliato", 15/16) import logging import telegram #import telepot import urllib3 import math # You can leave this bit out if you're using a paid PythonAnywhere account # proxy_url = "http://proxy.server:3128" # telepot.api._pools = { # 'default': urllib3.ProxyManager(proxy_url=proxy_url, num_pools=3, maxsize=10, retries=False, timeout=30), # } # telepot.api._onetime_pool_spec = (urllib3.ProxyManager, dict(proxy_url=proxy_url, num_pools=1, maxsize=1, retries=False, timeout=30)) # end of the stuff that's only needed for free accounts from telegram.ext import Updater, CommandHandler, MessageHandler, Filters # Enable logging logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO) updater = Updater(token="751566911:AAHUJoC-mZAPEVA8u8xmP2BM7gO-lmP2O54") dispatcher = updater.dispatcher # Command handlers (they usually take the two arguments bot and update) def start(bot, update): """Send a message when the command /start is issued""" bot.send_message(chat_id=update.message.chat_id, text="I'm the PiadaBot! Quante piadine vuoi fare?\nScrivi: \"/piade x\", dove x è il numero di piadine desiderato.") #########################################crap def echo(update, context): """Echo the user message.""" update.message.reply_text(update.message.text) #########################################crap def caps(bot, update, args): """Echo the user message, but in CAPS.""" text_caps = " ".join(args).upper() bot.send_message(chat_id=update.message.chat_id, text=text_caps) def piade(bot, update, args): """Set the amount of piadine to eat and get the quantities of ingredients""" # user_says = " ".join(args) piade = float(args[0]) message =\ "*" + wheat.name + "*: " + str(int(wheat.quantity*piade)) + "g \n" +\ "*" + lard.name + "*: " + str(int(lard.quantity*piade)) + "g \n" +\ "*" + milk.name + "*: " + str(int(milk.quantity*piade)) + "g \n" +\ "*" + water.name + "*: " + str(int(water.quantity*piade)) + "g \n" +\ "*" + yeast.name + "*: " + str(math.ceil(yeast.quantity*piade)) + "g \n" +\ "*Sale*: q.b.\n*Miele*: q.b." bot.send_message(chat_id=update.message.chat_id, text = message, parse_mode = telegram.ParseMode.MARKDOWN) def unknown(bot, update): """Message sent when an un unrecognized command is sent""" bot.send_message(chat_id=update.message.chat_id, text="No compriendo nu caz.") def main(): """Start the bot """ # Create the Updater and pass it your bot"s token. updater = Updater(token="751566911:AAHUJoC-mZAPEVA8u8xmP2BM7gO-lmP2O54") # Get the dispatcher to register handlers dispatcher = updater.dispatcher # on different commands - answer in Telegram dispatcher.add_handler(CommandHandler("start", start)) dispatcher.add_handler(CommandHandler("caps", caps, pass_args=True)) dispatcher.add_handler(CommandHandler("piade", piade, pass_args=True)) # on unknown command - show message in Telegram dispatcher.add_handler(MessageHandler(Filters.command, unknown)) # Start the Bot updater.start_polling() updater.idle() if __name__ == "__main__": main()
Ingredient
option.rs
use crate::{PIterator, PResult}; pub fn option<O, I, F>(parser: F) -> impl Fn(I) -> PResult<Option<O>, I> where I: PIterator, F: Fn(I) -> PResult<O, I>,
{ move |input: I| match parser(input.clone()) { Ok((input, v)) => Ok((input, Some(v))), Err(_) => Ok((input, None)), } }
config.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto package envoy_extensions_filters_http_grpc_http1_bridge_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // gRPC HTTP/1.1 Bridge filter config. type Config struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Config) Reset() { *m = Config{} } func (m *Config) String() string { return proto.CompactTextString(m) } func (*Config) ProtoMessage() {} func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor_a9d1a8190e8dfb91, []int{0} } func (m *Config) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Config.Unmarshal(m, b) } func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Config.Marshal(b, m, deterministic) } func (m *Config) XXX_Merge(src proto.Message) { xxx_messageInfo_Config.Merge(m, src) } func (m *Config) XXX_Size() int { return xxx_messageInfo_Config.Size(m) } func (m *Config) XXX_DiscardUnknown() { xxx_messageInfo_Config.DiscardUnknown(m) } var xxx_messageInfo_Config proto.InternalMessageInfo func init() { proto.RegisterType((*Config)(nil), "envoy.extensions.filters.http.grpc_http1_bridge.v3.Config") } func init() { proto.RegisterFile("envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto", fileDescriptor_a9d1a8190e8dfb91) } var fileDescriptor_a9d1a8190e8dfb91 = []byte{ // 214 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4f, 0xcd, 0x2b, 0xcb, 0xaf, 0xd4, 0x4f, 0xad, 0x28, 0x49, 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x2b, 0xd6, 0x4f, 0xcb, 0xcc, 0x29, 0x49, 0x2d, 0x2a, 0xd6, 0xcf, 0x28, 0x29, 0x29, 0xd0, 0x4f, 0x2f, 0x2a, 0x48, 0x8e, 0x07, 0xb1, 0x0c, 0xe3, 0x93, 0x8a, 0x32, 0x53, 0xd2, 0x53, 0xf5, 0xcb, 0x8c, 0xf5, 0x93, 0xf3, 0xf3, 0xd2, 0x32, 0xd3, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x8c, 0xc0, 0x06, 0xe8, 0x21, 0x0c, 0xd0, 0x83, 0x1a, 0xa0, 0x07, 0xd2, 0xa6, 0x87, 0x61, 0x80, 0x5e, 0x99, 0xb1, 0x94, 0x6c, 0x69, 0x4a, 0x41, 0xa2, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, 0x62, 0x09, 0xd8, 0xd2, 0xe2, 0x92, 0xc4, 0x92, 0xd2, 0x62, 0x88, 0x91, 0x52, 0x8a, 0x18, 0xd2, 0x65, 0xa9, 0x45, 0x20, 0xb3, 0x33, 0xf3, 0xa0, 0xb6, 0x2a, 0xb9, 0x72, 0xb1, 0x39, 0x83, 0x5d, 0x61, 0x65, 0x3d, 0xeb, 0x68, 0x87, 0x9c, 0x19, 0x97, 0x09, 0xc4, 0x19, 0x50, 0xa7, 0x41, 0x9c, 0x80, 0xd3, 0x05, 0x46, 0x7a, 0x10, 0xcd, 0x4e, 0x91, 0xbb, 0x1a, 0x4e, 0x5c, 0x64, 0x63, 0x12, 0x60, 0xe2, 0x72, 0xc8, 0xcc, 0xd7, 0x03, 0x1b, 0x51, 0x50, 0x94, 0x5f, 0x51, 0xa9, 0x47, 0xba, 0xa7, 0x9c, 0xb8, 0x21, 0x66, 0x06, 0x80, 0xdc, 0x17, 0xc0, 0x98, 0xc4, 0x06, 0x76, 0xa8, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x81, 0xfa, 0x3c, 0x55, 0x61, 0x01, 0x00, 0x00, }
lib.rs
//!# elasticlunr-rs //! //! [![Build Status](https://travis-ci.org/mattico/elasticlunr-rs.svg?branch=master)](https://travis-ci.org/mattico/elasticlunr-rs) //! [![Documentation](https://docs.rs/elasticlunr-rs/badge.svg)](https://docs.rs/elasticlunr-rs) //! [![Crates.io](https://img.shields.io/crates/v/elasticlunr-rs.svg)](https://crates.io/crates/elasticlunr-rs) //! //! A partial port of [elasticlunr](https://github.com/weixsong/elasticlunr.js) to Rust. Intended to //! be used for generating compatible search indices. //! //! Access to all index-generating functionality is provided. Most users will only need to use the //! [`Index`](struct.Index.html) or [`IndexBuilder`](struct.IndexBuilder.html) types. //! //! ## Example //! //! ``` //! use std::fs::File; //! use std::io::Write; //! use elasticlunr::Index; //! //! let mut index = Index::new(&["title", "body"]); //! index.add_doc("1", &["This is a title", "This is body text!"]); //! // Add more docs... //! let mut file = File::create("out.json").unwrap(); //! file.write_all(index.to_json_pretty().as_bytes()); //! ``` #![cfg_attr(feature = "bench", feature(test))] #[macro_use] extern crate lazy_static; extern crate regex; extern crate serde; #[macro_use] extern crate serde_derive; extern crate serde_json; extern crate strum; #[macro_use] extern crate strum_macros; #[cfg(feature = "rust-stemmers")] extern crate rust_stemmers; #[cfg(test)] #[macro_use] extern crate maplit; #[cfg(feature = "zh")] extern crate jieba_rs; #[cfg(feature = "ja")] extern crate lindera; /// The version of elasticlunr.js this library was designed for. pub const ELASTICLUNR_VERSION: &str = "0.9.5"; pub mod config; pub mod document_store; pub mod inverted_index; pub mod lang; pub mod pipeline; use std::collections::{BTreeMap, BTreeSet}; use document_store::DocumentStore; use inverted_index::InvertedIndex; pub use lang::Language; pub use pipeline::Pipeline; use pipeline::TokenizerFn; /// A builder for an `Index` with custom parameters. /// /// # Example /// ``` /// # use elasticlunr::{Index, IndexBuilder}; /// let mut index = IndexBuilder::new() /// .save_docs(false) /// .add_fields(&["title", "subtitle", "body"]) /// .set_ref("doc_id") /// .build(); /// index.add_doc("doc_a", &["Chapter 1", "Welcome to Copenhagen", "..."]); /// ``` pub struct IndexBuilder { save: bool, fields: BTreeSet<String>, ref_field: String, pipeline: Option<Pipeline>, } impl Default for IndexBuilder { fn default() -> Self { IndexBuilder { save: true, fields: BTreeSet::new(), ref_field: "id".into(), pipeline: None, } } } impl IndexBuilder { pub fn new() -> Self { Default::default() } /// Set whether or not documents should be saved in the `Index`'s document store. pub fn save_docs(mut self, save: bool) -> Self { self.save = save; self } /// Add a document field to the `Index`. /// /// If the `Index` already contains a field with an identical name, adding it again is a no-op. pub fn add_field(mut self, field: &str) -> Self { self.fields.insert(field.into()); self } /// Add the document fields to the `Index`. /// /// If the `Index` already contains a field with an identical name, adding it again is a no-op. pub fn add_fields<I>(mut self, fields: I) -> Self where I: IntoIterator, I::Item: AsRef<str>, { self.fields .extend(fields.into_iter().map(|f| f.as_ref().into())); self } /// Set the key used to store the document reference field. pub fn set_ref(mut self, ref_field: &str) -> Self { self.ref_field = ref_field.into(); self } /// Set the pipeline used by the `Index`. pub fn set_pipeline(mut self, pipeline: Pipeline) -> Self { self.pipeline = Some(pipeline); self } /// Build an `Index` from this builder. pub fn build(self) -> Index { let index = self .fields .iter() .map(|f| (f.clone(), InvertedIndex::new())) .collect(); Index { index, fields: self.fields.into_iter().collect(), ref_field: self.ref_field, document_store: DocumentStore::new(self.save), pipeline: self.pipeline.unwrap_or_default(), version: ::ELASTICLUNR_VERSION, lang: Language::English, } } } /// An elasticlunr search index. #[derive(Serialize, Deserialize, Debug)] #[serde(rename_all = "camelCase")] pub struct Index { // TODO(3.0): Use a BTreeSet<String> pub fields: Vec<String>, pub pipeline: Pipeline, #[serde(rename = "ref")] pub ref_field: String, pub version: &'static str, index: BTreeMap<String, InvertedIndex>, pub document_store: DocumentStore, lang: Language, } impl Index { /// Create a new index with the provided fields. /// /// # Example /// /// ``` /// # use elasticlunr::Index; /// let mut index = Index::new(&["title", "body", "breadcrumbs"]); /// index.add_doc("1", &["How to Foo", "First, you need to `bar`.", "Chapter 1 > How to Foo"]); /// ``` /// /// # Panics /// /// Panics if multiple given fields are identical. pub fn new<I>(fields: I) -> Self where I: IntoIterator, I::Item: AsRef<str>, { Index::with_language(Language::English, fields) } /// Create a new index with the provided fields for the given /// [`Language`](lang/enum.Language.html). /// /// # Example /// /// ``` /// # use elasticlunr::{Index, Language}; /// let mut index = Index::with_language(Language::English, &["title", "body"]); /// index.add_doc("1", &["this is a title", "this is body text"]); /// ``` /// /// # Panics /// /// Panics if multiple given fields are identical. pub fn with_language<I>(lang: Language, fields: I) -> Self where I: IntoIterator, I::Item: AsRef<str>, { let mut indices = BTreeMap::new(); let mut field_vec = Vec::new(); for field in fields { let field = field.as_ref().to_string(); if field_vec.contains(&field) { panic!("The Index already contains the field {}", field); } field_vec.push(field.clone()); indices.insert(field, InvertedIndex::new()); } Index { fields: field_vec, index: indices, pipeline: lang.make_pipeline(), ref_field: "id".into(), version: ::ELASTICLUNR_VERSION, document_store: DocumentStore::new(true), lang: lang, } } /// Add the data from a document to the index. /// /// *NOTE: The elements of `data` should be provided in the same order as /// the fields used to create the index.* /// /// # Example /// ``` /// # use elasticlunr::Index; /// let mut index = Index::new(&["title", "body"]); /// index.add_doc("1", &["this is a title", "this is body text"]); /// ``` pub fn add_doc<I>(&mut self, doc_ref: &str, data: I) where I: IntoIterator, I::Item: AsRef<str>, { let tokenizer = match self.lang { #[cfg(feature = "zh")] Language::Chinese => pipeline::tokenize_chinese, #[cfg(feature = "ja")] Language::Japanese => pipeline::tokenize_japanese, _ => pipeline::tokenize, }; self.add_doc_with_tokenizer(doc_ref, data, tokenizer) } /// Add the data from a document to the index. /// /// *NOTE: The elements of `data` should be provided in the same order as /// the fields used to create the index.* /// /// # Example /// ``` /// # use elasticlunr::Index; /// fn css_tokenizer(text: &str) -> Vec<String> { /// text.split(|c: char| c.is_whitespace()) /// .filter(|s| !s.is_empty()) /// .map(|s| s.trim().to_lowercase()) /// .collect() /// } /// let mut index = Index::new(&["title", "body"]); /// index.add_doc_with_tokenizer("1", &["this is a title", "this is body text"], css_tokenizer); /// ``` pub fn add_doc_with_tokenizer<I>(&mut self, doc_ref: &str, data: I, tokenizer: TokenizerFn) where I: IntoIterator, I::Item: AsRef<str>, { self.add_doc_with_tokenizers(doc_ref, data, std::iter::repeat(tokenizer)); } /// Add the data from a document to the index. /// /// *NOTE: The elements of `data` and `tokenizers` should be provided in /// the same order as the fields used to create the index.* /// /// # Example /// ``` /// # use elasticlunr::Index; /// use elasticlunr::pipeline::{tokenize, TokenizerFn}; /// fn css_tokenizer(text: &str) -> Vec<String> { /// text.split(|c: char| c.is_whitespace()) /// .filter(|s| !s.is_empty()) /// .map(|s| s.trim().to_lowercase()) /// .collect() /// } /// let mut index = Index::new(&["title", "body"]); /// let tokenizers: Vec<TokenizerFn> = vec![tokenize, css_tokenizer]; /// index.add_doc_with_tokenizers("1", &["this is a title", "this is body text"], tokenizers); /// ``` pub fn add_doc_with_tokenizers<I, T>(&mut self, doc_ref: &str, data: I, tokenizers: T) where I: IntoIterator, I::Item: AsRef<str>, T: IntoIterator<Item=TokenizerFn>, { let mut doc = BTreeMap::new(); doc.insert(self.ref_field.clone(), doc_ref.into()); let mut token_freq = BTreeMap::new(); for ((field, value), tokenizer) in self.fields.iter().zip(data).zip(tokenizers) { doc.insert(field.clone(), value.as_ref().to_string()); if field == &self.ref_field { continue; } let raw_tokens = tokenizer(value.as_ref()); let tokens = self.pipeline.run(raw_tokens); self.document_store .add_field_length(doc_ref, field, tokens.len()); for token in tokens { *token_freq.entry(token).or_insert(0u64) += 1; } for (token, count) in &token_freq { let freq = (*count as f64).sqrt(); self.index .get_mut(field) .expect(&format!("InvertedIndex does not exist for field {}", field)) .add_token(doc_ref, token, freq); } } self.document_store.add_doc(doc_ref, doc); } pub fn get_fields(&self) -> &[String]
/// Returns the index, serialized to pretty-printed JSON. pub fn to_json_pretty(&self) -> String { serde_json::to_string_pretty(&self).unwrap() } /// Returns the index, serialized to JSON. pub fn to_json(&self) -> String { serde_json::to_string(&self).unwrap() } } #[cfg(test)] mod tests { use super::*; #[test] fn add_field_to_builder() { let idx = IndexBuilder::new() .add_field("foo") .add_fields(&["foo", "bar", "baz"]) .build(); let idx_fields = idx.get_fields(); for f in &["foo", "bar", "baz"] { assert_eq!(idx_fields.iter().filter(|x| x == f).count(), 1); } } #[test] fn adding_document_to_index() { let mut idx = Index::new(&["body"]); idx.add_doc("1", &["this is a test"]); assert_eq!(idx.document_store.len(), 1); assert_eq!( idx.document_store.get_doc("1").unwrap(), btreemap! { "id".into() => "1".into(), "body".into() => "this is a test".into(), } ); } #[test] fn adding_document_with_empty_field() { let mut idx = Index::new(&["title", "body"]); idx.add_doc("1", &["", "test"]); assert_eq!(idx.index["body"].get_doc_frequency("test"), 1); assert_eq!(idx.index["body"].get_docs("test").unwrap()["1"], 1.); } #[test] #[should_panic] fn creating_index_with_identical_fields_panics() { let _idx = Index::new(&["title", "body", "title"]); } }
{ &self.fields }
api.go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package configservice import ( "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opBatchGetAggregateResourceConfig = "BatchGetAggregateResourceConfig" // BatchGetAggregateResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the BatchGetAggregateResourceConfig 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 BatchGetAggregateResourceConfig for more information on using the BatchGetAggregateResourceConfig // 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 BatchGetAggregateResourceConfigRequest method. // req, resp := client.BatchGetAggregateResourceConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetAggregateResourceConfig func (c *ConfigService) BatchGetAggregateResourceConfigRequest(input *BatchGetAggregateResourceConfigInput) (req *request.Request, output *BatchGetAggregateResourceConfigOutput) { op := &request.Operation{ Name: opBatchGetAggregateResourceConfig, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &BatchGetAggregateResourceConfigInput{} } output = &BatchGetAggregateResourceConfigOutput{} req = c.newRequest(op, input, output) return } // BatchGetAggregateResourceConfig API operation for AWS Config. // // Returns the current configuration items for resources that are present in // your AWS Config aggregator. The operation also returns a list of resources // that are not processed in the current request. If there are no unprocessed // resources, the operation returns an empty unprocessedResourceIdentifiers // list. // // * The API does not return results for deleted resources. // // * The API does not return tags and relationships. // // 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 Config's // API operation BatchGetAggregateResourceConfig for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetAggregateResourceConfig func (c *ConfigService) BatchGetAggregateResourceConfig(input *BatchGetAggregateResourceConfigInput) (*BatchGetAggregateResourceConfigOutput, error) { req, out := c.BatchGetAggregateResourceConfigRequest(input) return out, req.Send() } // BatchGetAggregateResourceConfigWithContext is the same as BatchGetAggregateResourceConfig with the addition of // the ability to pass a context and additional request options. // // See BatchGetAggregateResourceConfig 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 *ConfigService) BatchGetAggregateResourceConfigWithContext(ctx aws.Context, input *BatchGetAggregateResourceConfigInput, opts ...request.Option) (*BatchGetAggregateResourceConfigOutput, error) { req, out := c.BatchGetAggregateResourceConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opBatchGetResourceConfig = "BatchGetResourceConfig" // BatchGetResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the BatchGetResourceConfig 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 BatchGetResourceConfig for more information on using the BatchGetResourceConfig // 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 BatchGetResourceConfigRequest method. // req, resp := client.BatchGetResourceConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetResourceConfig func (c *ConfigService) BatchGetResourceConfigRequest(input *BatchGetResourceConfigInput) (req *request.Request, output *BatchGetResourceConfigOutput) { op := &request.Operation{ Name: opBatchGetResourceConfig, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &BatchGetResourceConfigInput{} } output = &BatchGetResourceConfigOutput{} req = c.newRequest(op, input, output) return } // BatchGetResourceConfig API operation for AWS Config. // // Returns the current configuration for one or more requested resources. The // operation also returns a list of resources that are not processed in the // current request. If there are no unprocessed resources, the operation returns // an empty unprocessedResourceKeys list. // // * The API does not return results for deleted resources. // // * The API does not return any tags for the requested resources. This information // is filtered out of the supplementaryConfiguration section of the API response. // // 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 Config's // API operation BatchGetResourceConfig for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * NoAvailableConfigurationRecorderException // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetResourceConfig func (c *ConfigService) BatchGetResourceConfig(input *BatchGetResourceConfigInput) (*BatchGetResourceConfigOutput, error) { req, out := c.BatchGetResourceConfigRequest(input) return out, req.Send() } // BatchGetResourceConfigWithContext is the same as BatchGetResourceConfig with the addition of // the ability to pass a context and additional request options. // // See BatchGetResourceConfig 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 *ConfigService) BatchGetResourceConfigWithContext(ctx aws.Context, input *BatchGetResourceConfigInput, opts ...request.Option) (*BatchGetResourceConfigOutput, error) { req, out := c.BatchGetResourceConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteAggregationAuthorization = "DeleteAggregationAuthorization" // DeleteAggregationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAggregationAuthorization 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 DeleteAggregationAuthorization for more information on using the DeleteAggregationAuthorization // 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 DeleteAggregationAuthorizationRequest method. // req, resp := client.DeleteAggregationAuthorizationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteAggregationAuthorization func (c *ConfigService) DeleteAggregationAuthorizationRequest(input *DeleteAggregationAuthorizationInput) (req *request.Request, output *DeleteAggregationAuthorizationOutput) { op := &request.Operation{ Name: opDeleteAggregationAuthorization, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteAggregationAuthorizationInput{} } output = &DeleteAggregationAuthorizationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteAggregationAuthorization API operation for AWS Config. // // Deletes the authorization granted to the specified configuration aggregator // account in a specified region. // // 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 Config's // API operation DeleteAggregationAuthorization for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteAggregationAuthorization func (c *ConfigService) DeleteAggregationAuthorization(input *DeleteAggregationAuthorizationInput) (*DeleteAggregationAuthorizationOutput, error) { req, out := c.DeleteAggregationAuthorizationRequest(input) return out, req.Send() } // DeleteAggregationAuthorizationWithContext is the same as DeleteAggregationAuthorization with the addition of // the ability to pass a context and additional request options. // // See DeleteAggregationAuthorization 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 *ConfigService) DeleteAggregationAuthorizationWithContext(ctx aws.Context, input *DeleteAggregationAuthorizationInput, opts ...request.Option) (*DeleteAggregationAuthorizationOutput, error) { req, out := c.DeleteAggregationAuthorizationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteConfigRule = "DeleteConfigRule" // DeleteConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigRule 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 DeleteConfigRule for more information on using the DeleteConfigRule // 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 DeleteConfigRuleRequest method. // req, resp := client.DeleteConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigRule func (c *ConfigService) DeleteConfigRuleRequest(input *DeleteConfigRuleInput) (req *request.Request, output *DeleteConfigRuleOutput) { op := &request.Operation{ Name: opDeleteConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteConfigRuleInput{} } output = &DeleteConfigRuleOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteConfigRule API operation for AWS Config. // // Deletes the specified AWS Config rule and all of its evaluation results. // // AWS Config sets the state of a rule to DELETING until the deletion is complete. // You cannot update a rule while it is in this state. If you make a PutConfigRule // or DeleteConfigRule request for the rule, you will receive a ResourceInUseException. // // You can check the state of a rule by using the DescribeConfigRules request. // // 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 Config's // API operation DeleteConfigRule for usage and error information. // // Returned Error Types: // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigRule func (c *ConfigService) DeleteConfigRule(input *DeleteConfigRuleInput) (*DeleteConfigRuleOutput, error) { req, out := c.DeleteConfigRuleRequest(input) return out, req.Send() } // DeleteConfigRuleWithContext is the same as DeleteConfigRule with the addition of // the ability to pass a context and additional request options. // // See DeleteConfigRule 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 *ConfigService) DeleteConfigRuleWithContext(ctx aws.Context, input *DeleteConfigRuleInput, opts ...request.Option) (*DeleteConfigRuleOutput, error) { req, out := c.DeleteConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteConfigurationAggregator = "DeleteConfigurationAggregator" // DeleteConfigurationAggregatorRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationAggregator 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 DeleteConfigurationAggregator for more information on using the DeleteConfigurationAggregator // 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 DeleteConfigurationAggregatorRequest method. // req, resp := client.DeleteConfigurationAggregatorRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationAggregator func (c *ConfigService) DeleteConfigurationAggregatorRequest(input *DeleteConfigurationAggregatorInput) (req *request.Request, output *DeleteConfigurationAggregatorOutput) { op := &request.Operation{ Name: opDeleteConfigurationAggregator, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteConfigurationAggregatorInput{} } output = &DeleteConfigurationAggregatorOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteConfigurationAggregator API operation for AWS Config. // // Deletes the specified configuration aggregator and the aggregated data associated // with the aggregator. // // 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 Config's // API operation DeleteConfigurationAggregator for usage and error information. // // Returned Error Types: // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationAggregator func (c *ConfigService) DeleteConfigurationAggregator(input *DeleteConfigurationAggregatorInput) (*DeleteConfigurationAggregatorOutput, error) { req, out := c.DeleteConfigurationAggregatorRequest(input) return out, req.Send() } // DeleteConfigurationAggregatorWithContext is the same as DeleteConfigurationAggregator with the addition of // the ability to pass a context and additional request options. // // See DeleteConfigurationAggregator 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 *ConfigService) DeleteConfigurationAggregatorWithContext(ctx aws.Context, input *DeleteConfigurationAggregatorInput, opts ...request.Option) (*DeleteConfigurationAggregatorOutput, error) { req, out := c.DeleteConfigurationAggregatorRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteConfigurationRecorder = "DeleteConfigurationRecorder" // DeleteConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationRecorder 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 DeleteConfigurationRecorder for more information on using the DeleteConfigurationRecorder // 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 DeleteConfigurationRecorderRequest method. // req, resp := client.DeleteConfigurationRecorderRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationRecorder func (c *ConfigService) DeleteConfigurationRecorderRequest(input *DeleteConfigurationRecorderInput) (req *request.Request, output *DeleteConfigurationRecorderOutput) { op := &request.Operation{ Name: opDeleteConfigurationRecorder, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteConfigurationRecorderInput{} } output = &DeleteConfigurationRecorderOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteConfigurationRecorder API operation for AWS Config. // // Deletes the configuration recorder. // // After the configuration recorder is deleted, AWS Config will not record resource // configuration changes until you create a new configuration recorder. // // This action does not delete the configuration information that was previously // recorded. You will be able to access the previously recorded information // by using the GetResourceConfigHistory action, but you will not be able to // access this information in the AWS Config console until you create a new // configuration recorder. // // 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 Config's // API operation DeleteConfigurationRecorder for usage and error information. // // Returned Error Types: // * NoSuchConfigurationRecorderException // You have specified a configuration recorder that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationRecorder func (c *ConfigService) DeleteConfigurationRecorder(input *DeleteConfigurationRecorderInput) (*DeleteConfigurationRecorderOutput, error) { req, out := c.DeleteConfigurationRecorderRequest(input) return out, req.Send() } // DeleteConfigurationRecorderWithContext is the same as DeleteConfigurationRecorder with the addition of // the ability to pass a context and additional request options. // // See DeleteConfigurationRecorder 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 *ConfigService) DeleteConfigurationRecorderWithContext(ctx aws.Context, input *DeleteConfigurationRecorderInput, opts ...request.Option) (*DeleteConfigurationRecorderOutput, error) { req, out := c.DeleteConfigurationRecorderRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteConformancePack = "DeleteConformancePack" // DeleteConformancePackRequest generates a "aws/request.Request" representing the // client's request for the DeleteConformancePack 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 DeleteConformancePack for more information on using the DeleteConformancePack // 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 DeleteConformancePackRequest method. // req, resp := client.DeleteConformancePackRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConformancePack func (c *ConfigService) DeleteConformancePackRequest(input *DeleteConformancePackInput) (req *request.Request, output *DeleteConformancePackOutput) { op := &request.Operation{ Name: opDeleteConformancePack, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteConformancePackInput{} } output = &DeleteConformancePackOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteConformancePack API operation for AWS Config. // // Deletes the specified conformance pack and all the AWS Config rules, remediation // actions, and all evaluation results within that conformance pack. // // AWS Config sets the conformance pack to DELETE_IN_PROGRESS until the deletion // is complete. You cannot update a conformance pack while it is in this state. // // 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 Config's // API operation DeleteConformancePack for usage and error information. // // Returned Error Types: // * NoSuchConformancePackException // You specified one or more conformance packs that do not exist. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConformancePack func (c *ConfigService) DeleteConformancePack(input *DeleteConformancePackInput) (*DeleteConformancePackOutput, error) { req, out := c.DeleteConformancePackRequest(input) return out, req.Send() } // DeleteConformancePackWithContext is the same as DeleteConformancePack with the addition of // the ability to pass a context and additional request options. // // See DeleteConformancePack 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 *ConfigService) DeleteConformancePackWithContext(ctx aws.Context, input *DeleteConformancePackInput, opts ...request.Option) (*DeleteConformancePackOutput, error) { req, out := c.DeleteConformancePackRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteDeliveryChannel = "DeleteDeliveryChannel" // DeleteDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeliveryChannel 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 DeleteDeliveryChannel for more information on using the DeleteDeliveryChannel // 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 DeleteDeliveryChannelRequest method. // req, resp := client.DeleteDeliveryChannelRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteDeliveryChannel func (c *ConfigService) DeleteDeliveryChannelRequest(input *DeleteDeliveryChannelInput) (req *request.Request, output *DeleteDeliveryChannelOutput) { op := &request.Operation{ Name: opDeleteDeliveryChannel, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteDeliveryChannelInput{} } output = &DeleteDeliveryChannelOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteDeliveryChannel API operation for AWS Config. // // Deletes the delivery channel. // // Before you can delete the delivery channel, you must stop the configuration // recorder by using the StopConfigurationRecorder action. // // 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 Config's // API operation DeleteDeliveryChannel for usage and error information. // // Returned Error Types: // * NoSuchDeliveryChannelException // You have specified a delivery channel that does not exist. // // * LastDeliveryChannelDeleteFailedException // You cannot delete the delivery channel you specified because the configuration // recorder is running. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteDeliveryChannel func (c *ConfigService) DeleteDeliveryChannel(input *DeleteDeliveryChannelInput) (*DeleteDeliveryChannelOutput, error) { req, out := c.DeleteDeliveryChannelRequest(input) return out, req.Send() } // DeleteDeliveryChannelWithContext is the same as DeleteDeliveryChannel with the addition of // the ability to pass a context and additional request options. // // See DeleteDeliveryChannel 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 *ConfigService) DeleteDeliveryChannelWithContext(ctx aws.Context, input *DeleteDeliveryChannelInput, opts ...request.Option) (*DeleteDeliveryChannelOutput, error) { req, out := c.DeleteDeliveryChannelRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteEvaluationResults = "DeleteEvaluationResults" // DeleteEvaluationResultsRequest generates a "aws/request.Request" representing the // client's request for the DeleteEvaluationResults 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 DeleteEvaluationResults for more information on using the DeleteEvaluationResults // 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 DeleteEvaluationResultsRequest method. // req, resp := client.DeleteEvaluationResultsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteEvaluationResults func (c *ConfigService) DeleteEvaluationResultsRequest(input *DeleteEvaluationResultsInput) (req *request.Request, output *DeleteEvaluationResultsOutput) { op := &request.Operation{ Name: opDeleteEvaluationResults, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteEvaluationResultsInput{} } output = &DeleteEvaluationResultsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteEvaluationResults API operation for AWS Config. // // Deletes the evaluation results for the specified AWS Config rule. You can // specify one AWS Config rule per request. After you delete the evaluation // results, you can call the StartConfigRulesEvaluation API to start evaluating // your AWS resources against the rule. // // 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 Config's // API operation DeleteEvaluationResults for usage and error information. // // Returned Error Types: // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteEvaluationResults func (c *ConfigService) DeleteEvaluationResults(input *DeleteEvaluationResultsInput) (*DeleteEvaluationResultsOutput, error) { req, out := c.DeleteEvaluationResultsRequest(input) return out, req.Send() } // DeleteEvaluationResultsWithContext is the same as DeleteEvaluationResults with the addition of // the ability to pass a context and additional request options. // // See DeleteEvaluationResults 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 *ConfigService) DeleteEvaluationResultsWithContext(ctx aws.Context, input *DeleteEvaluationResultsInput, opts ...request.Option) (*DeleteEvaluationResultsOutput, error) { req, out := c.DeleteEvaluationResultsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteOrganizationConfigRule = "DeleteOrganizationConfigRule" // DeleteOrganizationConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganizationConfigRule 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 DeleteOrganizationConfigRule for more information on using the DeleteOrganizationConfigRule // 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 DeleteOrganizationConfigRuleRequest method. // req, resp := client.DeleteOrganizationConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteOrganizationConfigRule func (c *ConfigService) DeleteOrganizationConfigRuleRequest(input *DeleteOrganizationConfigRuleInput) (req *request.Request, output *DeleteOrganizationConfigRuleOutput) { op := &request.Operation{ Name: opDeleteOrganizationConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteOrganizationConfigRuleInput{} } output = &DeleteOrganizationConfigRuleOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteOrganizationConfigRule API operation for AWS Config. // // Deletes the specified organization config rule and all of its evaluation // results from all member accounts in that organization. Only a master account // can delete an organization config rule. // // AWS Config sets the state of a rule to DELETE_IN_PROGRESS until the deletion // is complete. You cannot update a rule while it is in this state. // // 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 Config's // API operation DeleteOrganizationConfigRule for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConfigRuleException // You specified one or more organization config rules that do not exist. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteOrganizationConfigRule func (c *ConfigService) DeleteOrganizationConfigRule(input *DeleteOrganizationConfigRuleInput) (*DeleteOrganizationConfigRuleOutput, error) { req, out := c.DeleteOrganizationConfigRuleRequest(input) return out, req.Send() } // DeleteOrganizationConfigRuleWithContext is the same as DeleteOrganizationConfigRule with the addition of // the ability to pass a context and additional request options. // // See DeleteOrganizationConfigRule 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 *ConfigService) DeleteOrganizationConfigRuleWithContext(ctx aws.Context, input *DeleteOrganizationConfigRuleInput, opts ...request.Option) (*DeleteOrganizationConfigRuleOutput, error) { req, out := c.DeleteOrganizationConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteOrganizationConformancePack = "DeleteOrganizationConformancePack" // DeleteOrganizationConformancePackRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganizationConformancePack 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 DeleteOrganizationConformancePack for more information on using the DeleteOrganizationConformancePack // 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 DeleteOrganizationConformancePackRequest method. // req, resp := client.DeleteOrganizationConformancePackRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteOrganizationConformancePack func (c *ConfigService) DeleteOrganizationConformancePackRequest(input *DeleteOrganizationConformancePackInput) (req *request.Request, output *DeleteOrganizationConformancePackOutput) { op := &request.Operation{ Name: opDeleteOrganizationConformancePack, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteOrganizationConformancePackInput{} } output = &DeleteOrganizationConformancePackOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteOrganizationConformancePack API operation for AWS Config. // // Deletes the specified organization conformance pack and all of the config // rules and remediation actions from all member accounts in that organization. // Only a master account can delete an organization conformance pack. // // AWS Config sets the state of a conformance pack to DELETE_IN_PROGRESS until // the deletion is complete. You cannot update a conformance pack while it is // in this state. // // 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 Config's // API operation DeleteOrganizationConformancePack for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConformancePackException // AWS Config organization conformance pack that you passed in the filter does // not exist. // // For DeleteOrganizationConformancePack, you tried to delete an organization // conformance pack that does not exist. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteOrganizationConformancePack func (c *ConfigService) DeleteOrganizationConformancePack(input *DeleteOrganizationConformancePackInput) (*DeleteOrganizationConformancePackOutput, error) { req, out := c.DeleteOrganizationConformancePackRequest(input) return out, req.Send() } // DeleteOrganizationConformancePackWithContext is the same as DeleteOrganizationConformancePack with the addition of // the ability to pass a context and additional request options. // // See DeleteOrganizationConformancePack 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 *ConfigService) DeleteOrganizationConformancePackWithContext(ctx aws.Context, input *DeleteOrganizationConformancePackInput, opts ...request.Option) (*DeleteOrganizationConformancePackOutput, error) { req, out := c.DeleteOrganizationConformancePackRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeletePendingAggregationRequest = "DeletePendingAggregationRequest" // DeletePendingAggregationRequestRequest generates a "aws/request.Request" representing the // client's request for the DeletePendingAggregationRequest 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 DeletePendingAggregationRequest for more information on using the DeletePendingAggregationRequest // 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 DeletePendingAggregationRequestRequest method. // req, resp := client.DeletePendingAggregationRequestRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeletePendingAggregationRequest func (c *ConfigService) DeletePendingAggregationRequestRequest(input *DeletePendingAggregationRequestInput) (req *request.Request, output *DeletePendingAggregationRequestOutput) { op := &request.Operation{ Name: opDeletePendingAggregationRequest, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeletePendingAggregationRequestInput{} } output = &DeletePendingAggregationRequestOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeletePendingAggregationRequest API operation for AWS Config. // // Deletes pending authorization requests for a specified aggregator account // in a specified region. // // 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 Config's // API operation DeletePendingAggregationRequest for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeletePendingAggregationRequest func (c *ConfigService) DeletePendingAggregationRequest(input *DeletePendingAggregationRequestInput) (*DeletePendingAggregationRequestOutput, error) { req, out := c.DeletePendingAggregationRequestRequest(input) return out, req.Send() } // DeletePendingAggregationRequestWithContext is the same as DeletePendingAggregationRequest with the addition of // the ability to pass a context and additional request options. // // See DeletePendingAggregationRequest 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 *ConfigService) DeletePendingAggregationRequestWithContext(ctx aws.Context, input *DeletePendingAggregationRequestInput, opts ...request.Option) (*DeletePendingAggregationRequestOutput, error) { req, out := c.DeletePendingAggregationRequestRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteRemediationConfiguration = "DeleteRemediationConfiguration" // DeleteRemediationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteRemediationConfiguration 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 DeleteRemediationConfiguration for more information on using the DeleteRemediationConfiguration // 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 DeleteRemediationConfigurationRequest method. // req, resp := client.DeleteRemediationConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRemediationConfiguration func (c *ConfigService) DeleteRemediationConfigurationRequest(input *DeleteRemediationConfigurationInput) (req *request.Request, output *DeleteRemediationConfigurationOutput) { op := &request.Operation{ Name: opDeleteRemediationConfiguration, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteRemediationConfigurationInput{} } output = &DeleteRemediationConfigurationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteRemediationConfiguration API operation for AWS Config. // // Deletes the remediation configuration. // // 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 Config's // API operation DeleteRemediationConfiguration for usage and error information. // // Returned Error Types: // * NoSuchRemediationConfigurationException // You specified an AWS Config rule without a remediation configuration. // // * RemediationInProgressException // Remediation action is in progress. You can either cancel execution in AWS // Systems Manager or wait and try again later. // // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRemediationConfiguration func (c *ConfigService) DeleteRemediationConfiguration(input *DeleteRemediationConfigurationInput) (*DeleteRemediationConfigurationOutput, error) { req, out := c.DeleteRemediationConfigurationRequest(input) return out, req.Send() } // DeleteRemediationConfigurationWithContext is the same as DeleteRemediationConfiguration with the addition of // the ability to pass a context and additional request options. // // See DeleteRemediationConfiguration 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 *ConfigService) DeleteRemediationConfigurationWithContext(ctx aws.Context, input *DeleteRemediationConfigurationInput, opts ...request.Option) (*DeleteRemediationConfigurationOutput, error) { req, out := c.DeleteRemediationConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteRemediationExceptions = "DeleteRemediationExceptions" // DeleteRemediationExceptionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteRemediationExceptions 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 DeleteRemediationExceptions for more information on using the DeleteRemediationExceptions // 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 DeleteRemediationExceptionsRequest method. // req, resp := client.DeleteRemediationExceptionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRemediationExceptions func (c *ConfigService) DeleteRemediationExceptionsRequest(input *DeleteRemediationExceptionsInput) (req *request.Request, output *DeleteRemediationExceptionsOutput) { op := &request.Operation{ Name: opDeleteRemediationExceptions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteRemediationExceptionsInput{} } output = &DeleteRemediationExceptionsOutput{} req = c.newRequest(op, input, output) return } // DeleteRemediationExceptions API operation for AWS Config. // // Deletes one or more remediation exceptions mentioned in the resource keys. // // 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 Config's // API operation DeleteRemediationExceptions for usage and error information. // // Returned Error Types: // * NoSuchRemediationExceptionException // You tried to delete a remediation exception that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRemediationExceptions func (c *ConfigService) DeleteRemediationExceptions(input *DeleteRemediationExceptionsInput) (*DeleteRemediationExceptionsOutput, error) { req, out := c.DeleteRemediationExceptionsRequest(input) return out, req.Send() } // DeleteRemediationExceptionsWithContext is the same as DeleteRemediationExceptions with the addition of // the ability to pass a context and additional request options. // // See DeleteRemediationExceptions 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 *ConfigService) DeleteRemediationExceptionsWithContext(ctx aws.Context, input *DeleteRemediationExceptionsInput, opts ...request.Option) (*DeleteRemediationExceptionsOutput, error) { req, out := c.DeleteRemediationExceptionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteResourceConfig = "DeleteResourceConfig" // DeleteResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceConfig 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 DeleteResourceConfig for more information on using the DeleteResourceConfig // 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 DeleteResourceConfigRequest method. // req, resp := client.DeleteResourceConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteResourceConfig func (c *ConfigService) DeleteResourceConfigRequest(input *DeleteResourceConfigInput) (req *request.Request, output *DeleteResourceConfigOutput) { op := &request.Operation{ Name: opDeleteResourceConfig, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteResourceConfigInput{} } output = &DeleteResourceConfigOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteResourceConfig API operation for AWS Config. // // Records the configuration state for a custom resource that has been deleted. // This API records a new ConfigurationItem with a ResourceDeleted status. You // can retrieve the ConfigurationItems recorded for this resource in your AWS // Config History. // // 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 Config's // API operation DeleteResourceConfig for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * NoRunningConfigurationRecorderException // There is no configuration recorder running. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteResourceConfig func (c *ConfigService) DeleteResourceConfig(input *DeleteResourceConfigInput) (*DeleteResourceConfigOutput, error) { req, out := c.DeleteResourceConfigRequest(input) return out, req.Send() } // DeleteResourceConfigWithContext is the same as DeleteResourceConfig with the addition of // the ability to pass a context and additional request options. // // See DeleteResourceConfig 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 *ConfigService) DeleteResourceConfigWithContext(ctx aws.Context, input *DeleteResourceConfigInput, opts ...request.Option) (*DeleteResourceConfigOutput, error) { req, out := c.DeleteResourceConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteRetentionConfiguration = "DeleteRetentionConfiguration" // DeleteRetentionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteRetentionConfiguration 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 DeleteRetentionConfiguration for more information on using the DeleteRetentionConfiguration // 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 DeleteRetentionConfigurationRequest method. // req, resp := client.DeleteRetentionConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRetentionConfiguration func (c *ConfigService) DeleteRetentionConfigurationRequest(input *DeleteRetentionConfigurationInput) (req *request.Request, output *DeleteRetentionConfigurationOutput) { op := &request.Operation{ Name: opDeleteRetentionConfiguration, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteRetentionConfigurationInput{} } output = &DeleteRetentionConfigurationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteRetentionConfiguration API operation for AWS Config. // // Deletes the retention configuration. // // 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 Config's // API operation DeleteRetentionConfiguration for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * NoSuchRetentionConfigurationException // You have specified a retention configuration that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRetentionConfiguration func (c *ConfigService) DeleteRetentionConfiguration(input *DeleteRetentionConfigurationInput) (*DeleteRetentionConfigurationOutput, error) { req, out := c.DeleteRetentionConfigurationRequest(input) return out, req.Send() } // DeleteRetentionConfigurationWithContext is the same as DeleteRetentionConfiguration with the addition of // the ability to pass a context and additional request options. // // See DeleteRetentionConfiguration 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 *ConfigService) DeleteRetentionConfigurationWithContext(ctx aws.Context, input *DeleteRetentionConfigurationInput, opts ...request.Option) (*DeleteRetentionConfigurationOutput, error) { req, out := c.DeleteRetentionConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeliverConfigSnapshot = "DeliverConfigSnapshot" // DeliverConfigSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeliverConfigSnapshot 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 DeliverConfigSnapshot for more information on using the DeliverConfigSnapshot // 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 DeliverConfigSnapshotRequest method. // req, resp := client.DeliverConfigSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeliverConfigSnapshot func (c *ConfigService) DeliverConfigSnapshotRequest(input *DeliverConfigSnapshotInput) (req *request.Request, output *DeliverConfigSnapshotOutput) { op := &request.Operation{ Name: opDeliverConfigSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeliverConfigSnapshotInput{} } output = &DeliverConfigSnapshotOutput{} req = c.newRequest(op, input, output) return } // DeliverConfigSnapshot API operation for AWS Config. // // Schedules delivery of a configuration snapshot to the Amazon S3 bucket in // the specified delivery channel. After the delivery has started, AWS Config // sends the following notifications using an Amazon SNS topic that you have // specified. // // * Notification of the start of the delivery. // // * Notification of the completion of the delivery, if the delivery was // successfully completed. // // * Notification of delivery failure, if the delivery failed. // // 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 Config's // API operation DeliverConfigSnapshot for usage and error information. // // Returned Error Types: // * NoSuchDeliveryChannelException // You have specified a delivery channel that does not exist. // // * NoAvailableConfigurationRecorderException // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. // // * NoRunningConfigurationRecorderException // There is no configuration recorder running. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeliverConfigSnapshot func (c *ConfigService) DeliverConfigSnapshot(input *DeliverConfigSnapshotInput) (*DeliverConfigSnapshotOutput, error) { req, out := c.DeliverConfigSnapshotRequest(input) return out, req.Send() } // DeliverConfigSnapshotWithContext is the same as DeliverConfigSnapshot with the addition of // the ability to pass a context and additional request options. // // See DeliverConfigSnapshot 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 *ConfigService) DeliverConfigSnapshotWithContext(ctx aws.Context, input *DeliverConfigSnapshotInput, opts ...request.Option) (*DeliverConfigSnapshotOutput, error) { req, out := c.DeliverConfigSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeAggregateComplianceByConfigRules = "DescribeAggregateComplianceByConfigRules" // DescribeAggregateComplianceByConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregateComplianceByConfigRules 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 DescribeAggregateComplianceByConfigRules for more information on using the DescribeAggregateComplianceByConfigRules // 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 DescribeAggregateComplianceByConfigRulesRequest method. // req, resp := client.DescribeAggregateComplianceByConfigRulesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregateComplianceByConfigRules func (c *ConfigService) DescribeAggregateComplianceByConfigRulesRequest(input *DescribeAggregateComplianceByConfigRulesInput) (req *request.Request, output *DescribeAggregateComplianceByConfigRulesOutput) { op := &request.Operation{ Name: opDescribeAggregateComplianceByConfigRules, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeAggregateComplianceByConfigRulesInput{} } output = &DescribeAggregateComplianceByConfigRulesOutput{} req = c.newRequest(op, input, output) return } // DescribeAggregateComplianceByConfigRules API operation for AWS Config. // // Returns a list of compliant and noncompliant rules with the number of resources // for compliant and noncompliant rules. // // The results can return an empty result page, but if you have a nextToken, // the results are displayed on the next page. // // 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 Config's // API operation DescribeAggregateComplianceByConfigRules for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregateComplianceByConfigRules func (c *ConfigService) DescribeAggregateComplianceByConfigRules(input *DescribeAggregateComplianceByConfigRulesInput) (*DescribeAggregateComplianceByConfigRulesOutput, error) { req, out := c.DescribeAggregateComplianceByConfigRulesRequest(input) return out, req.Send() } // DescribeAggregateComplianceByConfigRulesWithContext is the same as DescribeAggregateComplianceByConfigRules with the addition of // the ability to pass a context and additional request options. // // See DescribeAggregateComplianceByConfigRules 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 *ConfigService) DescribeAggregateComplianceByConfigRulesWithContext(ctx aws.Context, input *DescribeAggregateComplianceByConfigRulesInput, opts ...request.Option) (*DescribeAggregateComplianceByConfigRulesOutput, error) { req, out := c.DescribeAggregateComplianceByConfigRulesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeAggregationAuthorizations = "DescribeAggregationAuthorizations" // DescribeAggregationAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregationAuthorizations 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 DescribeAggregationAuthorizations for more information on using the DescribeAggregationAuthorizations // 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 DescribeAggregationAuthorizationsRequest method. // req, resp := client.DescribeAggregationAuthorizationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregationAuthorizations func (c *ConfigService) DescribeAggregationAuthorizationsRequest(input *DescribeAggregationAuthorizationsInput) (req *request.Request, output *DescribeAggregationAuthorizationsOutput) { op := &request.Operation{ Name: opDescribeAggregationAuthorizations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeAggregationAuthorizationsInput{} } output = &DescribeAggregationAuthorizationsOutput{} req = c.newRequest(op, input, output) return } // DescribeAggregationAuthorizations API operation for AWS Config. // // Returns a list of authorizations granted to various aggregator accounts and // regions. // // 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 Config's // API operation DescribeAggregationAuthorizations for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidLimitException // The specified limit is outside the allowable range. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregationAuthorizations func (c *ConfigService) DescribeAggregationAuthorizations(input *DescribeAggregationAuthorizationsInput) (*DescribeAggregationAuthorizationsOutput, error) { req, out := c.DescribeAggregationAuthorizationsRequest(input) return out, req.Send() } // DescribeAggregationAuthorizationsWithContext is the same as DescribeAggregationAuthorizations with the addition of // the ability to pass a context and additional request options. // // See DescribeAggregationAuthorizations 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 *ConfigService) DescribeAggregationAuthorizationsWithContext(ctx aws.Context, input *DescribeAggregationAuthorizationsInput, opts ...request.Option) (*DescribeAggregationAuthorizationsOutput, error) { req, out := c.DescribeAggregationAuthorizationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeComplianceByConfigRule = "DescribeComplianceByConfigRule" // DescribeComplianceByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeComplianceByConfigRule 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 DescribeComplianceByConfigRule for more information on using the DescribeComplianceByConfigRule // 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 DescribeComplianceByConfigRuleRequest method. // req, resp := client.DescribeComplianceByConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule func (c *ConfigService) DescribeComplianceByConfigRuleRequest(input *DescribeComplianceByConfigRuleInput) (req *request.Request, output *DescribeComplianceByConfigRuleOutput) { op := &request.Operation{ Name: opDescribeComplianceByConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeComplianceByConfigRuleInput{} } output = &DescribeComplianceByConfigRuleOutput{} req = c.newRequest(op, input, output) return } // DescribeComplianceByConfigRule API operation for AWS Config. // // Indicates whether the specified AWS Config rules are compliant. If a rule // is noncompliant, this action returns the number of AWS resources that do // not comply with the rule. // // A rule is compliant if all of the evaluated resources comply with it. It // is noncompliant if any of these resources do not comply. // // If AWS Config has no current evaluation results for the rule, it returns // INSUFFICIENT_DATA. This result might indicate one of the following conditions: // // * AWS Config has never invoked an evaluation for the rule. To check whether // it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime // and LastFailedInvocationTime. // // * The rule's AWS Lambda function is failing to send evaluation results // to AWS Config. Verify that the role you assigned to your configuration // recorder includes the config:PutEvaluations permission. If the rule is // a custom rule, verify that the AWS Lambda execution role includes the // config:PutEvaluations permission. // // * The rule's AWS Lambda function has returned NOT_APPLICABLE for all evaluation // results. This can occur if the resources were deleted or removed from // the rule's scope. // // 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 Config's // API operation DescribeComplianceByConfigRule for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule func (c *ConfigService) DescribeComplianceByConfigRule(input *DescribeComplianceByConfigRuleInput) (*DescribeComplianceByConfigRuleOutput, error) { req, out := c.DescribeComplianceByConfigRuleRequest(input) return out, req.Send() } // DescribeComplianceByConfigRuleWithContext is the same as DescribeComplianceByConfigRule with the addition of // the ability to pass a context and additional request options. // // See DescribeComplianceByConfigRule 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 *ConfigService) DescribeComplianceByConfigRuleWithContext(ctx aws.Context, input *DescribeComplianceByConfigRuleInput, opts ...request.Option) (*DescribeComplianceByConfigRuleOutput, error) { req, out := c.DescribeComplianceByConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeComplianceByResource = "DescribeComplianceByResource" // DescribeComplianceByResourceRequest generates a "aws/request.Request" representing the // client's request for the DescribeComplianceByResource 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 DescribeComplianceByResource for more information on using the DescribeComplianceByResource // 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 DescribeComplianceByResourceRequest method. // req, resp := client.DescribeComplianceByResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByResource func (c *ConfigService) DescribeComplianceByResourceRequest(input *DescribeComplianceByResourceInput) (req *request.Request, output *DescribeComplianceByResourceOutput) { op := &request.Operation{ Name: opDescribeComplianceByResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeComplianceByResourceInput{} } output = &DescribeComplianceByResourceOutput{} req = c.newRequest(op, input, output) return } // DescribeComplianceByResource API operation for AWS Config. // // Indicates whether the specified AWS resources are compliant. If a resource // is noncompliant, this action returns the number of AWS Config rules that // the resource does not comply with. // // A resource is compliant if it complies with all the AWS Config rules that // evaluate it. It is noncompliant if it does not comply with one or more of // these rules. // // If AWS Config has no current evaluation results for the resource, it returns // INSUFFICIENT_DATA. This result might indicate one of the following conditions // about the rules that evaluate the resource: // // * AWS Config has never invoked an evaluation for the rule. To check whether // it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime // and LastFailedInvocationTime. // // * The rule's AWS Lambda function is failing to send evaluation results // to AWS Config. Verify that the role that you assigned to your configuration // recorder includes the config:PutEvaluations permission. If the rule is // a custom rule, verify that the AWS Lambda execution role includes the // config:PutEvaluations permission. // // * The rule's AWS Lambda function has returned NOT_APPLICABLE for all evaluation // results. This can occur if the resources were deleted or removed from // the rule's scope. // // 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 Config's // API operation DescribeComplianceByResource for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByResource func (c *ConfigService) DescribeComplianceByResource(input *DescribeComplianceByResourceInput) (*DescribeComplianceByResourceOutput, error) { req, out := c.DescribeComplianceByResourceRequest(input) return out, req.Send() } // DescribeComplianceByResourceWithContext is the same as DescribeComplianceByResource with the addition of // the ability to pass a context and additional request options. // // See DescribeComplianceByResource 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 *ConfigService) DescribeComplianceByResourceWithContext(ctx aws.Context, input *DescribeComplianceByResourceInput, opts ...request.Option) (*DescribeComplianceByResourceOutput, error) { req, out := c.DescribeComplianceByResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConfigRuleEvaluationStatus = "DescribeConfigRuleEvaluationStatus" // DescribeConfigRuleEvaluationStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRuleEvaluationStatus 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 DescribeConfigRuleEvaluationStatus for more information on using the DescribeConfigRuleEvaluationStatus // 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 DescribeConfigRuleEvaluationStatusRequest method. // req, resp := client.DescribeConfigRuleEvaluationStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRuleEvaluationStatus func (c *ConfigService) DescribeConfigRuleEvaluationStatusRequest(input *DescribeConfigRuleEvaluationStatusInput) (req *request.Request, output *DescribeConfigRuleEvaluationStatusOutput) { op := &request.Operation{ Name: opDescribeConfigRuleEvaluationStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConfigRuleEvaluationStatusInput{} } output = &DescribeConfigRuleEvaluationStatusOutput{} req = c.newRequest(op, input, output) return } // DescribeConfigRuleEvaluationStatus API operation for AWS Config. // // Returns status information for each of your AWS managed Config rules. The // status includes information such as the last time AWS Config invoked the // rule, the last time AWS Config failed to invoke the rule, and the related // error for the last failure. // // 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 Config's // API operation DescribeConfigRuleEvaluationStatus for usage and error information. // // Returned Error Types: // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRuleEvaluationStatus func (c *ConfigService) DescribeConfigRuleEvaluationStatus(input *DescribeConfigRuleEvaluationStatusInput) (*DescribeConfigRuleEvaluationStatusOutput, error) { req, out := c.DescribeConfigRuleEvaluationStatusRequest(input) return out, req.Send() } // DescribeConfigRuleEvaluationStatusWithContext is the same as DescribeConfigRuleEvaluationStatus with the addition of // the ability to pass a context and additional request options. // // See DescribeConfigRuleEvaluationStatus 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 *ConfigService) DescribeConfigRuleEvaluationStatusWithContext(ctx aws.Context, input *DescribeConfigRuleEvaluationStatusInput, opts ...request.Option) (*DescribeConfigRuleEvaluationStatusOutput, error) { req, out := c.DescribeConfigRuleEvaluationStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConfigRules = "DescribeConfigRules" // DescribeConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRules 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 DescribeConfigRules for more information on using the DescribeConfigRules // 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 DescribeConfigRulesRequest method. // req, resp := client.DescribeConfigRulesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRules func (c *ConfigService) DescribeConfigRulesRequest(input *DescribeConfigRulesInput) (req *request.Request, output *DescribeConfigRulesOutput) { op := &request.Operation{ Name: opDescribeConfigRules, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConfigRulesInput{} } output = &DescribeConfigRulesOutput{} req = c.newRequest(op, input, output) return } // DescribeConfigRules API operation for AWS Config. // // Returns details about your AWS Config rules. // // 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 Config's // API operation DescribeConfigRules for usage and error information. // // Returned Error Types: // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRules func (c *ConfigService) DescribeConfigRules(input *DescribeConfigRulesInput) (*DescribeConfigRulesOutput, error) { req, out := c.DescribeConfigRulesRequest(input) return out, req.Send() } // DescribeConfigRulesWithContext is the same as DescribeConfigRules with the addition of // the ability to pass a context and additional request options. // // See DescribeConfigRules 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 *ConfigService) DescribeConfigRulesWithContext(ctx aws.Context, input *DescribeConfigRulesInput, opts ...request.Option) (*DescribeConfigRulesOutput, error) { req, out := c.DescribeConfigRulesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConfigurationAggregatorSourcesStatus = "DescribeConfigurationAggregatorSourcesStatus" // DescribeConfigurationAggregatorSourcesStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationAggregatorSourcesStatus 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 DescribeConfigurationAggregatorSourcesStatus for more information on using the DescribeConfigurationAggregatorSourcesStatus // 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 DescribeConfigurationAggregatorSourcesStatusRequest method. // req, resp := client.DescribeConfigurationAggregatorSourcesStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregatorSourcesStatus func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatusRequest(input *DescribeConfigurationAggregatorSourcesStatusInput) (req *request.Request, output *DescribeConfigurationAggregatorSourcesStatusOutput) { op := &request.Operation{ Name: opDescribeConfigurationAggregatorSourcesStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConfigurationAggregatorSourcesStatusInput{} } output = &DescribeConfigurationAggregatorSourcesStatusOutput{} req = c.newRequest(op, input, output) return } // DescribeConfigurationAggregatorSourcesStatus API operation for AWS Config. // // Returns status information for sources within an aggregator. The status includes // information about the last time AWS Config verified authorization between // the source account and an aggregator account. In case of a failure, the status // contains the related error code or message. // // 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 Config's // API operation DescribeConfigurationAggregatorSourcesStatus for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidLimitException // The specified limit is outside the allowable range. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregatorSourcesStatus func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatus(input *DescribeConfigurationAggregatorSourcesStatusInput) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) { req, out := c.DescribeConfigurationAggregatorSourcesStatusRequest(input) return out, req.Send() } // DescribeConfigurationAggregatorSourcesStatusWithContext is the same as DescribeConfigurationAggregatorSourcesStatus with the addition of // the ability to pass a context and additional request options. // // See DescribeConfigurationAggregatorSourcesStatus 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 *ConfigService) DescribeConfigurationAggregatorSourcesStatusWithContext(ctx aws.Context, input *DescribeConfigurationAggregatorSourcesStatusInput, opts ...request.Option) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) { req, out := c.DescribeConfigurationAggregatorSourcesStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConfigurationAggregators = "DescribeConfigurationAggregators" // DescribeConfigurationAggregatorsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationAggregators 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 DescribeConfigurationAggregators for more information on using the DescribeConfigurationAggregators // 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 DescribeConfigurationAggregatorsRequest method. // req, resp := client.DescribeConfigurationAggregatorsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregators func (c *ConfigService) DescribeConfigurationAggregatorsRequest(input *DescribeConfigurationAggregatorsInput) (req *request.Request, output *DescribeConfigurationAggregatorsOutput) { op := &request.Operation{ Name: opDescribeConfigurationAggregators, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConfigurationAggregatorsInput{} } output = &DescribeConfigurationAggregatorsOutput{} req = c.newRequest(op, input, output) return } // DescribeConfigurationAggregators API operation for AWS Config. // // Returns the details of one or more configuration aggregators. If the configuration // aggregator is not specified, this action returns the details for all the // configuration aggregators associated with the account. // // 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 Config's // API operation DescribeConfigurationAggregators for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidLimitException // The specified limit is outside the allowable range. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregators func (c *ConfigService) DescribeConfigurationAggregators(input *DescribeConfigurationAggregatorsInput) (*DescribeConfigurationAggregatorsOutput, error) { req, out := c.DescribeConfigurationAggregatorsRequest(input) return out, req.Send() } // DescribeConfigurationAggregatorsWithContext is the same as DescribeConfigurationAggregators with the addition of // the ability to pass a context and additional request options. // // See DescribeConfigurationAggregators 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 *ConfigService) DescribeConfigurationAggregatorsWithContext(ctx aws.Context, input *DescribeConfigurationAggregatorsInput, opts ...request.Option) (*DescribeConfigurationAggregatorsOutput, error) { req, out := c.DescribeConfigurationAggregatorsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConfigurationRecorderStatus = "DescribeConfigurationRecorderStatus" // DescribeConfigurationRecorderStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRecorderStatus 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 DescribeConfigurationRecorderStatus for more information on using the DescribeConfigurationRecorderStatus // 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 DescribeConfigurationRecorderStatusRequest method. // req, resp := client.DescribeConfigurationRecorderStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus func (c *ConfigService) DescribeConfigurationRecorderStatusRequest(input *DescribeConfigurationRecorderStatusInput) (req *request.Request, output *DescribeConfigurationRecorderStatusOutput) { op := &request.Operation{ Name: opDescribeConfigurationRecorderStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConfigurationRecorderStatusInput{} } output = &DescribeConfigurationRecorderStatusOutput{} req = c.newRequest(op, input, output) return } // DescribeConfigurationRecorderStatus API operation for AWS Config. // // Returns the current status of the specified configuration recorder. If a // configuration recorder is not specified, this action returns the status of // all configuration recorders associated with the account. // // Currently, you can specify only one configuration recorder per region in // your account. // // 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 Config's // API operation DescribeConfigurationRecorderStatus for usage and error information. // // Returned Error Types: // * NoSuchConfigurationRecorderException // You have specified a configuration recorder that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus func (c *ConfigService) DescribeConfigurationRecorderStatus(input *DescribeConfigurationRecorderStatusInput) (*DescribeConfigurationRecorderStatusOutput, error) { req, out := c.DescribeConfigurationRecorderStatusRequest(input) return out, req.Send() } // DescribeConfigurationRecorderStatusWithContext is the same as DescribeConfigurationRecorderStatus with the addition of // the ability to pass a context and additional request options. // // See DescribeConfigurationRecorderStatus 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 *ConfigService) DescribeConfigurationRecorderStatusWithContext(ctx aws.Context, input *DescribeConfigurationRecorderStatusInput, opts ...request.Option) (*DescribeConfigurationRecorderStatusOutput, error) { req, out := c.DescribeConfigurationRecorderStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConfigurationRecorders = "DescribeConfigurationRecorders" // DescribeConfigurationRecordersRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRecorders 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 DescribeConfigurationRecorders for more information on using the DescribeConfigurationRecorders // 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 DescribeConfigurationRecordersRequest method. // req, resp := client.DescribeConfigurationRecordersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders func (c *ConfigService) DescribeConfigurationRecordersRequest(input *DescribeConfigurationRecordersInput) (req *request.Request, output *DescribeConfigurationRecordersOutput) { op := &request.Operation{ Name: opDescribeConfigurationRecorders, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConfigurationRecordersInput{} } output = &DescribeConfigurationRecordersOutput{} req = c.newRequest(op, input, output) return } // DescribeConfigurationRecorders API operation for AWS Config. // // Returns the details for the specified configuration recorders. If the configuration // recorder is not specified, this action returns the details for all configuration // recorders associated with the account. // // Currently, you can specify only one configuration recorder per region in // your account. // // 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 Config's // API operation DescribeConfigurationRecorders for usage and error information. // // Returned Error Types: // * NoSuchConfigurationRecorderException // You have specified a configuration recorder that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders func (c *ConfigService) DescribeConfigurationRecorders(input *DescribeConfigurationRecordersInput) (*DescribeConfigurationRecordersOutput, error) { req, out := c.DescribeConfigurationRecordersRequest(input) return out, req.Send() } // DescribeConfigurationRecordersWithContext is the same as DescribeConfigurationRecorders with the addition of // the ability to pass a context and additional request options. // // See DescribeConfigurationRecorders 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 *ConfigService) DescribeConfigurationRecordersWithContext(ctx aws.Context, input *DescribeConfigurationRecordersInput, opts ...request.Option) (*DescribeConfigurationRecordersOutput, error) { req, out := c.DescribeConfigurationRecordersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConformancePackCompliance = "DescribeConformancePackCompliance" // DescribeConformancePackComplianceRequest generates a "aws/request.Request" representing the // client's request for the DescribeConformancePackCompliance 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 DescribeConformancePackCompliance for more information on using the DescribeConformancePackCompliance // 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 DescribeConformancePackComplianceRequest method. // req, resp := client.DescribeConformancePackComplianceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConformancePackCompliance func (c *ConfigService) DescribeConformancePackComplianceRequest(input *DescribeConformancePackComplianceInput) (req *request.Request, output *DescribeConformancePackComplianceOutput) { op := &request.Operation{ Name: opDescribeConformancePackCompliance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConformancePackComplianceInput{} } output = &DescribeConformancePackComplianceOutput{} req = c.newRequest(op, input, output) return } // DescribeConformancePackCompliance API operation for AWS Config. // // Returns compliance details for each rule in that conformance pack. // // You must provide exact rule names. // // 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 Config's // API operation DescribeConformancePackCompliance for usage and error information. // // Returned Error Types: // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * NoSuchConfigRuleInConformancePackException // AWS Config rule that you passed in the filter does not exist. // // * NoSuchConformancePackException // You specified one or more conformance packs that do not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConformancePackCompliance func (c *ConfigService) DescribeConformancePackCompliance(input *DescribeConformancePackComplianceInput) (*DescribeConformancePackComplianceOutput, error) { req, out := c.DescribeConformancePackComplianceRequest(input) return out, req.Send() } // DescribeConformancePackComplianceWithContext is the same as DescribeConformancePackCompliance with the addition of // the ability to pass a context and additional request options. // // See DescribeConformancePackCompliance 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 *ConfigService) DescribeConformancePackComplianceWithContext(ctx aws.Context, input *DescribeConformancePackComplianceInput, opts ...request.Option) (*DescribeConformancePackComplianceOutput, error) { req, out := c.DescribeConformancePackComplianceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConformancePackStatus = "DescribeConformancePackStatus" // DescribeConformancePackStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConformancePackStatus 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 DescribeConformancePackStatus for more information on using the DescribeConformancePackStatus // 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 DescribeConformancePackStatusRequest method. // req, resp := client.DescribeConformancePackStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConformancePackStatus func (c *ConfigService) DescribeConformancePackStatusRequest(input *DescribeConformancePackStatusInput) (req *request.Request, output *DescribeConformancePackStatusOutput) { op := &request.Operation{ Name: opDescribeConformancePackStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConformancePackStatusInput{} } output = &DescribeConformancePackStatusOutput{} req = c.newRequest(op, input, output) return } // DescribeConformancePackStatus API operation for AWS Config. // // Provides one or more conformance packs deployment status. // // If there are no conformance packs then you will see an empty result. // // 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 Config's // API operation DescribeConformancePackStatus for usage and error information. // // Returned Error Types: // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConformancePackStatus func (c *ConfigService) DescribeConformancePackStatus(input *DescribeConformancePackStatusInput) (*DescribeConformancePackStatusOutput, error) { req, out := c.DescribeConformancePackStatusRequest(input) return out, req.Send() } // DescribeConformancePackStatusWithContext is the same as DescribeConformancePackStatus with the addition of // the ability to pass a context and additional request options. // // See DescribeConformancePackStatus 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 *ConfigService) DescribeConformancePackStatusWithContext(ctx aws.Context, input *DescribeConformancePackStatusInput, opts ...request.Option) (*DescribeConformancePackStatusOutput, error) { req, out := c.DescribeConformancePackStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeConformancePacks = "DescribeConformancePacks" // DescribeConformancePacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeConformancePacks 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 DescribeConformancePacks for more information on using the DescribeConformancePacks // 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 DescribeConformancePacksRequest method. // req, resp := client.DescribeConformancePacksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConformancePacks func (c *ConfigService) DescribeConformancePacksRequest(input *DescribeConformancePacksInput) (req *request.Request, output *DescribeConformancePacksOutput) { op := &request.Operation{ Name: opDescribeConformancePacks, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeConformancePacksInput{} } output = &DescribeConformancePacksOutput{} req = c.newRequest(op, input, output) return } // DescribeConformancePacks API operation for AWS Config. // // Returns a list of one or more conformance packs. // // 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 Config's // API operation DescribeConformancePacks for usage and error information. // // Returned Error Types: // * NoSuchConformancePackException // You specified one or more conformance packs that do not exist. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConformancePacks func (c *ConfigService) DescribeConformancePacks(input *DescribeConformancePacksInput) (*DescribeConformancePacksOutput, error) { req, out := c.DescribeConformancePacksRequest(input) return out, req.Send() } // DescribeConformancePacksWithContext is the same as DescribeConformancePacks with the addition of // the ability to pass a context and additional request options. // // See DescribeConformancePacks 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 *ConfigService) DescribeConformancePacksWithContext(ctx aws.Context, input *DescribeConformancePacksInput, opts ...request.Option) (*DescribeConformancePacksOutput, error) { req, out := c.DescribeConformancePacksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeDeliveryChannelStatus = "DescribeDeliveryChannelStatus" // DescribeDeliveryChannelStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannelStatus 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 DescribeDeliveryChannelStatus for more information on using the DescribeDeliveryChannelStatus // 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 DescribeDeliveryChannelStatusRequest method. // req, resp := client.DescribeDeliveryChannelStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannelStatus func (c *ConfigService) DescribeDeliveryChannelStatusRequest(input *DescribeDeliveryChannelStatusInput) (req *request.Request, output *DescribeDeliveryChannelStatusOutput) { op := &request.Operation{ Name: opDescribeDeliveryChannelStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeDeliveryChannelStatusInput{} } output = &DescribeDeliveryChannelStatusOutput{} req = c.newRequest(op, input, output) return } // DescribeDeliveryChannelStatus API operation for AWS Config. // // Returns the current status of the specified delivery channel. If a delivery // channel is not specified, this action returns the current status of all delivery // channels associated with the account. // // Currently, you can specify only one delivery channel per region in your account. // // 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 Config's // API operation DescribeDeliveryChannelStatus for usage and error information. // // Returned Error Types: // * NoSuchDeliveryChannelException // You have specified a delivery channel that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannelStatus func (c *ConfigService) DescribeDeliveryChannelStatus(input *DescribeDeliveryChannelStatusInput) (*DescribeDeliveryChannelStatusOutput, error) { req, out := c.DescribeDeliveryChannelStatusRequest(input) return out, req.Send() } // DescribeDeliveryChannelStatusWithContext is the same as DescribeDeliveryChannelStatus with the addition of // the ability to pass a context and additional request options. // // See DescribeDeliveryChannelStatus 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 *ConfigService) DescribeDeliveryChannelStatusWithContext(ctx aws.Context, input *DescribeDeliveryChannelStatusInput, opts ...request.Option) (*DescribeDeliveryChannelStatusOutput, error) { req, out := c.DescribeDeliveryChannelStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeDeliveryChannels = "DescribeDeliveryChannels" // DescribeDeliveryChannelsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannels 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 DescribeDeliveryChannels for more information on using the DescribeDeliveryChannels // 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 DescribeDeliveryChannelsRequest method. // req, resp := client.DescribeDeliveryChannelsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannels func (c *ConfigService) DescribeDeliveryChannelsRequest(input *DescribeDeliveryChannelsInput) (req *request.Request, output *DescribeDeliveryChannelsOutput) { op := &request.Operation{ Name: opDescribeDeliveryChannels, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeDeliveryChannelsInput{} } output = &DescribeDeliveryChannelsOutput{} req = c.newRequest(op, input, output) return } // DescribeDeliveryChannels API operation for AWS Config. // // Returns details about the specified delivery channel. If a delivery channel // is not specified, this action returns the details of all delivery channels // associated with the account. // // Currently, you can specify only one delivery channel per region in your account. // // 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 Config's // API operation DescribeDeliveryChannels for usage and error information. // // Returned Error Types: // * NoSuchDeliveryChannelException // You have specified a delivery channel that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannels func (c *ConfigService) DescribeDeliveryChannels(input *DescribeDeliveryChannelsInput) (*DescribeDeliveryChannelsOutput, error) { req, out := c.DescribeDeliveryChannelsRequest(input) return out, req.Send() } // DescribeDeliveryChannelsWithContext is the same as DescribeDeliveryChannels with the addition of // the ability to pass a context and additional request options. // // See DescribeDeliveryChannels 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 *ConfigService) DescribeDeliveryChannelsWithContext(ctx aws.Context, input *DescribeDeliveryChannelsInput, opts ...request.Option) (*DescribeDeliveryChannelsOutput, error) { req, out := c.DescribeDeliveryChannelsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeOrganizationConfigRuleStatuses = "DescribeOrganizationConfigRuleStatuses" // DescribeOrganizationConfigRuleStatusesRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganizationConfigRuleStatuses 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 DescribeOrganizationConfigRuleStatuses for more information on using the DescribeOrganizationConfigRuleStatuses // 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 DescribeOrganizationConfigRuleStatusesRequest method. // req, resp := client.DescribeOrganizationConfigRuleStatusesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConfigRuleStatuses func (c *ConfigService) DescribeOrganizationConfigRuleStatusesRequest(input *DescribeOrganizationConfigRuleStatusesInput) (req *request.Request, output *DescribeOrganizationConfigRuleStatusesOutput) { op := &request.Operation{ Name: opDescribeOrganizationConfigRuleStatuses, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeOrganizationConfigRuleStatusesInput{} } output = &DescribeOrganizationConfigRuleStatusesOutput{} req = c.newRequest(op, input, output) return } // DescribeOrganizationConfigRuleStatuses API operation for AWS Config. // // Provides organization config rule deployment status for an organization. // // The status is not considered successful until organization config rule is // successfully deployed in all the member accounts with an exception of excluded // accounts. // // When you specify the limit and the next token, you receive a paginated response. // Limit and next token are not applicable if you specify organization config // rule names. It is only applicable, when you request all the organization // config rules. // // Only a master account can call this API. // // 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 Config's // API operation DescribeOrganizationConfigRuleStatuses for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConfigRuleException // You specified one or more organization config rules that do not exist. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConfigRuleStatuses func (c *ConfigService) DescribeOrganizationConfigRuleStatuses(input *DescribeOrganizationConfigRuleStatusesInput) (*DescribeOrganizationConfigRuleStatusesOutput, error) { req, out := c.DescribeOrganizationConfigRuleStatusesRequest(input) return out, req.Send() } // DescribeOrganizationConfigRuleStatusesWithContext is the same as DescribeOrganizationConfigRuleStatuses with the addition of // the ability to pass a context and additional request options. // // See DescribeOrganizationConfigRuleStatuses 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 *ConfigService) DescribeOrganizationConfigRuleStatusesWithContext(ctx aws.Context, input *DescribeOrganizationConfigRuleStatusesInput, opts ...request.Option) (*DescribeOrganizationConfigRuleStatusesOutput, error) { req, out := c.DescribeOrganizationConfigRuleStatusesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeOrganizationConfigRules = "DescribeOrganizationConfigRules" // DescribeOrganizationConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganizationConfigRules 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 DescribeOrganizationConfigRules for more information on using the DescribeOrganizationConfigRules // 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 DescribeOrganizationConfigRulesRequest method. // req, resp := client.DescribeOrganizationConfigRulesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConfigRules func (c *ConfigService) DescribeOrganizationConfigRulesRequest(input *DescribeOrganizationConfigRulesInput) (req *request.Request, output *DescribeOrganizationConfigRulesOutput) { op := &request.Operation{ Name: opDescribeOrganizationConfigRules, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeOrganizationConfigRulesInput{} } output = &DescribeOrganizationConfigRulesOutput{} req = c.newRequest(op, input, output) return } // DescribeOrganizationConfigRules API operation for AWS Config. // // Returns a list of organization config rules. // // When you specify the limit and the next token, you receive a paginated response. // Limit and next token are not applicable if you specify organization config // rule names. It is only applicable, when you request all the organization // config rules. // // Only a master account can call this API. // // 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 Config's // API operation DescribeOrganizationConfigRules for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConfigRuleException // You specified one or more organization config rules that do not exist. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConfigRules func (c *ConfigService) DescribeOrganizationConfigRules(input *DescribeOrganizationConfigRulesInput) (*DescribeOrganizationConfigRulesOutput, error) { req, out := c.DescribeOrganizationConfigRulesRequest(input) return out, req.Send() } // DescribeOrganizationConfigRulesWithContext is the same as DescribeOrganizationConfigRules with the addition of // the ability to pass a context and additional request options. // // See DescribeOrganizationConfigRules 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 *ConfigService) DescribeOrganizationConfigRulesWithContext(ctx aws.Context, input *DescribeOrganizationConfigRulesInput, opts ...request.Option) (*DescribeOrganizationConfigRulesOutput, error) { req, out := c.DescribeOrganizationConfigRulesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeOrganizationConformancePackStatuses = "DescribeOrganizationConformancePackStatuses" // DescribeOrganizationConformancePackStatusesRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganizationConformancePackStatuses 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 DescribeOrganizationConformancePackStatuses for more information on using the DescribeOrganizationConformancePackStatuses // 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 DescribeOrganizationConformancePackStatusesRequest method. // req, resp := client.DescribeOrganizationConformancePackStatusesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConformancePackStatuses func (c *ConfigService) DescribeOrganizationConformancePackStatusesRequest(input *DescribeOrganizationConformancePackStatusesInput) (req *request.Request, output *DescribeOrganizationConformancePackStatusesOutput) { op := &request.Operation{ Name: opDescribeOrganizationConformancePackStatuses, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeOrganizationConformancePackStatusesInput{} } output = &DescribeOrganizationConformancePackStatusesOutput{} req = c.newRequest(op, input, output) return } // DescribeOrganizationConformancePackStatuses API operation for AWS Config. // // Provides organization conformance pack deployment status for an organization. // // The status is not considered successful until organization conformance pack // is successfully deployed in all the member accounts with an exception of // excluded accounts. // // When you specify the limit and the next token, you receive a paginated response. // Limit and next token are not applicable if you specify organization conformance // pack names. They are only applicable, when you request all the organization // conformance packs. // // Only a master account can call this API. // // 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 Config's // API operation DescribeOrganizationConformancePackStatuses for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConformancePackException // AWS Config organization conformance pack that you passed in the filter does // not exist. // // For DeleteOrganizationConformancePack, you tried to delete an organization // conformance pack that does not exist. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConformancePackStatuses func (c *ConfigService) DescribeOrganizationConformancePackStatuses(input *DescribeOrganizationConformancePackStatusesInput) (*DescribeOrganizationConformancePackStatusesOutput, error) { req, out := c.DescribeOrganizationConformancePackStatusesRequest(input) return out, req.Send() } // DescribeOrganizationConformancePackStatusesWithContext is the same as DescribeOrganizationConformancePackStatuses with the addition of // the ability to pass a context and additional request options. // // See DescribeOrganizationConformancePackStatuses 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 *ConfigService) DescribeOrganizationConformancePackStatusesWithContext(ctx aws.Context, input *DescribeOrganizationConformancePackStatusesInput, opts ...request.Option) (*DescribeOrganizationConformancePackStatusesOutput, error) { req, out := c.DescribeOrganizationConformancePackStatusesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeOrganizationConformancePacks = "DescribeOrganizationConformancePacks" // DescribeOrganizationConformancePacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganizationConformancePacks 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 DescribeOrganizationConformancePacks for more information on using the DescribeOrganizationConformancePacks // 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 DescribeOrganizationConformancePacksRequest method. // req, resp := client.DescribeOrganizationConformancePacksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConformancePacks func (c *ConfigService) DescribeOrganizationConformancePacksRequest(input *DescribeOrganizationConformancePacksInput) (req *request.Request, output *DescribeOrganizationConformancePacksOutput) { op := &request.Operation{ Name: opDescribeOrganizationConformancePacks, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeOrganizationConformancePacksInput{} } output = &DescribeOrganizationConformancePacksOutput{} req = c.newRequest(op, input, output) return } // DescribeOrganizationConformancePacks API operation for AWS Config. // // Returns a list of organization conformance packs. // // When you specify the limit and the next token, you receive a paginated response. // // Limit and next token are not applicable if you specify organization conformance // packs names. They are only applicable, when you request all the organization // conformance packs. // // Only a master account can call this API. // // 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 Config's // API operation DescribeOrganizationConformancePacks for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConformancePackException // AWS Config organization conformance pack that you passed in the filter does // not exist. // // For DeleteOrganizationConformancePack, you tried to delete an organization // conformance pack that does not exist. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeOrganizationConformancePacks func (c *ConfigService) DescribeOrganizationConformancePacks(input *DescribeOrganizationConformancePacksInput) (*DescribeOrganizationConformancePacksOutput, error) { req, out := c.DescribeOrganizationConformancePacksRequest(input) return out, req.Send() } // DescribeOrganizationConformancePacksWithContext is the same as DescribeOrganizationConformancePacks with the addition of // the ability to pass a context and additional request options. // // See DescribeOrganizationConformancePacks 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 *ConfigService) DescribeOrganizationConformancePacksWithContext(ctx aws.Context, input *DescribeOrganizationConformancePacksInput, opts ...request.Option) (*DescribeOrganizationConformancePacksOutput, error) { req, out := c.DescribeOrganizationConformancePacksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribePendingAggregationRequests = "DescribePendingAggregationRequests" // DescribePendingAggregationRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingAggregationRequests 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 DescribePendingAggregationRequests for more information on using the DescribePendingAggregationRequests // 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 DescribePendingAggregationRequestsRequest method. // req, resp := client.DescribePendingAggregationRequestsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribePendingAggregationRequests func (c *ConfigService) DescribePendingAggregationRequestsRequest(input *DescribePendingAggregationRequestsInput) (req *request.Request, output *DescribePendingAggregationRequestsOutput) { op := &request.Operation{ Name: opDescribePendingAggregationRequests, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribePendingAggregationRequestsInput{} } output = &DescribePendingAggregationRequestsOutput{} req = c.newRequest(op, input, output) return } // DescribePendingAggregationRequests API operation for AWS Config. // // Returns a list of all pending aggregation requests. // // 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 Config's // API operation DescribePendingAggregationRequests for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidLimitException // The specified limit is outside the allowable range. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribePendingAggregationRequests func (c *ConfigService) DescribePendingAggregationRequests(input *DescribePendingAggregationRequestsInput) (*DescribePendingAggregationRequestsOutput, error) { req, out := c.DescribePendingAggregationRequestsRequest(input) return out, req.Send() } // DescribePendingAggregationRequestsWithContext is the same as DescribePendingAggregationRequests with the addition of // the ability to pass a context and additional request options. // // See DescribePendingAggregationRequests 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 *ConfigService) DescribePendingAggregationRequestsWithContext(ctx aws.Context, input *DescribePendingAggregationRequestsInput, opts ...request.Option) (*DescribePendingAggregationRequestsOutput, error) { req, out := c.DescribePendingAggregationRequestsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeRemediationConfigurations = "DescribeRemediationConfigurations" // DescribeRemediationConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRemediationConfigurations 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 DescribeRemediationConfigurations for more information on using the DescribeRemediationConfigurations // 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 DescribeRemediationConfigurationsRequest method. // req, resp := client.DescribeRemediationConfigurationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRemediationConfigurations func (c *ConfigService) DescribeRemediationConfigurationsRequest(input *DescribeRemediationConfigurationsInput) (req *request.Request, output *DescribeRemediationConfigurationsOutput) { op := &request.Operation{ Name: opDescribeRemediationConfigurations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeRemediationConfigurationsInput{} } output = &DescribeRemediationConfigurationsOutput{} req = c.newRequest(op, input, output) return } // DescribeRemediationConfigurations API operation for AWS Config. // // Returns the details of one or more remediation configurations. // // 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 Config's // API operation DescribeRemediationConfigurations for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRemediationConfigurations func (c *ConfigService) DescribeRemediationConfigurations(input *DescribeRemediationConfigurationsInput) (*DescribeRemediationConfigurationsOutput, error) { req, out := c.DescribeRemediationConfigurationsRequest(input) return out, req.Send() } // DescribeRemediationConfigurationsWithContext is the same as DescribeRemediationConfigurations with the addition of // the ability to pass a context and additional request options. // // See DescribeRemediationConfigurations 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 *ConfigService) DescribeRemediationConfigurationsWithContext(ctx aws.Context, input *DescribeRemediationConfigurationsInput, opts ...request.Option) (*DescribeRemediationConfigurationsOutput, error) { req, out := c.DescribeRemediationConfigurationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeRemediationExceptions = "DescribeRemediationExceptions" // DescribeRemediationExceptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRemediationExceptions 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 DescribeRemediationExceptions for more information on using the DescribeRemediationExceptions // 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 DescribeRemediationExceptionsRequest method. // req, resp := client.DescribeRemediationExceptionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRemediationExceptions func (c *ConfigService) DescribeRemediationExceptionsRequest(input *DescribeRemediationExceptionsInput) (req *request.Request, output *DescribeRemediationExceptionsOutput) { op := &request.Operation{ Name: opDescribeRemediationExceptions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "Limit", TruncationToken: "", }, } if input == nil { input = &DescribeRemediationExceptionsInput{} } output = &DescribeRemediationExceptionsOutput{} req = c.newRequest(op, input, output) return } // DescribeRemediationExceptions API operation for AWS Config. // // Returns the details of one or more remediation exceptions. A detailed view // of a remediation exception for a set of resources that includes an explanation // of an exception and the time when the exception will be deleted. When you // specify the limit and the next token, you receive a paginated response. // // When you specify the limit and the next token, you receive a paginated response. // // Limit and next token are not applicable if you request resources in batch. // It is only applicable, when you request all resources. // // 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 Config's // API operation DescribeRemediationExceptions for usage and error information. // // Returned Error Types: // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRemediationExceptions func (c *ConfigService) DescribeRemediationExceptions(input *DescribeRemediationExceptionsInput) (*DescribeRemediationExceptionsOutput, error) { req, out := c.DescribeRemediationExceptionsRequest(input) return out, req.Send() } // DescribeRemediationExceptionsWithContext is the same as DescribeRemediationExceptions with the addition of // the ability to pass a context and additional request options. // // See DescribeRemediationExceptions 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 *ConfigService) DescribeRemediationExceptionsWithContext(ctx aws.Context, input *DescribeRemediationExceptionsInput, opts ...request.Option) (*DescribeRemediationExceptionsOutput, error) { req, out := c.DescribeRemediationExceptionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeRemediationExceptionsPages iterates over the pages of a DescribeRemediationExceptions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeRemediationExceptions method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // // // Example iterating over at most 3 pages of a DescribeRemediationExceptions operation. // pageNum := 0 // err := client.DescribeRemediationExceptionsPages(params, // func(page *configservice.DescribeRemediationExceptionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // func (c *ConfigService) DescribeRemediationExceptionsPages(input *DescribeRemediationExceptionsInput, fn func(*DescribeRemediationExceptionsOutput, bool) bool) error { return c.DescribeRemediationExceptionsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeRemediationExceptionsPagesWithContext same as DescribeRemediationExceptionsPages except // it takes a Context and allows setting request options on the pages. // // 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 *ConfigService) DescribeRemediationExceptionsPagesWithContext(ctx aws.Context, input *DescribeRemediationExceptionsInput, fn func(*DescribeRemediationExceptionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeRemediationExceptionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeRemediationExceptionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeRemediationExceptionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeRemediationExecutionStatus = "DescribeRemediationExecutionStatus" // DescribeRemediationExecutionStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeRemediationExecutionStatus 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 DescribeRemediationExecutionStatus for more information on using the DescribeRemediationExecutionStatus // 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 DescribeRemediationExecutionStatusRequest method. // req, resp := client.DescribeRemediationExecutionStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRemediationExecutionStatus func (c *ConfigService) DescribeRemediationExecutionStatusRequest(input *DescribeRemediationExecutionStatusInput) (req *request.Request, output *DescribeRemediationExecutionStatusOutput) { op := &request.Operation{ Name: opDescribeRemediationExecutionStatus, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "Limit", TruncationToken: "", }, } if input == nil { input = &DescribeRemediationExecutionStatusInput{} } output = &DescribeRemediationExecutionStatusOutput{} req = c.newRequest(op, input, output) return } // DescribeRemediationExecutionStatus API operation for AWS Config. // // Provides a detailed view of a Remediation Execution for a set of resources // including state, timestamps for when steps for the remediation execution // occur, and any error messages for steps that have failed. When you specify // the limit and the next token, you receive a paginated response. // // 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 Config's // API operation DescribeRemediationExecutionStatus for usage and error information. // // Returned Error Types: // * NoSuchRemediationConfigurationException // You specified an AWS Config rule without a remediation configuration. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRemediationExecutionStatus func (c *ConfigService) DescribeRemediationExecutionStatus(input *DescribeRemediationExecutionStatusInput) (*DescribeRemediationExecutionStatusOutput, error) { req, out := c.DescribeRemediationExecutionStatusRequest(input) return out, req.Send() } // DescribeRemediationExecutionStatusWithContext is the same as DescribeRemediationExecutionStatus with the addition of // the ability to pass a context and additional request options. // // See DescribeRemediationExecutionStatus 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 *ConfigService) DescribeRemediationExecutionStatusWithContext(ctx aws.Context, input *DescribeRemediationExecutionStatusInput, opts ...request.Option) (*DescribeRemediationExecutionStatusOutput, error) { req, out := c.DescribeRemediationExecutionStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeRemediationExecutionStatusPages iterates over the pages of a DescribeRemediationExecutionStatus operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeRemediationExecutionStatus method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // // // Example iterating over at most 3 pages of a DescribeRemediationExecutionStatus operation. // pageNum := 0 // err := client.DescribeRemediationExecutionStatusPages(params, // func(page *configservice.DescribeRemediationExecutionStatusOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // func (c *ConfigService) DescribeRemediationExecutionStatusPages(input *DescribeRemediationExecutionStatusInput, fn func(*DescribeRemediationExecutionStatusOutput, bool) bool) error { return c.DescribeRemediationExecutionStatusPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeRemediationExecutionStatusPagesWithContext same as DescribeRemediationExecutionStatusPages except // it takes a Context and allows setting request options on the pages. // // 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 *ConfigService) DescribeRemediationExecutionStatusPagesWithContext(ctx aws.Context, input *DescribeRemediationExecutionStatusInput, fn func(*DescribeRemediationExecutionStatusOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeRemediationExecutionStatusInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeRemediationExecutionStatusRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeRemediationExecutionStatusOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeRetentionConfigurations = "DescribeRetentionConfigurations" // DescribeRetentionConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRetentionConfigurations 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 DescribeRetentionConfigurations for more information on using the DescribeRetentionConfigurations // 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 DescribeRetentionConfigurationsRequest method. // req, resp := client.DescribeRetentionConfigurationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRetentionConfigurations func (c *ConfigService) DescribeRetentionConfigurationsRequest(input *DescribeRetentionConfigurationsInput) (req *request.Request, output *DescribeRetentionConfigurationsOutput) { op := &request.Operation{ Name: opDescribeRetentionConfigurations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeRetentionConfigurationsInput{} } output = &DescribeRetentionConfigurationsOutput{} req = c.newRequest(op, input, output) return } // DescribeRetentionConfigurations API operation for AWS Config. // // Returns the details of one or more retention configurations. If the retention // configuration name is not specified, this action returns the details for // all the retention configurations for that account. // // Currently, AWS Config supports only one retention configuration per region // in your account. // // 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 Config's // API operation DescribeRetentionConfigurations for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * NoSuchRetentionConfigurationException // You have specified a retention configuration that does not exist. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRetentionConfigurations func (c *ConfigService) DescribeRetentionConfigurations(input *DescribeRetentionConfigurationsInput) (*DescribeRetentionConfigurationsOutput, error) { req, out := c.DescribeRetentionConfigurationsRequest(input) return out, req.Send() } // DescribeRetentionConfigurationsWithContext is the same as DescribeRetentionConfigurations with the addition of // the ability to pass a context and additional request options. // // See DescribeRetentionConfigurations 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 *ConfigService) DescribeRetentionConfigurationsWithContext(ctx aws.Context, input *DescribeRetentionConfigurationsInput, opts ...request.Option) (*DescribeRetentionConfigurationsOutput, error) { req, out := c.DescribeRetentionConfigurationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetAggregateComplianceDetailsByConfigRule = "GetAggregateComplianceDetailsByConfigRule" // GetAggregateComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateComplianceDetailsByConfigRule 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 GetAggregateComplianceDetailsByConfigRule for more information on using the GetAggregateComplianceDetailsByConfigRule // 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 GetAggregateComplianceDetailsByConfigRuleRequest method. // req, resp := client.GetAggregateComplianceDetailsByConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateComplianceDetailsByConfigRule func (c *ConfigService) GetAggregateComplianceDetailsByConfigRuleRequest(input *GetAggregateComplianceDetailsByConfigRuleInput) (req *request.Request, output *GetAggregateComplianceDetailsByConfigRuleOutput) { op := &request.Operation{ Name: opGetAggregateComplianceDetailsByConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetAggregateComplianceDetailsByConfigRuleInput{} } output = &GetAggregateComplianceDetailsByConfigRuleOutput{} req = c.newRequest(op, input, output) return } // GetAggregateComplianceDetailsByConfigRule API operation for AWS Config. // // Returns the evaluation results for the specified AWS Config rule for a specific // resource in a rule. The results indicate which AWS resources were evaluated // by the rule, when each resource was last evaluated, and whether each resource // complies with the rule. // // The results can return an empty result page. But if you have a nextToken, // the results are displayed on the next page. // // 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 Config's // API operation GetAggregateComplianceDetailsByConfigRule for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateComplianceDetailsByConfigRule func (c *ConfigService) GetAggregateComplianceDetailsByConfigRule(input *GetAggregateComplianceDetailsByConfigRuleInput) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) { req, out := c.GetAggregateComplianceDetailsByConfigRuleRequest(input) return out, req.Send() } // GetAggregateComplianceDetailsByConfigRuleWithContext is the same as GetAggregateComplianceDetailsByConfigRule with the addition of // the ability to pass a context and additional request options. // // See GetAggregateComplianceDetailsByConfigRule 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 *ConfigService) GetAggregateComplianceDetailsByConfigRuleWithContext(ctx aws.Context, input *GetAggregateComplianceDetailsByConfigRuleInput, opts ...request.Option) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) { req, out := c.GetAggregateComplianceDetailsByConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetAggregateConfigRuleComplianceSummary = "GetAggregateConfigRuleComplianceSummary" // GetAggregateConfigRuleComplianceSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateConfigRuleComplianceSummary 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 GetAggregateConfigRuleComplianceSummary for more information on using the GetAggregateConfigRuleComplianceSummary // 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 GetAggregateConfigRuleComplianceSummaryRequest method. // req, resp := client.GetAggregateConfigRuleComplianceSummaryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateConfigRuleComplianceSummary func (c *ConfigService) GetAggregateConfigRuleComplianceSummaryRequest(input *GetAggregateConfigRuleComplianceSummaryInput) (req *request.Request, output *GetAggregateConfigRuleComplianceSummaryOutput) { op := &request.Operation{ Name: opGetAggregateConfigRuleComplianceSummary, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetAggregateConfigRuleComplianceSummaryInput{} } output = &GetAggregateConfigRuleComplianceSummaryOutput{} req = c.newRequest(op, input, output) return } // GetAggregateConfigRuleComplianceSummary API operation for AWS Config. // // Returns the number of compliant and noncompliant rules for one or more accounts // and regions in an aggregator. // // The results can return an empty result page, but if you have a nextToken, // the results are displayed on the next page. // // 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 Config's // API operation GetAggregateConfigRuleComplianceSummary for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateConfigRuleComplianceSummary func (c *ConfigService) GetAggregateConfigRuleComplianceSummary(input *GetAggregateConfigRuleComplianceSummaryInput) (*GetAggregateConfigRuleComplianceSummaryOutput, error) { req, out := c.GetAggregateConfigRuleComplianceSummaryRequest(input) return out, req.Send() } // GetAggregateConfigRuleComplianceSummaryWithContext is the same as GetAggregateConfigRuleComplianceSummary with the addition of // the ability to pass a context and additional request options. // // See GetAggregateConfigRuleComplianceSummary 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 *ConfigService) GetAggregateConfigRuleComplianceSummaryWithContext(ctx aws.Context, input *GetAggregateConfigRuleComplianceSummaryInput, opts ...request.Option) (*GetAggregateConfigRuleComplianceSummaryOutput, error) { req, out := c.GetAggregateConfigRuleComplianceSummaryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetAggregateDiscoveredResourceCounts = "GetAggregateDiscoveredResourceCounts" // GetAggregateDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateDiscoveredResourceCounts 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 GetAggregateDiscoveredResourceCounts for more information on using the GetAggregateDiscoveredResourceCounts // 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 GetAggregateDiscoveredResourceCountsRequest method. // req, resp := client.GetAggregateDiscoveredResourceCountsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateDiscoveredResourceCounts func (c *ConfigService) GetAggregateDiscoveredResourceCountsRequest(input *GetAggregateDiscoveredResourceCountsInput) (req *request.Request, output *GetAggregateDiscoveredResourceCountsOutput) { op := &request.Operation{ Name: opGetAggregateDiscoveredResourceCounts, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetAggregateDiscoveredResourceCountsInput{} } output = &GetAggregateDiscoveredResourceCountsOutput{} req = c.newRequest(op, input, output) return } // GetAggregateDiscoveredResourceCounts API operation for AWS Config. // // Returns the resource counts across accounts and regions that are present // in your AWS Config aggregator. You can request the resource counts by providing // filters and GroupByKey. // // For example, if the input contains accountID 12345678910 and region us-east-1 // in filters, the API returns the count of resources in account ID 12345678910 // and region us-east-1. If the input contains ACCOUNT_ID as a GroupByKey, the // API returns resource counts for all source accounts that are present in your // aggregator. // // 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 Config's // API operation GetAggregateDiscoveredResourceCounts for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateDiscoveredResourceCounts func (c *ConfigService) GetAggregateDiscoveredResourceCounts(input *GetAggregateDiscoveredResourceCountsInput) (*GetAggregateDiscoveredResourceCountsOutput, error) { req, out := c.GetAggregateDiscoveredResourceCountsRequest(input) return out, req.Send() } // GetAggregateDiscoveredResourceCountsWithContext is the same as GetAggregateDiscoveredResourceCounts with the addition of // the ability to pass a context and additional request options. // // See GetAggregateDiscoveredResourceCounts 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 *ConfigService) GetAggregateDiscoveredResourceCountsWithContext(ctx aws.Context, input *GetAggregateDiscoveredResourceCountsInput, opts ...request.Option) (*GetAggregateDiscoveredResourceCountsOutput, error) { req, out := c.GetAggregateDiscoveredResourceCountsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetAggregateResourceConfig = "GetAggregateResourceConfig" // GetAggregateResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateResourceConfig 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 GetAggregateResourceConfig for more information on using the GetAggregateResourceConfig // 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 GetAggregateResourceConfigRequest method. // req, resp := client.GetAggregateResourceConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateResourceConfig func (c *ConfigService) GetAggregateResourceConfigRequest(input *GetAggregateResourceConfigInput) (req *request.Request, output *GetAggregateResourceConfigOutput) { op := &request.Operation{ Name: opGetAggregateResourceConfig, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetAggregateResourceConfigInput{} } output = &GetAggregateResourceConfigOutput{} req = c.newRequest(op, input, output) return } // GetAggregateResourceConfig API operation for AWS Config. // // Returns configuration item that is aggregated for your specific resource // in a specific source account and region. // // 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 Config's // API operation GetAggregateResourceConfig for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // * OversizedConfigurationItemException // The configuration item size is outside the allowable range. // // * ResourceNotDiscoveredException // You have specified a resource that is either unknown or has not been discovered. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateResourceConfig func (c *ConfigService) GetAggregateResourceConfig(input *GetAggregateResourceConfigInput) (*GetAggregateResourceConfigOutput, error) { req, out := c.GetAggregateResourceConfigRequest(input) return out, req.Send() } // GetAggregateResourceConfigWithContext is the same as GetAggregateResourceConfig with the addition of // the ability to pass a context and additional request options. // // See GetAggregateResourceConfig 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 *ConfigService) GetAggregateResourceConfigWithContext(ctx aws.Context, input *GetAggregateResourceConfigInput, opts ...request.Option) (*GetAggregateResourceConfigOutput, error) { req, out := c.GetAggregateResourceConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetComplianceDetailsByConfigRule = "GetComplianceDetailsByConfigRule" // GetComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetailsByConfigRule 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 GetComplianceDetailsByConfigRule for more information on using the GetComplianceDetailsByConfigRule // 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 GetComplianceDetailsByConfigRuleRequest method. // req, resp := client.GetComplianceDetailsByConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule func (c *ConfigService) GetComplianceDetailsByConfigRuleRequest(input *GetComplianceDetailsByConfigRuleInput) (req *request.Request, output *GetComplianceDetailsByConfigRuleOutput) { op := &request.Operation{ Name: opGetComplianceDetailsByConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetComplianceDetailsByConfigRuleInput{} } output = &GetComplianceDetailsByConfigRuleOutput{} req = c.newRequest(op, input, output) return } // GetComplianceDetailsByConfigRule API operation for AWS Config. // // Returns the evaluation results for the specified AWS Config rule. The results // indicate which AWS resources were evaluated by the rule, when each resource // was last evaluated, and whether each resource complies with the rule. // // 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 Config's // API operation GetComplianceDetailsByConfigRule for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule func (c *ConfigService) GetComplianceDetailsByConfigRule(input *GetComplianceDetailsByConfigRuleInput) (*GetComplianceDetailsByConfigRuleOutput, error) { req, out := c.GetComplianceDetailsByConfigRuleRequest(input) return out, req.Send() } // GetComplianceDetailsByConfigRuleWithContext is the same as GetComplianceDetailsByConfigRule with the addition of // the ability to pass a context and additional request options. // // See GetComplianceDetailsByConfigRule 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 *ConfigService) GetComplianceDetailsByConfigRuleWithContext(ctx aws.Context, input *GetComplianceDetailsByConfigRuleInput, opts ...request.Option) (*GetComplianceDetailsByConfigRuleOutput, error) { req, out := c.GetComplianceDetailsByConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetComplianceDetailsByResource = "GetComplianceDetailsByResource" // GetComplianceDetailsByResourceRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetailsByResource 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 GetComplianceDetailsByResource for more information on using the GetComplianceDetailsByResource // 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 GetComplianceDetailsByResourceRequest method. // req, resp := client.GetComplianceDetailsByResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource func (c *ConfigService) GetComplianceDetailsByResourceRequest(input *GetComplianceDetailsByResourceInput) (req *request.Request, output *GetComplianceDetailsByResourceOutput) { op := &request.Operation{ Name: opGetComplianceDetailsByResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetComplianceDetailsByResourceInput{} } output = &GetComplianceDetailsByResourceOutput{} req = c.newRequest(op, input, output) return } // GetComplianceDetailsByResource API operation for AWS Config. // // Returns the evaluation results for the specified AWS resource. The results // indicate which AWS Config rules were used to evaluate the resource, when // each rule was last used, and whether the resource complies with each rule. // // 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 Config's // API operation GetComplianceDetailsByResource for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource func (c *ConfigService) GetComplianceDetailsByResource(input *GetComplianceDetailsByResourceInput) (*GetComplianceDetailsByResourceOutput, error) { req, out := c.GetComplianceDetailsByResourceRequest(input) return out, req.Send() } // GetComplianceDetailsByResourceWithContext is the same as GetComplianceDetailsByResource with the addition of // the ability to pass a context and additional request options. // // See GetComplianceDetailsByResource 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 *ConfigService) GetComplianceDetailsByResourceWithContext(ctx aws.Context, input *GetComplianceDetailsByResourceInput, opts ...request.Option) (*GetComplianceDetailsByResourceOutput, error) { req, out := c.GetComplianceDetailsByResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetComplianceSummaryByConfigRule = "GetComplianceSummaryByConfigRule" // GetComplianceSummaryByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceSummaryByConfigRule 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 GetComplianceSummaryByConfigRule for more information on using the GetComplianceSummaryByConfigRule // 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 GetComplianceSummaryByConfigRuleRequest method. // req, resp := client.GetComplianceSummaryByConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule func (c *ConfigService) GetComplianceSummaryByConfigRuleRequest(input *GetComplianceSummaryByConfigRuleInput) (req *request.Request, output *GetComplianceSummaryByConfigRuleOutput) { op := &request.Operation{ Name: opGetComplianceSummaryByConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetComplianceSummaryByConfigRuleInput{} } output = &GetComplianceSummaryByConfigRuleOutput{} req = c.newRequest(op, input, output) return } // GetComplianceSummaryByConfigRule API operation for AWS Config. // // Returns the number of AWS Config rules that are compliant and noncompliant, // up to a maximum of 25 for each. // // 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 Config's // API operation GetComplianceSummaryByConfigRule for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule func (c *ConfigService) GetComplianceSummaryByConfigRule(input *GetComplianceSummaryByConfigRuleInput) (*GetComplianceSummaryByConfigRuleOutput, error) { req, out := c.GetComplianceSummaryByConfigRuleRequest(input) return out, req.Send() } // GetComplianceSummaryByConfigRuleWithContext is the same as GetComplianceSummaryByConfigRule with the addition of // the ability to pass a context and additional request options. // // See GetComplianceSummaryByConfigRule 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 *ConfigService) GetComplianceSummaryByConfigRuleWithContext(ctx aws.Context, input *GetComplianceSummaryByConfigRuleInput, opts ...request.Option) (*GetComplianceSummaryByConfigRuleOutput, error) { req, out := c.GetComplianceSummaryByConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetComplianceSummaryByResourceType = "GetComplianceSummaryByResourceType" // GetComplianceSummaryByResourceTypeRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceSummaryByResourceType 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 GetComplianceSummaryByResourceType for more information on using the GetComplianceSummaryByResourceType // 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 GetComplianceSummaryByResourceTypeRequest method. // req, resp := client.GetComplianceSummaryByResourceTypeRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByResourceType func (c *ConfigService) GetComplianceSummaryByResourceTypeRequest(input *GetComplianceSummaryByResourceTypeInput) (req *request.Request, output *GetComplianceSummaryByResourceTypeOutput) { op := &request.Operation{ Name: opGetComplianceSummaryByResourceType, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetComplianceSummaryByResourceTypeInput{} } output = &GetComplianceSummaryByResourceTypeOutput{} req = c.newRequest(op, input, output) return } // GetComplianceSummaryByResourceType API operation for AWS Config. // // Returns the number of resources that are compliant and the number that are // noncompliant. You can specify one or more resource types to get these numbers // for each resource type. The maximum number returned 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. // // See the AWS API reference guide for AWS Config's // API operation GetComplianceSummaryByResourceType for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByResourceType func (c *ConfigService) GetComplianceSummaryByResourceType(input *GetComplianceSummaryByResourceTypeInput) (*GetComplianceSummaryByResourceTypeOutput, error) { req, out := c.GetComplianceSummaryByResourceTypeRequest(input) return out, req.Send() } // GetComplianceSummaryByResourceTypeWithContext is the same as GetComplianceSummaryByResourceType with the addition of // the ability to pass a context and additional request options. // // See GetComplianceSummaryByResourceType 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 *ConfigService) GetComplianceSummaryByResourceTypeWithContext(ctx aws.Context, input *GetComplianceSummaryByResourceTypeInput, opts ...request.Option) (*GetComplianceSummaryByResourceTypeOutput, error) { req, out := c.GetComplianceSummaryByResourceTypeRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetConformancePackComplianceDetails = "GetConformancePackComplianceDetails" // GetConformancePackComplianceDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetConformancePackComplianceDetails 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 GetConformancePackComplianceDetails for more information on using the GetConformancePackComplianceDetails // 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 GetConformancePackComplianceDetailsRequest method. // req, resp := client.GetConformancePackComplianceDetailsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetConformancePackComplianceDetails func (c *ConfigService) GetConformancePackComplianceDetailsRequest(input *GetConformancePackComplianceDetailsInput) (req *request.Request, output *GetConformancePackComplianceDetailsOutput) { op := &request.Operation{ Name: opGetConformancePackComplianceDetails, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetConformancePackComplianceDetailsInput{} } output = &GetConformancePackComplianceDetailsOutput{} req = c.newRequest(op, input, output) return } // GetConformancePackComplianceDetails API operation for AWS Config. // // Returns compliance details of a conformance pack for all AWS resources that // are monitered by conformance pack. // // 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 Config's // API operation GetConformancePackComplianceDetails for usage and error information. // // Returned Error Types: // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoSuchConformancePackException // You specified one or more conformance packs that do not exist. // // * NoSuchConfigRuleInConformancePackException // AWS Config rule that you passed in the filter does not exist. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetConformancePackComplianceDetails func (c *ConfigService) GetConformancePackComplianceDetails(input *GetConformancePackComplianceDetailsInput) (*GetConformancePackComplianceDetailsOutput, error) { req, out := c.GetConformancePackComplianceDetailsRequest(input) return out, req.Send() } // GetConformancePackComplianceDetailsWithContext is the same as GetConformancePackComplianceDetails with the addition of // the ability to pass a context and additional request options. // // See GetConformancePackComplianceDetails 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 *ConfigService) GetConformancePackComplianceDetailsWithContext(ctx aws.Context, input *GetConformancePackComplianceDetailsInput, opts ...request.Option) (*GetConformancePackComplianceDetailsOutput, error) { req, out := c.GetConformancePackComplianceDetailsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetConformancePackComplianceSummary = "GetConformancePackComplianceSummary" // GetConformancePackComplianceSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetConformancePackComplianceSummary 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 GetConformancePackComplianceSummary for more information on using the GetConformancePackComplianceSummary // 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 GetConformancePackComplianceSummaryRequest method. // req, resp := client.GetConformancePackComplianceSummaryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetConformancePackComplianceSummary func (c *ConfigService) GetConformancePackComplianceSummaryRequest(input *GetConformancePackComplianceSummaryInput) (req *request.Request, output *GetConformancePackComplianceSummaryOutput) { op := &request.Operation{ Name: opGetConformancePackComplianceSummary, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetConformancePackComplianceSummaryInput{} } output = &GetConformancePackComplianceSummaryOutput{} req = c.newRequest(op, input, output) return } // GetConformancePackComplianceSummary API operation for AWS Config. // // Returns compliance details for the conformance pack based on the cumulative // compliance results of all the rules in that conformance pack. // // 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 Config's // API operation GetConformancePackComplianceSummary for usage and error information. // // Returned Error Types: // * NoSuchConformancePackException // You specified one or more conformance packs that do not exist. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetConformancePackComplianceSummary func (c *ConfigService) GetConformancePackComplianceSummary(input *GetConformancePackComplianceSummaryInput) (*GetConformancePackComplianceSummaryOutput, error) { req, out := c.GetConformancePackComplianceSummaryRequest(input) return out, req.Send() } // GetConformancePackComplianceSummaryWithContext is the same as GetConformancePackComplianceSummary with the addition of // the ability to pass a context and additional request options. // // See GetConformancePackComplianceSummary 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 *ConfigService) GetConformancePackComplianceSummaryWithContext(ctx aws.Context, input *GetConformancePackComplianceSummaryInput, opts ...request.Option) (*GetConformancePackComplianceSummaryOutput, error) { req, out := c.GetConformancePackComplianceSummaryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetDiscoveredResourceCounts = "GetDiscoveredResourceCounts" // GetDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the // client's request for the GetDiscoveredResourceCounts 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 GetDiscoveredResourceCounts for more information on using the GetDiscoveredResourceCounts // 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 GetDiscoveredResourceCountsRequest method. // req, resp := client.GetDiscoveredResourceCountsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetDiscoveredResourceCounts func (c *ConfigService) GetDiscoveredResourceCountsRequest(input *GetDiscoveredResourceCountsInput) (req *request.Request, output *GetDiscoveredResourceCountsOutput) { op := &request.Operation{ Name: opGetDiscoveredResourceCounts, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetDiscoveredResourceCountsInput{} } output = &GetDiscoveredResourceCountsOutput{} req = c.newRequest(op, input, output) return } // GetDiscoveredResourceCounts API operation for AWS Config. // // Returns the resource types, the number of each resource type, and the total // number of resources that AWS Config is recording in this region for your // AWS account. // // Example // // AWS Config is recording three resource types in the US East (Ohio) Region // for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets. // // You make a call to the GetDiscoveredResourceCounts action and specify that // you want all resource types. // // AWS Config returns the following: // // * The resource types (EC2 instances, IAM users, and S3 buckets). // // * The number of each resource type (25, 20, and 15). // // * The total number of all resources (60). // // The response is paginated. By default, AWS Config lists 100 ResourceCount // objects on each page. You can customize this number with the limit parameter. // The response includes a nextToken string. To get the next page of results, // run the request again and specify the string for the nextToken parameter. // // If you make a call to the GetDiscoveredResourceCounts action, you might not // immediately receive resource counts in the following situations: // // * You are a new AWS Config customer. // // * You just enabled resource recording. // // It might take a few minutes for AWS Config to record and count your resources. // Wait a few minutes and then retry the GetDiscoveredResourceCounts action. // // 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 Config's // API operation GetDiscoveredResourceCounts for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetDiscoveredResourceCounts func (c *ConfigService) GetDiscoveredResourceCounts(input *GetDiscoveredResourceCountsInput) (*GetDiscoveredResourceCountsOutput, error) { req, out := c.GetDiscoveredResourceCountsRequest(input) return out, req.Send() } // GetDiscoveredResourceCountsWithContext is the same as GetDiscoveredResourceCounts with the addition of // the ability to pass a context and additional request options. // // See GetDiscoveredResourceCounts 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 *ConfigService) GetDiscoveredResourceCountsWithContext(ctx aws.Context, input *GetDiscoveredResourceCountsInput, opts ...request.Option) (*GetDiscoveredResourceCountsOutput, error) { req, out := c.GetDiscoveredResourceCountsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetOrganizationConfigRuleDetailedStatus = "GetOrganizationConfigRuleDetailedStatus" // GetOrganizationConfigRuleDetailedStatusRequest generates a "aws/request.Request" representing the // client's request for the GetOrganizationConfigRuleDetailedStatus 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 GetOrganizationConfigRuleDetailedStatus for more information on using the GetOrganizationConfigRuleDetailedStatus // 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 GetOrganizationConfigRuleDetailedStatusRequest method. // req, resp := client.GetOrganizationConfigRuleDetailedStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetOrganizationConfigRuleDetailedStatus func (c *ConfigService) GetOrganizationConfigRuleDetailedStatusRequest(input *GetOrganizationConfigRuleDetailedStatusInput) (req *request.Request, output *GetOrganizationConfigRuleDetailedStatusOutput) { op := &request.Operation{ Name: opGetOrganizationConfigRuleDetailedStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetOrganizationConfigRuleDetailedStatusInput{} } output = &GetOrganizationConfigRuleDetailedStatusOutput{} req = c.newRequest(op, input, output) return } // GetOrganizationConfigRuleDetailedStatus API operation for AWS Config. // // Returns detailed status for each member account within an organization for // a given organization config rule. // // Only a master account can call this API. // // 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 Config's // API operation GetOrganizationConfigRuleDetailedStatus for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConfigRuleException // You specified one or more organization config rules that do not exist. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetOrganizationConfigRuleDetailedStatus func (c *ConfigService) GetOrganizationConfigRuleDetailedStatus(input *GetOrganizationConfigRuleDetailedStatusInput) (*GetOrganizationConfigRuleDetailedStatusOutput, error) { req, out := c.GetOrganizationConfigRuleDetailedStatusRequest(input) return out, req.Send() } // GetOrganizationConfigRuleDetailedStatusWithContext is the same as GetOrganizationConfigRuleDetailedStatus with the addition of // the ability to pass a context and additional request options. // // See GetOrganizationConfigRuleDetailedStatus 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 *ConfigService) GetOrganizationConfigRuleDetailedStatusWithContext(ctx aws.Context, input *GetOrganizationConfigRuleDetailedStatusInput, opts ...request.Option) (*GetOrganizationConfigRuleDetailedStatusOutput, error) { req, out := c.GetOrganizationConfigRuleDetailedStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetOrganizationConformancePackDetailedStatus = "GetOrganizationConformancePackDetailedStatus" // GetOrganizationConformancePackDetailedStatusRequest generates a "aws/request.Request" representing the // client's request for the GetOrganizationConformancePackDetailedStatus 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 GetOrganizationConformancePackDetailedStatus for more information on using the GetOrganizationConformancePackDetailedStatus // 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 GetOrganizationConformancePackDetailedStatusRequest method. // req, resp := client.GetOrganizationConformancePackDetailedStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetOrganizationConformancePackDetailedStatus func (c *ConfigService) GetOrganizationConformancePackDetailedStatusRequest(input *GetOrganizationConformancePackDetailedStatusInput) (req *request.Request, output *GetOrganizationConformancePackDetailedStatusOutput) { op := &request.Operation{ Name: opGetOrganizationConformancePackDetailedStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetOrganizationConformancePackDetailedStatusInput{} } output = &GetOrganizationConformancePackDetailedStatusOutput{} req = c.newRequest(op, input, output) return } // GetOrganizationConformancePackDetailedStatus API operation for AWS Config. // // Returns detailed status for each member account within an organization for // a given organization conformance pack. // // Only a master account can call this API. // // 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 Config's // API operation GetOrganizationConformancePackDetailedStatus for usage and error information. // // Returned Error Types: // * NoSuchOrganizationConformancePackException // AWS Config organization conformance pack that you passed in the filter does // not exist. // // For DeleteOrganizationConformancePack, you tried to delete an organization // conformance pack that does not exist. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetOrganizationConformancePackDetailedStatus func (c *ConfigService) GetOrganizationConformancePackDetailedStatus(input *GetOrganizationConformancePackDetailedStatusInput) (*GetOrganizationConformancePackDetailedStatusOutput, error) { req, out := c.GetOrganizationConformancePackDetailedStatusRequest(input) return out, req.Send() } // GetOrganizationConformancePackDetailedStatusWithContext is the same as GetOrganizationConformancePackDetailedStatus with the addition of // the ability to pass a context and additional request options. // // See GetOrganizationConformancePackDetailedStatus 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 *ConfigService) GetOrganizationConformancePackDetailedStatusWithContext(ctx aws.Context, input *GetOrganizationConformancePackDetailedStatusInput, opts ...request.Option) (*GetOrganizationConformancePackDetailedStatusOutput, error) { req, out := c.GetOrganizationConformancePackDetailedStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetResourceConfigHistory = "GetResourceConfigHistory" // GetResourceConfigHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetResourceConfigHistory 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 GetResourceConfigHistory for more information on using the GetResourceConfigHistory // 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 GetResourceConfigHistoryRequest method. // req, resp := client.GetResourceConfigHistoryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetResourceConfigHistory func (c *ConfigService) GetResourceConfigHistoryRequest(input *GetResourceConfigHistoryInput) (req *request.Request, output *GetResourceConfigHistoryOutput) { op := &request.Operation{ Name: opGetResourceConfigHistory, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, LimitToken: "limit", TruncationToken: "", }, } if input == nil { input = &GetResourceConfigHistoryInput{} } output = &GetResourceConfigHistoryOutput{} req = c.newRequest(op, input, output) return } // GetResourceConfigHistory API operation for AWS Config. // // Returns a list of configuration items for the specified resource. The list // contains details about each state of the resource during the specified time // interval. If you specified a retention period to retain your ConfigurationItems // between a minimum of 30 days and a maximum of 7 years (2557 days), AWS Config // returns the ConfigurationItems for the specified retention period. // // The response is paginated. By default, AWS Config returns a limit of 10 configuration // items per page. You can customize this number with the limit parameter. The // response includes a nextToken string. To get the next page of results, run // the request again and specify the string for the nextToken parameter. // // Each call to the API is limited to span a duration of seven days. It is likely // that the number of records returned is smaller than the specified limit. // In such cases, you can make another call, using the nextToken. // // 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 Config's // API operation GetResourceConfigHistory for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidTimeRangeException // The specified time range is not valid. The earlier time is not chronologically // before the later time. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoAvailableConfigurationRecorderException // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. // // * ResourceNotDiscoveredException // You have specified a resource that is either unknown or has not been discovered. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetResourceConfigHistory func (c *ConfigService) GetResourceConfigHistory(input *GetResourceConfigHistoryInput) (*GetResourceConfigHistoryOutput, error) { req, out := c.GetResourceConfigHistoryRequest(input) return out, req.Send() } // GetResourceConfigHistoryWithContext is the same as GetResourceConfigHistory with the addition of // the ability to pass a context and additional request options. // // See GetResourceConfigHistory 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 *ConfigService) GetResourceConfigHistoryWithContext(ctx aws.Context, input *GetResourceConfigHistoryInput, opts ...request.Option) (*GetResourceConfigHistoryOutput, error) { req, out := c.GetResourceConfigHistoryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // GetResourceConfigHistoryPages iterates over the pages of a GetResourceConfigHistory operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See GetResourceConfigHistory method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // // // Example iterating over at most 3 pages of a GetResourceConfigHistory operation. // pageNum := 0 // err := client.GetResourceConfigHistoryPages(params, // func(page *configservice.GetResourceConfigHistoryOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // func (c *ConfigService) GetResourceConfigHistoryPages(input *GetResourceConfigHistoryInput, fn func(*GetResourceConfigHistoryOutput, bool) bool) error { return c.GetResourceConfigHistoryPagesWithContext(aws.BackgroundContext(), input, fn) } // GetResourceConfigHistoryPagesWithContext same as GetResourceConfigHistoryPages except // it takes a Context and allows setting request options on the pages. // // 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 *ConfigService) GetResourceConfigHistoryPagesWithContext(ctx aws.Context, input *GetResourceConfigHistoryInput, fn func(*GetResourceConfigHistoryOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetResourceConfigHistoryInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetResourceConfigHistoryRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetResourceConfigHistoryOutput), !p.HasNextPage()) { break } } return p.Err() } const opListAggregateDiscoveredResources = "ListAggregateDiscoveredResources" // ListAggregateDiscoveredResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListAggregateDiscoveredResources 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 ListAggregateDiscoveredResources for more information on using the ListAggregateDiscoveredResources // 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 ListAggregateDiscoveredResourcesRequest method. // req, resp := client.ListAggregateDiscoveredResourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListAggregateDiscoveredResources func (c *ConfigService) ListAggregateDiscoveredResourcesRequest(input *ListAggregateDiscoveredResourcesInput) (req *request.Request, output *ListAggregateDiscoveredResourcesOutput) { op := &request.Operation{ Name: opListAggregateDiscoveredResources, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListAggregateDiscoveredResourcesInput{} } output = &ListAggregateDiscoveredResourcesOutput{} req = c.newRequest(op, input, output) return } // ListAggregateDiscoveredResources API operation for AWS Config. // // Accepts a resource type and returns a list of resource identifiers that are // aggregated for a specific resource type across accounts and regions. A resource // identifier includes the resource type, ID, (if available) the custom resource // name, source account, and source region. You can narrow the results to include // only resources that have specific resource IDs, or a resource name, or source // account ID, or source region. // // For example, if the input consists of accountID 12345678910 and the region // is us-east-1 for resource type AWS::EC2::Instance then the API returns all // the EC2 instance identifiers of accountID 12345678910 and region us-east-1. // // 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 Config's // API operation ListAggregateDiscoveredResources for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListAggregateDiscoveredResources func (c *ConfigService) ListAggregateDiscoveredResources(input *ListAggregateDiscoveredResourcesInput) (*ListAggregateDiscoveredResourcesOutput, error) { req, out := c.ListAggregateDiscoveredResourcesRequest(input) return out, req.Send() } // ListAggregateDiscoveredResourcesWithContext is the same as ListAggregateDiscoveredResources with the addition of // the ability to pass a context and additional request options. // // See ListAggregateDiscoveredResources 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 *ConfigService) ListAggregateDiscoveredResourcesWithContext(ctx aws.Context, input *ListAggregateDiscoveredResourcesInput, opts ...request.Option) (*ListAggregateDiscoveredResourcesOutput, error) { req, out := c.ListAggregateDiscoveredResourcesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListDiscoveredResources = "ListDiscoveredResources" // ListDiscoveredResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListDiscoveredResources 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 ListDiscoveredResources for more information on using the ListDiscoveredResources // 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 ListDiscoveredResourcesRequest method. // req, resp := client.ListDiscoveredResourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources func (c *ConfigService) ListDiscoveredResourcesRequest(input *ListDiscoveredResourcesInput) (req *request.Request, output *ListDiscoveredResourcesOutput) { op := &request.Operation{ Name: opListDiscoveredResources, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListDiscoveredResourcesInput{} } output = &ListDiscoveredResourcesOutput{} req = c.newRequest(op, input, output) return } // ListDiscoveredResources API operation for AWS Config. // // Accepts a resource type and returns a list of resource identifiers for the // resources of that type. A resource identifier includes the resource type, // ID, and (if available) the custom resource name. The results consist of resources // that AWS Config has discovered, including those that AWS Config is not currently // recording. You can narrow the results to include only resources that have // specific resource IDs or a resource name. // // You can specify either resource IDs or a resource name, but not both, in // the same request. // // The response is paginated. By default, AWS Config lists 100 resource identifiers // on each page. You can customize this number with the limit parameter. The // response includes a nextToken string. To get the next page of results, run // the request again and specify the string for the nextToken parameter. // // 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 Config's // API operation ListDiscoveredResources for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * NoAvailableConfigurationRecorderException // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources func (c *ConfigService) ListDiscoveredResources(input *ListDiscoveredResourcesInput) (*ListDiscoveredResourcesOutput, error) { req, out := c.ListDiscoveredResourcesRequest(input) return out, req.Send() } // ListDiscoveredResourcesWithContext is the same as ListDiscoveredResources with the addition of // the ability to pass a context and additional request options. // // See ListDiscoveredResources 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 *ConfigService) ListDiscoveredResourcesWithContext(ctx aws.Context, input *ListDiscoveredResourcesInput, opts ...request.Option) (*ListDiscoveredResourcesOutput, error) { req, out := c.ListDiscoveredResourcesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource 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 ListTagsForResource for more information on using the ListTagsForResource // 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 ListTagsForResourceRequest method. // req, resp := client.ListTagsForResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListTagsForResource func (c *ConfigService) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { op := &request.Operation{ Name: opListTagsForResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListTagsForResourceInput{} } output = &ListTagsForResourceOutput{} req = c.newRequest(op, input, output) return } // ListTagsForResource API operation for AWS Config. // // List the tags for AWS Config resource. // // 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 Config's // API operation ListTagsForResource for usage and error information. // // Returned Error Types: // * ResourceNotFoundException // You have specified a resource that does not exist. // // * ValidationException // The requested action is not valid. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListTagsForResource func (c *ConfigService) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) return out, req.Send() } // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of // the ability to pass a context and additional request options. // // See ListTagsForResource 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 *ConfigService) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutAggregationAuthorization = "PutAggregationAuthorization" // PutAggregationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the PutAggregationAuthorization 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 PutAggregationAuthorization for more information on using the PutAggregationAuthorization // 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 PutAggregationAuthorizationRequest method. // req, resp := client.PutAggregationAuthorizationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization func (c *ConfigService) PutAggregationAuthorizationRequest(input *PutAggregationAuthorizationInput) (req *request.Request, output *PutAggregationAuthorizationOutput) { op := &request.Operation{ Name: opPutAggregationAuthorization, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutAggregationAuthorizationInput{} } output = &PutAggregationAuthorizationOutput{} req = c.newRequest(op, input, output) return } // PutAggregationAuthorization API operation for AWS Config. // // Authorizes the aggregator account and region to collect data from the source // account and region. // // 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 Config's // API operation PutAggregationAuthorization for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization func (c *ConfigService) PutAggregationAuthorization(input *PutAggregationAuthorizationInput) (*PutAggregationAuthorizationOutput, error) { req, out := c.PutAggregationAuthorizationRequest(input) return out, req.Send() } // PutAggregationAuthorizationWithContext is the same as PutAggregationAuthorization with the addition of // the ability to pass a context and additional request options. // // See PutAggregationAuthorization 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 *ConfigService) PutAggregationAuthorizationWithContext(ctx aws.Context, input *PutAggregationAuthorizationInput, opts ...request.Option) (*PutAggregationAuthorizationOutput, error) { req, out := c.PutAggregationAuthorizationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutConfigRule = "PutConfigRule" // PutConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the PutConfigRule 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 PutConfigRule for more information on using the PutConfigRule // 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 PutConfigRuleRequest method. // req, resp := client.PutConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigRule func (c *ConfigService) PutConfigRuleRequest(input *PutConfigRuleInput) (req *request.Request, output *PutConfigRuleOutput) { op := &request.Operation{ Name: opPutConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutConfigRuleInput{} } output = &PutConfigRuleOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutConfigRule API operation for AWS Config. // // Adds or updates an AWS Config rule for evaluating whether your AWS resources // comply with your desired configurations. // // You can use this action for custom AWS Config rules and AWS managed Config // rules. A custom AWS Config rule is a rule that you develop and maintain. // An AWS managed Config rule is a customizable, predefined rule that AWS Config // provides. // // If you are adding a new custom AWS Config rule, you must first create the // AWS Lambda function that the rule invokes to evaluate your resources. When // you use the PutConfigRule action to add the rule to AWS Config, you must // specify the Amazon Resource Name (ARN) that AWS Lambda assigns to the function. // Specify the ARN for the SourceIdentifier key. This key is part of the Source // object, which is part of the ConfigRule object. // // If you are adding an AWS managed Config rule, specify the rule's identifier // for the SourceIdentifier key. To reference AWS managed Config rule identifiers, // see About AWS Managed Config Rules (https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html). // // For any new rule that you add, specify the ConfigRuleName in the ConfigRule // object. Do not specify the ConfigRuleArn or the ConfigRuleId. These values // are generated by AWS Config for new rules. // // If you are updating a rule that you added previously, you can specify the // rule by ConfigRuleName, ConfigRuleId, or ConfigRuleArn in the ConfigRule // data type that you use in this request. // // The maximum number of rules that AWS Config supports is 150. // // For information about requesting a rule limit increase, see AWS Config Limits // (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) // in the AWS General Reference Guide. // // For more information about developing and using AWS Config rules, see Evaluating // AWS Resource Configurations with AWS Config (https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) // in the AWS Config Developer 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. // // See the AWS API reference guide for AWS Config's // API operation PutConfigRule for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * MaxNumberOfConfigRulesExceededException // Failed to add the AWS Config rule because the account already contains the // maximum number of 150 rules. Consider deleting any deactivated rules before // you add new rules. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // * NoAvailableConfigurationRecorderException // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigRule func (c *ConfigService) PutConfigRule(input *PutConfigRuleInput) (*PutConfigRuleOutput, error) { req, out := c.PutConfigRuleRequest(input) return out, req.Send() } // PutConfigRuleWithContext is the same as PutConfigRule with the addition of // the ability to pass a context and additional request options. // // See PutConfigRule 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 *ConfigService) PutConfigRuleWithContext(ctx aws.Context, input *PutConfigRuleInput, opts ...request.Option) (*PutConfigRuleOutput, error) { req, out := c.PutConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutConfigurationAggregator = "PutConfigurationAggregator" // PutConfigurationAggregatorRequest generates a "aws/request.Request" representing the // client's request for the PutConfigurationAggregator 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 PutConfigurationAggregator for more information on using the PutConfigurationAggregator // 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 PutConfigurationAggregatorRequest method. // req, resp := client.PutConfigurationAggregatorRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationAggregator func (c *ConfigService) PutConfigurationAggregatorRequest(input *PutConfigurationAggregatorInput) (req *request.Request, output *PutConfigurationAggregatorOutput) { op := &request.Operation{ Name: opPutConfigurationAggregator, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutConfigurationAggregatorInput{} } output = &PutConfigurationAggregatorOutput{} req = c.newRequest(op, input, output) return } // PutConfigurationAggregator API operation for AWS Config. // // Creates and updates the configuration aggregator with the selected source // accounts and regions. The source account can be individual account(s) or // an organization. // // AWS Config should be enabled in source accounts and regions you want to aggregate. // // If your source type is an organization, you must be signed in to the master // account and all features must be enabled in your organization. AWS Config // calls EnableAwsServiceAccess API to enable integration between AWS Config // and AWS Organizations. // // 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 Config's // API operation PutConfigurationAggregator for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * LimitExceededException // For StartConfigRulesEvaluation API, this exception is thrown if an evaluation // is in progress or if you call the StartConfigRulesEvaluation API more than // once per minute. // // For PutConfigurationAggregator API, this exception is thrown if the number // of accounts and aggregators exceeds the limit. // // * InvalidRoleException // You have provided a null or empty role ARN. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // * NoAvailableOrganizationException // Organization is no longer available. // // * OrganizationAllFeaturesNotEnabledException // AWS Config resource cannot be created because your organization does not // have all features enabled. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationAggregator func (c *ConfigService) PutConfigurationAggregator(input *PutConfigurationAggregatorInput) (*PutConfigurationAggregatorOutput, error) { req, out := c.PutConfigurationAggregatorRequest(input) return out, req.Send() } // PutConfigurationAggregatorWithContext is the same as PutConfigurationAggregator with the addition of // the ability to pass a context and additional request options. // // See PutConfigurationAggregator 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 *ConfigService) PutConfigurationAggregatorWithContext(ctx aws.Context, input *PutConfigurationAggregatorInput, opts ...request.Option) (*PutConfigurationAggregatorOutput, error) { req, out := c.PutConfigurationAggregatorRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutConfigurationRecorder = "PutConfigurationRecorder" // PutConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the PutConfigurationRecorder 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 PutConfigurationRecorder for more information on using the PutConfigurationRecorder // 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 PutConfigurationRecorderRequest method. // req, resp := client.PutConfigurationRecorderRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationRecorder func (c *ConfigService) PutConfigurationRecorderRequest(input *PutConfigurationRecorderInput) (req *request.Request, output *PutConfigurationRecorderOutput) { op := &request.Operation{ Name: opPutConfigurationRecorder, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutConfigurationRecorderInput{} } output = &PutConfigurationRecorderOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutConfigurationRecorder API operation for AWS Config. // // Creates a new configuration recorder to record the selected resource configurations. // // You can use this action to change the role roleARN or the recordingGroup // of an existing recorder. To change the role, call the action on the existing // configuration recorder and specify a role. // // Currently, you can specify only one configuration recorder per region in // your account. // // If ConfigurationRecorder does not have the recordingGroup parameter specified, // the default is to record all supported resource types. // // 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 Config's // API operation PutConfigurationRecorder for usage and error information. // // Returned Error Types: // * MaxNumberOfConfigurationRecordersExceededException // You have reached the limit of the number of recorders you can create. // // * InvalidConfigurationRecorderNameException // You have provided a configuration recorder name that is not valid. // // * InvalidRoleException // You have provided a null or empty role ARN. // // * InvalidRecordingGroupException // AWS Config throws an exception if the recording group does not contain a // valid list of resource types. Invalid values might also be incorrectly formatted. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationRecorder func (c *ConfigService) PutConfigurationRecorder(input *PutConfigurationRecorderInput) (*PutConfigurationRecorderOutput, error) { req, out := c.PutConfigurationRecorderRequest(input) return out, req.Send() } // PutConfigurationRecorderWithContext is the same as PutConfigurationRecorder with the addition of // the ability to pass a context and additional request options. // // See PutConfigurationRecorder 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 *ConfigService) PutConfigurationRecorderWithContext(ctx aws.Context, input *PutConfigurationRecorderInput, opts ...request.Option) (*PutConfigurationRecorderOutput, error) { req, out := c.PutConfigurationRecorderRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutConformancePack = "PutConformancePack" // PutConformancePackRequest generates a "aws/request.Request" representing the // client's request for the PutConformancePack 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 PutConformancePack for more information on using the PutConformancePack // 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 PutConformancePackRequest method. // req, resp := client.PutConformancePackRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConformancePack func (c *ConfigService) PutConformancePackRequest(input *PutConformancePackInput) (req *request.Request, output *PutConformancePackOutput) { op := &request.Operation{ Name: opPutConformancePack, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutConformancePackInput{} } output = &PutConformancePackOutput{} req = c.newRequest(op, input, output) return } // PutConformancePack API operation for AWS Config. // // Creates or updates a conformance pack. A conformance pack is a collection // of AWS Config rules that can be easily deployed in an account and a region // and across AWS Organization. // // This API creates a service linked role AWSServiceRoleForConfigConforms in // your account. The service linked role is created only when the role does // not exist in your account. AWS Config verifies the existence of role with // GetRole action. // // You must specify either the TemplateS3Uri or the TemplateBody parameter, // but not both. If you provide both AWS Config uses the TemplateS3Uri parameter // and ignores the TemplateBody parameter. // // 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 Config's // API operation PutConformancePack for usage and error information. // // Returned Error Types: // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // * ConformancePackTemplateValidationException // You have specified a template that is not valid or supported. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * MaxNumberOfConformancePacksExceededException // You have reached the limit (6) of the number of conformance packs in an account // (6 conformance pack with 25 AWS Config rules per pack). // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConformancePack func (c *ConfigService) PutConformancePack(input *PutConformancePackInput) (*PutConformancePackOutput, error) { req, out := c.PutConformancePackRequest(input) return out, req.Send() } // PutConformancePackWithContext is the same as PutConformancePack with the addition of // the ability to pass a context and additional request options. // // See PutConformancePack 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 *ConfigService) PutConformancePackWithContext(ctx aws.Context, input *PutConformancePackInput, opts ...request.Option) (*PutConformancePackOutput, error) { req, out := c.PutConformancePackRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutDeliveryChannel = "PutDeliveryChannel" // PutDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the PutDeliveryChannel 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 PutDeliveryChannel for more information on using the PutDeliveryChannel // 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 PutDeliveryChannelRequest method. // req, resp := client.PutDeliveryChannelRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutDeliveryChannel func (c *ConfigService) PutDeliveryChannelRequest(input *PutDeliveryChannelInput) (req *request.Request, output *PutDeliveryChannelOutput) { op := &request.Operation{ Name: opPutDeliveryChannel, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutDeliveryChannelInput{} } output = &PutDeliveryChannelOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutDeliveryChannel API operation for AWS Config. // // Creates a delivery channel object to deliver configuration information to // an Amazon S3 bucket and Amazon SNS topic. // // Before you can create a delivery channel, you must create a configuration // recorder. // // You can use this action to change the Amazon S3 bucket or an Amazon SNS topic // of the existing delivery channel. To change the Amazon S3 bucket or an Amazon // SNS topic, call this action and specify the changed values for the S3 bucket // and the SNS topic. If you specify a different value for either the S3 bucket // or the SNS topic, this action will keep the existing value for the parameter // that is not changed. // // You can have only one delivery channel per region in your account. // // 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 Config's // API operation PutDeliveryChannel for usage and error information. // // Returned Error Types: // * MaxNumberOfDeliveryChannelsExceededException // You have reached the limit of the number of delivery channels you can create. // // * NoAvailableConfigurationRecorderException // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. // // * InvalidDeliveryChannelNameException // The specified delivery channel name is not valid. // // * NoSuchBucketException // The specified Amazon S3 bucket does not exist. // // * InvalidS3KeyPrefixException // The specified Amazon S3 key prefix is not valid. // // * InvalidSNSTopicARNException // The specified Amazon SNS topic does not exist. // // * InsufficientDeliveryPolicyException // Your Amazon S3 bucket policy does not permit AWS Config to write to it. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutDeliveryChannel func (c *ConfigService) PutDeliveryChannel(input *PutDeliveryChannelInput) (*PutDeliveryChannelOutput, error) { req, out := c.PutDeliveryChannelRequest(input) return out, req.Send() } // PutDeliveryChannelWithContext is the same as PutDeliveryChannel with the addition of // the ability to pass a context and additional request options. // // See PutDeliveryChannel 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 *ConfigService) PutDeliveryChannelWithContext(ctx aws.Context, input *PutDeliveryChannelInput, opts ...request.Option) (*PutDeliveryChannelOutput, error) { req, out := c.PutDeliveryChannelRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutEvaluations = "PutEvaluations" // PutEvaluationsRequest generates a "aws/request.Request" representing the // client's request for the PutEvaluations 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 PutEvaluations for more information on using the PutEvaluations // 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 PutEvaluationsRequest method. // req, resp := client.PutEvaluationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutEvaluations func (c *ConfigService) PutEvaluationsRequest(input *PutEvaluationsInput) (req *request.Request, output *PutEvaluationsOutput) { op := &request.Operation{ Name: opPutEvaluations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutEvaluationsInput{} } output = &PutEvaluationsOutput{} req = c.newRequest(op, input, output) return } // PutEvaluations API operation for AWS Config. // // Used by an AWS Lambda function to deliver evaluation results to AWS Config. // This action is required in every AWS Lambda function that is invoked by an // AWS Config rule. // // 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 Config's // API operation PutEvaluations for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * InvalidResultTokenException // The specified ResultToken is invalid. // // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutEvaluations func (c *ConfigService) PutEvaluations(input *PutEvaluationsInput) (*PutEvaluationsOutput, error) { req, out := c.PutEvaluationsRequest(input) return out, req.Send() } // PutEvaluationsWithContext is the same as PutEvaluations with the addition of // the ability to pass a context and additional request options. // // See PutEvaluations 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 *ConfigService) PutEvaluationsWithContext(ctx aws.Context, input *PutEvaluationsInput, opts ...request.Option) (*PutEvaluationsOutput, error) { req, out := c.PutEvaluationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutOrganizationConfigRule = "PutOrganizationConfigRule" // PutOrganizationConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the PutOrganizationConfigRule 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 PutOrganizationConfigRule for more information on using the PutOrganizationConfigRule // 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 PutOrganizationConfigRuleRequest method. // req, resp := client.PutOrganizationConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutOrganizationConfigRule func (c *ConfigService) PutOrganizationConfigRuleRequest(input *PutOrganizationConfigRuleInput) (req *request.Request, output *PutOrganizationConfigRuleOutput) { op := &request.Operation{ Name: opPutOrganizationConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutOrganizationConfigRuleInput{} } output = &PutOrganizationConfigRuleOutput{} req = c.newRequest(op, input, output) return } // PutOrganizationConfigRule API operation for AWS Config. // // Adds or updates organization config rule for your entire organization evaluating // whether your AWS resources comply with your desired configurations. Only // a master account can create or update an organization config rule. // // This API enables organization service access through the EnableAWSServiceAccess // action and creates a service linked role AWSServiceRoleForConfigMultiAccountSetup // in the master account of your organization. The service linked role is created // only when the role does not exist in the master account. AWS Config verifies // the existence of role with GetRole action. // // You can use this action to create both custom AWS Config rules and AWS managed // Config rules. If you are adding a new custom AWS Config rule, you must first // create AWS Lambda function in the master account that the rule invokes to // evaluate your resources. When you use the PutOrganizationConfigRule action // to add the rule to AWS Config, you must specify the Amazon Resource Name // (ARN) that AWS Lambda assigns to the function. If you are adding an AWS managed // Config rule, specify the rule's identifier for the RuleIdentifier key. // // The maximum number of organization config rules that AWS Config supports // is 150. // // Specify either OrganizationCustomRuleMetadata or OrganizationManagedRuleMetadata. // // 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 Config's // API operation PutOrganizationConfigRule for usage and error information. // // Returned Error Types: // * MaxNumberOfOrganizationConfigRulesExceededException // You have reached the limit of the number of organization config rules you // can create. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * ValidationException // The requested action is not valid. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // * NoAvailableOrganizationException // Organization is no longer available. // // * OrganizationAllFeaturesNotEnabledException // AWS Config resource cannot be created because your organization does not // have all features enabled. // // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutOrganizationConfigRule func (c *ConfigService) PutOrganizationConfigRule(input *PutOrganizationConfigRuleInput) (*PutOrganizationConfigRuleOutput, error) { req, out := c.PutOrganizationConfigRuleRequest(input) return out, req.Send() } // PutOrganizationConfigRuleWithContext is the same as PutOrganizationConfigRule with the addition of // the ability to pass a context and additional request options. // // See PutOrganizationConfigRule 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 *ConfigService) PutOrganizationConfigRuleWithContext(ctx aws.Context, input *PutOrganizationConfigRuleInput, opts ...request.Option) (*PutOrganizationConfigRuleOutput, error) { req, out := c.PutOrganizationConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutOrganizationConformancePack = "PutOrganizationConformancePack" // PutOrganizationConformancePackRequest generates a "aws/request.Request" representing the // client's request for the PutOrganizationConformancePack 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 PutOrganizationConformancePack for more information on using the PutOrganizationConformancePack // 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 PutOrganizationConformancePackRequest method. // req, resp := client.PutOrganizationConformancePackRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutOrganizationConformancePack func (c *ConfigService) PutOrganizationConformancePackRequest(input *PutOrganizationConformancePackInput) (req *request.Request, output *PutOrganizationConformancePackOutput) { op := &request.Operation{ Name: opPutOrganizationConformancePack, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutOrganizationConformancePackInput{} } output = &PutOrganizationConformancePackOutput{} req = c.newRequest(op, input, output) return } // PutOrganizationConformancePack API operation for AWS Config. // // Deploys conformance packs across member accounts in an AWS Organization. // // This API enables organization service access for config-multiaccountsetup.amazonaws.com // through the EnableAWSServiceAccess action and creates a service linked role // AWSServiceRoleForConfigMultiAccountSetup in the master account of your organization. // The service linked role is created only when the role does not exist in the // master account. AWS Config verifies the existence of role with GetRole action. // // You must specify either the TemplateS3Uri or the TemplateBody parameter, // but not both. If you provide both AWS Config uses the TemplateS3Uri parameter // and ignores the TemplateBody parameter. // // AWS Config sets the state of a conformance pack to CREATE_IN_PROGRESS and // UPDATE_IN_PROGRESS until the confomance pack is created or updated. You cannot // update a conformance pack while it is in this state. // // You can create 6 conformance packs with 25 AWS Config rules in each pack. // // 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 Config's // API operation PutOrganizationConformancePack for usage and error information. // // Returned Error Types: // * MaxNumberOfOrganizationConformancePacksExceededException // You have reached the limit (6) of the number of organization conformance // packs in an account (6 conformance pack with 25 AWS Config rules per pack // per account). // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // * ValidationException // The requested action is not valid. // // * OrganizationAccessDeniedException // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. // // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // * OrganizationConformancePackTemplateValidationException // You have specified a template that is not valid or supported. // // * OrganizationAllFeaturesNotEnabledException // AWS Config resource cannot be created because your organization does not // have all features enabled. // // * NoAvailableOrganizationException // Organization is no longer available. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutOrganizationConformancePack func (c *ConfigService) PutOrganizationConformancePack(input *PutOrganizationConformancePackInput) (*PutOrganizationConformancePackOutput, error) { req, out := c.PutOrganizationConformancePackRequest(input) return out, req.Send() } // PutOrganizationConformancePackWithContext is the same as PutOrganizationConformancePack with the addition of // the ability to pass a context and additional request options. // // See PutOrganizationConformancePack 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 *ConfigService) PutOrganizationConformancePackWithContext(ctx aws.Context, input *PutOrganizationConformancePackInput, opts ...request.Option) (*PutOrganizationConformancePackOutput, error) { req, out := c.PutOrganizationConformancePackRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutRemediationConfigurations = "PutRemediationConfigurations" // PutRemediationConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the PutRemediationConfigurations 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 PutRemediationConfigurations for more information on using the PutRemediationConfigurations // 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 PutRemediationConfigurationsRequest method. // req, resp := client.PutRemediationConfigurationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRemediationConfigurations func (c *ConfigService) PutRemediationConfigurationsRequest(input *PutRemediationConfigurationsInput) (req *request.Request, output *PutRemediationConfigurationsOutput) { op := &request.Operation{ Name: opPutRemediationConfigurations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutRemediationConfigurationsInput{} } output = &PutRemediationConfigurationsOutput{} req = c.newRequest(op, input, output) return } // PutRemediationConfigurations API operation for AWS Config. // // Adds or updates the remediation configuration with a specific AWS Config // rule with the selected target or action. The API creates the RemediationConfiguration // object for the AWS Config rule. The AWS Config rule must already exist for // you to add a remediation configuration. The target (SSM document) must exist // and have permissions to use the target. // // 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 Config's // API operation PutRemediationConfigurations for usage and error information. // // Returned Error Types: // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRemediationConfigurations func (c *ConfigService) PutRemediationConfigurations(input *PutRemediationConfigurationsInput) (*PutRemediationConfigurationsOutput, error) { req, out := c.PutRemediationConfigurationsRequest(input) return out, req.Send() } // PutRemediationConfigurationsWithContext is the same as PutRemediationConfigurations with the addition of // the ability to pass a context and additional request options. // // See PutRemediationConfigurations 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 *ConfigService) PutRemediationConfigurationsWithContext(ctx aws.Context, input *PutRemediationConfigurationsInput, opts ...request.Option) (*PutRemediationConfigurationsOutput, error) { req, out := c.PutRemediationConfigurationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutRemediationExceptions = "PutRemediationExceptions" // PutRemediationExceptionsRequest generates a "aws/request.Request" representing the // client's request for the PutRemediationExceptions 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 PutRemediationExceptions for more information on using the PutRemediationExceptions // 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 PutRemediationExceptionsRequest method. // req, resp := client.PutRemediationExceptionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRemediationExceptions func (c *ConfigService) PutRemediationExceptionsRequest(input *PutRemediationExceptionsInput) (req *request.Request, output *PutRemediationExceptionsOutput) { op := &request.Operation{ Name: opPutRemediationExceptions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutRemediationExceptionsInput{} } output = &PutRemediationExceptionsOutput{} req = c.newRequest(op, input, output) return } // PutRemediationExceptions API operation for AWS Config. // // A remediation exception is when a specific resource is no longer considered // for auto-remediation. This API adds a new exception or updates an exisiting // exception for a specific resource with a specific AWS Config rule. // // 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 Config's // API operation PutRemediationExceptions for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRemediationExceptions func (c *ConfigService) PutRemediationExceptions(input *PutRemediationExceptionsInput) (*PutRemediationExceptionsOutput, error) { req, out := c.PutRemediationExceptionsRequest(input) return out, req.Send() } // PutRemediationExceptionsWithContext is the same as PutRemediationExceptions with the addition of // the ability to pass a context and additional request options. // // See PutRemediationExceptions 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 *ConfigService) PutRemediationExceptionsWithContext(ctx aws.Context, input *PutRemediationExceptionsInput, opts ...request.Option) (*PutRemediationExceptionsOutput, error) { req, out := c.PutRemediationExceptionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutResourceConfig = "PutResourceConfig" // PutResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the PutResourceConfig 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 PutResourceConfig for more information on using the PutResourceConfig // 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 PutResourceConfigRequest method. // req, resp := client.PutResourceConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutResourceConfig func (c *ConfigService) PutResourceConfigRequest(input *PutResourceConfigInput) (req *request.Request, output *PutResourceConfigOutput) { op := &request.Operation{ Name: opPutResourceConfig, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutResourceConfigInput{} } output = &PutResourceConfigOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutResourceConfig API operation for AWS Config. // // Records the configuration state for the resource provided in the request. // The configuration state of a resource is represented in AWS Config as Configuration // Items. Once this API records the configuration item, you can retrieve the // list of configuration items for the custom resource type using existing AWS // Config APIs. // // The custom resource type must be registered with AWS CloudFormation. This // API accepts the configuration item registered with AWS CloudFormation. // // When you call this API, AWS Config only stores configuration state of the // resource provided in the request. This API does not change or remediate the // configuration of the resource. // // 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 Config's // API operation PutResourceConfig for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // * NoRunningConfigurationRecorderException // There is no configuration recorder running. // // * MaxActiveResourcesExceededException // You have reached the limit (100,000) of active custom resource types in your // account. Delete unused resources using DeleteResourceConfig. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutResourceConfig func (c *ConfigService) PutResourceConfig(input *PutResourceConfigInput) (*PutResourceConfigOutput, error) { req, out := c.PutResourceConfigRequest(input) return out, req.Send() } // PutResourceConfigWithContext is the same as PutResourceConfig with the addition of // the ability to pass a context and additional request options. // // See PutResourceConfig 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 *ConfigService) PutResourceConfigWithContext(ctx aws.Context, input *PutResourceConfigInput, opts ...request.Option) (*PutResourceConfigOutput, error) { req, out := c.PutResourceConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutRetentionConfiguration = "PutRetentionConfiguration" // PutRetentionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutRetentionConfiguration 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 PutRetentionConfiguration for more information on using the PutRetentionConfiguration // 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 PutRetentionConfigurationRequest method. // req, resp := client.PutRetentionConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRetentionConfiguration func (c *ConfigService) PutRetentionConfigurationRequest(input *PutRetentionConfigurationInput) (req *request.Request, output *PutRetentionConfigurationOutput) { op := &request.Operation{ Name: opPutRetentionConfiguration, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutRetentionConfigurationInput{} } output = &PutRetentionConfigurationOutput{} req = c.newRequest(op, input, output) return } // PutRetentionConfiguration API operation for AWS Config. // // Creates and updates the retention configuration with details about retention // period (number of days) that AWS Config stores your historical information. // The API creates the RetentionConfiguration object and names the object as // default. When you have a RetentionConfiguration object named default, calling // the API modifies the default object. // // Currently, AWS Config supports only one retention configuration per region // in your account. // // 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 Config's // API operation PutRetentionConfiguration for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * MaxNumberOfRetentionConfigurationsExceededException // Failed to add the retention configuration because a retention configuration // with that name already exists. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRetentionConfiguration func (c *ConfigService) PutRetentionConfiguration(input *PutRetentionConfigurationInput) (*PutRetentionConfigurationOutput, error) { req, out := c.PutRetentionConfigurationRequest(input) return out, req.Send() } // PutRetentionConfigurationWithContext is the same as PutRetentionConfiguration with the addition of // the ability to pass a context and additional request options. // // See PutRetentionConfiguration 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 *ConfigService) PutRetentionConfigurationWithContext(ctx aws.Context, input *PutRetentionConfigurationInput, opts ...request.Option) (*PutRetentionConfigurationOutput, error) { req, out := c.PutRetentionConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opSelectAggregateResourceConfig = "SelectAggregateResourceConfig" // SelectAggregateResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the SelectAggregateResourceConfig 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 SelectAggregateResourceConfig for more information on using the SelectAggregateResourceConfig // 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 SelectAggregateResourceConfigRequest method. // req, resp := client.SelectAggregateResourceConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/SelectAggregateResourceConfig func (c *ConfigService) SelectAggregateResourceConfigRequest(input *SelectAggregateResourceConfigInput) (req *request.Request, output *SelectAggregateResourceConfigOutput) { op := &request.Operation{ Name: opSelectAggregateResourceConfig, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &SelectAggregateResourceConfigInput{} } output = &SelectAggregateResourceConfigOutput{} req = c.newRequest(op, input, output) return } // SelectAggregateResourceConfig API operation for AWS Config. // // Accepts a structured query language (SQL) SELECT command and an aggregator // to query configuration state of AWS resources across multiple accounts and // regions, performs the corresponding search, and returns resource configurations // matching the properties. // // For more information about query components, see the Query Components (https://docs.aws.amazon.com/config/latest/developerguide/query-components.html) // section in the AWS Config Developer 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. // // See the AWS API reference guide for AWS Config's // API operation SelectAggregateResourceConfig for usage and error information. // // Returned Error Types: // * InvalidExpressionException // The syntax of the query is incorrect. // // * NoSuchConfigurationAggregatorException // You have specified a configuration aggregator that does not exist. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/SelectAggregateResourceConfig func (c *ConfigService) SelectAggregateResourceConfig(input *SelectAggregateResourceConfigInput) (*SelectAggregateResourceConfigOutput, error) { req, out := c.SelectAggregateResourceConfigRequest(input) return out, req.Send() } // SelectAggregateResourceConfigWithContext is the same as SelectAggregateResourceConfig with the addition of // the ability to pass a context and additional request options. // // See SelectAggregateResourceConfig 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 *ConfigService) SelectAggregateResourceConfigWithContext(ctx aws.Context, input *SelectAggregateResourceConfigInput, opts ...request.Option) (*SelectAggregateResourceConfigOutput, error) { req, out := c.SelectAggregateResourceConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // SelectAggregateResourceConfigPages iterates over the pages of a SelectAggregateResourceConfig operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See SelectAggregateResourceConfig method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // // // Example iterating over at most 3 pages of a SelectAggregateResourceConfig operation. // pageNum := 0 // err := client.SelectAggregateResourceConfigPages(params, // func(page *configservice.SelectAggregateResourceConfigOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // func (c *ConfigService) SelectAggregateResourceConfigPages(input *SelectAggregateResourceConfigInput, fn func(*SelectAggregateResourceConfigOutput, bool) bool) error { return c.SelectAggregateResourceConfigPagesWithContext(aws.BackgroundContext(), input, fn) } // SelectAggregateResourceConfigPagesWithContext same as SelectAggregateResourceConfigPages except // it takes a Context and allows setting request options on the pages. // // 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 *ConfigService) SelectAggregateResourceConfigPagesWithContext(ctx aws.Context, input *SelectAggregateResourceConfigInput, fn func(*SelectAggregateResourceConfigOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *SelectAggregateResourceConfigInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.SelectAggregateResourceConfigRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*SelectAggregateResourceConfigOutput), !p.HasNextPage()) { break } } return p.Err() } const opSelectResourceConfig = "SelectResourceConfig" // SelectResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the SelectResourceConfig 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 SelectResourceConfig for more information on using the SelectResourceConfig // 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 SelectResourceConfigRequest method. // req, resp := client.SelectResourceConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/SelectResourceConfig func (c *ConfigService) SelectResourceConfigRequest(input *SelectResourceConfigInput) (req *request.Request, output *SelectResourceConfigOutput) { op := &request.Operation{ Name: opSelectResourceConfig, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &SelectResourceConfigInput{} } output = &SelectResourceConfigOutput{} req = c.newRequest(op, input, output) return } // SelectResourceConfig API operation for AWS Config. // // Accepts a structured query language (SQL) SELECT command, performs the corresponding // search, and returns resource configurations matching the properties. // // For more information about query components, see the Query Components (https://docs.aws.amazon.com/config/latest/developerguide/query-components.html) // section in the AWS Config Developer 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. // // See the AWS API reference guide for AWS Config's // API operation SelectResourceConfig for usage and error information. // // Returned Error Types: // * InvalidExpressionException // The syntax of the query is incorrect. // // * InvalidLimitException // The specified limit is outside the allowable range. // // * InvalidNextTokenException // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/SelectResourceConfig func (c *ConfigService) SelectResourceConfig(input *SelectResourceConfigInput) (*SelectResourceConfigOutput, error) { req, out := c.SelectResourceConfigRequest(input) return out, req.Send() } // SelectResourceConfigWithContext is the same as SelectResourceConfig with the addition of // the ability to pass a context and additional request options. // // See SelectResourceConfig 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 *ConfigService) SelectResourceConfigWithContext(ctx aws.Context, input *SelectResourceConfigInput, opts ...request.Option) (*SelectResourceConfigOutput, error) { req, out := c.SelectResourceConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartConfigRulesEvaluation = "StartConfigRulesEvaluation" // StartConfigRulesEvaluationRequest generates a "aws/request.Request" representing the // client's request for the StartConfigRulesEvaluation 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 StartConfigRulesEvaluation for more information on using the StartConfigRulesEvaluation // 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 StartConfigRulesEvaluationRequest method. // req, resp := client.StartConfigRulesEvaluationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigRulesEvaluation func (c *ConfigService) StartConfigRulesEvaluationRequest(input *StartConfigRulesEvaluationInput) (req *request.Request, output *StartConfigRulesEvaluationOutput) { op := &request.Operation{ Name: opStartConfigRulesEvaluation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StartConfigRulesEvaluationInput{} } output = &StartConfigRulesEvaluationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // StartConfigRulesEvaluation API operation for AWS Config. // // Runs an on-demand evaluation for the specified AWS Config rules against the // last known configuration state of the resources. Use StartConfigRulesEvaluation // when you want to test that a rule you updated is working as expected. StartConfigRulesEvaluation // does not re-record the latest configuration state for your resources. It // re-runs an evaluation against the last known state of your resources. // // You can specify up to 25 AWS Config rules per request. // // An existing StartConfigRulesEvaluation call for the specified rules must // complete before you can call the API again. If you chose to have AWS Config // stream to an Amazon SNS topic, you will receive a ConfigRuleEvaluationStarted // notification when the evaluation starts. // // You don't need to call the StartConfigRulesEvaluation API to run an evaluation // for a new rule. When you create a rule, AWS Config evaluates your resources // against the rule automatically. // // The StartConfigRulesEvaluation API is useful if you want to run on-demand // evaluations, such as the following example: // // You have a custom rule that evaluates your IAM resources every 24 hours. // // You update your Lambda function to add additional conditions to your rule. // // Instead of waiting for the next periodic evaluation, you call the StartConfigRulesEvaluation // API. // // AWS Config invokes your Lambda function and evaluates your IAM resources. // // Your custom rule will still run periodic evaluations every 24 hours. // // 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 Config's // API operation StartConfigRulesEvaluation for usage and error information. // // Returned Error Types: // * NoSuchConfigRuleException // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. // // * LimitExceededException // For StartConfigRulesEvaluation API, this exception is thrown if an evaluation // is in progress or if you call the StartConfigRulesEvaluation API more than // once per minute. // // For PutConfigurationAggregator API, this exception is thrown if the number // of accounts and aggregators exceeds the limit. // // * ResourceInUseException // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. // // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigRulesEvaluation func (c *ConfigService) StartConfigRulesEvaluation(input *StartConfigRulesEvaluationInput) (*StartConfigRulesEvaluationOutput, error) { req, out := c.StartConfigRulesEvaluationRequest(input) return out, req.Send() } // StartConfigRulesEvaluationWithContext is the same as StartConfigRulesEvaluation with the addition of // the ability to pass a context and additional request options. // // See StartConfigRulesEvaluation 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 *ConfigService) StartConfigRulesEvaluationWithContext(ctx aws.Context, input *StartConfigRulesEvaluationInput, opts ...request.Option) (*StartConfigRulesEvaluationOutput, error) { req, out := c.StartConfigRulesEvaluationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartConfigurationRecorder = "StartConfigurationRecorder" // StartConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the StartConfigurationRecorder 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 StartConfigurationRecorder for more information on using the StartConfigurationRecorder // 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 StartConfigurationRecorderRequest method. // req, resp := client.StartConfigurationRecorderRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigurationRecorder func (c *ConfigService) StartConfigurationRecorderRequest(input *StartConfigurationRecorderInput) (req *request.Request, output *StartConfigurationRecorderOutput) { op := &request.Operation{ Name: opStartConfigurationRecorder, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StartConfigurationRecorderInput{} } output = &StartConfigurationRecorderOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // StartConfigurationRecorder API operation for AWS Config. // // Starts recording configurations of the AWS resources you have selected to // record in your AWS account. // // You must have created at least one delivery channel to successfully start // the configuration recorder. // // 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 Config's // API operation StartConfigurationRecorder for usage and error information. // // Returned Error Types: // * NoSuchConfigurationRecorderException // You have specified a configuration recorder that does not exist. // // * NoAvailableDeliveryChannelException // There is no delivery channel available to record configurations. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigurationRecorder func (c *ConfigService) StartConfigurationRecorder(input *StartConfigurationRecorderInput) (*StartConfigurationRecorderOutput, error) { req, out := c.StartConfigurationRecorderRequest(input) return out, req.Send() } // StartConfigurationRecorderWithContext is the same as StartConfigurationRecorder with the addition of // the ability to pass a context and additional request options. // // See StartConfigurationRecorder 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 *ConfigService) StartConfigurationRecorderWithContext(ctx aws.Context, input *StartConfigurationRecorderInput, opts ...request.Option) (*StartConfigurationRecorderOutput, error) { req, out := c.StartConfigurationRecorderRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartRemediationExecution = "StartRemediationExecution" // StartRemediationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartRemediationExecution 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 StartRemediationExecution for more information on using the StartRemediationExecution // 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 StartRemediationExecutionRequest method. // req, resp := client.StartRemediationExecutionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartRemediationExecution func (c *ConfigService) StartRemediationExecutionRequest(input *StartRemediationExecutionInput) (req *request.Request, output *StartRemediationExecutionOutput) { op := &request.Operation{ Name: opStartRemediationExecution, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StartRemediationExecutionInput{} } output = &StartRemediationExecutionOutput{} req = c.newRequest(op, input, output) return } // StartRemediationExecution API operation for AWS Config. // // Runs an on-demand remediation for the specified AWS Config rules against // the last known remediation configuration. It runs an execution against the // current state of your resources. Remediation execution is asynchronous. // // You can specify up to 100 resource keys per request. An existing StartRemediationExecution // call for the specified resource keys must complete before you can call the // API again. // // 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 Config's // API operation StartRemediationExecution for usage and error information. // // Returned Error Types: // * InvalidParameterValueException // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. // // * InsufficientPermissionsException // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. // // * NoSuchRemediationConfigurationException // You specified an AWS Config rule without a remediation configuration. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartRemediationExecution func (c *ConfigService) StartRemediationExecution(input *StartRemediationExecutionInput) (*StartRemediationExecutionOutput, error) { req, out := c.StartRemediationExecutionRequest(input) return out, req.Send() } // StartRemediationExecutionWithContext is the same as StartRemediationExecution with the addition of // the ability to pass a context and additional request options. // // See StartRemediationExecution 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 *ConfigService) StartRemediationExecutionWithContext(ctx aws.Context, input *StartRemediationExecutionInput, opts ...request.Option) (*StartRemediationExecutionOutput, error) { req, out := c.StartRemediationExecutionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStopConfigurationRecorder = "StopConfigurationRecorder" // StopConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the StopConfigurationRecorder 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 StopConfigurationRecorder for more information on using the StopConfigurationRecorder // 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 StopConfigurationRecorderRequest method. // req, resp := client.StopConfigurationRecorderRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder func (c *ConfigService) StopConfigurationRecorderRequest(input *StopConfigurationRecorderInput) (req *request.Request, output *StopConfigurationRecorderOutput) { op := &request.Operation{ Name: opStopConfigurationRecorder, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StopConfigurationRecorderInput{} } output = &StopConfigurationRecorderOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // StopConfigurationRecorder API operation for AWS Config. // // Stops recording configurations of the AWS resources you have selected to // record in your AWS account. // // 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 Config's // API operation StopConfigurationRecorder for usage and error information. // // Returned Error Types: // * NoSuchConfigurationRecorderException // You have specified a configuration recorder that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder func (c *ConfigService) StopConfigurationRecorder(input *StopConfigurationRecorderInput) (*StopConfigurationRecorderOutput, error) { req, out := c.StopConfigurationRecorderRequest(input) return out, req.Send() } // StopConfigurationRecorderWithContext is the same as StopConfigurationRecorder with the addition of // the ability to pass a context and additional request options. // // See StopConfigurationRecorder 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 *ConfigService) StopConfigurationRecorderWithContext(ctx aws.Context, input *StopConfigurationRecorderInput, opts ...request.Option) (*StopConfigurationRecorderOutput, error) { req, out := c.StopConfigurationRecorderRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource 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 TagResource for more information on using the TagResource // 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 TagResourceRequest method. // req, resp := client.TagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/TagResource func (c *ConfigService) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ Name: opTagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &TagResourceInput{} } output = &TagResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // TagResource API operation for AWS Config. // // Associates the specified tags to a resource with the specified resourceArn. // If existing tags on a resource are not specified in the request parameters, // they are not changed. When a resource is deleted, the tags associated with // that resource are deleted as well. // // 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 Config's // API operation TagResource for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * ResourceNotFoundException // You have specified a resource that does not exist. // // * TooManyTagsException // You have reached the limit of the number of tags you can use. You have more // than 50 tags. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/TagResource func (c *ConfigService) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) return out, req.Send() } // TagResourceWithContext is the same as TagResource with the addition of // the ability to pass a context and additional request options. // // See TagResource 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 *ConfigService) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource 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 UntagResource for more information on using the UntagResource // 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 UntagResourceRequest method. // req, resp := client.UntagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/UntagResource func (c *ConfigService) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ Name: opUntagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UntagResourceInput{} } output = &UntagResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UntagResource API operation for AWS Config. // // Deletes specified tags from a resource. // // 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 Config's // API operation UntagResource for usage and error information. // // Returned Error Types: // * ValidationException // The requested action is not valid. // // * ResourceNotFoundException // You have specified a resource that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/UntagResource func (c *ConfigService) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) return out, req.Send() } // UntagResourceWithContext is the same as UntagResource with the addition of // the ability to pass a context and additional request options. // // See UntagResource 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 *ConfigService) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // A collection of accounts and regions. type AccountAggregationSource struct { _ struct{} `type:"structure"` // The 12-digit account ID of the account being aggregated. // // AccountIds is a required field AccountIds []*string `min:"1" type:"list" required:"true"` // If true, aggregate existing AWS Config regions and future regions. AllAwsRegions *bool `type:"boolean"` // The source regions being aggregated. AwsRegions []*string `min:"1" type:"list"` } // String returns the string representation func (s AccountAggregationSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AccountAggregationSource) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AccountAggregationSource) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AccountAggregationSource"} if s.AccountIds == nil { invalidParams.Add(request.NewErrParamRequired("AccountIds")) } if s.AccountIds != nil && len(s.AccountIds) < 1 { invalidParams.Add(request.NewErrParamMinLen("AccountIds", 1)) } if s.AwsRegions != nil && len(s.AwsRegions) < 1 { invalidParams.Add(request.NewErrParamMinLen("AwsRegions", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountIds sets the AccountIds field's value. func (s *AccountAggregationSource) SetAccountIds(v []*string) *AccountAggregationSource { s.AccountIds = v return s } // SetAllAwsRegions sets the AllAwsRegions field's value. func (s *AccountAggregationSource) SetAllAwsRegions(v bool) *AccountAggregationSource { s.AllAwsRegions = &v return s } // SetAwsRegions sets the AwsRegions field's value. func (s *AccountAggregationSource) SetAwsRegions(v []*string) *AccountAggregationSource { s.AwsRegions = v return s } // Indicates whether an AWS Config rule is compliant based on account ID, region, // compliance, and rule name. // // A rule is compliant if all of the resources that the rule evaluated comply // with it. It is noncompliant if any of these resources do not comply. type AggregateComplianceByConfigRule struct { _ struct{} `type:"structure"` // The 12-digit account ID of the source account. AccountId *string `type:"string"` // The source region from where the data is aggregated. AwsRegion *string `min:"1" type:"string"` // Indicates whether an AWS resource or AWS Config rule is compliant and provides // the number of contributors that affect the compliance. Compliance *Compliance `type:"structure"` // The name of the AWS Config rule. ConfigRuleName *string `min:"1" type:"string"` } // String returns the string representation func (s AggregateComplianceByConfigRule) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AggregateComplianceByConfigRule) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *AggregateComplianceByConfigRule) SetAccountId(v string) *AggregateComplianceByConfigRule { s.AccountId = &v return s } // SetAwsRegion sets the AwsRegion field's value. func (s *AggregateComplianceByConfigRule) SetAwsRegion(v string) *AggregateComplianceByConfigRule { s.AwsRegion = &v return s } // SetCompliance sets the Compliance field's value. func (s *AggregateComplianceByConfigRule) SetCompliance(v *Compliance) *AggregateComplianceByConfigRule { s.Compliance = v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *AggregateComplianceByConfigRule) SetConfigRuleName(v string) *AggregateComplianceByConfigRule { s.ConfigRuleName = &v return s } // Returns the number of compliant and noncompliant rules for one or more accounts // and regions in an aggregator. type AggregateComplianceCount struct { _ struct{} `type:"structure"` // The number of compliant and noncompliant AWS Config rules. ComplianceSummary *ComplianceSummary `type:"structure"` // The 12-digit account ID or region based on the GroupByKey value. GroupName *string `min:"1" type:"string"` } // String returns the string representation func (s AggregateComplianceCount) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AggregateComplianceCount) GoString() string { return s.String() } // SetComplianceSummary sets the ComplianceSummary field's value. func (s *AggregateComplianceCount) SetComplianceSummary(v *ComplianceSummary) *AggregateComplianceCount { s.ComplianceSummary = v return s } // SetGroupName sets the GroupName field's value. func (s *AggregateComplianceCount) SetGroupName(v string) *AggregateComplianceCount { s.GroupName = &v return s } // The details of an AWS Config evaluation for an account ID and region in an // aggregator. Provides the AWS resource that was evaluated, the compliance // of the resource, related time stamps, and supplementary information. type AggregateEvaluationResult struct { _ struct{} `type:"structure"` // The 12-digit account ID of the source account. AccountId *string `type:"string"` // Supplementary information about how the agrregate evaluation determined the // compliance. Annotation *string `min:"1" type:"string"` // The source region from where the data is aggregated. AwsRegion *string `min:"1" type:"string"` // The resource compliance status. // // For the AggregationEvaluationResult data type, AWS Config supports only the // COMPLIANT and NON_COMPLIANT. AWS Config does not support the NOT_APPLICABLE // and INSUFFICIENT_DATA value. ComplianceType *string `type:"string" enum:"ComplianceType"` // The time when the AWS Config rule evaluated the AWS resource. ConfigRuleInvokedTime *time.Time `type:"timestamp"` // Uniquely identifies the evaluation result. EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` // The time when AWS Config recorded the aggregate evaluation result. ResultRecordedTime *time.Time `type:"timestamp"` } // String returns the string representation func (s AggregateEvaluationResult) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AggregateEvaluationResult) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *AggregateEvaluationResult) SetAccountId(v string) *AggregateEvaluationResult { s.AccountId = &v return s } // SetAnnotation sets the Annotation field's value. func (s *AggregateEvaluationResult) SetAnnotation(v string) *AggregateEvaluationResult { s.Annotation = &v return s } // SetAwsRegion sets the AwsRegion field's value. func (s *AggregateEvaluationResult) SetAwsRegion(v string) *AggregateEvaluationResult { s.AwsRegion = &v return s } // SetComplianceType sets the ComplianceType field's value. func (s *AggregateEvaluationResult) SetComplianceType(v string) *AggregateEvaluationResult { s.ComplianceType = &v return s } // SetConfigRuleInvokedTime sets the ConfigRuleInvokedTime field's value. func (s *AggregateEvaluationResult) SetConfigRuleInvokedTime(v time.Time) *AggregateEvaluationResult { s.ConfigRuleInvokedTime = &v return s } // SetEvaluationResultIdentifier sets the EvaluationResultIdentifier field's value. func (s *AggregateEvaluationResult) SetEvaluationResultIdentifier(v *EvaluationResultIdentifier) *AggregateEvaluationResult { s.EvaluationResultIdentifier = v return s } // SetResultRecordedTime sets the ResultRecordedTime field's value. func (s *AggregateEvaluationResult) SetResultRecordedTime(v time.Time) *AggregateEvaluationResult { s.ResultRecordedTime = &v return s } // The details that identify a resource that is collected by AWS Config aggregator, // including the resource type, ID, (if available) the custom resource name, // the source account, and source region. type AggregateResourceIdentifier struct { _ struct{} `type:"structure"` // The ID of the AWS resource. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // The name of the AWS resource. ResourceName *string `type:"string"` // The type of the AWS resource. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceType"` // The 12-digit account ID of the source account. // // SourceAccountId is a required field SourceAccountId *string `type:"string" required:"true"` // The source region where data is aggregated. // // SourceRegion is a required field SourceRegion *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s AggregateResourceIdentifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AggregateResourceIdentifier) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AggregateResourceIdentifier) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AggregateResourceIdentifier"} if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.SourceAccountId == nil { invalidParams.Add(request.NewErrParamRequired("SourceAccountId")) } if s.SourceRegion == nil { invalidParams.Add(request.NewErrParamRequired("SourceRegion")) } if s.SourceRegion != nil && len(*s.SourceRegion) < 1 { invalidParams.Add(request.NewErrParamMinLen("SourceRegion", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceId sets the ResourceId field's value. func (s *AggregateResourceIdentifier) SetResourceId(v string) *AggregateResourceIdentifier { s.ResourceId = &v return s } // SetResourceName sets the ResourceName field's value. func (s *AggregateResourceIdentifier) SetResourceName(v string) *AggregateResourceIdentifier { s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *AggregateResourceIdentifier) SetResourceType(v string) *AggregateResourceIdentifier { s.ResourceType = &v return s } // SetSourceAccountId sets the SourceAccountId field's value. func (s *AggregateResourceIdentifier) SetSourceAccountId(v string) *AggregateResourceIdentifier { s.SourceAccountId = &v return s } // SetSourceRegion sets the SourceRegion field's value. func (s *AggregateResourceIdentifier) SetSourceRegion(v string) *AggregateResourceIdentifier { s.SourceRegion = &v return s } // The current sync status between the source and the aggregator account. type AggregatedSourceStatus struct { _ struct{} `type:"structure"` // The region authorized to collect aggregated data. AwsRegion *string `min:"1" type:"string"` // The error code that AWS Config returned when the source account aggregation // last failed. LastErrorCode *string `type:"string"` // The message indicating that the source account aggregation failed due to // an error. LastErrorMessage *string `type:"string"` // Filters the last updated status type. // // * Valid value FAILED indicates errors while moving data. // // * Valid value SUCCEEDED indicates the data was successfully moved. // // * Valid value OUTDATED indicates the data is not the most recent. LastUpdateStatus *string `type:"string" enum:"AggregatedSourceStatusType"` // The time of the last update. LastUpdateTime *time.Time `type:"timestamp"` // The source account ID or an organization. SourceId *string `type:"string"` // The source account or an organization. SourceType *string `type:"string" enum:"AggregatedSourceType"` } // String returns the string representation func (s AggregatedSourceStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AggregatedSourceStatus) GoString() string { return s.String() } // SetAwsRegion sets the AwsRegion field's value. func (s *AggregatedSourceStatus) SetAwsRegion(v string) *AggregatedSourceStatus { s.AwsRegion = &v return s } // SetLastErrorCode sets the LastErrorCode field's value. func (s *AggregatedSourceStatus) SetLastErrorCode(v string) *AggregatedSourceStatus { s.LastErrorCode = &v return s } // SetLastErrorMessage sets the LastErrorMessage field's value. func (s *AggregatedSourceStatus) SetLastErrorMessage(v string) *AggregatedSourceStatus { s.LastErrorMessage = &v return s } // SetLastUpdateStatus sets the LastUpdateStatus field's value. func (s *AggregatedSourceStatus) SetLastUpdateStatus(v string) *AggregatedSourceStatus { s.LastUpdateStatus = &v return s } // SetLastUpdateTime sets the LastUpdateTime field's value. func (s *AggregatedSourceStatus) SetLastUpdateTime(v time.Time) *AggregatedSourceStatus { s.LastUpdateTime = &v return s } // SetSourceId sets the SourceId field's value. func (s *AggregatedSourceStatus) SetSourceId(v string) *AggregatedSourceStatus { s.SourceId = &v return s } // SetSourceType sets the SourceType field's value. func (s *AggregatedSourceStatus) SetSourceType(v string) *AggregatedSourceStatus { s.SourceType = &v return s } // An object that represents the authorizations granted to aggregator accounts // and regions. type AggregationAuthorization struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the aggregation object. AggregationAuthorizationArn *string `type:"string"` // The 12-digit account ID of the account authorized to aggregate data. AuthorizedAccountId *string `type:"string"` // The region authorized to collect aggregated data. AuthorizedAwsRegion *string `min:"1" type:"string"` // The time stamp when the aggregation authorization was created. CreationTime *time.Time `type:"timestamp"` } // String returns the string representation func (s AggregationAuthorization) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AggregationAuthorization) GoString() string { return s.String() } // SetAggregationAuthorizationArn sets the AggregationAuthorizationArn field's value. func (s *AggregationAuthorization) SetAggregationAuthorizationArn(v string) *AggregationAuthorization { s.AggregationAuthorizationArn = &v return s } // SetAuthorizedAccountId sets the AuthorizedAccountId field's value. func (s *AggregationAuthorization) SetAuthorizedAccountId(v string) *AggregationAuthorization { s.AuthorizedAccountId = &v return s } // SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. func (s *AggregationAuthorization) SetAuthorizedAwsRegion(v string) *AggregationAuthorization { s.AuthorizedAwsRegion = &v return s } // SetCreationTime sets the CreationTime field's value. func (s *AggregationAuthorization) SetCreationTime(v time.Time) *AggregationAuthorization { s.CreationTime = &v return s } // The detailed configuration of a specified resource. type BaseConfigurationItem struct { _ struct{} `type:"structure"` // The 12-digit AWS account ID associated with the resource. AccountId *string `locationName:"accountId" type:"string"` // The Amazon Resource Name (ARN) of the resource. Arn *string `locationName:"arn" type:"string"` // The Availability Zone associated with the resource. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The region where the resource resides. AwsRegion *string `locationName:"awsRegion" min:"1" type:"string"` // The description of the resource configuration. Configuration *string `locationName:"configuration" type:"string"` // The time when the configuration recording was initiated. ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` // The configuration item status. ConfigurationItemStatus *string `locationName:"configurationItemStatus" type:"string" enum:"ConfigurationItemStatus"` // An identifier that indicates the ordering of the configuration items of a // resource. ConfigurationStateId *string `locationName:"configurationStateId" type:"string"` // The time stamp when the resource was created. ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` // The ID of the resource (for example., sg-xxxxxx). ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` // The type of AWS resource. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // Configuration attributes that AWS Config returns for certain resource types // to supplement the information returned for the configuration parameter. SupplementaryConfiguration map[string]*string `locationName:"supplementaryConfiguration" type:"map"` // The version number of the resource configuration. Version *string `locationName:"version" type:"string"` } // String returns the string representation func (s BaseConfigurationItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s BaseConfigurationItem) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *BaseConfigurationItem) SetAccountId(v string) *BaseConfigurationItem { s.AccountId = &v return s } // SetArn sets the Arn field's value. func (s *BaseConfigurationItem) SetArn(v string) *BaseConfigurationItem { s.Arn = &v return s } // SetAvailabilityZone sets the AvailabilityZone field's value. func (s *BaseConfigurationItem) SetAvailabilityZone(v string) *BaseConfigurationItem { s.AvailabilityZone = &v return s } // SetAwsRegion sets the AwsRegion field's value. func (s *BaseConfigurationItem) SetAwsRegion(v string) *BaseConfigurationItem { s.AwsRegion = &v return s } // SetConfiguration sets the Configuration field's value. func (s *BaseConfigurationItem) SetConfiguration(v string) *BaseConfigurationItem { s.Configuration = &v return s } // SetConfigurationItemCaptureTime sets the ConfigurationItemCaptureTime field's value. func (s *BaseConfigurationItem) SetConfigurationItemCaptureTime(v time.Time) *BaseConfigurationItem { s.ConfigurationItemCaptureTime = &v return s } // SetConfigurationItemStatus sets the ConfigurationItemStatus field's value. func (s *BaseConfigurationItem) SetConfigurationItemStatus(v string) *BaseConfigurationItem { s.ConfigurationItemStatus = &v return s } // SetConfigurationStateId sets the ConfigurationStateId field's value. func (s *BaseConfigurationItem) SetConfigurationStateId(v string) *BaseConfigurationItem { s.ConfigurationStateId = &v return s } // SetResourceCreationTime sets the ResourceCreationTime field's value. func (s *BaseConfigurationItem) SetResourceCreationTime(v time.Time) *BaseConfigurationItem { s.ResourceCreationTime = &v return s } // SetResourceId sets the ResourceId field's value. func (s *BaseConfigurationItem) SetResourceId(v string) *BaseConfigurationItem { s.ResourceId = &v return s } // SetResourceName sets the ResourceName field's value. func (s *BaseConfigurationItem) SetResourceName(v string) *BaseConfigurationItem { s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *BaseConfigurationItem) SetResourceType(v string) *BaseConfigurationItem { s.ResourceType = &v return s } // SetSupplementaryConfiguration sets the SupplementaryConfiguration field's value. func (s *BaseConfigurationItem) SetSupplementaryConfiguration(v map[string]*string) *BaseConfigurationItem { s.SupplementaryConfiguration = v return s } // SetVersion sets the Version field's value. func (s *BaseConfigurationItem) SetVersion(v string) *BaseConfigurationItem { s.Version = &v return s } type BatchGetAggregateResourceConfigInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // A list of aggregate ResourceIdentifiers objects. // // ResourceIdentifiers is a required field ResourceIdentifiers []*AggregateResourceIdentifier `min:"1" type:"list" required:"true"` } // String returns the string representation func (s BatchGetAggregateResourceConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s BatchGetAggregateResourceConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BatchGetAggregateResourceConfigInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BatchGetAggregateResourceConfigInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.ResourceIdentifiers == nil { invalidParams.Add(request.NewErrParamRequired("ResourceIdentifiers")) } if s.ResourceIdentifiers != nil && len(s.ResourceIdentifiers) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifiers", 1)) } if s.ResourceIdentifiers != nil { for i, v := range s.ResourceIdentifiers { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceIdentifiers", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *BatchGetAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *BatchGetAggregateResourceConfigInput { s.ConfigurationAggregatorName = &v return s } // SetResourceIdentifiers sets the ResourceIdentifiers field's value. func (s *BatchGetAggregateResourceConfigInput) SetResourceIdentifiers(v []*AggregateResourceIdentifier) *BatchGetAggregateResourceConfigInput { s.ResourceIdentifiers = v return s } type BatchGetAggregateResourceConfigOutput struct { _ struct{} `type:"structure"` // A list that contains the current configuration of one or more resources. BaseConfigurationItems []*BaseConfigurationItem `type:"list"` // A list of resource identifiers that were not processed with current scope. // The list is empty if all the resources are processed. UnprocessedResourceIdentifiers []*AggregateResourceIdentifier `type:"list"` } // String returns the string representation func (s BatchGetAggregateResourceConfigOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s BatchGetAggregateResourceConfigOutput) GoString() string { return s.String() } // SetBaseConfigurationItems sets the BaseConfigurationItems field's value. func (s *BatchGetAggregateResourceConfigOutput) SetBaseConfigurationItems(v []*BaseConfigurationItem) *BatchGetAggregateResourceConfigOutput { s.BaseConfigurationItems = v return s } // SetUnprocessedResourceIdentifiers sets the UnprocessedResourceIdentifiers field's value. func (s *BatchGetAggregateResourceConfigOutput) SetUnprocessedResourceIdentifiers(v []*AggregateResourceIdentifier) *BatchGetAggregateResourceConfigOutput { s.UnprocessedResourceIdentifiers = v return s } type BatchGetResourceConfigInput struct { _ struct{} `type:"structure"` // A list of resource keys to be processed with the current request. Each element // in the list consists of the resource type and resource ID. // // ResourceKeys is a required field ResourceKeys []*ResourceKey `locationName:"resourceKeys" min:"1" type:"list" required:"true"` } // String returns the string representation func (s BatchGetResourceConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s BatchGetResourceConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BatchGetResourceConfigInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BatchGetResourceConfigInput"} if s.ResourceKeys == nil { invalidParams.Add(request.NewErrParamRequired("ResourceKeys")) } if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) } if s.ResourceKeys != nil { for i, v := range s.ResourceKeys { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceKeys sets the ResourceKeys field's value. func (s *BatchGetResourceConfigInput) SetResourceKeys(v []*ResourceKey) *BatchGetResourceConfigInput { s.ResourceKeys = v return s } type BatchGetResourceConfigOutput struct { _ struct{} `type:"structure"` // A list that contains the current configuration of one or more resources. BaseConfigurationItems []*BaseConfigurationItem `locationName:"baseConfigurationItems" type:"list"` // A list of resource keys that were not processed with the current response. // The unprocessesResourceKeys value is in the same form as ResourceKeys, so // the value can be directly provided to a subsequent BatchGetResourceConfig // operation. If there are no unprocessed resource keys, the response contains // an empty unprocessedResourceKeys list. UnprocessedResourceKeys []*ResourceKey `locationName:"unprocessedResourceKeys" min:"1" type:"list"` } // String returns the string representation func (s BatchGetResourceConfigOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s BatchGetResourceConfigOutput) GoString() string { return s.String() } // SetBaseConfigurationItems sets the BaseConfigurationItems field's value. func (s *BatchGetResourceConfigOutput) SetBaseConfigurationItems(v []*BaseConfigurationItem) *BatchGetResourceConfigOutput { s.BaseConfigurationItems = v return s } // SetUnprocessedResourceKeys sets the UnprocessedResourceKeys field's value. func (s *BatchGetResourceConfigOutput) SetUnprocessedResourceKeys(v []*ResourceKey) *BatchGetResourceConfigOutput { s.UnprocessedResourceKeys = v return s } // Indicates whether an AWS resource or AWS Config rule is compliant and provides // the number of contributors that affect the compliance. type Compliance struct { _ struct{} `type:"structure"` // The number of AWS resources or AWS Config rules that cause a result of NON_COMPLIANT, // up to a maximum number. ComplianceContributorCount *ComplianceContributorCount `type:"structure"` // Indicates whether an AWS resource or AWS Config rule is compliant. // // A resource is compliant if it complies with all of the AWS Config rules that // evaluate it. A resource is noncompliant if it does not comply with one or // more of these rules. // // A rule is compliant if all of the resources that the rule evaluates comply // with it. A rule is noncompliant if any of these resources do not comply. // // AWS Config returns the INSUFFICIENT_DATA value when no evaluation results // are available for the AWS resource or AWS Config rule. // // For the Compliance data type, AWS Config supports only COMPLIANT, NON_COMPLIANT, // and INSUFFICIENT_DATA values. AWS Config does not support the NOT_APPLICABLE // value for the Compliance data type. ComplianceType *string `type:"string" enum:"ComplianceType"` } // String returns the string representation func (s Compliance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Compliance) GoString() string { return s.String() } // SetComplianceContributorCount sets the ComplianceContributorCount field's value. func (s *Compliance) SetComplianceContributorCount(v *ComplianceContributorCount) *Compliance { s.ComplianceContributorCount = v return s } // SetComplianceType sets the ComplianceType field's value. func (s *Compliance) SetComplianceType(v string) *Compliance { s.ComplianceType = &v return s } // Indicates whether an AWS Config rule is compliant. A rule is compliant if // all of the resources that the rule evaluated comply with it. A rule is noncompliant // if any of these resources do not comply. type ComplianceByConfigRule struct { _ struct{} `type:"structure"` // Indicates whether the AWS Config rule is compliant. Compliance *Compliance `type:"structure"` // The name of the AWS Config rule. ConfigRuleName *string `min:"1" type:"string"` } // String returns the string representation func (s ComplianceByConfigRule) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ComplianceByConfigRule) GoString() string { return s.String() } // SetCompliance sets the Compliance field's value. func (s *ComplianceByConfigRule) SetCompliance(v *Compliance) *ComplianceByConfigRule { s.Compliance = v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *ComplianceByConfigRule) SetConfigRuleName(v string) *ComplianceByConfigRule { s.ConfigRuleName = &v return s } // Indicates whether an AWS resource that is evaluated according to one or more // AWS Config rules is compliant. A resource is compliant if it complies with // all of the rules that evaluate it. A resource is noncompliant if it does // not comply with one or more of these rules. type ComplianceByResource struct { _ struct{} `type:"structure"` // Indicates whether the AWS resource complies with all of the AWS Config rules // that evaluated it. Compliance *Compliance `type:"structure"` // The ID of the AWS resource that was evaluated. ResourceId *string `min:"1" type:"string"` // The type of the AWS resource that was evaluated. ResourceType *string `min:"1" type:"string"` } // String returns the string representation func (s ComplianceByResource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ComplianceByResource) GoString() string { return s.String() } // SetCompliance sets the Compliance field's value. func (s *ComplianceByResource) SetCompliance(v *Compliance) *ComplianceByResource { s.Compliance = v return s } // SetResourceId sets the ResourceId field's value. func (s *ComplianceByResource) SetResourceId(v string) *ComplianceByResource { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ComplianceByResource) SetResourceType(v string) *ComplianceByResource { s.ResourceType = &v return s } // The number of AWS resources or AWS Config rules responsible for the current // compliance of the item, up to a maximum number. type ComplianceContributorCount struct { _ struct{} `type:"structure"` // Indicates whether the maximum count is reached. CapExceeded *bool `type:"boolean"` // The number of AWS resources or AWS Config rules responsible for the current // compliance of the item. CappedCount *int64 `type:"integer"` } // String returns the string representation func (s ComplianceContributorCount) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ComplianceContributorCount) GoString() string { return s.String() } // SetCapExceeded sets the CapExceeded field's value. func (s *ComplianceContributorCount) SetCapExceeded(v bool) *ComplianceContributorCount { s.CapExceeded = &v return s } // SetCappedCount sets the CappedCount field's value. func (s *ComplianceContributorCount) SetCappedCount(v int64) *ComplianceContributorCount { s.CappedCount = &v return s } // The number of AWS Config rules or AWS resources that are compliant and noncompliant. type ComplianceSummary struct { _ struct{} `type:"structure"` // The time that AWS Config created the compliance summary. ComplianceSummaryTimestamp *time.Time `type:"timestamp"` // The number of AWS Config rules or AWS resources that are compliant, up to // a maximum of 25 for rules and 100 for resources. CompliantResourceCount *ComplianceContributorCount `type:"structure"` // The number of AWS Config rules or AWS resources that are noncompliant, up // to a maximum of 25 for rules and 100 for resources. NonCompliantResourceCount *ComplianceContributorCount `type:"structure"` } // String returns the string representation func (s ComplianceSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ComplianceSummary) GoString() string { return s.String() } // SetComplianceSummaryTimestamp sets the ComplianceSummaryTimestamp field's value. func (s *ComplianceSummary) SetComplianceSummaryTimestamp(v time.Time) *ComplianceSummary { s.ComplianceSummaryTimestamp = &v return s } // SetCompliantResourceCount sets the CompliantResourceCount field's value. func (s *ComplianceSummary) SetCompliantResourceCount(v *ComplianceContributorCount) *ComplianceSummary { s.CompliantResourceCount = v return s } // SetNonCompliantResourceCount sets the NonCompliantResourceCount field's value. func (s *ComplianceSummary) SetNonCompliantResourceCount(v *ComplianceContributorCount) *ComplianceSummary { s.NonCompliantResourceCount = v return s } // The number of AWS resources of a specific type that are compliant or noncompliant, // up to a maximum of 100 for each. type ComplianceSummaryByResourceType struct { _ struct{} `type:"structure"` // The number of AWS resources that are compliant or noncompliant, up to a maximum // of 100 for each. ComplianceSummary *ComplianceSummary `type:"structure"` // The type of AWS resource. ResourceType *string `min:"1" type:"string"` } // String returns the string representation func (s ComplianceSummaryByResourceType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ComplianceSummaryByResourceType) GoString() string { return s.String() } // SetComplianceSummary sets the ComplianceSummary field's value. func (s *ComplianceSummaryByResourceType) SetComplianceSummary(v *ComplianceSummary) *ComplianceSummaryByResourceType { s.ComplianceSummary = v return s } // SetResourceType sets the ResourceType field's value. func (s *ComplianceSummaryByResourceType) SetResourceType(v string) *ComplianceSummaryByResourceType { s.ResourceType = &v return s } // Provides status of the delivery of the snapshot or the configuration history // to the specified Amazon S3 bucket. Also provides the status of notifications // about the Amazon S3 delivery to the specified Amazon SNS topic. type ConfigExportDeliveryInfo struct { _ struct{} `type:"structure"` // The time of the last attempted delivery. LastAttemptTime *time.Time `locationName:"lastAttemptTime" type:"timestamp"` // The error code from the last attempted delivery. LastErrorCode *string `locationName:"lastErrorCode" type:"string"` // The error message from the last attempted delivery. LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` // Status of the last attempted delivery. LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` // The time of the last successful delivery. LastSuccessfulTime *time.Time `locationName:"lastSuccessfulTime" type:"timestamp"` // The time that the next delivery occurs. NextDeliveryTime *time.Time `locationName:"nextDeliveryTime" type:"timestamp"` } // String returns the string representation func (s ConfigExportDeliveryInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigExportDeliveryInfo) GoString() string { return s.String() } // SetLastAttemptTime sets the LastAttemptTime field's value. func (s *ConfigExportDeliveryInfo) SetLastAttemptTime(v time.Time) *ConfigExportDeliveryInfo { s.LastAttemptTime = &v return s } // SetLastErrorCode sets the LastErrorCode field's value. func (s *ConfigExportDeliveryInfo) SetLastErrorCode(v string) *ConfigExportDeliveryInfo { s.LastErrorCode = &v return s } // SetLastErrorMessage sets the LastErrorMessage field's value. func (s *ConfigExportDeliveryInfo) SetLastErrorMessage(v string) *ConfigExportDeliveryInfo { s.LastErrorMessage = &v return s } // SetLastStatus sets the LastStatus field's value. func (s *ConfigExportDeliveryInfo) SetLastStatus(v string) *ConfigExportDeliveryInfo { s.LastStatus = &v return s } // SetLastSuccessfulTime sets the LastSuccessfulTime field's value. func (s *ConfigExportDeliveryInfo) SetLastSuccessfulTime(v time.Time) *ConfigExportDeliveryInfo { s.LastSuccessfulTime = &v return s } // SetNextDeliveryTime sets the NextDeliveryTime field's value. func (s *ConfigExportDeliveryInfo) SetNextDeliveryTime(v time.Time) *ConfigExportDeliveryInfo { s.NextDeliveryTime = &v return s } // An AWS Config rule represents an AWS Lambda function that you create for // a custom rule or a predefined function for an AWS managed rule. The function // evaluates configuration items to assess whether your AWS resources comply // with your desired configurations. This function can run when AWS Config detects // a configuration change to an AWS resource and at a periodic frequency that // you choose (for example, every 24 hours). // // You can use the AWS CLI and AWS SDKs if you want to create a rule that triggers // evaluations for your resources when AWS Config delivers the configuration // snapshot. For more information, see ConfigSnapshotDeliveryProperties. // // For more information about developing and using AWS Config rules, see Evaluating // AWS Resource Configurations with AWS Config (https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) // in the AWS Config Developer Guide. type ConfigRule struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the AWS Config rule. ConfigRuleArn *string `min:"1" type:"string"` // The ID of the AWS Config rule. ConfigRuleId *string `min:"1" type:"string"` // The name that you assign to the AWS Config rule. The name is required if // you are adding a new rule. ConfigRuleName *string `min:"1" type:"string"` // Indicates whether the AWS Config rule is active or is currently being deleted // by AWS Config. It can also indicate the evaluation status for the AWS Config // rule. // // AWS Config sets the state of the rule to EVALUATING temporarily after you // use the StartConfigRulesEvaluation request to evaluate your resources against // the AWS Config rule. // // AWS Config sets the state of the rule to DELETING_RESULTS temporarily after // you use the DeleteEvaluationResults request to delete the current evaluation // results for the AWS Config rule. // // AWS Config temporarily sets the state of a rule to DELETING after you use // the DeleteConfigRule request to delete the rule. After AWS Config deletes // the rule, the rule and all of its evaluations are erased and are no longer // available. ConfigRuleState *string `type:"string" enum:"ConfigRuleState"` // Service principal name of the service that created the rule. // // The field is populated only if the service linked rule is created by a service. // The field is empty if you create your own rule. CreatedBy *string `min:"1" type:"string"` // The description that you provide for the AWS Config rule. Description *string `type:"string"` // A string, in JSON format, that is passed to the AWS Config rule Lambda function. InputParameters *string `min:"1" type:"string"` // The maximum frequency with which AWS Config runs evaluations for a rule. // You can specify a value for MaximumExecutionFrequency when: // // * You are using an AWS managed rule that is triggered at a periodic frequency. // // * Your custom rule is triggered when AWS Config delivers the configuration // snapshot. For more information, see ConfigSnapshotDeliveryProperties. // // By default, rules with a periodic trigger are evaluated every 24 hours. To // change the frequency, specify a valid value for the MaximumExecutionFrequency // parameter. MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` // Defines which resources can trigger an evaluation for the rule. The scope // can include one or more resource types, a combination of one resource type // and one resource ID, or a combination of a tag key and value. Specify a scope // to constrain the resources that can trigger an evaluation for the rule. If // you do not specify a scope, evaluations are triggered when any resource in // the recording group changes. Scope *Scope `type:"structure"` // Provides the rule owner (AWS or customer), the rule identifier, and the notifications // that cause the function to evaluate your AWS resources. // // Source is a required field Source *Source `type:"structure" required:"true"` } // String returns the string representation func (s ConfigRule) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigRule) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ConfigRule) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ConfigRule"} if s.ConfigRuleArn != nil && len(*s.ConfigRuleArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleArn", 1)) } if s.ConfigRuleId != nil && len(*s.ConfigRuleId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleId", 1)) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.CreatedBy != nil && len(*s.CreatedBy) < 1 { invalidParams.Add(request.NewErrParamMinLen("CreatedBy", 1)) } if s.InputParameters != nil && len(*s.InputParameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("InputParameters", 1)) } if s.Source == nil { invalidParams.Add(request.NewErrParamRequired("Source")) } if s.Scope != nil { if err := s.Scope.Validate(); err != nil { invalidParams.AddNested("Scope", err.(request.ErrInvalidParams)) } } if s.Source != nil { if err := s.Source.Validate(); err != nil { invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleArn sets the ConfigRuleArn field's value. func (s *ConfigRule) SetConfigRuleArn(v string) *ConfigRule { s.ConfigRuleArn = &v return s } // SetConfigRuleId sets the ConfigRuleId field's value. func (s *ConfigRule) SetConfigRuleId(v string) *ConfigRule { s.ConfigRuleId = &v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *ConfigRule) SetConfigRuleName(v string) *ConfigRule { s.ConfigRuleName = &v return s } // SetConfigRuleState sets the ConfigRuleState field's value. func (s *ConfigRule) SetConfigRuleState(v string) *ConfigRule { s.ConfigRuleState = &v return s } // SetCreatedBy sets the CreatedBy field's value. func (s *ConfigRule) SetCreatedBy(v string) *ConfigRule { s.CreatedBy = &v return s } // SetDescription sets the Description field's value. func (s *ConfigRule) SetDescription(v string) *ConfigRule { s.Description = &v return s } // SetInputParameters sets the InputParameters field's value. func (s *ConfigRule) SetInputParameters(v string) *ConfigRule { s.InputParameters = &v return s } // SetMaximumExecutionFrequency sets the MaximumExecutionFrequency field's value. func (s *ConfigRule) SetMaximumExecutionFrequency(v string) *ConfigRule { s.MaximumExecutionFrequency = &v return s } // SetScope sets the Scope field's value. func (s *ConfigRule) SetScope(v *Scope) *ConfigRule { s.Scope = v return s } // SetSource sets the Source field's value. func (s *ConfigRule) SetSource(v *Source) *ConfigRule { s.Source = v return s } // Filters the compliance results based on account ID, region, compliance type, // and rule name. type ConfigRuleComplianceFilters struct { _ struct{} `type:"structure"` // The 12-digit account ID of the source account. AccountId *string `type:"string"` // The source region where the data is aggregated. AwsRegion *string `min:"1" type:"string"` // The rule compliance status. // // For the ConfigRuleComplianceFilters data type, AWS Config supports only COMPLIANT // and NON_COMPLIANT. AWS Config does not support the NOT_APPLICABLE and the // INSUFFICIENT_DATA values. ComplianceType *string `type:"string" enum:"ComplianceType"` // The name of the AWS Config rule. ConfigRuleName *string `min:"1" type:"string"` } // String returns the string representation func (s ConfigRuleComplianceFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigRuleComplianceFilters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ConfigRuleComplianceFilters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ConfigRuleComplianceFilters"} if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountId sets the AccountId field's value. func (s *ConfigRuleComplianceFilters) SetAccountId(v string) *ConfigRuleComplianceFilters { s.AccountId = &v return s } // SetAwsRegion sets the AwsRegion field's value. func (s *ConfigRuleComplianceFilters) SetAwsRegion(v string) *ConfigRuleComplianceFilters { s.AwsRegion = &v return s } // SetComplianceType sets the ComplianceType field's value. func (s *ConfigRuleComplianceFilters) SetComplianceType(v string) *ConfigRuleComplianceFilters { s.ComplianceType = &v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *ConfigRuleComplianceFilters) SetConfigRuleName(v string) *ConfigRuleComplianceFilters { s.ConfigRuleName = &v return s } // Filters the results based on the account IDs and regions. type ConfigRuleComplianceSummaryFilters struct { _ struct{} `type:"structure"` // The 12-digit account ID of the source account. AccountId *string `type:"string"` // The source region where the data is aggregated. AwsRegion *string `min:"1" type:"string"` } // String returns the string representation func (s ConfigRuleComplianceSummaryFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigRuleComplianceSummaryFilters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ConfigRuleComplianceSummaryFilters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ConfigRuleComplianceSummaryFilters"} if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountId sets the AccountId field's value. func (s *ConfigRuleComplianceSummaryFilters) SetAccountId(v string) *ConfigRuleComplianceSummaryFilters { s.AccountId = &v return s } // SetAwsRegion sets the AwsRegion field's value. func (s *ConfigRuleComplianceSummaryFilters) SetAwsRegion(v string) *ConfigRuleComplianceSummaryFilters { s.AwsRegion = &v return s } // Status information for your AWS managed Config rules. The status includes // information such as the last time the rule ran, the last time it failed, // and the related error for the last failure. // // This action does not return status information about custom AWS Config rules. type ConfigRuleEvaluationStatus struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the AWS Config rule. ConfigRuleArn *string `type:"string"` // The ID of the AWS Config rule. ConfigRuleId *string `type:"string"` // The name of the AWS Config rule. ConfigRuleName *string `min:"1" type:"string"` // The time that you first activated the AWS Config rule. FirstActivatedTime *time.Time `type:"timestamp"` // Indicates whether AWS Config has evaluated your resources against the rule // at least once. // // * true - AWS Config has evaluated your AWS resources against the rule // at least once. // // * false - AWS Config has not once finished evaluating your AWS resources // against the rule. FirstEvaluationStarted *bool `type:"boolean"` LastDeactivatedTime *time.Time `type:"timestamp"` // The error code that AWS Config returned when the rule last failed. LastErrorCode *string `type:"string"` // The error message that AWS Config returned when the rule last failed. LastErrorMessage *string `type:"string"` // The time that AWS Config last failed to evaluate your AWS resources against // the rule. LastFailedEvaluationTime *time.Time `type:"timestamp"` // The time that AWS Config last failed to invoke the AWS Config rule to evaluate // your AWS resources. LastFailedInvocationTime *time.Time `type:"timestamp"` // The time that AWS Config last successfully evaluated your AWS resources against // the rule. LastSuccessfulEvaluationTime *time.Time `type:"timestamp"` // The time that AWS Config last successfully invoked the AWS Config rule to // evaluate your AWS resources. LastSuccessfulInvocationTime *time.Time `type:"timestamp"` } // String returns the string representation func (s ConfigRuleEvaluationStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigRuleEvaluationStatus) GoString() string { return s.String() } // SetConfigRuleArn sets the ConfigRuleArn field's value. func (s *ConfigRuleEvaluationStatus) SetConfigRuleArn(v string) *ConfigRuleEvaluationStatus { s.ConfigRuleArn = &v return s } // SetConfigRuleId sets the ConfigRuleId field's value. func (s *ConfigRuleEvaluationStatus) SetConfigRuleId(v string) *ConfigRuleEvaluationStatus { s.ConfigRuleId = &v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *ConfigRuleEvaluationStatus) SetConfigRuleName(v string) *ConfigRuleEvaluationStatus { s.ConfigRuleName = &v return s } // SetFirstActivatedTime sets the FirstActivatedTime field's value. func (s *ConfigRuleEvaluationStatus) SetFirstActivatedTime(v time.Time) *ConfigRuleEvaluationStatus { s.FirstActivatedTime = &v return s } // SetFirstEvaluationStarted sets the FirstEvaluationStarted field's value. func (s *ConfigRuleEvaluationStatus) SetFirstEvaluationStarted(v bool) *ConfigRuleEvaluationStatus { s.FirstEvaluationStarted = &v return s } // SetLastDeactivatedTime sets the LastDeactivatedTime field's value. func (s *ConfigRuleEvaluationStatus) SetLastDeactivatedTime(v time.Time) *ConfigRuleEvaluationStatus { s.LastDeactivatedTime = &v return s } // SetLastErrorCode sets the LastErrorCode field's value. func (s *ConfigRuleEvaluationStatus) SetLastErrorCode(v string) *ConfigRuleEvaluationStatus { s.LastErrorCode = &v return s } // SetLastErrorMessage sets the LastErrorMessage field's value. func (s *ConfigRuleEvaluationStatus) SetLastErrorMessage(v string) *ConfigRuleEvaluationStatus { s.LastErrorMessage = &v return s } // SetLastFailedEvaluationTime sets the LastFailedEvaluationTime field's value. func (s *ConfigRuleEvaluationStatus) SetLastFailedEvaluationTime(v time.Time) *ConfigRuleEvaluationStatus { s.LastFailedEvaluationTime = &v return s } // SetLastFailedInvocationTime sets the LastFailedInvocationTime field's value. func (s *ConfigRuleEvaluationStatus) SetLastFailedInvocationTime(v time.Time) *ConfigRuleEvaluationStatus { s.LastFailedInvocationTime = &v return s } // SetLastSuccessfulEvaluationTime sets the LastSuccessfulEvaluationTime field's value. func (s *ConfigRuleEvaluationStatus) SetLastSuccessfulEvaluationTime(v time.Time) *ConfigRuleEvaluationStatus { s.LastSuccessfulEvaluationTime = &v return s } // SetLastSuccessfulInvocationTime sets the LastSuccessfulInvocationTime field's value. func (s *ConfigRuleEvaluationStatus) SetLastSuccessfulInvocationTime(v time.Time) *ConfigRuleEvaluationStatus { s.LastSuccessfulInvocationTime = &v return s } // Provides options for how often AWS Config delivers configuration snapshots // to the Amazon S3 bucket in your delivery channel. // // The frequency for a rule that triggers evaluations for your resources when // AWS Config delivers the configuration snapshot is set by one of two values, // depending on which is less frequent: // // * The value for the deliveryFrequency parameter within the delivery channel // configuration, which sets how often AWS Config delivers configuration // snapshots. This value also sets how often AWS Config invokes evaluations // for AWS Config rules. // // * The value for the MaximumExecutionFrequency parameter, which sets the // maximum frequency with which AWS Config invokes evaluations for the rule. // For more information, see ConfigRule. // // If the deliveryFrequency value is less frequent than the MaximumExecutionFrequency // value for a rule, AWS Config invokes the rule only as often as the deliveryFrequency // value. // // For example, you want your rule to run evaluations when AWS Config delivers // the configuration snapshot. // // You specify the MaximumExecutionFrequency value for Six_Hours. // // You then specify the delivery channel deliveryFrequency value for TwentyFour_Hours. // // Because the value for deliveryFrequency is less frequent than MaximumExecutionFrequency, // AWS Config invokes evaluations for the rule every 24 hours. // // You should set the MaximumExecutionFrequency value to be at least as frequent // as the deliveryFrequency value. You can view the deliveryFrequency value // by using the DescribeDeliveryChannnels action. // // To update the deliveryFrequency with which AWS Config delivers your configuration // snapshots, use the PutDeliveryChannel action. type ConfigSnapshotDeliveryProperties struct { _ struct{} `type:"structure"` // The frequency with which AWS Config delivers configuration snapshots. DeliveryFrequency *string `locationName:"deliveryFrequency" type:"string" enum:"MaximumExecutionFrequency"` } // String returns the string representation func (s ConfigSnapshotDeliveryProperties) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigSnapshotDeliveryProperties) GoString() string { return s.String() } // SetDeliveryFrequency sets the DeliveryFrequency field's value. func (s *ConfigSnapshotDeliveryProperties) SetDeliveryFrequency(v string) *ConfigSnapshotDeliveryProperties { s.DeliveryFrequency = &v return s } // A list that contains the status of the delivery of the configuration stream // notification to the Amazon SNS topic. type ConfigStreamDeliveryInfo struct { _ struct{} `type:"structure"` // The error code from the last attempted delivery. LastErrorCode *string `locationName:"lastErrorCode" type:"string"` // The error message from the last attempted delivery. LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` // Status of the last attempted delivery. // // Note Providing an SNS topic on a DeliveryChannel (https://docs.aws.amazon.com/config/latest/APIReference/API_DeliveryChannel.html) // for AWS Config is optional. If the SNS delivery is turned off, the last status // will be Not_Applicable. LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` // The time from the last status change. LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` } // String returns the string representation func (s ConfigStreamDeliveryInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigStreamDeliveryInfo) GoString() string { return s.String() } // SetLastErrorCode sets the LastErrorCode field's value. func (s *ConfigStreamDeliveryInfo) SetLastErrorCode(v string) *ConfigStreamDeliveryInfo { s.LastErrorCode = &v return s } // SetLastErrorMessage sets the LastErrorMessage field's value. func (s *ConfigStreamDeliveryInfo) SetLastErrorMessage(v string) *ConfigStreamDeliveryInfo { s.LastErrorMessage = &v return s } // SetLastStatus sets the LastStatus field's value. func (s *ConfigStreamDeliveryInfo) SetLastStatus(v string) *ConfigStreamDeliveryInfo { s.LastStatus = &v return s } // SetLastStatusChangeTime sets the LastStatusChangeTime field's value. func (s *ConfigStreamDeliveryInfo) SetLastStatusChangeTime(v time.Time) *ConfigStreamDeliveryInfo { s.LastStatusChangeTime = &v return s } // The details about the configuration aggregator, including information about // source accounts, regions, and metadata of the aggregator. type ConfigurationAggregator struct { _ struct{} `type:"structure"` // Provides a list of source accounts and regions to be aggregated. AccountAggregationSources []*AccountAggregationSource `type:"list"` // The Amazon Resource Name (ARN) of the aggregator. ConfigurationAggregatorArn *string `type:"string"` // The name of the aggregator. ConfigurationAggregatorName *string `min:"1" type:"string"` // The time stamp when the configuration aggregator was created. CreationTime *time.Time `type:"timestamp"` // The time of the last update. LastUpdatedTime *time.Time `type:"timestamp"` // Provides an organization and list of regions to be aggregated. OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` } // String returns the string representation func (s ConfigurationAggregator) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigurationAggregator) GoString() string { return s.String() } // SetAccountAggregationSources sets the AccountAggregationSources field's value. func (s *ConfigurationAggregator) SetAccountAggregationSources(v []*AccountAggregationSource) *ConfigurationAggregator { s.AccountAggregationSources = v return s } // SetConfigurationAggregatorArn sets the ConfigurationAggregatorArn field's value. func (s *ConfigurationAggregator) SetConfigurationAggregatorArn(v string) *ConfigurationAggregator { s.ConfigurationAggregatorArn = &v return s } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *ConfigurationAggregator) SetConfigurationAggregatorName(v string) *ConfigurationAggregator { s.ConfigurationAggregatorName = &v return s } // SetCreationTime sets the CreationTime field's value. func (s *ConfigurationAggregator) SetCreationTime(v time.Time) *ConfigurationAggregator { s.CreationTime = &v return s } // SetLastUpdatedTime sets the LastUpdatedTime field's value. func (s *ConfigurationAggregator) SetLastUpdatedTime(v time.Time) *ConfigurationAggregator { s.LastUpdatedTime = &v return s } // SetOrganizationAggregationSource sets the OrganizationAggregationSource field's value. func (s *ConfigurationAggregator) SetOrganizationAggregationSource(v *OrganizationAggregationSource) *ConfigurationAggregator { s.OrganizationAggregationSource = v return s } // A list that contains detailed configurations of a specified resource. type ConfigurationItem struct { _ struct{} `type:"structure"` // The 12-digit AWS account ID associated with the resource. AccountId *string `locationName:"accountId" type:"string"` // accoun Arn *string `locationName:"arn" type:"string"` // The Availability Zone associated with the resource. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The region where the resource resides. AwsRegion *string `locationName:"awsRegion" min:"1" type:"string"` // The description of the resource configuration. Configuration *string `locationName:"configuration" type:"string"` // The time when the configuration recording was initiated. ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` // Unique MD5 hash that represents the configuration item's state. // // You can use MD5 hash to compare the states of two or more configuration items // that are associated with the same resource. ConfigurationItemMD5Hash *string `locationName:"configurationItemMD5Hash" type:"string"` // The configuration item status. ConfigurationItemStatus *string `locationName:"configurationItemStatus" type:"string" enum:"ConfigurationItemStatus"` // An identifier that indicates the ordering of the configuration items of a // resource. ConfigurationStateId *string `locationName:"configurationStateId" type:"string"` // A list of CloudTrail event IDs. // // A populated field indicates that the current configuration was initiated // by the events recorded in the CloudTrail log. For more information about // CloudTrail, see What Is AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). // // An empty field indicates that the current configuration was not initiated // by any event. As of Version 1.3, the relatedEvents field is empty. You can // access the LookupEvents API (https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_LookupEvents.html) // in the AWS CloudTrail API Reference to retrieve the events for the resource. RelatedEvents []*string `locationName:"relatedEvents" type:"list"` // A list of related AWS resources. Relationships []*Relationship `locationName:"relationships" type:"list"` // The time stamp when the resource was created. ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` // The ID of the resource (for example, sg-xxxxxx). ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` // The type of AWS resource. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // Configuration attributes that AWS Config returns for certain resource types // to supplement the information returned for the configuration parameter. SupplementaryConfiguration map[string]*string `locationName:"supplementaryConfiguration" type:"map"` // A mapping of key value tags associated with the resource. Tags map[string]*string `locationName:"tags" type:"map"` // The version number of the resource configuration. Version *string `locationName:"version" type:"string"` } // String returns the string representation func (s ConfigurationItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigurationItem) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *ConfigurationItem) SetAccountId(v string) *ConfigurationItem { s.AccountId = &v return s } // SetArn sets the Arn field's value. func (s *ConfigurationItem) SetArn(v string) *ConfigurationItem { s.Arn = &v return s } // SetAvailabilityZone sets the AvailabilityZone field's value. func (s *ConfigurationItem) SetAvailabilityZone(v string) *ConfigurationItem { s.AvailabilityZone = &v return s } // SetAwsRegion sets the AwsRegion field's value. func (s *ConfigurationItem) SetAwsRegion(v string) *ConfigurationItem { s.AwsRegion = &v return s } // SetConfiguration sets the Configuration field's value. func (s *ConfigurationItem) SetConfiguration(v string) *ConfigurationItem { s.Configuration = &v return s } // SetConfigurationItemCaptureTime sets the ConfigurationItemCaptureTime field's value. func (s *ConfigurationItem) SetConfigurationItemCaptureTime(v time.Time) *ConfigurationItem { s.ConfigurationItemCaptureTime = &v return s } // SetConfigurationItemMD5Hash sets the ConfigurationItemMD5Hash field's value. func (s *ConfigurationItem) SetConfigurationItemMD5Hash(v string) *ConfigurationItem { s.ConfigurationItemMD5Hash = &v return s } // SetConfigurationItemStatus sets the ConfigurationItemStatus field's value. func (s *ConfigurationItem) SetConfigurationItemStatus(v string) *ConfigurationItem { s.ConfigurationItemStatus = &v return s } // SetConfigurationStateId sets the ConfigurationStateId field's value. func (s *ConfigurationItem) SetConfigurationStateId(v string) *ConfigurationItem { s.ConfigurationStateId = &v return s } // SetRelatedEvents sets the RelatedEvents field's value. func (s *ConfigurationItem) SetRelatedEvents(v []*string) *ConfigurationItem { s.RelatedEvents = v return s } // SetRelationships sets the Relationships field's value. func (s *ConfigurationItem) SetRelationships(v []*Relationship) *ConfigurationItem { s.Relationships = v return s } // SetResourceCreationTime sets the ResourceCreationTime field's value. func (s *ConfigurationItem) SetResourceCreationTime(v time.Time) *ConfigurationItem { s.ResourceCreationTime = &v return s } // SetResourceId sets the ResourceId field's value. func (s *ConfigurationItem) SetResourceId(v string) *ConfigurationItem { s.ResourceId = &v return s } // SetResourceName sets the ResourceName field's value. func (s *ConfigurationItem) SetResourceName(v string) *ConfigurationItem { s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ConfigurationItem) SetResourceType(v string) *ConfigurationItem { s.ResourceType = &v return s } // SetSupplementaryConfiguration sets the SupplementaryConfiguration field's value. func (s *ConfigurationItem) SetSupplementaryConfiguration(v map[string]*string) *ConfigurationItem { s.SupplementaryConfiguration = v return s } // SetTags sets the Tags field's value. func (s *ConfigurationItem) SetTags(v map[string]*string) *ConfigurationItem { s.Tags = v return s } // SetVersion sets the Version field's value. func (s *ConfigurationItem) SetVersion(v string) *ConfigurationItem { s.Version = &v return s } // An object that represents the recording of configuration changes of an AWS // resource. type ConfigurationRecorder struct { _ struct{} `type:"structure"` // The name of the recorder. By default, AWS Config automatically assigns the // name "default" when creating the configuration recorder. You cannot change // the assigned name. Name *string `locationName:"name" min:"1" type:"string"` // Specifies the types of AWS resources for which AWS Config records configuration // changes. RecordingGroup *RecordingGroup `locationName:"recordingGroup" type:"structure"` // Amazon Resource Name (ARN) of the IAM role used to describe the AWS resources // associated with the account. RoleARN *string `locationName:"roleARN" type:"string"` } // String returns the string representation func (s ConfigurationRecorder) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigurationRecorder) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ConfigurationRecorder) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ConfigurationRecorder"} if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetName sets the Name field's value. func (s *ConfigurationRecorder) SetName(v string) *ConfigurationRecorder { s.Name = &v return s } // SetRecordingGroup sets the RecordingGroup field's value. func (s *ConfigurationRecorder) SetRecordingGroup(v *RecordingGroup) *ConfigurationRecorder { s.RecordingGroup = v return s } // SetRoleARN sets the RoleARN field's value. func (s *ConfigurationRecorder) SetRoleARN(v string) *ConfigurationRecorder { s.RoleARN = &v return s } // The current status of the configuration recorder. type ConfigurationRecorderStatus struct { _ struct{} `type:"structure"` // The error code indicating that the recording failed. LastErrorCode *string `locationName:"lastErrorCode" type:"string"` // The message indicating that the recording failed due to an error. LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` // The time the recorder was last started. LastStartTime *time.Time `locationName:"lastStartTime" type:"timestamp"` // The last (previous) status of the recorder. LastStatus *string `locationName:"lastStatus" type:"string" enum:"RecorderStatus"` // The time when the status was last changed. LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` // The time the recorder was last stopped. LastStopTime *time.Time `locationName:"lastStopTime" type:"timestamp"` // The name of the configuration recorder. Name *string `locationName:"name" type:"string"` // Specifies whether or not the recorder is currently recording. Recording *bool `locationName:"recording" type:"boolean"` } // String returns the string representation func (s ConfigurationRecorderStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConfigurationRecorderStatus) GoString() string { return s.String() } // SetLastErrorCode sets the LastErrorCode field's value. func (s *ConfigurationRecorderStatus) SetLastErrorCode(v string) *ConfigurationRecorderStatus { s.LastErrorCode = &v return s } // SetLastErrorMessage sets the LastErrorMessage field's value. func (s *ConfigurationRecorderStatus) SetLastErrorMessage(v string) *ConfigurationRecorderStatus { s.LastErrorMessage = &v return s } // SetLastStartTime sets the LastStartTime field's value. func (s *ConfigurationRecorderStatus) SetLastStartTime(v time.Time) *ConfigurationRecorderStatus { s.LastStartTime = &v return s } // SetLastStatus sets the LastStatus field's value. func (s *ConfigurationRecorderStatus) SetLastStatus(v string) *ConfigurationRecorderStatus { s.LastStatus = &v return s } // SetLastStatusChangeTime sets the LastStatusChangeTime field's value. func (s *ConfigurationRecorderStatus) SetLastStatusChangeTime(v time.Time) *ConfigurationRecorderStatus { s.LastStatusChangeTime = &v return s } // SetLastStopTime sets the LastStopTime field's value. func (s *ConfigurationRecorderStatus) SetLastStopTime(v time.Time) *ConfigurationRecorderStatus { s.LastStopTime = &v return s } // SetName sets the Name field's value. func (s *ConfigurationRecorderStatus) SetName(v string) *ConfigurationRecorderStatus { s.Name = &v return s } // SetRecording sets the Recording field's value. func (s *ConfigurationRecorderStatus) SetRecording(v bool) *ConfigurationRecorderStatus { s.Recording = &v return s } // Filters the conformance pack by compliance types and AWS Config rule names. type ConformancePackComplianceFilters struct { _ struct{} `type:"structure"` // Filters the results by compliance. // // The allowed values are COMPLIANT and NON_COMPLIANT. ComplianceType *string `type:"string" enum:"ConformancePackComplianceType"` // Filters the results by AWS Config rule names. ConfigRuleNames []*string `type:"list"` } // String returns the string representation func (s ConformancePackComplianceFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackComplianceFilters) GoString() string { return s.String() } // SetComplianceType sets the ComplianceType field's value. func (s *ConformancePackComplianceFilters) SetComplianceType(v string) *ConformancePackComplianceFilters { s.ComplianceType = &v return s } // SetConfigRuleNames sets the ConfigRuleNames field's value. func (s *ConformancePackComplianceFilters) SetConfigRuleNames(v []*string) *ConformancePackComplianceFilters { s.ConfigRuleNames = v return s } // Summary includes the name and status of the conformance pack. type ConformancePackComplianceSummary struct { _ struct{} `type:"structure"` // The status of the conformance pack. The allowed values are COMPLIANT and // NON_COMPLIANT. // // ConformancePackComplianceStatus is a required field ConformancePackComplianceStatus *string `type:"string" required:"true" enum:"ConformancePackComplianceType"` // The name of the conformance pack name. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s ConformancePackComplianceSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackComplianceSummary) GoString() string { return s.String() } // SetConformancePackComplianceStatus sets the ConformancePackComplianceStatus field's value. func (s *ConformancePackComplianceSummary) SetConformancePackComplianceStatus(v string) *ConformancePackComplianceSummary { s.ConformancePackComplianceStatus = &v return s } // SetConformancePackName sets the ConformancePackName field's value. func (s *ConformancePackComplianceSummary) SetConformancePackName(v string) *ConformancePackComplianceSummary { s.ConformancePackName = &v return s } // Returns details of a conformance pack. A conformance pack is a collection // of AWS Config rules and remediation actions that can be easily deployed in // an account and a region. type ConformancePackDetail struct { _ struct{} `type:"structure"` // Amazon Resource Name (ARN) of the conformance pack. // // ConformancePackArn is a required field ConformancePackArn *string `min:"1" type:"string" required:"true"` // ID of the conformance pack. // // ConformancePackId is a required field ConformancePackId *string `min:"1" type:"string" required:"true"` // A list of ConformancePackInputParameter objects. ConformancePackInputParameters []*ConformancePackInputParameter `type:"list"` // Name of the conformance pack. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // AWS service that created the conformance pack. CreatedBy *string `min:"1" type:"string"` // Conformance pack template that is used to create a pack. The delivery bucket // name should start with awsconfigconforms. For example: "Resource": "arn:aws:s3:::your_bucket_name/*". // // DeliveryS3Bucket is a required field DeliveryS3Bucket *string `min:"3" type:"string" required:"true"` // The prefix for the Amazon S3 bucket. DeliveryS3KeyPrefix *string `min:"1" type:"string"` // Last time when conformation pack update was requested. LastUpdateRequestedTime *time.Time `type:"timestamp"` } // String returns the string representation func (s ConformancePackDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackDetail) GoString() string { return s.String() } // SetConformancePackArn sets the ConformancePackArn field's value. func (s *ConformancePackDetail) SetConformancePackArn(v string) *ConformancePackDetail { s.ConformancePackArn = &v return s } // SetConformancePackId sets the ConformancePackId field's value. func (s *ConformancePackDetail) SetConformancePackId(v string) *ConformancePackDetail { s.ConformancePackId = &v return s } // SetConformancePackInputParameters sets the ConformancePackInputParameters field's value. func (s *ConformancePackDetail) SetConformancePackInputParameters(v []*ConformancePackInputParameter) *ConformancePackDetail { s.ConformancePackInputParameters = v return s } // SetConformancePackName sets the ConformancePackName field's value. func (s *ConformancePackDetail) SetConformancePackName(v string) *ConformancePackDetail { s.ConformancePackName = &v return s } // SetCreatedBy sets the CreatedBy field's value. func (s *ConformancePackDetail) SetCreatedBy(v string) *ConformancePackDetail { s.CreatedBy = &v return s } // SetDeliveryS3Bucket sets the DeliveryS3Bucket field's value. func (s *ConformancePackDetail) SetDeliveryS3Bucket(v string) *ConformancePackDetail { s.DeliveryS3Bucket = &v return s } // SetDeliveryS3KeyPrefix sets the DeliveryS3KeyPrefix field's value. func (s *ConformancePackDetail) SetDeliveryS3KeyPrefix(v string) *ConformancePackDetail { s.DeliveryS3KeyPrefix = &v return s } // SetLastUpdateRequestedTime sets the LastUpdateRequestedTime field's value. func (s *ConformancePackDetail) SetLastUpdateRequestedTime(v time.Time) *ConformancePackDetail { s.LastUpdateRequestedTime = &v return s } // Filters a conformance pack by AWS Config rule names, compliance types, AWS // resource types, and resource IDs. type ConformancePackEvaluationFilters struct { _ struct{} `type:"structure"` // Filters the results by compliance. // // The allowed values are COMPLIANT and NON_COMPLIANT. ComplianceType *string `type:"string" enum:"ConformancePackComplianceType"` // Filters the results by AWS Config rule names. ConfigRuleNames []*string `type:"list"` // Filters the results by resource IDs. // // This is valid only when you provide resource type. If there is no resource // type, you will see an error. ResourceIds []*string `type:"list"` // Filters the results by the resource type (for example, "AWS::EC2::Instance"). ResourceType *string `min:"1" type:"string"` } // String returns the string representation func (s ConformancePackEvaluationFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackEvaluationFilters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ConformancePackEvaluationFilters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ConformancePackEvaluationFilters"} if s.ResourceType != nil && len(*s.ResourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetComplianceType sets the ComplianceType field's value. func (s *ConformancePackEvaluationFilters) SetComplianceType(v string) *ConformancePackEvaluationFilters { s.ComplianceType = &v return s } // SetConfigRuleNames sets the ConfigRuleNames field's value. func (s *ConformancePackEvaluationFilters) SetConfigRuleNames(v []*string) *ConformancePackEvaluationFilters { s.ConfigRuleNames = v return s } // SetResourceIds sets the ResourceIds field's value. func (s *ConformancePackEvaluationFilters) SetResourceIds(v []*string) *ConformancePackEvaluationFilters { s.ResourceIds = v return s } // SetResourceType sets the ResourceType field's value. func (s *ConformancePackEvaluationFilters) SetResourceType(v string) *ConformancePackEvaluationFilters { s.ResourceType = &v return s } // The details of a conformance pack evaluation. Provides AWS Config rule and // AWS resource type that was evaluated, the compliance of the conformance pack, // related time stamps, and supplementary information. type ConformancePackEvaluationResult struct { _ struct{} `type:"structure"` // Supplementary information about how the evaluation determined the compliance. Annotation *string `type:"string"` // The compliance type. The allowed values are COMPLIANT and NON_COMPLIANT. // // ComplianceType is a required field ComplianceType *string `type:"string" required:"true" enum:"ConformancePackComplianceType"` // The time when AWS Config rule evaluated AWS resource. // // ConfigRuleInvokedTime is a required field ConfigRuleInvokedTime *time.Time `type:"timestamp" required:"true"` // Uniquely identifies an evaluation result. // // EvaluationResultIdentifier is a required field EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure" required:"true"` // The time when AWS Config recorded the evaluation result. // // ResultRecordedTime is a required field ResultRecordedTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation func (s ConformancePackEvaluationResult) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackEvaluationResult) GoString() string { return s.String() } // SetAnnotation sets the Annotation field's value. func (s *ConformancePackEvaluationResult) SetAnnotation(v string) *ConformancePackEvaluationResult { s.Annotation = &v return s } // SetComplianceType sets the ComplianceType field's value. func (s *ConformancePackEvaluationResult) SetComplianceType(v string) *ConformancePackEvaluationResult { s.ComplianceType = &v return s } // SetConfigRuleInvokedTime sets the ConfigRuleInvokedTime field's value. func (s *ConformancePackEvaluationResult) SetConfigRuleInvokedTime(v time.Time) *ConformancePackEvaluationResult { s.ConfigRuleInvokedTime = &v return s } // SetEvaluationResultIdentifier sets the EvaluationResultIdentifier field's value. func (s *ConformancePackEvaluationResult) SetEvaluationResultIdentifier(v *EvaluationResultIdentifier) *ConformancePackEvaluationResult { s.EvaluationResultIdentifier = v return s } // SetResultRecordedTime sets the ResultRecordedTime field's value. func (s *ConformancePackEvaluationResult) SetResultRecordedTime(v time.Time) *ConformancePackEvaluationResult { s.ResultRecordedTime = &v return s } // Input parameters in the form of key-value pairs for the conformance pack, // both of which you define. Keys can have a maximum character length of 128 // characters, and values can have a maximum length of 256 characters. type ConformancePackInputParameter struct { _ struct{} `type:"structure"` // One part of a key-value pair. // // ParameterName is a required field ParameterName *string `type:"string" required:"true"` // Another part of the key-value pair. // // ParameterValue is a required field ParameterValue *string `type:"string" required:"true"` } // String returns the string representation func (s ConformancePackInputParameter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackInputParameter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ConformancePackInputParameter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ConformancePackInputParameter"} if s.ParameterName == nil { invalidParams.Add(request.NewErrParamRequired("ParameterName")) } if s.ParameterValue == nil { invalidParams.Add(request.NewErrParamRequired("ParameterValue")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetParameterName sets the ParameterName field's value. func (s *ConformancePackInputParameter) SetParameterName(v string) *ConformancePackInputParameter { s.ParameterName = &v return s } // SetParameterValue sets the ParameterValue field's value. func (s *ConformancePackInputParameter) SetParameterValue(v string) *ConformancePackInputParameter { s.ParameterValue = &v return s } // Compliance information of one or more AWS Config rules within a conformance // pack. You can filter using AWS Config rule names and compliance types. type ConformancePackRuleCompliance struct { _ struct{} `type:"structure"` // Compliance of the AWS Config rule // // The allowed values are COMPLIANT and NON_COMPLIANT. ComplianceType *string `type:"string" enum:"ConformancePackComplianceType"` // Name of the config rule. ConfigRuleName *string `min:"1" type:"string"` } // String returns the string representation func (s ConformancePackRuleCompliance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackRuleCompliance) GoString() string { return s.String() } // SetComplianceType sets the ComplianceType field's value. func (s *ConformancePackRuleCompliance) SetComplianceType(v string) *ConformancePackRuleCompliance { s.ComplianceType = &v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *ConformancePackRuleCompliance) SetConfigRuleName(v string) *ConformancePackRuleCompliance { s.ConfigRuleName = &v return s } // Status details of a conformance pack. type ConformancePackStatusDetail struct { _ struct{} `type:"structure"` // Amazon Resource Name (ARN) of comformance pack. // // ConformancePackArn is a required field ConformancePackArn *string `min:"1" type:"string" required:"true"` // ID of the conformance pack. // // ConformancePackId is a required field ConformancePackId *string `min:"1" type:"string" required:"true"` // Name of the conformance pack. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // Indicates deployment status of conformance pack. // // AWS Config sets the state of the conformance pack to: // // * CREATE_IN_PROGRESS when a conformance pack creation is in progress for // an account. // // * CREATE_COMPLETE when a conformance pack has been successfully created // in your account. // // * CREATE_FAILED when a conformance pack creation failed in your account. // // * DELETE_IN_PROGRESS when a conformance pack deletion is in progress. // // * DELETE_FAILED when a conformance pack deletion failed in your account. // // ConformancePackState is a required field ConformancePackState *string `type:"string" required:"true" enum:"ConformancePackState"` // The reason of conformance pack creation failure. ConformancePackStatusReason *string `type:"string"` // Last time when conformation pack creation and update was successful. LastUpdateCompletedTime *time.Time `type:"timestamp"` // Last time when conformation pack creation and update was requested. // // LastUpdateRequestedTime is a required field LastUpdateRequestedTime *time.Time `type:"timestamp" required:"true"` // Amazon Resource Name (ARN) of AWS CloudFormation stack. // // StackArn is a required field StackArn *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s ConformancePackStatusDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackStatusDetail) GoString() string { return s.String() } // SetConformancePackArn sets the ConformancePackArn field's value. func (s *ConformancePackStatusDetail) SetConformancePackArn(v string) *ConformancePackStatusDetail { s.ConformancePackArn = &v return s } // SetConformancePackId sets the ConformancePackId field's value. func (s *ConformancePackStatusDetail) SetConformancePackId(v string) *ConformancePackStatusDetail { s.ConformancePackId = &v return s } // SetConformancePackName sets the ConformancePackName field's value. func (s *ConformancePackStatusDetail) SetConformancePackName(v string) *ConformancePackStatusDetail { s.ConformancePackName = &v return s } // SetConformancePackState sets the ConformancePackState field's value. func (s *ConformancePackStatusDetail) SetConformancePackState(v string) *ConformancePackStatusDetail { s.ConformancePackState = &v return s } // SetConformancePackStatusReason sets the ConformancePackStatusReason field's value. func (s *ConformancePackStatusDetail) SetConformancePackStatusReason(v string) *ConformancePackStatusDetail { s.ConformancePackStatusReason = &v return s } // SetLastUpdateCompletedTime sets the LastUpdateCompletedTime field's value. func (s *ConformancePackStatusDetail) SetLastUpdateCompletedTime(v time.Time) *ConformancePackStatusDetail { s.LastUpdateCompletedTime = &v return s } // SetLastUpdateRequestedTime sets the LastUpdateRequestedTime field's value. func (s *ConformancePackStatusDetail) SetLastUpdateRequestedTime(v time.Time) *ConformancePackStatusDetail { s.LastUpdateRequestedTime = &v return s } // SetStackArn sets the StackArn field's value. func (s *ConformancePackStatusDetail) SetStackArn(v string) *ConformancePackStatusDetail { s.StackArn = &v return s } // You have specified a template that is not valid or supported. type ConformancePackTemplateValidationException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s ConformancePackTemplateValidationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ConformancePackTemplateValidationException) GoString() string { return s.String() } func newErrorConformancePackTemplateValidationException(v protocol.ResponseMetadata) error { return &ConformancePackTemplateValidationException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ConformancePackTemplateValidationException) Code() string { return "ConformancePackTemplateValidationException" } // Message returns the exception's message. func (s *ConformancePackTemplateValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ConformancePackTemplateValidationException) OrigErr() error { return nil } func (s *ConformancePackTemplateValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ConformancePackTemplateValidationException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ConformancePackTemplateValidationException) RequestID() string { return s.RespMetadata.RequestID } type DeleteAggregationAuthorizationInput struct { _ struct{} `type:"structure"` // The 12-digit account ID of the account authorized to aggregate data. // // AuthorizedAccountId is a required field AuthorizedAccountId *string `type:"string" required:"true"` // The region authorized to collect aggregated data. // // AuthorizedAwsRegion is a required field AuthorizedAwsRegion *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteAggregationAuthorizationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteAggregationAuthorizationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteAggregationAuthorizationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteAggregationAuthorizationInput"} if s.AuthorizedAccountId == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizedAccountId")) } if s.AuthorizedAwsRegion == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizedAwsRegion")) } if s.AuthorizedAwsRegion != nil && len(*s.AuthorizedAwsRegion) < 1 { invalidParams.Add(request.NewErrParamMinLen("AuthorizedAwsRegion", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAuthorizedAccountId sets the AuthorizedAccountId field's value. func (s *DeleteAggregationAuthorizationInput) SetAuthorizedAccountId(v string) *DeleteAggregationAuthorizationInput { s.AuthorizedAccountId = &v return s } // SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. func (s *DeleteAggregationAuthorizationInput) SetAuthorizedAwsRegion(v string) *DeleteAggregationAuthorizationInput { s.AuthorizedAwsRegion = &v return s } type DeleteAggregationAuthorizationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteAggregationAuthorizationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteAggregationAuthorizationOutput) GoString() string { return s.String() } type DeleteConfigRuleInput struct { _ struct{} `type:"structure"` // The name of the AWS Config rule that you want to delete. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConfigRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteConfigRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteConfigRuleInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *DeleteConfigRuleInput) SetConfigRuleName(v string) *DeleteConfigRuleInput { s.ConfigRuleName = &v return s } type DeleteConfigRuleOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConfigRuleOutput) GoString() string { return s.String() } type DeleteConfigurationAggregatorInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteConfigurationAggregatorInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConfigurationAggregatorInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteConfigurationAggregatorInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationAggregatorInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *DeleteConfigurationAggregatorInput) SetConfigurationAggregatorName(v string) *DeleteConfigurationAggregatorInput { s.ConfigurationAggregatorName = &v return s } type DeleteConfigurationAggregatorOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteConfigurationAggregatorOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConfigurationAggregatorOutput) GoString() string { return s.String() } // The request object for the DeleteConfigurationRecorder action. type DeleteConfigurationRecorderInput struct { _ struct{} `type:"structure"` // The name of the configuration recorder to be deleted. You can retrieve the // name of your configuration recorder by using the DescribeConfigurationRecorders // action. // // ConfigurationRecorderName is a required field ConfigurationRecorderName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteConfigurationRecorderInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConfigurationRecorderInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteConfigurationRecorderInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationRecorderInput"} if s.ConfigurationRecorderName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorderName")) } if s.ConfigurationRecorderName != nil && len(*s.ConfigurationRecorderName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationRecorderName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationRecorderName sets the ConfigurationRecorderName field's value. func (s *DeleteConfigurationRecorderInput) SetConfigurationRecorderName(v string) *DeleteConfigurationRecorderInput { s.ConfigurationRecorderName = &v return s } type DeleteConfigurationRecorderOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteConfigurationRecorderOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConfigurationRecorderOutput) GoString() string { return s.String() } type DeleteConformancePackInput struct { _ struct{} `type:"structure"` // Name of the conformance pack you want to delete. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteConformancePackInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConformancePackInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteConformancePackInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteConformancePackInput"} if s.ConformancePackName == nil { invalidParams.Add(request.NewErrParamRequired("ConformancePackName")) } if s.ConformancePackName != nil && len(*s.ConformancePackName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConformancePackName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConformancePackName sets the ConformancePackName field's value. func (s *DeleteConformancePackInput) SetConformancePackName(v string) *DeleteConformancePackInput { s.ConformancePackName = &v return s } type DeleteConformancePackOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteConformancePackOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteConformancePackOutput) GoString() string { return s.String() } // The input for the DeleteDeliveryChannel action. The action accepts the following // data, in JSON format. type DeleteDeliveryChannelInput struct { _ struct{} `type:"structure"` // The name of the delivery channel to delete. // // DeliveryChannelName is a required field DeliveryChannelName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteDeliveryChannelInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteDeliveryChannelInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteDeliveryChannelInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryChannelInput"} if s.DeliveryChannelName == nil { invalidParams.Add(request.NewErrParamRequired("DeliveryChannelName")) } if s.DeliveryChannelName != nil && len(*s.DeliveryChannelName) < 1 { invalidParams.Add(request.NewErrParamMinLen("DeliveryChannelName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDeliveryChannelName sets the DeliveryChannelName field's value. func (s *DeleteDeliveryChannelInput) SetDeliveryChannelName(v string) *DeleteDeliveryChannelInput { s.DeliveryChannelName = &v return s } type DeleteDeliveryChannelOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteDeliveryChannelOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteDeliveryChannelOutput) GoString() string { return s.String() } type DeleteEvaluationResultsInput struct { _ struct{} `type:"structure"` // The name of the AWS Config rule for which you want to delete the evaluation // results. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteEvaluationResultsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteEvaluationResultsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteEvaluationResultsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteEvaluationResultsInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *DeleteEvaluationResultsInput) SetConfigRuleName(v string) *DeleteEvaluationResultsInput { s.ConfigRuleName = &v return s } // The output when you delete the evaluation results for the specified AWS Config // rule. type DeleteEvaluationResultsOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteEvaluationResultsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteEvaluationResultsOutput) GoString() string { return s.String() } type DeleteOrganizationConfigRuleInput struct { _ struct{} `type:"structure"` // The name of organization config rule that you want to delete. // // OrganizationConfigRuleName is a required field OrganizationConfigRuleName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteOrganizationConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteOrganizationConfigRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteOrganizationConfigRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteOrganizationConfigRuleInput"} if s.OrganizationConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationConfigRuleName")) } if s.OrganizationConfigRuleName != nil && len(*s.OrganizationConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationConfigRuleName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOrganizationConfigRuleName sets the OrganizationConfigRuleName field's value. func (s *DeleteOrganizationConfigRuleInput) SetOrganizationConfigRuleName(v string) *DeleteOrganizationConfigRuleInput { s.OrganizationConfigRuleName = &v return s } type DeleteOrganizationConfigRuleOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteOrganizationConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteOrganizationConfigRuleOutput) GoString() string { return s.String() } type DeleteOrganizationConformancePackInput struct { _ struct{} `type:"structure"` // The name of organization conformance pack that you want to delete. // // OrganizationConformancePackName is a required field OrganizationConformancePackName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteOrganizationConformancePackInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteOrganizationConformancePackInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteOrganizationConformancePackInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteOrganizationConformancePackInput"} if s.OrganizationConformancePackName == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationConformancePackName")) } if s.OrganizationConformancePackName != nil && len(*s.OrganizationConformancePackName) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationConformancePackName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOrganizationConformancePackName sets the OrganizationConformancePackName field's value. func (s *DeleteOrganizationConformancePackInput) SetOrganizationConformancePackName(v string) *DeleteOrganizationConformancePackInput { s.OrganizationConformancePackName = &v return s } type DeleteOrganizationConformancePackOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteOrganizationConformancePackOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteOrganizationConformancePackOutput) GoString() string { return s.String() } type DeletePendingAggregationRequestInput struct { _ struct{} `type:"structure"` // The 12-digit account ID of the account requesting to aggregate data. // // RequesterAccountId is a required field RequesterAccountId *string `type:"string" required:"true"` // The region requesting to aggregate data. // // RequesterAwsRegion is a required field RequesterAwsRegion *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeletePendingAggregationRequestInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeletePendingAggregationRequestInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeletePendingAggregationRequestInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeletePendingAggregationRequestInput"} if s.RequesterAccountId == nil { invalidParams.Add(request.NewErrParamRequired("RequesterAccountId")) } if s.RequesterAwsRegion == nil { invalidParams.Add(request.NewErrParamRequired("RequesterAwsRegion")) } if s.RequesterAwsRegion != nil && len(*s.RequesterAwsRegion) < 1 { invalidParams.Add(request.NewErrParamMinLen("RequesterAwsRegion", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRequesterAccountId sets the RequesterAccountId field's value. func (s *DeletePendingAggregationRequestInput) SetRequesterAccountId(v string) *DeletePendingAggregationRequestInput { s.RequesterAccountId = &v return s } // SetRequesterAwsRegion sets the RequesterAwsRegion field's value. func (s *DeletePendingAggregationRequestInput) SetRequesterAwsRegion(v string) *DeletePendingAggregationRequestInput { s.RequesterAwsRegion = &v return s } type DeletePendingAggregationRequestOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeletePendingAggregationRequestOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeletePendingAggregationRequestOutput) GoString() string { return s.String() } type DeleteRemediationConfigurationInput struct { _ struct{} `type:"structure"` // The name of the AWS Config rule for which you want to delete remediation // configuration. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // The type of a resource. ResourceType *string `type:"string"` } // String returns the string representation func (s DeleteRemediationConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRemediationConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteRemediationConfigurationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteRemediationConfigurationInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *DeleteRemediationConfigurationInput) SetConfigRuleName(v string) *DeleteRemediationConfigurationInput { s.ConfigRuleName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *DeleteRemediationConfigurationInput) SetResourceType(v string) *DeleteRemediationConfigurationInput { s.ResourceType = &v return s } type DeleteRemediationConfigurationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteRemediationConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRemediationConfigurationOutput) GoString() string { return s.String() } type DeleteRemediationExceptionsInput struct { _ struct{} `type:"structure"` // The name of the AWS Config rule for which you want to delete remediation // exception configuration. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // An exception list of resource exception keys to be processed with the current // request. AWS Config adds exception for each resource key. For example, AWS // Config adds 3 exceptions for 3 resource keys. // // ResourceKeys is a required field ResourceKeys []*RemediationExceptionResourceKey `min:"1" type:"list" required:"true"` } // String returns the string representation func (s DeleteRemediationExceptionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRemediationExceptionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteRemediationExceptionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteRemediationExceptionsInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.ResourceKeys == nil { invalidParams.Add(request.NewErrParamRequired("ResourceKeys")) } if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) } if s.ResourceKeys != nil { for i, v := range s.ResourceKeys { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *DeleteRemediationExceptionsInput) SetConfigRuleName(v string) *DeleteRemediationExceptionsInput { s.ConfigRuleName = &v return s } // SetResourceKeys sets the ResourceKeys field's value. func (s *DeleteRemediationExceptionsInput) SetResourceKeys(v []*RemediationExceptionResourceKey) *DeleteRemediationExceptionsInput { s.ResourceKeys = v return s } type DeleteRemediationExceptionsOutput struct { _ struct{} `type:"structure"` // Returns a list of failed delete remediation exceptions batch objects. Each // object in the batch consists of a list of failed items and failure messages. FailedBatches []*FailedDeleteRemediationExceptionsBatch `type:"list"` } // String returns the string representation func (s DeleteRemediationExceptionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRemediationExceptionsOutput) GoString() string { return s.String() } // SetFailedBatches sets the FailedBatches field's value. func (s *DeleteRemediationExceptionsOutput) SetFailedBatches(v []*FailedDeleteRemediationExceptionsBatch) *DeleteRemediationExceptionsOutput { s.FailedBatches = v return s } type DeleteResourceConfigInput struct { _ struct{} `type:"structure"` // Unique identifier of the resource. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // The type of the resource. // // ResourceType is a required field ResourceType *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteResourceConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteResourceConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteResourceConfigInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteResourceConfigInput"} if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.ResourceType != nil && len(*s.ResourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceId sets the ResourceId field's value. func (s *DeleteResourceConfigInput) SetResourceId(v string) *DeleteResourceConfigInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *DeleteResourceConfigInput) SetResourceType(v string) *DeleteResourceConfigInput { s.ResourceType = &v return s } type DeleteResourceConfigOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteResourceConfigOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteResourceConfigOutput) GoString() string { return s.String() } type DeleteRetentionConfigurationInput struct { _ struct{} `type:"structure"` // The name of the retention configuration to delete. // // RetentionConfigurationName is a required field RetentionConfigurationName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteRetentionConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRetentionConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteRetentionConfigurationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionConfigurationInput"} if s.RetentionConfigurationName == nil { invalidParams.Add(request.NewErrParamRequired("RetentionConfigurationName")) } if s.RetentionConfigurationName != nil && len(*s.RetentionConfigurationName) < 1 { invalidParams.Add(request.NewErrParamMinLen("RetentionConfigurationName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRetentionConfigurationName sets the RetentionConfigurationName field's value. func (s *DeleteRetentionConfigurationInput) SetRetentionConfigurationName(v string) *DeleteRetentionConfigurationInput { s.RetentionConfigurationName = &v return s } type DeleteRetentionConfigurationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteRetentionConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRetentionConfigurationOutput) GoString() string { return s.String() } // The input for the DeliverConfigSnapshot action. type DeliverConfigSnapshotInput struct { _ struct{} `type:"structure"` // The name of the delivery channel through which the snapshot is delivered. // // DeliveryChannelName is a required field DeliveryChannelName *string `locationName:"deliveryChannelName" min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeliverConfigSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeliverConfigSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeliverConfigSnapshotInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeliverConfigSnapshotInput"} if s.DeliveryChannelName == nil { invalidParams.Add(request.NewErrParamRequired("DeliveryChannelName")) } if s.DeliveryChannelName != nil && len(*s.DeliveryChannelName) < 1 { invalidParams.Add(request.NewErrParamMinLen("DeliveryChannelName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDeliveryChannelName sets the DeliveryChannelName field's value. func (s *DeliverConfigSnapshotInput) SetDeliveryChannelName(v string) *DeliverConfigSnapshotInput { s.DeliveryChannelName = &v return s } // The output for the DeliverConfigSnapshot action, in JSON format. type DeliverConfigSnapshotOutput struct { _ struct{} `type:"structure"` // The ID of the snapshot that is being created. ConfigSnapshotId *string `locationName:"configSnapshotId" type:"string"` } // String returns the string representation func (s DeliverConfigSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeliverConfigSnapshotOutput) GoString() string { return s.String() } // SetConfigSnapshotId sets the ConfigSnapshotId field's value. func (s *DeliverConfigSnapshotOutput) SetConfigSnapshotId(v string) *DeliverConfigSnapshotOutput { s.ConfigSnapshotId = &v return s } // The channel through which AWS Config delivers notifications and updated configuration // states. type DeliveryChannel struct { _ struct{} `type:"structure"` // The options for how often AWS Config delivers configuration snapshots to // the Amazon S3 bucket. ConfigSnapshotDeliveryProperties *ConfigSnapshotDeliveryProperties `locationName:"configSnapshotDeliveryProperties" type:"structure"` // The name of the delivery channel. By default, AWS Config assigns the name // "default" when creating the delivery channel. To change the delivery channel // name, you must use the DeleteDeliveryChannel action to delete your current // delivery channel, and then you must use the PutDeliveryChannel command to // create a delivery channel that has the desired name. Name *string `locationName:"name" min:"1" type:"string"` // The name of the Amazon S3 bucket to which AWS Config delivers configuration // snapshots and configuration history files. // // If you specify a bucket that belongs to another AWS account, that bucket // must have policies that grant access permissions to AWS Config. For more // information, see Permissions for the Amazon S3 Bucket (https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html) // in the AWS Config Developer Guide. S3BucketName *string `locationName:"s3BucketName" type:"string"` // The prefix for the specified Amazon S3 bucket. S3KeyPrefix *string `locationName:"s3KeyPrefix" type:"string"` // The Amazon Resource Name (ARN) of the Amazon SNS topic to which AWS Config // sends notifications about configuration changes. // // If you choose a topic from another account, the topic must have policies // that grant access permissions to AWS Config. For more information, see Permissions // for the Amazon SNS Topic (https://docs.aws.amazon.com/config/latest/developerguide/sns-topic-policy.html) // in the AWS Config Developer Guide. SnsTopicARN *string `locationName:"snsTopicARN" type:"string"` } // String returns the string representation func (s DeliveryChannel) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeliveryChannel) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeliveryChannel) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeliveryChannel"} if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigSnapshotDeliveryProperties sets the ConfigSnapshotDeliveryProperties field's value. func (s *DeliveryChannel) SetConfigSnapshotDeliveryProperties(v *ConfigSnapshotDeliveryProperties) *DeliveryChannel { s.ConfigSnapshotDeliveryProperties = v return s } // SetName sets the Name field's value. func (s *DeliveryChannel) SetName(v string) *DeliveryChannel { s.Name = &v return s } // SetS3BucketName sets the S3BucketName field's value. func (s *DeliveryChannel) SetS3BucketName(v string) *DeliveryChannel { s.S3BucketName = &v return s } // SetS3KeyPrefix sets the S3KeyPrefix field's value. func (s *DeliveryChannel) SetS3KeyPrefix(v string) *DeliveryChannel { s.S3KeyPrefix = &v return s } // SetSnsTopicARN sets the SnsTopicARN field's value. func (s *DeliveryChannel) SetSnsTopicARN(v string) *DeliveryChannel { s.SnsTopicARN = &v return s } // The status of a specified delivery channel. // // Valid values: Success | Failure type DeliveryChannelStatus struct { _ struct{} `type:"structure"` // A list that contains the status of the delivery of the configuration history // to the specified Amazon S3 bucket. ConfigHistoryDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configHistoryDeliveryInfo" type:"structure"` // A list containing the status of the delivery of the snapshot to the specified // Amazon S3 bucket. ConfigSnapshotDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configSnapshotDeliveryInfo" type:"structure"` // A list containing the status of the delivery of the configuration stream // notification to the specified Amazon SNS topic. ConfigStreamDeliveryInfo *ConfigStreamDeliveryInfo `locationName:"configStreamDeliveryInfo" type:"structure"` // The name of the delivery channel. Name *string `locationName:"name" type:"string"` } // String returns the string representation func (s DeliveryChannelStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeliveryChannelStatus) GoString() string { return s.String() } // SetConfigHistoryDeliveryInfo sets the ConfigHistoryDeliveryInfo field's value. func (s *DeliveryChannelStatus) SetConfigHistoryDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { s.ConfigHistoryDeliveryInfo = v return s } // SetConfigSnapshotDeliveryInfo sets the ConfigSnapshotDeliveryInfo field's value. func (s *DeliveryChannelStatus) SetConfigSnapshotDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { s.ConfigSnapshotDeliveryInfo = v return s } // SetConfigStreamDeliveryInfo sets the ConfigStreamDeliveryInfo field's value. func (s *DeliveryChannelStatus) SetConfigStreamDeliveryInfo(v *ConfigStreamDeliveryInfo) *DeliveryChannelStatus { s.ConfigStreamDeliveryInfo = v return s } // SetName sets the Name field's value. func (s *DeliveryChannelStatus) SetName(v string) *DeliveryChannelStatus { s.Name = &v return s } type DescribeAggregateComplianceByConfigRulesInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // Filters the results by ConfigRuleComplianceFilters object. Filters *ConfigRuleComplianceFilters `type:"structure"` // The maximum number of evaluation results returned on each page. The default // is maximum. If you specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeAggregateComplianceByConfigRulesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeAggregateComplianceByConfigRulesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeAggregateComplianceByConfigRulesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeAggregateComplianceByConfigRulesInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.Filters != nil { if err := s.Filters.Validate(); err != nil { invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *DescribeAggregateComplianceByConfigRulesInput) SetConfigurationAggregatorName(v string) *DescribeAggregateComplianceByConfigRulesInput { s.ConfigurationAggregatorName = &v return s } // SetFilters sets the Filters field's value. func (s *DescribeAggregateComplianceByConfigRulesInput) SetFilters(v *ConfigRuleComplianceFilters) *DescribeAggregateComplianceByConfigRulesInput { s.Filters = v return s } // SetLimit sets the Limit field's value. func (s *DescribeAggregateComplianceByConfigRulesInput) SetLimit(v int64) *DescribeAggregateComplianceByConfigRulesInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAggregateComplianceByConfigRulesInput) SetNextToken(v string) *DescribeAggregateComplianceByConfigRulesInput { s.NextToken = &v return s } type DescribeAggregateComplianceByConfigRulesOutput struct { _ struct{} `type:"structure"` // Returns a list of AggregateComplianceByConfigRule object. AggregateComplianceByConfigRules []*AggregateComplianceByConfigRule `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeAggregateComplianceByConfigRulesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeAggregateComplianceByConfigRulesOutput) GoString() string { return s.String() } // SetAggregateComplianceByConfigRules sets the AggregateComplianceByConfigRules field's value. func (s *DescribeAggregateComplianceByConfigRulesOutput) SetAggregateComplianceByConfigRules(v []*AggregateComplianceByConfigRule) *DescribeAggregateComplianceByConfigRulesOutput { s.AggregateComplianceByConfigRules = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAggregateComplianceByConfigRulesOutput) SetNextToken(v string) *DescribeAggregateComplianceByConfigRulesOutput { s.NextToken = &v return s } type DescribeAggregationAuthorizationsInput struct { _ struct{} `type:"structure"` // The maximum number of AggregationAuthorizations returned on each page. The // default is maximum. If you specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeAggregationAuthorizationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeAggregationAuthorizationsInput) GoString() string { return s.String() } // SetLimit sets the Limit field's value. func (s *DescribeAggregationAuthorizationsInput) SetLimit(v int64) *DescribeAggregationAuthorizationsInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAggregationAuthorizationsInput) SetNextToken(v string) *DescribeAggregationAuthorizationsInput { s.NextToken = &v return s } type DescribeAggregationAuthorizationsOutput struct { _ struct{} `type:"structure"` // Returns a list of authorizations granted to various aggregator accounts and // regions. AggregationAuthorizations []*AggregationAuthorization `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeAggregationAuthorizationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeAggregationAuthorizationsOutput) GoString() string { return s.String() } // SetAggregationAuthorizations sets the AggregationAuthorizations field's value. func (s *DescribeAggregationAuthorizationsOutput) SetAggregationAuthorizations(v []*AggregationAuthorization) *DescribeAggregationAuthorizationsOutput { s.AggregationAuthorizations = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAggregationAuthorizationsOutput) SetNextToken(v string) *DescribeAggregationAuthorizationsOutput { s.NextToken = &v return s } type DescribeComplianceByConfigRuleInput struct { _ struct{} `type:"structure"` // Filters the results by compliance. // // The allowed values are COMPLIANT and NON_COMPLIANT. ComplianceTypes []*string `type:"list"` // Specify one or more AWS Config rule names to filter the results by rule. ConfigRuleNames []*string `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeComplianceByConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeComplianceByConfigRuleInput) GoString() string { return s.String() } // SetComplianceTypes sets the ComplianceTypes field's value. func (s *DescribeComplianceByConfigRuleInput) SetComplianceTypes(v []*string) *DescribeComplianceByConfigRuleInput { s.ComplianceTypes = v return s } // SetConfigRuleNames sets the ConfigRuleNames field's value. func (s *DescribeComplianceByConfigRuleInput) SetConfigRuleNames(v []*string) *DescribeComplianceByConfigRuleInput { s.ConfigRuleNames = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeComplianceByConfigRuleInput) SetNextToken(v string) *DescribeComplianceByConfigRuleInput { s.NextToken = &v return s } type DescribeComplianceByConfigRuleOutput struct { _ struct{} `type:"structure"` // Indicates whether each of the specified AWS Config rules is compliant. ComplianceByConfigRules []*ComplianceByConfigRule `type:"list"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeComplianceByConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeComplianceByConfigRuleOutput) GoString() string { return s.String() } // SetComplianceByConfigRules sets the ComplianceByConfigRules field's value. func (s *DescribeComplianceByConfigRuleOutput) SetComplianceByConfigRules(v []*ComplianceByConfigRule) *DescribeComplianceByConfigRuleOutput { s.ComplianceByConfigRules = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeComplianceByConfigRuleOutput) SetNextToken(v string) *DescribeComplianceByConfigRuleOutput { s.NextToken = &v return s } type DescribeComplianceByResourceInput struct { _ struct{} `type:"structure"` // Filters the results by compliance. // // The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA. ComplianceTypes []*string `type:"list"` // The maximum number of evaluation results returned on each page. The default // is 10. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The ID of the AWS resource for which you want compliance information. You // can specify only one resource ID. If you specify a resource ID, you must // also specify a type for ResourceType. ResourceId *string `min:"1" type:"string"` // The types of AWS resources for which you want compliance information (for // example, AWS::EC2::Instance). For this action, you can specify that the resource // type is an AWS account by specifying AWS::::Account. ResourceType *string `min:"1" type:"string"` } // String returns the string representation func (s DescribeComplianceByResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeComplianceByResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeComplianceByResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeComplianceByResourceInput"} if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType != nil && len(*s.ResourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetComplianceTypes sets the ComplianceTypes field's value. func (s *DescribeComplianceByResourceInput) SetComplianceTypes(v []*string) *DescribeComplianceByResourceInput { s.ComplianceTypes = v return s } // SetLimit sets the Limit field's value. func (s *DescribeComplianceByResourceInput) SetLimit(v int64) *DescribeComplianceByResourceInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeComplianceByResourceInput) SetNextToken(v string) *DescribeComplianceByResourceInput { s.NextToken = &v return s } // SetResourceId sets the ResourceId field's value. func (s *DescribeComplianceByResourceInput) SetResourceId(v string) *DescribeComplianceByResourceInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *DescribeComplianceByResourceInput) SetResourceType(v string) *DescribeComplianceByResourceInput { s.ResourceType = &v return s } type DescribeComplianceByResourceOutput struct { _ struct{} `type:"structure"` // Indicates whether the specified AWS resource complies with all of the AWS // Config rules that evaluate it. ComplianceByResources []*ComplianceByResource `type:"list"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeComplianceByResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeComplianceByResourceOutput) GoString() string { return s.String() } // SetComplianceByResources sets the ComplianceByResources field's value. func (s *DescribeComplianceByResourceOutput) SetComplianceByResources(v []*ComplianceByResource) *DescribeComplianceByResourceOutput { s.ComplianceByResources = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeComplianceByResourceOutput) SetNextToken(v string) *DescribeComplianceByResourceOutput { s.NextToken = &v return s } type DescribeConfigRuleEvaluationStatusInput struct { _ struct{} `type:"structure"` // The name of the AWS managed Config rules for which you want status information. // If you do not specify any names, AWS Config returns status information for // all AWS managed Config rules that you use. ConfigRuleNames []*string `type:"list"` // The number of rule evaluation results that you want returned. // // This parameter is required if the rule limit for your account is more than // the default of 150 rules. // // For information about requesting a rule limit increase, see AWS Config Limits // (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) // in the AWS General Reference Guide. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConfigRuleEvaluationStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigRuleEvaluationStatusInput) GoString() string { return s.String() } // SetConfigRuleNames sets the ConfigRuleNames field's value. func (s *DescribeConfigRuleEvaluationStatusInput) SetConfigRuleNames(v []*string) *DescribeConfigRuleEvaluationStatusInput { s.ConfigRuleNames = v return s } // SetLimit sets the Limit field's value. func (s *DescribeConfigRuleEvaluationStatusInput) SetLimit(v int64) *DescribeConfigRuleEvaluationStatusInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigRuleEvaluationStatusInput) SetNextToken(v string) *DescribeConfigRuleEvaluationStatusInput { s.NextToken = &v return s } type DescribeConfigRuleEvaluationStatusOutput struct { _ struct{} `type:"structure"` // Status information about your AWS managed Config rules. ConfigRulesEvaluationStatus []*ConfigRuleEvaluationStatus `type:"list"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConfigRuleEvaluationStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigRuleEvaluationStatusOutput) GoString() string { return s.String() } // SetConfigRulesEvaluationStatus sets the ConfigRulesEvaluationStatus field's value. func (s *DescribeConfigRuleEvaluationStatusOutput) SetConfigRulesEvaluationStatus(v []*ConfigRuleEvaluationStatus) *DescribeConfigRuleEvaluationStatusOutput { s.ConfigRulesEvaluationStatus = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigRuleEvaluationStatusOutput) SetNextToken(v string) *DescribeConfigRuleEvaluationStatusOutput { s.NextToken = &v return s } type DescribeConfigRulesInput struct { _ struct{} `type:"structure"` // The names of the AWS Config rules for which you want details. If you do not // specify any names, AWS Config returns details for all your rules. ConfigRuleNames []*string `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConfigRulesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigRulesInput) GoString() string { return s.String() } // SetConfigRuleNames sets the ConfigRuleNames field's value. func (s *DescribeConfigRulesInput) SetConfigRuleNames(v []*string) *DescribeConfigRulesInput { s.ConfigRuleNames = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigRulesInput) SetNextToken(v string) *DescribeConfigRulesInput { s.NextToken = &v return s } type DescribeConfigRulesOutput struct { _ struct{} `type:"structure"` // The details about your AWS Config rules. ConfigRules []*ConfigRule `type:"list"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConfigRulesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigRulesOutput) GoString() string { return s.String() } // SetConfigRules sets the ConfigRules field's value. func (s *DescribeConfigRulesOutput) SetConfigRules(v []*ConfigRule) *DescribeConfigRulesOutput { s.ConfigRules = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigRulesOutput) SetNextToken(v string) *DescribeConfigRulesOutput { s.NextToken = &v return s } type DescribeConfigurationAggregatorSourcesStatusInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // The maximum number of AggregatorSourceStatus returned on each page. The default // is maximum. If you specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // Filters the status type. // // * Valid value FAILED indicates errors while moving data. // // * Valid value SUCCEEDED indicates the data was successfully moved. // // * Valid value OUTDATED indicates the data is not the most recent. UpdateStatus []*string `min:"1" type:"list"` } // String returns the string representation func (s DescribeConfigurationAggregatorSourcesStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationAggregatorSourcesStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeConfigurationAggregatorSourcesStatusInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationAggregatorSourcesStatusInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.UpdateStatus != nil && len(s.UpdateStatus) < 1 { invalidParams.Add(request.NewErrParamMinLen("UpdateStatus", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetConfigurationAggregatorName(v string) *DescribeConfigurationAggregatorSourcesStatusInput { s.ConfigurationAggregatorName = &v return s } // SetLimit sets the Limit field's value. func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetLimit(v int64) *DescribeConfigurationAggregatorSourcesStatusInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetNextToken(v string) *DescribeConfigurationAggregatorSourcesStatusInput { s.NextToken = &v return s } // SetUpdateStatus sets the UpdateStatus field's value. func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetUpdateStatus(v []*string) *DescribeConfigurationAggregatorSourcesStatusInput { s.UpdateStatus = v return s } type DescribeConfigurationAggregatorSourcesStatusOutput struct { _ struct{} `type:"structure"` // Returns an AggregatedSourceStatus object. AggregatedSourceStatusList []*AggregatedSourceStatus `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConfigurationAggregatorSourcesStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationAggregatorSourcesStatusOutput) GoString() string { return s.String() } // SetAggregatedSourceStatusList sets the AggregatedSourceStatusList field's value. func (s *DescribeConfigurationAggregatorSourcesStatusOutput) SetAggregatedSourceStatusList(v []*AggregatedSourceStatus) *DescribeConfigurationAggregatorSourcesStatusOutput { s.AggregatedSourceStatusList = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigurationAggregatorSourcesStatusOutput) SetNextToken(v string) *DescribeConfigurationAggregatorSourcesStatusOutput { s.NextToken = &v return s } type DescribeConfigurationAggregatorsInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregators. ConfigurationAggregatorNames []*string `type:"list"` // The maximum number of configuration aggregators returned on each page. The // default is maximum. If you specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConfigurationAggregatorsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationAggregatorsInput) GoString() string { return s.String() } // SetConfigurationAggregatorNames sets the ConfigurationAggregatorNames field's value. func (s *DescribeConfigurationAggregatorsInput) SetConfigurationAggregatorNames(v []*string) *DescribeConfigurationAggregatorsInput { s.ConfigurationAggregatorNames = v return s } // SetLimit sets the Limit field's value. func (s *DescribeConfigurationAggregatorsInput) SetLimit(v int64) *DescribeConfigurationAggregatorsInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigurationAggregatorsInput) SetNextToken(v string) *DescribeConfigurationAggregatorsInput { s.NextToken = &v return s } type DescribeConfigurationAggregatorsOutput struct { _ struct{} `type:"structure"` // Returns a ConfigurationAggregators object. ConfigurationAggregators []*ConfigurationAggregator `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConfigurationAggregatorsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationAggregatorsOutput) GoString() string { return s.String() } // SetConfigurationAggregators sets the ConfigurationAggregators field's value. func (s *DescribeConfigurationAggregatorsOutput) SetConfigurationAggregators(v []*ConfigurationAggregator) *DescribeConfigurationAggregatorsOutput { s.ConfigurationAggregators = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConfigurationAggregatorsOutput) SetNextToken(v string) *DescribeConfigurationAggregatorsOutput { s.NextToken = &v return s } // The input for the DescribeConfigurationRecorderStatus action. type DescribeConfigurationRecorderStatusInput struct { _ struct{} `type:"structure"` // The name(s) of the configuration recorder. If the name is not specified, // the action returns the current status of all the configuration recorders // associated with the account. ConfigurationRecorderNames []*string `type:"list"` } // String returns the string representation func (s DescribeConfigurationRecorderStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationRecorderStatusInput) GoString() string { return s.String() } // SetConfigurationRecorderNames sets the ConfigurationRecorderNames field's value. func (s *DescribeConfigurationRecorderStatusInput) SetConfigurationRecorderNames(v []*string) *DescribeConfigurationRecorderStatusInput { s.ConfigurationRecorderNames = v return s } // The output for the DescribeConfigurationRecorderStatus action, in JSON format. type DescribeConfigurationRecorderStatusOutput struct { _ struct{} `type:"structure"` // A list that contains status of the specified recorders. ConfigurationRecordersStatus []*ConfigurationRecorderStatus `type:"list"` } // String returns the string representation func (s DescribeConfigurationRecorderStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationRecorderStatusOutput) GoString() string { return s.String() } // SetConfigurationRecordersStatus sets the ConfigurationRecordersStatus field's value. func (s *DescribeConfigurationRecorderStatusOutput) SetConfigurationRecordersStatus(v []*ConfigurationRecorderStatus) *DescribeConfigurationRecorderStatusOutput { s.ConfigurationRecordersStatus = v return s } // The input for the DescribeConfigurationRecorders action. type DescribeConfigurationRecordersInput struct { _ struct{} `type:"structure"` // A list of configuration recorder names. ConfigurationRecorderNames []*string `type:"list"` } // String returns the string representation func (s DescribeConfigurationRecordersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationRecordersInput) GoString() string { return s.String() } // SetConfigurationRecorderNames sets the ConfigurationRecorderNames field's value. func (s *DescribeConfigurationRecordersInput) SetConfigurationRecorderNames(v []*string) *DescribeConfigurationRecordersInput { s.ConfigurationRecorderNames = v return s } // The output for the DescribeConfigurationRecorders action. type DescribeConfigurationRecordersOutput struct { _ struct{} `type:"structure"` // A list that contains the descriptions of the specified configuration recorders. ConfigurationRecorders []*ConfigurationRecorder `type:"list"` } // String returns the string representation func (s DescribeConfigurationRecordersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConfigurationRecordersOutput) GoString() string { return s.String() } // SetConfigurationRecorders sets the ConfigurationRecorders field's value. func (s *DescribeConfigurationRecordersOutput) SetConfigurationRecorders(v []*ConfigurationRecorder) *DescribeConfigurationRecordersOutput { s.ConfigurationRecorders = v return s } type DescribeConformancePackComplianceInput struct { _ struct{} `type:"structure"` // Name of the conformance pack. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // A ConformancePackComplianceFilters object. Filters *ConformancePackComplianceFilters `type:"structure"` // The maximum number of AWS Config rules within a conformance pack are returned // on each page. Limit *int64 `type:"integer"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConformancePackComplianceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConformancePackComplianceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeConformancePackComplianceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeConformancePackComplianceInput"} if s.ConformancePackName == nil { invalidParams.Add(request.NewErrParamRequired("ConformancePackName")) } if s.ConformancePackName != nil && len(*s.ConformancePackName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConformancePackName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConformancePackName sets the ConformancePackName field's value. func (s *DescribeConformancePackComplianceInput) SetConformancePackName(v string) *DescribeConformancePackComplianceInput { s.ConformancePackName = &v return s } // SetFilters sets the Filters field's value. func (s *DescribeConformancePackComplianceInput) SetFilters(v *ConformancePackComplianceFilters) *DescribeConformancePackComplianceInput { s.Filters = v return s } // SetLimit sets the Limit field's value. func (s *DescribeConformancePackComplianceInput) SetLimit(v int64) *DescribeConformancePackComplianceInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConformancePackComplianceInput) SetNextToken(v string) *DescribeConformancePackComplianceInput { s.NextToken = &v return s } type DescribeConformancePackComplianceOutput struct { _ struct{} `type:"structure"` // Name of the conformance pack. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // Returns a list of ConformancePackRuleCompliance objects. // // ConformancePackRuleComplianceList is a required field ConformancePackRuleComplianceList []*ConformancePackRuleCompliance `type:"list" required:"true"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConformancePackComplianceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConformancePackComplianceOutput) GoString() string { return s.String() } // SetConformancePackName sets the ConformancePackName field's value. func (s *DescribeConformancePackComplianceOutput) SetConformancePackName(v string) *DescribeConformancePackComplianceOutput { s.ConformancePackName = &v return s } // SetConformancePackRuleComplianceList sets the ConformancePackRuleComplianceList field's value. func (s *DescribeConformancePackComplianceOutput) SetConformancePackRuleComplianceList(v []*ConformancePackRuleCompliance) *DescribeConformancePackComplianceOutput { s.ConformancePackRuleComplianceList = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConformancePackComplianceOutput) SetNextToken(v string) *DescribeConformancePackComplianceOutput { s.NextToken = &v return s } type DescribeConformancePackStatusInput struct { _ struct{} `type:"structure"` // Comma-separated list of conformance pack names. ConformancePackNames []*string `type:"list"` // The maximum number of conformance packs status returned on each page. Limit *int64 `type:"integer"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConformancePackStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConformancePackStatusInput) GoString() string { return s.String() } // SetConformancePackNames sets the ConformancePackNames field's value. func (s *DescribeConformancePackStatusInput) SetConformancePackNames(v []*string) *DescribeConformancePackStatusInput { s.ConformancePackNames = v return s } // SetLimit sets the Limit field's value. func (s *DescribeConformancePackStatusInput) SetLimit(v int64) *DescribeConformancePackStatusInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConformancePackStatusInput) SetNextToken(v string) *DescribeConformancePackStatusInput { s.NextToken = &v return s } type DescribeConformancePackStatusOutput struct { _ struct{} `type:"structure"` // A list of ConformancePackStatusDetail objects. ConformancePackStatusDetails []*ConformancePackStatusDetail `type:"list"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConformancePackStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConformancePackStatusOutput) GoString() string { return s.String() } // SetConformancePackStatusDetails sets the ConformancePackStatusDetails field's value. func (s *DescribeConformancePackStatusOutput) SetConformancePackStatusDetails(v []*ConformancePackStatusDetail) *DescribeConformancePackStatusOutput { s.ConformancePackStatusDetails = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConformancePackStatusOutput) SetNextToken(v string) *DescribeConformancePackStatusOutput { s.NextToken = &v return s } type DescribeConformancePacksInput struct { _ struct{} `type:"structure"` // Comma-separated list of conformance pack names for which you want details. // If you do not specify any names, AWS Config returns details for all your // conformance packs. ConformancePackNames []*string `type:"list"` // The maximum number of conformance packs returned on each page. Limit *int64 `type:"integer"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConformancePacksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConformancePacksInput) GoString() string { return s.String() } // SetConformancePackNames sets the ConformancePackNames field's value. func (s *DescribeConformancePacksInput) SetConformancePackNames(v []*string) *DescribeConformancePacksInput { s.ConformancePackNames = v return s } // SetLimit sets the Limit field's value. func (s *DescribeConformancePacksInput) SetLimit(v int64) *DescribeConformancePacksInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConformancePacksInput) SetNextToken(v string) *DescribeConformancePacksInput { s.NextToken = &v return s } type DescribeConformancePacksOutput struct { _ struct{} `type:"structure"` // Returns a list of ConformancePackDetail objects. ConformancePackDetails []*ConformancePackDetail `type:"list"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribeConformancePacksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeConformancePacksOutput) GoString() string { return s.String() } // SetConformancePackDetails sets the ConformancePackDetails field's value. func (s *DescribeConformancePacksOutput) SetConformancePackDetails(v []*ConformancePackDetail) *DescribeConformancePacksOutput { s.ConformancePackDetails = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeConformancePacksOutput) SetNextToken(v string) *DescribeConformancePacksOutput { s.NextToken = &v return s } // The input for the DeliveryChannelStatus action. type DescribeDeliveryChannelStatusInput struct { _ struct{} `type:"structure"` // A list of delivery channel names. DeliveryChannelNames []*string `type:"list"` } // String returns the string representation func (s DescribeDeliveryChannelStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeDeliveryChannelStatusInput) GoString() string { return s.String() } // SetDeliveryChannelNames sets the DeliveryChannelNames field's value. func (s *DescribeDeliveryChannelStatusInput) SetDeliveryChannelNames(v []*string) *DescribeDeliveryChannelStatusInput { s.DeliveryChannelNames = v return s } // The output for the DescribeDeliveryChannelStatus action. type DescribeDeliveryChannelStatusOutput struct { _ struct{} `type:"structure"` // A list that contains the status of a specified delivery channel. DeliveryChannelsStatus []*DeliveryChannelStatus `type:"list"` } // String returns the string representation func (s DescribeDeliveryChannelStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeDeliveryChannelStatusOutput) GoString() string { return s.String() } // SetDeliveryChannelsStatus sets the DeliveryChannelsStatus field's value. func (s *DescribeDeliveryChannelStatusOutput) SetDeliveryChannelsStatus(v []*DeliveryChannelStatus) *DescribeDeliveryChannelStatusOutput { s.DeliveryChannelsStatus = v return s } // The input for the DescribeDeliveryChannels action. type DescribeDeliveryChannelsInput struct { _ struct{} `type:"structure"` // A list of delivery channel names. DeliveryChannelNames []*string `type:"list"` } // String returns the string representation func (s DescribeDeliveryChannelsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeDeliveryChannelsInput) GoString() string { return s.String() } // SetDeliveryChannelNames sets the DeliveryChannelNames field's value. func (s *DescribeDeliveryChannelsInput) SetDeliveryChannelNames(v []*string) *DescribeDeliveryChannelsInput { s.DeliveryChannelNames = v return s } // The output for the DescribeDeliveryChannels action. type DescribeDeliveryChannelsOutput struct { _ struct{} `type:"structure"` // A list that contains the descriptions of the specified delivery channel. DeliveryChannels []*DeliveryChannel `type:"list"` } // String returns the string representation func (s DescribeDeliveryChannelsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeDeliveryChannelsOutput) GoString() string { return s.String() } // SetDeliveryChannels sets the DeliveryChannels field's value. func (s *DescribeDeliveryChannelsOutput) SetDeliveryChannels(v []*DeliveryChannel) *DescribeDeliveryChannelsOutput { s.DeliveryChannels = v return s } type DescribeOrganizationConfigRuleStatusesInput struct { _ struct{} `type:"structure"` // The maximum number of OrganizationConfigRuleStatuses returned on each page. // If you do no specify a number, AWS Config uses the default. The default is // 100. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The names of organization config rules for which you want status details. // If you do not specify any names, AWS Config returns details for all your // organization AWS Confg rules. OrganizationConfigRuleNames []*string `type:"list"` } // String returns the string representation func (s DescribeOrganizationConfigRuleStatusesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConfigRuleStatusesInput) GoString() string { return s.String() } // SetLimit sets the Limit field's value. func (s *DescribeOrganizationConfigRuleStatusesInput) SetLimit(v int64) *DescribeOrganizationConfigRuleStatusesInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConfigRuleStatusesInput) SetNextToken(v string) *DescribeOrganizationConfigRuleStatusesInput { s.NextToken = &v return s } // SetOrganizationConfigRuleNames sets the OrganizationConfigRuleNames field's value. func (s *DescribeOrganizationConfigRuleStatusesInput) SetOrganizationConfigRuleNames(v []*string) *DescribeOrganizationConfigRuleStatusesInput { s.OrganizationConfigRuleNames = v return s } type DescribeOrganizationConfigRuleStatusesOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // A list of OrganizationConfigRuleStatus objects. OrganizationConfigRuleStatuses []*OrganizationConfigRuleStatus `type:"list"` } // String returns the string representation func (s DescribeOrganizationConfigRuleStatusesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConfigRuleStatusesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConfigRuleStatusesOutput) SetNextToken(v string) *DescribeOrganizationConfigRuleStatusesOutput { s.NextToken = &v return s } // SetOrganizationConfigRuleStatuses sets the OrganizationConfigRuleStatuses field's value. func (s *DescribeOrganizationConfigRuleStatusesOutput) SetOrganizationConfigRuleStatuses(v []*OrganizationConfigRuleStatus) *DescribeOrganizationConfigRuleStatusesOutput { s.OrganizationConfigRuleStatuses = v return s } type DescribeOrganizationConfigRulesInput struct { _ struct{} `type:"structure"` // The maximum number of organization config rules returned on each page. If // you do no specify a number, AWS Config uses the default. The default is 100. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The names of organization config rules for which you want details. If you // do not specify any names, AWS Config returns details for all your organization // config rules. OrganizationConfigRuleNames []*string `type:"list"` } // String returns the string representation func (s DescribeOrganizationConfigRulesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConfigRulesInput) GoString() string { return s.String() } // SetLimit sets the Limit field's value. func (s *DescribeOrganizationConfigRulesInput) SetLimit(v int64) *DescribeOrganizationConfigRulesInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConfigRulesInput) SetNextToken(v string) *DescribeOrganizationConfigRulesInput { s.NextToken = &v return s } // SetOrganizationConfigRuleNames sets the OrganizationConfigRuleNames field's value. func (s *DescribeOrganizationConfigRulesInput) SetOrganizationConfigRuleNames(v []*string) *DescribeOrganizationConfigRulesInput { s.OrganizationConfigRuleNames = v return s } type DescribeOrganizationConfigRulesOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // Returns a list of OrganizationConfigRule objects. OrganizationConfigRules []*OrganizationConfigRule `type:"list"` } // String returns the string representation func (s DescribeOrganizationConfigRulesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConfigRulesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConfigRulesOutput) SetNextToken(v string) *DescribeOrganizationConfigRulesOutput { s.NextToken = &v return s } // SetOrganizationConfigRules sets the OrganizationConfigRules field's value. func (s *DescribeOrganizationConfigRulesOutput) SetOrganizationConfigRules(v []*OrganizationConfigRule) *DescribeOrganizationConfigRulesOutput { s.OrganizationConfigRules = v return s } type DescribeOrganizationConformancePackStatusesInput struct { _ struct{} `type:"structure"` // The maximum number of OrganizationConformancePackStatuses returned on each // page. If you do no specify a number, AWS Config uses the default. The default // is 100. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The names of organization conformance packs for which you want status details. // If you do not specify any names, AWS Config returns details for all your // organization conformance packs. OrganizationConformancePackNames []*string `type:"list"` } // String returns the string representation func (s DescribeOrganizationConformancePackStatusesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConformancePackStatusesInput) GoString() string { return s.String() } // SetLimit sets the Limit field's value. func (s *DescribeOrganizationConformancePackStatusesInput) SetLimit(v int64) *DescribeOrganizationConformancePackStatusesInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConformancePackStatusesInput) SetNextToken(v string) *DescribeOrganizationConformancePackStatusesInput { s.NextToken = &v return s } // SetOrganizationConformancePackNames sets the OrganizationConformancePackNames field's value. func (s *DescribeOrganizationConformancePackStatusesInput) SetOrganizationConformancePackNames(v []*string) *DescribeOrganizationConformancePackStatusesInput { s.OrganizationConformancePackNames = v return s } type DescribeOrganizationConformancePackStatusesOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // A list of OrganizationConformancePackStatus objects. OrganizationConformancePackStatuses []*OrganizationConformancePackStatus `type:"list"` } // String returns the string representation func (s DescribeOrganizationConformancePackStatusesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConformancePackStatusesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConformancePackStatusesOutput) SetNextToken(v string) *DescribeOrganizationConformancePackStatusesOutput { s.NextToken = &v return s } // SetOrganizationConformancePackStatuses sets the OrganizationConformancePackStatuses field's value. func (s *DescribeOrganizationConformancePackStatusesOutput) SetOrganizationConformancePackStatuses(v []*OrganizationConformancePackStatus) *DescribeOrganizationConformancePackStatusesOutput { s.OrganizationConformancePackStatuses = v return s } type DescribeOrganizationConformancePacksInput struct { _ struct{} `type:"structure"` // The maximum number of organization config packs returned on each page. If // you do no specify a number, AWS Config uses the default. The default is 100. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The name that you assign to an organization conformance pack. OrganizationConformancePackNames []*string `type:"list"` } // String returns the string representation func (s DescribeOrganizationConformancePacksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConformancePacksInput) GoString() string { return s.String() } // SetLimit sets the Limit field's value. func (s *DescribeOrganizationConformancePacksInput) SetLimit(v int64) *DescribeOrganizationConformancePacksInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConformancePacksInput) SetNextToken(v string) *DescribeOrganizationConformancePacksInput { s.NextToken = &v return s } // SetOrganizationConformancePackNames sets the OrganizationConformancePackNames field's value. func (s *DescribeOrganizationConformancePacksInput) SetOrganizationConformancePackNames(v []*string) *DescribeOrganizationConformancePacksInput { s.OrganizationConformancePackNames = v return s } type DescribeOrganizationConformancePacksOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // Returns a list of OrganizationConformancePacks objects. OrganizationConformancePacks []*OrganizationConformancePack `type:"list"` } // String returns the string representation func (s DescribeOrganizationConformancePacksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeOrganizationConformancePacksOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeOrganizationConformancePacksOutput) SetNextToken(v string) *DescribeOrganizationConformancePacksOutput { s.NextToken = &v return s } // SetOrganizationConformancePacks sets the OrganizationConformancePacks field's value. func (s *DescribeOrganizationConformancePacksOutput) SetOrganizationConformancePacks(v []*OrganizationConformancePack) *DescribeOrganizationConformancePacksOutput { s.OrganizationConformancePacks = v return s } type DescribePendingAggregationRequestsInput struct { _ struct{} `type:"structure"` // The maximum number of evaluation results returned on each page. The default // is maximum. If you specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s DescribePendingAggregationRequestsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribePendingAggregationRequestsInput) GoString() string { return s.String() } // SetLimit sets the Limit field's value. func (s *DescribePendingAggregationRequestsInput) SetLimit(v int64) *DescribePendingAggregationRequestsInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribePendingAggregationRequestsInput) SetNextToken(v string) *DescribePendingAggregationRequestsInput { s.NextToken = &v return s } type DescribePendingAggregationRequestsOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // Returns a PendingAggregationRequests object. PendingAggregationRequests []*PendingAggregationRequest `type:"list"` } // String returns the string representation func (s DescribePendingAggregationRequestsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribePendingAggregationRequestsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribePendingAggregationRequestsOutput) SetNextToken(v string) *DescribePendingAggregationRequestsOutput { s.NextToken = &v return s } // SetPendingAggregationRequests sets the PendingAggregationRequests field's value. func (s *DescribePendingAggregationRequestsOutput) SetPendingAggregationRequests(v []*PendingAggregationRequest) *DescribePendingAggregationRequestsOutput { s.PendingAggregationRequests = v return s } type DescribeRemediationConfigurationsInput struct { _ struct{} `type:"structure"` // A list of AWS Config rule names of remediation configurations for which you // want details. // // ConfigRuleNames is a required field ConfigRuleNames []*string `type:"list" required:"true"` } // String returns the string representation func (s DescribeRemediationConfigurationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRemediationConfigurationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeRemediationConfigurationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeRemediationConfigurationsInput"} if s.ConfigRuleNames == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleNames")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleNames sets the ConfigRuleNames field's value. func (s *DescribeRemediationConfigurationsInput) SetConfigRuleNames(v []*string) *DescribeRemediationConfigurationsInput { s.ConfigRuleNames = v return s } type DescribeRemediationConfigurationsOutput struct { _ struct{} `type:"structure"` // Returns a remediation configuration object. RemediationConfigurations []*RemediationConfiguration `type:"list"` } // String returns the string representation func (s DescribeRemediationConfigurationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRemediationConfigurationsOutput) GoString() string { return s.String() } // SetRemediationConfigurations sets the RemediationConfigurations field's value. func (s *DescribeRemediationConfigurationsOutput) SetRemediationConfigurations(v []*RemediationConfiguration) *DescribeRemediationConfigurationsOutput { s.RemediationConfigurations = v return s } type DescribeRemediationExceptionsInput struct { _ struct{} `type:"structure"` // The name of the AWS Config rule. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // The maximum number of RemediationExceptionResourceKey returned on each page. // The default is 25. If you specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` // An exception list of resource exception keys to be processed with the current // request. AWS Config adds exception for each resource key. For example, AWS // Config adds 3 exceptions for 3 resource keys. ResourceKeys []*RemediationExceptionResourceKey `min:"1" type:"list"` } // String returns the string representation func (s DescribeRemediationExceptionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRemediationExceptionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeRemediationExceptionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeRemediationExceptionsInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) } if s.ResourceKeys != nil { for i, v := range s.ResourceKeys { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *DescribeRemediationExceptionsInput) SetConfigRuleName(v string) *DescribeRemediationExceptionsInput { s.ConfigRuleName = &v return s } // SetLimit sets the Limit field's value. func (s *DescribeRemediationExceptionsInput) SetLimit(v int64) *DescribeRemediationExceptionsInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeRemediationExceptionsInput) SetNextToken(v string) *DescribeRemediationExceptionsInput { s.NextToken = &v return s } // SetResourceKeys sets the ResourceKeys field's value. func (s *DescribeRemediationExceptionsInput) SetResourceKeys(v []*RemediationExceptionResourceKey) *DescribeRemediationExceptionsInput { s.ResourceKeys = v return s } type DescribeRemediationExceptionsOutput struct { _ struct{} `type:"structure"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` // Returns a list of remediation exception objects. RemediationExceptions []*RemediationException `type:"list"` } // String returns the string representation func (s DescribeRemediationExceptionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRemediationExceptionsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeRemediationExceptionsOutput) SetNextToken(v string) *DescribeRemediationExceptionsOutput { s.NextToken = &v return s } // SetRemediationExceptions sets the RemediationExceptions field's value. func (s *DescribeRemediationExceptionsOutput) SetRemediationExceptions(v []*RemediationException) *DescribeRemediationExceptionsOutput { s.RemediationExceptions = v return s } type DescribeRemediationExecutionStatusInput struct { _ struct{} `type:"structure"` // A list of AWS Config rule names. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // The maximum number of RemediationExecutionStatuses returned on each page. // The default is maximum. If you specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // A list of resource keys to be processed with the current request. Each element // in the list consists of the resource type and resource ID. ResourceKeys []*ResourceKey `min:"1" type:"list"` } // String returns the string representation func (s DescribeRemediationExecutionStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRemediationExecutionStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeRemediationExecutionStatusInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeRemediationExecutionStatusInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) } if s.ResourceKeys != nil { for i, v := range s.ResourceKeys { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *DescribeRemediationExecutionStatusInput) SetConfigRuleName(v string) *DescribeRemediationExecutionStatusInput { s.ConfigRuleName = &v return s } // SetLimit sets the Limit field's value. func (s *DescribeRemediationExecutionStatusInput) SetLimit(v int64) *DescribeRemediationExecutionStatusInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeRemediationExecutionStatusInput) SetNextToken(v string) *DescribeRemediationExecutionStatusInput { s.NextToken = &v return s } // SetResourceKeys sets the ResourceKeys field's value. func (s *DescribeRemediationExecutionStatusInput) SetResourceKeys(v []*ResourceKey) *DescribeRemediationExecutionStatusInput { s.ResourceKeys = v return s } type DescribeRemediationExecutionStatusOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // Returns a list of remediation execution statuses objects. RemediationExecutionStatuses []*RemediationExecutionStatus `type:"list"` } // String returns the string representation func (s DescribeRemediationExecutionStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRemediationExecutionStatusOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeRemediationExecutionStatusOutput) SetNextToken(v string) *DescribeRemediationExecutionStatusOutput { s.NextToken = &v return s } // SetRemediationExecutionStatuses sets the RemediationExecutionStatuses field's value. func (s *DescribeRemediationExecutionStatusOutput) SetRemediationExecutionStatuses(v []*RemediationExecutionStatus) *DescribeRemediationExecutionStatusOutput { s.RemediationExecutionStatuses = v return s } type DescribeRetentionConfigurationsInput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // A list of names of retention configurations for which you want details. If // you do not specify a name, AWS Config returns details for all the retention // configurations for that account. // // Currently, AWS Config supports only one retention configuration per region // in your account. RetentionConfigurationNames []*string `type:"list"` } // String returns the string representation func (s DescribeRetentionConfigurationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRetentionConfigurationsInput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeRetentionConfigurationsInput) SetNextToken(v string) *DescribeRetentionConfigurationsInput { s.NextToken = &v return s } // SetRetentionConfigurationNames sets the RetentionConfigurationNames field's value. func (s *DescribeRetentionConfigurationsInput) SetRetentionConfigurationNames(v []*string) *DescribeRetentionConfigurationsInput { s.RetentionConfigurationNames = v return s } type DescribeRetentionConfigurationsOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // Returns a retention configuration object. RetentionConfigurations []*RetentionConfiguration `type:"list"` } // String returns the string representation func (s DescribeRetentionConfigurationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeRetentionConfigurationsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeRetentionConfigurationsOutput) SetNextToken(v string) *DescribeRetentionConfigurationsOutput { s.NextToken = &v return s } // SetRetentionConfigurations sets the RetentionConfigurations field's value. func (s *DescribeRetentionConfigurationsOutput) SetRetentionConfigurations(v []*RetentionConfiguration) *DescribeRetentionConfigurationsOutput { s.RetentionConfigurations = v return s } // Identifies an AWS resource and indicates whether it complies with the AWS // Config rule that it was evaluated against. type Evaluation struct { _ struct{} `type:"structure"` // Supplementary information about how the evaluation determined the compliance. Annotation *string `min:"1" type:"string"` // The ID of the AWS resource that was evaluated. // // ComplianceResourceId is a required field ComplianceResourceId *string `min:"1" type:"string" required:"true"` // The type of AWS resource that was evaluated. // // ComplianceResourceType is a required field ComplianceResourceType *string `min:"1" type:"string" required:"true"` // Indicates whether the AWS resource complies with the AWS Config rule that // it was evaluated against. // // For the Evaluation data type, AWS Config supports only the COMPLIANT, NON_COMPLIANT, // and NOT_APPLICABLE values. AWS Config does not support the INSUFFICIENT_DATA // value for this data type. // // Similarly, AWS Config does not accept INSUFFICIENT_DATA as the value for // ComplianceType from a PutEvaluations request. For example, an AWS Lambda // function for a custom AWS Config rule cannot pass an INSUFFICIENT_DATA value // to AWS Config. // // ComplianceType is a required field ComplianceType *string `type:"string" required:"true" enum:"ComplianceType"` // The time of the event in AWS Config that triggered the evaluation. For event-based // evaluations, the time indicates when AWS Config created the configuration // item that triggered the evaluation. For periodic evaluations, the time indicates // when AWS Config triggered the evaluation at the frequency that you specified // (for example, every 24 hours). // // OrderingTimestamp is a required field OrderingTimestamp *time.Time `type:"timestamp" required:"true"` } // String returns the string representation func (s Evaluation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Evaluation) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Evaluation) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Evaluation"} if s.Annotation != nil && len(*s.Annotation) < 1 { invalidParams.Add(request.NewErrParamMinLen("Annotation", 1)) } if s.ComplianceResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ComplianceResourceId")) } if s.ComplianceResourceId != nil && len(*s.ComplianceResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ComplianceResourceId", 1)) } if s.ComplianceResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ComplianceResourceType")) } if s.ComplianceResourceType != nil && len(*s.ComplianceResourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ComplianceResourceType", 1)) } if s.ComplianceType == nil { invalidParams.Add(request.NewErrParamRequired("ComplianceType")) } if s.OrderingTimestamp == nil { invalidParams.Add(request.NewErrParamRequired("OrderingTimestamp")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAnnotation sets the Annotation field's value. func (s *Evaluation) SetAnnotation(v string) *Evaluation { s.Annotation = &v return s } // SetComplianceResourceId sets the ComplianceResourceId field's value. func (s *Evaluation) SetComplianceResourceId(v string) *Evaluation { s.ComplianceResourceId = &v return s } // SetComplianceResourceType sets the ComplianceResourceType field's value. func (s *Evaluation) SetComplianceResourceType(v string) *Evaluation { s.ComplianceResourceType = &v return s } // SetComplianceType sets the ComplianceType field's value. func (s *Evaluation) SetComplianceType(v string) *Evaluation { s.ComplianceType = &v return s } // SetOrderingTimestamp sets the OrderingTimestamp field's value. func (s *Evaluation) SetOrderingTimestamp(v time.Time) *Evaluation { s.OrderingTimestamp = &v return s } // The details of an AWS Config evaluation. Provides the AWS resource that was // evaluated, the compliance of the resource, related time stamps, and supplementary // information. type EvaluationResult struct { _ struct{} `type:"structure"` // Supplementary information about how the evaluation determined the compliance. Annotation *string `min:"1" type:"string"` // Indicates whether the AWS resource complies with the AWS Config rule that // evaluated it. // // For the EvaluationResult data type, AWS Config supports only the COMPLIANT, // NON_COMPLIANT, and NOT_APPLICABLE values. AWS Config does not support the // INSUFFICIENT_DATA value for the EvaluationResult data type. ComplianceType *string `type:"string" enum:"ComplianceType"` // The time when the AWS Config rule evaluated the AWS resource. ConfigRuleInvokedTime *time.Time `type:"timestamp"` // Uniquely identifies the evaluation result. EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` // The time when AWS Config recorded the evaluation result. ResultRecordedTime *time.Time `type:"timestamp"` // An encrypted token that associates an evaluation with an AWS Config rule. // The token identifies the rule, the AWS resource being evaluated, and the // event that triggered the evaluation. ResultToken *string `type:"string"` } // String returns the string representation func (s EvaluationResult) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s EvaluationResult) GoString() string { return s.String() } // SetAnnotation sets the Annotation field's value. func (s *EvaluationResult) SetAnnotation(v string) *EvaluationResult { s.Annotation = &v return s } // SetComplianceType sets the ComplianceType field's value. func (s *EvaluationResult) SetComplianceType(v string) *EvaluationResult { s.ComplianceType = &v return s } // SetConfigRuleInvokedTime sets the ConfigRuleInvokedTime field's value. func (s *EvaluationResult) SetConfigRuleInvokedTime(v time.Time) *EvaluationResult { s.ConfigRuleInvokedTime = &v return s } // SetEvaluationResultIdentifier sets the EvaluationResultIdentifier field's value. func (s *EvaluationResult) SetEvaluationResultIdentifier(v *EvaluationResultIdentifier) *EvaluationResult { s.EvaluationResultIdentifier = v return s } // SetResultRecordedTime sets the ResultRecordedTime field's value. func (s *EvaluationResult) SetResultRecordedTime(v time.Time) *EvaluationResult { s.ResultRecordedTime = &v return s } // SetResultToken sets the ResultToken field's value. func (s *EvaluationResult) SetResultToken(v string) *EvaluationResult { s.ResultToken = &v return s } // Uniquely identifies an evaluation result. type EvaluationResultIdentifier struct { _ struct{} `type:"structure"` // Identifies an AWS Config rule used to evaluate an AWS resource, and provides // the type and ID of the evaluated resource. EvaluationResultQualifier *EvaluationResultQualifier `type:"structure"` // The time of the event that triggered the evaluation of your AWS resources. // The time can indicate when AWS Config delivered a configuration item change // notification, or it can indicate when AWS Config delivered the configuration // snapshot, depending on which event triggered the evaluation. OrderingTimestamp *time.Time `type:"timestamp"` } // String returns the string representation func (s EvaluationResultIdentifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s EvaluationResultIdentifier) GoString() string { return s.String() } // SetEvaluationResultQualifier sets the EvaluationResultQualifier field's value. func (s *EvaluationResultIdentifier) SetEvaluationResultQualifier(v *EvaluationResultQualifier) *EvaluationResultIdentifier { s.EvaluationResultQualifier = v return s } // SetOrderingTimestamp sets the OrderingTimestamp field's value. func (s *EvaluationResultIdentifier) SetOrderingTimestamp(v time.Time) *EvaluationResultIdentifier { s.OrderingTimestamp = &v return s } // Identifies an AWS Config rule that evaluated an AWS resource, and provides // the type and ID of the resource that the rule evaluated. type EvaluationResultQualifier struct { _ struct{} `type:"structure"` // The name of the AWS Config rule that was used in the evaluation. ConfigRuleName *string `min:"1" type:"string"` // The ID of the evaluated AWS resource. ResourceId *string `min:"1" type:"string"` // The type of AWS resource that was evaluated. ResourceType *string `min:"1" type:"string"` } // String returns the string representation func (s EvaluationResultQualifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s EvaluationResultQualifier) GoString() string { return s.String() } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *EvaluationResultQualifier) SetConfigRuleName(v string) *EvaluationResultQualifier { s.ConfigRuleName = &v return s } // SetResourceId sets the ResourceId field's value. func (s *EvaluationResultQualifier) SetResourceId(v string) *EvaluationResultQualifier { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *EvaluationResultQualifier) SetResourceType(v string) *EvaluationResultQualifier { s.ResourceType = &v return s } // The controls that AWS Config uses for executing remediations. type ExecutionControls struct { _ struct{} `type:"structure"` // A SsmControls object. SsmControls *SsmControls `type:"structure"` } // String returns the string representation func (s ExecutionControls) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ExecutionControls) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ExecutionControls) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ExecutionControls"} if s.SsmControls != nil { if err := s.SsmControls.Validate(); err != nil { invalidParams.AddNested("SsmControls", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSsmControls sets the SsmControls field's value. func (s *ExecutionControls) SetSsmControls(v *SsmControls) *ExecutionControls { s.SsmControls = v return s } // List of each of the failed delete remediation exceptions with specific reasons. type FailedDeleteRemediationExceptionsBatch struct { _ struct{} `type:"structure"` // Returns remediation exception resource key object of the failed items. FailedItems []*RemediationExceptionResourceKey `min:"1" type:"list"` // Returns a failure message for delete remediation exception. For example, // AWS Config creates an exception due to an internal error. FailureMessage *string `type:"string"` } // String returns the string representation func (s FailedDeleteRemediationExceptionsBatch) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s FailedDeleteRemediationExceptionsBatch) GoString() string { return s.String() } // SetFailedItems sets the FailedItems field's value. func (s *FailedDeleteRemediationExceptionsBatch) SetFailedItems(v []*RemediationExceptionResourceKey) *FailedDeleteRemediationExceptionsBatch { s.FailedItems = v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *FailedDeleteRemediationExceptionsBatch) SetFailureMessage(v string) *FailedDeleteRemediationExceptionsBatch { s.FailureMessage = &v return s } // List of each of the failed remediations with specific reasons. type FailedRemediationBatch struct { _ struct{} `type:"structure"` // Returns remediation configurations of the failed items. FailedItems []*RemediationConfiguration `type:"list"` // Returns a failure message. For example, the resource is already compliant. FailureMessage *string `type:"string"` } // String returns the string representation func (s FailedRemediationBatch) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s FailedRemediationBatch) GoString() string { return s.String() } // SetFailedItems sets the FailedItems field's value. func (s *FailedRemediationBatch) SetFailedItems(v []*RemediationConfiguration) *FailedRemediationBatch { s.FailedItems = v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *FailedRemediationBatch) SetFailureMessage(v string) *FailedRemediationBatch { s.FailureMessage = &v return s } // List of each of the failed remediation exceptions with specific reasons. type FailedRemediationExceptionBatch struct { _ struct{} `type:"structure"` // Returns remediation exception resource key object of the failed items. FailedItems []*RemediationException `type:"list"` // Returns a failure message. For example, the auto-remediation has failed. FailureMessage *string `type:"string"` } // String returns the string representation func (s FailedRemediationExceptionBatch) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s FailedRemediationExceptionBatch) GoString() string { return s.String() } // SetFailedItems sets the FailedItems field's value. func (s *FailedRemediationExceptionBatch) SetFailedItems(v []*RemediationException) *FailedRemediationExceptionBatch { s.FailedItems = v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *FailedRemediationExceptionBatch) SetFailureMessage(v string) *FailedRemediationExceptionBatch { s.FailureMessage = &v return s } // Details about the fields such as name of the field. type FieldInfo struct { _ struct{} `type:"structure"` // Name of the field. Name *string `type:"string"` } // String returns the string representation func (s FieldInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s FieldInfo) GoString() string { return s.String() } // SetName sets the Name field's value. func (s *FieldInfo) SetName(v string) *FieldInfo { s.Name = &v return s } type GetAggregateComplianceDetailsByConfigRuleInput struct { _ struct{} `type:"structure"` // The 12-digit account ID of the source account. // // AccountId is a required field AccountId *string `type:"string" required:"true"` // The source region from where the data is aggregated. // // AwsRegion is a required field AwsRegion *string `min:"1" type:"string" required:"true"` // The resource compliance status. // // For the GetAggregateComplianceDetailsByConfigRuleRequest data type, AWS Config // supports only the COMPLIANT and NON_COMPLIANT. AWS Config does not support // the NOT_APPLICABLE and INSUFFICIENT_DATA values. ComplianceType *string `type:"string" enum:"ComplianceType"` // The name of the AWS Config rule for which you want compliance information. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // The maximum number of evaluation results returned on each page. The default // is 50. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetAggregateComplianceDetailsByConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateComplianceDetailsByConfigRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetAggregateComplianceDetailsByConfigRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetAggregateComplianceDetailsByConfigRuleInput"} if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } if s.AwsRegion == nil { invalidParams.Add(request.NewErrParamRequired("AwsRegion")) } if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) } if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountId sets the AccountId field's value. func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetAccountId(v string) *GetAggregateComplianceDetailsByConfigRuleInput { s.AccountId = &v return s } // SetAwsRegion sets the AwsRegion field's value. func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetAwsRegion(v string) *GetAggregateComplianceDetailsByConfigRuleInput { s.AwsRegion = &v return s } // SetComplianceType sets the ComplianceType field's value. func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetComplianceType(v string) *GetAggregateComplianceDetailsByConfigRuleInput { s.ComplianceType = &v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetConfigRuleName(v string) *GetAggregateComplianceDetailsByConfigRuleInput { s.ConfigRuleName = &v return s } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetConfigurationAggregatorName(v string) *GetAggregateComplianceDetailsByConfigRuleInput { s.ConfigurationAggregatorName = &v return s } // SetLimit sets the Limit field's value. func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetLimit(v int64) *GetAggregateComplianceDetailsByConfigRuleInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetNextToken(v string) *GetAggregateComplianceDetailsByConfigRuleInput { s.NextToken = &v return s } type GetAggregateComplianceDetailsByConfigRuleOutput struct { _ struct{} `type:"structure"` // Returns an AggregateEvaluationResults object. AggregateEvaluationResults []*AggregateEvaluationResult `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetAggregateComplianceDetailsByConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateComplianceDetailsByConfigRuleOutput) GoString() string { return s.String() } // SetAggregateEvaluationResults sets the AggregateEvaluationResults field's value. func (s *GetAggregateComplianceDetailsByConfigRuleOutput) SetAggregateEvaluationResults(v []*AggregateEvaluationResult) *GetAggregateComplianceDetailsByConfigRuleOutput { s.AggregateEvaluationResults = v return s } // SetNextToken sets the NextToken field's value. func (s *GetAggregateComplianceDetailsByConfigRuleOutput) SetNextToken(v string) *GetAggregateComplianceDetailsByConfigRuleOutput { s.NextToken = &v return s } type GetAggregateConfigRuleComplianceSummaryInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // Filters the results based on the ConfigRuleComplianceSummaryFilters object. Filters *ConfigRuleComplianceSummaryFilters `type:"structure"` // Groups the result based on ACCOUNT_ID or AWS_REGION. GroupByKey *string `type:"string" enum:"ConfigRuleComplianceSummaryGroupKey"` // The maximum number of evaluation results returned on each page. The default // is 1000. You cannot specify a number greater than 1000. If you specify 0, // AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetAggregateConfigRuleComplianceSummaryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateConfigRuleComplianceSummaryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetAggregateConfigRuleComplianceSummaryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetAggregateConfigRuleComplianceSummaryInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.Filters != nil { if err := s.Filters.Validate(); err != nil { invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *GetAggregateConfigRuleComplianceSummaryInput) SetConfigurationAggregatorName(v string) *GetAggregateConfigRuleComplianceSummaryInput { s.ConfigurationAggregatorName = &v return s } // SetFilters sets the Filters field's value. func (s *GetAggregateConfigRuleComplianceSummaryInput) SetFilters(v *ConfigRuleComplianceSummaryFilters) *GetAggregateConfigRuleComplianceSummaryInput { s.Filters = v return s } // SetGroupByKey sets the GroupByKey field's value. func (s *GetAggregateConfigRuleComplianceSummaryInput) SetGroupByKey(v string) *GetAggregateConfigRuleComplianceSummaryInput { s.GroupByKey = &v return s } // SetLimit sets the Limit field's value. func (s *GetAggregateConfigRuleComplianceSummaryInput) SetLimit(v int64) *GetAggregateConfigRuleComplianceSummaryInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetAggregateConfigRuleComplianceSummaryInput) SetNextToken(v string) *GetAggregateConfigRuleComplianceSummaryInput { s.NextToken = &v return s } type GetAggregateConfigRuleComplianceSummaryOutput struct { _ struct{} `type:"structure"` // Returns a list of AggregateComplianceCounts object. AggregateComplianceCounts []*AggregateComplianceCount `type:"list"` // Groups the result based on ACCOUNT_ID or AWS_REGION. GroupByKey *string `min:"1" type:"string"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetAggregateConfigRuleComplianceSummaryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateConfigRuleComplianceSummaryOutput) GoString() string { return s.String() } // SetAggregateComplianceCounts sets the AggregateComplianceCounts field's value. func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetAggregateComplianceCounts(v []*AggregateComplianceCount) *GetAggregateConfigRuleComplianceSummaryOutput { s.AggregateComplianceCounts = v return s } // SetGroupByKey sets the GroupByKey field's value. func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetGroupByKey(v string) *GetAggregateConfigRuleComplianceSummaryOutput { s.GroupByKey = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetNextToken(v string) *GetAggregateConfigRuleComplianceSummaryOutput { s.NextToken = &v return s } type GetAggregateDiscoveredResourceCountsInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // Filters the results based on the ResourceCountFilters object. Filters *ResourceCountFilters `type:"structure"` // The key to group the resource counts. GroupByKey *string `type:"string" enum:"ResourceCountGroupKey"` // The maximum number of GroupedResourceCount objects returned on each page. // The default is 1000. You cannot specify a number greater than 1000. If you // specify 0, AWS Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetAggregateDiscoveredResourceCountsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateDiscoveredResourceCountsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetAggregateDiscoveredResourceCountsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetAggregateDiscoveredResourceCountsInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.Filters != nil { if err := s.Filters.Validate(); err != nil { invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *GetAggregateDiscoveredResourceCountsInput) SetConfigurationAggregatorName(v string) *GetAggregateDiscoveredResourceCountsInput { s.ConfigurationAggregatorName = &v return s } // SetFilters sets the Filters field's value. func (s *GetAggregateDiscoveredResourceCountsInput) SetFilters(v *ResourceCountFilters) *GetAggregateDiscoveredResourceCountsInput { s.Filters = v return s } // SetGroupByKey sets the GroupByKey field's value. func (s *GetAggregateDiscoveredResourceCountsInput) SetGroupByKey(v string) *GetAggregateDiscoveredResourceCountsInput { s.GroupByKey = &v return s } // SetLimit sets the Limit field's value. func (s *GetAggregateDiscoveredResourceCountsInput) SetLimit(v int64) *GetAggregateDiscoveredResourceCountsInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetAggregateDiscoveredResourceCountsInput) SetNextToken(v string) *GetAggregateDiscoveredResourceCountsInput { s.NextToken = &v return s } type GetAggregateDiscoveredResourceCountsOutput struct { _ struct{} `type:"structure"` // The key passed into the request object. If GroupByKey is not provided, the // result will be empty. GroupByKey *string `min:"1" type:"string"` // Returns a list of GroupedResourceCount objects. GroupedResourceCounts []*GroupedResourceCount `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The total number of resources that are present in an aggregator with the // filters that you provide. // // TotalDiscoveredResources is a required field TotalDiscoveredResources *int64 `type:"long" required:"true"` } // String returns the string representation func (s GetAggregateDiscoveredResourceCountsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateDiscoveredResourceCountsOutput) GoString() string { return s.String() } // SetGroupByKey sets the GroupByKey field's value. func (s *GetAggregateDiscoveredResourceCountsOutput) SetGroupByKey(v string) *GetAggregateDiscoveredResourceCountsOutput { s.GroupByKey = &v return s } // SetGroupedResourceCounts sets the GroupedResourceCounts field's value. func (s *GetAggregateDiscoveredResourceCountsOutput) SetGroupedResourceCounts(v []*GroupedResourceCount) *GetAggregateDiscoveredResourceCountsOutput { s.GroupedResourceCounts = v return s } // SetNextToken sets the NextToken field's value. func (s *GetAggregateDiscoveredResourceCountsOutput) SetNextToken(v string) *GetAggregateDiscoveredResourceCountsOutput { s.NextToken = &v return s } // SetTotalDiscoveredResources sets the TotalDiscoveredResources field's value. func (s *GetAggregateDiscoveredResourceCountsOutput) SetTotalDiscoveredResources(v int64) *GetAggregateDiscoveredResourceCountsOutput { s.TotalDiscoveredResources = &v return s } type GetAggregateResourceConfigInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // An object that identifies aggregate resource. // // ResourceIdentifier is a required field ResourceIdentifier *AggregateResourceIdentifier `type:"structure" required:"true"` } // String returns the string representation func (s GetAggregateResourceConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateResourceConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetAggregateResourceConfigInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetAggregateResourceConfigInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.ResourceIdentifier == nil { invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) } if s.ResourceIdentifier != nil { if err := s.ResourceIdentifier.Validate(); err != nil { invalidParams.AddNested("ResourceIdentifier", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *GetAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *GetAggregateResourceConfigInput { s.ConfigurationAggregatorName = &v return s } // SetResourceIdentifier sets the ResourceIdentifier field's value. func (s *GetAggregateResourceConfigInput) SetResourceIdentifier(v *AggregateResourceIdentifier) *GetAggregateResourceConfigInput { s.ResourceIdentifier = v return s } type GetAggregateResourceConfigOutput struct { _ struct{} `type:"structure"` // Returns a ConfigurationItem object. ConfigurationItem *ConfigurationItem `type:"structure"` } // String returns the string representation func (s GetAggregateResourceConfigOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetAggregateResourceConfigOutput) GoString() string { return s.String() } // SetConfigurationItem sets the ConfigurationItem field's value. func (s *GetAggregateResourceConfigOutput) SetConfigurationItem(v *ConfigurationItem) *GetAggregateResourceConfigOutput { s.ConfigurationItem = v return s } type GetComplianceDetailsByConfigRuleInput struct { _ struct{} `type:"structure"` // Filters the results by compliance. // // The allowed values are COMPLIANT, NON_COMPLIANT, and NOT_APPLICABLE. ComplianceTypes []*string `type:"list"` // The name of the AWS Config rule for which you want compliance information. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // The maximum number of evaluation results returned on each page. The default // is 10. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetComplianceDetailsByConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceDetailsByConfigRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetComplianceDetailsByConfigRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailsByConfigRuleInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetComplianceTypes sets the ComplianceTypes field's value. func (s *GetComplianceDetailsByConfigRuleInput) SetComplianceTypes(v []*string) *GetComplianceDetailsByConfigRuleInput { s.ComplianceTypes = v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *GetComplianceDetailsByConfigRuleInput) SetConfigRuleName(v string) *GetComplianceDetailsByConfigRuleInput { s.ConfigRuleName = &v return s } // SetLimit sets the Limit field's value. func (s *GetComplianceDetailsByConfigRuleInput) SetLimit(v int64) *GetComplianceDetailsByConfigRuleInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetComplianceDetailsByConfigRuleInput) SetNextToken(v string) *GetComplianceDetailsByConfigRuleInput { s.NextToken = &v return s } type GetComplianceDetailsByConfigRuleOutput struct { _ struct{} `type:"structure"` // Indicates whether the AWS resource complies with the specified AWS Config // rule. EvaluationResults []*EvaluationResult `type:"list"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetComplianceDetailsByConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceDetailsByConfigRuleOutput) GoString() string { return s.String() } // SetEvaluationResults sets the EvaluationResults field's value. func (s *GetComplianceDetailsByConfigRuleOutput) SetEvaluationResults(v []*EvaluationResult) *GetComplianceDetailsByConfigRuleOutput { s.EvaluationResults = v return s } // SetNextToken sets the NextToken field's value. func (s *GetComplianceDetailsByConfigRuleOutput) SetNextToken(v string) *GetComplianceDetailsByConfigRuleOutput { s.NextToken = &v return s } type GetComplianceDetailsByResourceInput struct { _ struct{} `type:"structure"` // Filters the results by compliance. // // The allowed values are COMPLIANT, NON_COMPLIANT, and NOT_APPLICABLE. ComplianceTypes []*string `type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The ID of the AWS resource for which you want compliance information. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // The type of the AWS resource for which you want compliance information. // // ResourceType is a required field ResourceType *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s GetComplianceDetailsByResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceDetailsByResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetComplianceDetailsByResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailsByResourceInput"} if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.ResourceType != nil && len(*s.ResourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetComplianceTypes sets the ComplianceTypes field's value. func (s *GetComplianceDetailsByResourceInput) SetComplianceTypes(v []*string) *GetComplianceDetailsByResourceInput { s.ComplianceTypes = v return s } // SetNextToken sets the NextToken field's value. func (s *GetComplianceDetailsByResourceInput) SetNextToken(v string) *GetComplianceDetailsByResourceInput { s.NextToken = &v return s } // SetResourceId sets the ResourceId field's value. func (s *GetComplianceDetailsByResourceInput) SetResourceId(v string) *GetComplianceDetailsByResourceInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *GetComplianceDetailsByResourceInput) SetResourceType(v string) *GetComplianceDetailsByResourceInput { s.ResourceType = &v return s } type GetComplianceDetailsByResourceOutput struct { _ struct{} `type:"structure"` // Indicates whether the specified AWS resource complies each AWS Config rule. EvaluationResults []*EvaluationResult `type:"list"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetComplianceDetailsByResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceDetailsByResourceOutput) GoString() string { return s.String() } // SetEvaluationResults sets the EvaluationResults field's value. func (s *GetComplianceDetailsByResourceOutput) SetEvaluationResults(v []*EvaluationResult) *GetComplianceDetailsByResourceOutput { s.EvaluationResults = v return s } // SetNextToken sets the NextToken field's value. func (s *GetComplianceDetailsByResourceOutput) SetNextToken(v string) *GetComplianceDetailsByResourceOutput { s.NextToken = &v return s } type GetComplianceSummaryByConfigRuleInput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s GetComplianceSummaryByConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceSummaryByConfigRuleInput) GoString() string { return s.String() } type GetComplianceSummaryByConfigRuleOutput struct { _ struct{} `type:"structure"` // The number of AWS Config rules that are compliant and the number that are // noncompliant, up to a maximum of 25 for each. ComplianceSummary *ComplianceSummary `type:"structure"` } // String returns the string representation func (s GetComplianceSummaryByConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceSummaryByConfigRuleOutput) GoString() string { return s.String() } // SetComplianceSummary sets the ComplianceSummary field's value. func (s *GetComplianceSummaryByConfigRuleOutput) SetComplianceSummary(v *ComplianceSummary) *GetComplianceSummaryByConfigRuleOutput { s.ComplianceSummary = v return s } type GetComplianceSummaryByResourceTypeInput struct { _ struct{} `type:"structure"` // Specify one or more resource types to get the number of resources that are // compliant and the number that are noncompliant for each resource type. // // For this request, you can specify an AWS resource type such as AWS::EC2::Instance. // You can specify that the resource type is an AWS account by specifying AWS::::Account. ResourceTypes []*string `type:"list"` } // String returns the string representation func (s GetComplianceSummaryByResourceTypeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceSummaryByResourceTypeInput) GoString() string { return s.String() } // SetResourceTypes sets the ResourceTypes field's value. func (s *GetComplianceSummaryByResourceTypeInput) SetResourceTypes(v []*string) *GetComplianceSummaryByResourceTypeInput { s.ResourceTypes = v return s } type GetComplianceSummaryByResourceTypeOutput struct { _ struct{} `type:"structure"` // The number of resources that are compliant and the number that are noncompliant. // If one or more resource types were provided with the request, the numbers // are returned for each resource type. The maximum number returned is 100. ComplianceSummariesByResourceType []*ComplianceSummaryByResourceType `type:"list"` } // String returns the string representation func (s GetComplianceSummaryByResourceTypeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetComplianceSummaryByResourceTypeOutput) GoString() string { return s.String() } // SetComplianceSummariesByResourceType sets the ComplianceSummariesByResourceType field's value. func (s *GetComplianceSummaryByResourceTypeOutput) SetComplianceSummariesByResourceType(v []*ComplianceSummaryByResourceType) *GetComplianceSummaryByResourceTypeOutput { s.ComplianceSummariesByResourceType = v return s } type GetConformancePackComplianceDetailsInput struct { _ struct{} `type:"structure"` // Name of the conformance pack. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // A ConformancePackEvaluationFilters object. Filters *ConformancePackEvaluationFilters `type:"structure"` // The maximum number of evaluation results returned on each page. If you do // no specify a number, AWS Config uses the default. The default is 100. Limit *int64 `type:"integer"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetConformancePackComplianceDetailsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetConformancePackComplianceDetailsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetConformancePackComplianceDetailsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetConformancePackComplianceDetailsInput"} if s.ConformancePackName == nil { invalidParams.Add(request.NewErrParamRequired("ConformancePackName")) } if s.ConformancePackName != nil && len(*s.ConformancePackName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConformancePackName", 1)) } if s.Filters != nil { if err := s.Filters.Validate(); err != nil { invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConformancePackName sets the ConformancePackName field's value. func (s *GetConformancePackComplianceDetailsInput) SetConformancePackName(v string) *GetConformancePackComplianceDetailsInput { s.ConformancePackName = &v return s } // SetFilters sets the Filters field's value. func (s *GetConformancePackComplianceDetailsInput) SetFilters(v *ConformancePackEvaluationFilters) *GetConformancePackComplianceDetailsInput { s.Filters = v return s } // SetLimit sets the Limit field's value. func (s *GetConformancePackComplianceDetailsInput) SetLimit(v int64) *GetConformancePackComplianceDetailsInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetConformancePackComplianceDetailsInput) SetNextToken(v string) *GetConformancePackComplianceDetailsInput { s.NextToken = &v return s } type GetConformancePackComplianceDetailsOutput struct { _ struct{} `type:"structure"` // Name of the conformance pack. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // Returns a list of ConformancePackEvaluationResult objects. ConformancePackRuleEvaluationResults []*ConformancePackEvaluationResult `type:"list"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetConformancePackComplianceDetailsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetConformancePackComplianceDetailsOutput) GoString() string { return s.String() } // SetConformancePackName sets the ConformancePackName field's value. func (s *GetConformancePackComplianceDetailsOutput) SetConformancePackName(v string) *GetConformancePackComplianceDetailsOutput { s.ConformancePackName = &v return s } // SetConformancePackRuleEvaluationResults sets the ConformancePackRuleEvaluationResults field's value. func (s *GetConformancePackComplianceDetailsOutput) SetConformancePackRuleEvaluationResults(v []*ConformancePackEvaluationResult) *GetConformancePackComplianceDetailsOutput { s.ConformancePackRuleEvaluationResults = v return s } // SetNextToken sets the NextToken field's value. func (s *GetConformancePackComplianceDetailsOutput) SetNextToken(v string) *GetConformancePackComplianceDetailsOutput { s.NextToken = &v return s } type GetConformancePackComplianceSummaryInput struct { _ struct{} `type:"structure"` // Names of conformance packs. // // ConformancePackNames is a required field ConformancePackNames []*string `min:"1" type:"list" required:"true"` // The maximum number of conformance packs returned on each page. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetConformancePackComplianceSummaryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetConformancePackComplianceSummaryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetConformancePackComplianceSummaryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetConformancePackComplianceSummaryInput"} if s.ConformancePackNames == nil { invalidParams.Add(request.NewErrParamRequired("ConformancePackNames")) } if s.ConformancePackNames != nil && len(s.ConformancePackNames) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConformancePackNames", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConformancePackNames sets the ConformancePackNames field's value. func (s *GetConformancePackComplianceSummaryInput) SetConformancePackNames(v []*string) *GetConformancePackComplianceSummaryInput { s.ConformancePackNames = v return s } // SetLimit sets the Limit field's value. func (s *GetConformancePackComplianceSummaryInput) SetLimit(v int64) *GetConformancePackComplianceSummaryInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetConformancePackComplianceSummaryInput) SetNextToken(v string) *GetConformancePackComplianceSummaryInput { s.NextToken = &v return s } type GetConformancePackComplianceSummaryOutput struct { _ struct{} `type:"structure"` // A list of ConformancePackComplianceSummary objects. ConformancePackComplianceSummaryList []*ConformancePackComplianceSummary `min:"1" type:"list"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s GetConformancePackComplianceSummaryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetConformancePackComplianceSummaryOutput) GoString() string { return s.String() } // SetConformancePackComplianceSummaryList sets the ConformancePackComplianceSummaryList field's value. func (s *GetConformancePackComplianceSummaryOutput) SetConformancePackComplianceSummaryList(v []*ConformancePackComplianceSummary) *GetConformancePackComplianceSummaryOutput { s.ConformancePackComplianceSummaryList = v return s } // SetNextToken sets the NextToken field's value. func (s *GetConformancePackComplianceSummaryOutput) SetNextToken(v string) *GetConformancePackComplianceSummaryOutput { s.NextToken = &v return s } type GetDiscoveredResourceCountsInput struct { _ struct{} `type:"structure"` // The maximum number of ResourceCount objects returned on each page. The default // is 100. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `locationName:"limit" type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `locationName:"nextToken" type:"string"` // The comma-separated list that specifies the resource types that you want // AWS Config to return (for example, "AWS::EC2::Instance", "AWS::IAM::User"). // // If a value for resourceTypes is not specified, AWS Config returns all resource // types that AWS Config is recording in the region for your account. // // If the configuration recorder is turned off, AWS Config returns an empty // list of ResourceCount objects. If the configuration recorder is not recording // a specific resource type (for example, S3 buckets), that resource type is // not returned in the list of ResourceCount objects. ResourceTypes []*string `locationName:"resourceTypes" type:"list"` } // String returns the string representation func (s GetDiscoveredResourceCountsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetDiscoveredResourceCountsInput) GoString() string { return s.String() } // SetLimit sets the Limit field's value. func (s *GetDiscoveredResourceCountsInput) SetLimit(v int64) *GetDiscoveredResourceCountsInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetDiscoveredResourceCountsInput) SetNextToken(v string) *GetDiscoveredResourceCountsInput { s.NextToken = &v return s } // SetResourceTypes sets the ResourceTypes field's value. func (s *GetDiscoveredResourceCountsInput) SetResourceTypes(v []*string) *GetDiscoveredResourceCountsInput { s.ResourceTypes = v return s } type GetDiscoveredResourceCountsOutput struct { _ struct{} `type:"structure"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `locationName:"nextToken" type:"string"` // The list of ResourceCount objects. Each object is listed in descending order // by the number of resources. ResourceCounts []*ResourceCount `locationName:"resourceCounts" type:"list"` // The total number of resources that AWS Config is recording in the region // for your account. If you specify resource types in the request, AWS Config // returns only the total number of resources for those resource types. // // Example // // AWS Config is recording three resource types in the US East (Ohio) Region // for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets, for // a total of 60 resources. // // You make a call to the GetDiscoveredResourceCounts action and specify the // resource type, "AWS::EC2::Instances", in the request. // // AWS Config returns 25 for totalDiscoveredResources. TotalDiscoveredResources *int64 `locationName:"totalDiscoveredResources" type:"long"` } // String returns the string representation func (s GetDiscoveredResourceCountsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetDiscoveredResourceCountsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *GetDiscoveredResourceCountsOutput) SetNextToken(v string) *GetDiscoveredResourceCountsOutput { s.NextToken = &v return s } // SetResourceCounts sets the ResourceCounts field's value. func (s *GetDiscoveredResourceCountsOutput) SetResourceCounts(v []*ResourceCount) *GetDiscoveredResourceCountsOutput { s.ResourceCounts = v return s } // SetTotalDiscoveredResources sets the TotalDiscoveredResources field's value. func (s *GetDiscoveredResourceCountsOutput) SetTotalDiscoveredResources(v int64) *GetDiscoveredResourceCountsOutput { s.TotalDiscoveredResources = &v return s } type GetOrganizationConfigRuleDetailedStatusInput struct { _ struct{} `type:"structure"` // A StatusDetailFilters object. Filters *StatusDetailFilters `type:"structure"` // The maximum number of OrganizationConfigRuleDetailedStatus returned on each // page. If you do not specify a number, AWS Config uses the default. The default // is 100. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The name of organization config rule for which you want status details for // member accounts. // // OrganizationConfigRuleName is a required field OrganizationConfigRuleName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s GetOrganizationConfigRuleDetailedStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetOrganizationConfigRuleDetailedStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetOrganizationConfigRuleDetailedStatusInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetOrganizationConfigRuleDetailedStatusInput"} if s.OrganizationConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationConfigRuleName")) } if s.OrganizationConfigRuleName != nil && len(*s.OrganizationConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationConfigRuleName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *GetOrganizationConfigRuleDetailedStatusInput) SetFilters(v *StatusDetailFilters) *GetOrganizationConfigRuleDetailedStatusInput { s.Filters = v return s } // SetLimit sets the Limit field's value. func (s *GetOrganizationConfigRuleDetailedStatusInput) SetLimit(v int64) *GetOrganizationConfigRuleDetailedStatusInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetOrganizationConfigRuleDetailedStatusInput) SetNextToken(v string) *GetOrganizationConfigRuleDetailedStatusInput { s.NextToken = &v return s } // SetOrganizationConfigRuleName sets the OrganizationConfigRuleName field's value. func (s *GetOrganizationConfigRuleDetailedStatusInput) SetOrganizationConfigRuleName(v string) *GetOrganizationConfigRuleDetailedStatusInput { s.OrganizationConfigRuleName = &v return s } type GetOrganizationConfigRuleDetailedStatusOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // A list of MemberAccountStatus objects. OrganizationConfigRuleDetailedStatus []*MemberAccountStatus `type:"list"` } // String returns the string representation func (s GetOrganizationConfigRuleDetailedStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetOrganizationConfigRuleDetailedStatusOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *GetOrganizationConfigRuleDetailedStatusOutput) SetNextToken(v string) *GetOrganizationConfigRuleDetailedStatusOutput { s.NextToken = &v return s } // SetOrganizationConfigRuleDetailedStatus sets the OrganizationConfigRuleDetailedStatus field's value. func (s *GetOrganizationConfigRuleDetailedStatusOutput) SetOrganizationConfigRuleDetailedStatus(v []*MemberAccountStatus) *GetOrganizationConfigRuleDetailedStatusOutput { s.OrganizationConfigRuleDetailedStatus = v return s } type GetOrganizationConformancePackDetailedStatusInput struct { _ struct{} `type:"structure"` // An OrganizationResourceDetailedStatusFilters object. Filters *OrganizationResourceDetailedStatusFilters `type:"structure"` // The maximum number of OrganizationConformancePackDetailedStatuses returned // on each page. If you do not specify a number, AWS Config uses the default. // The default is 100. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The name of organization conformance pack for which you want status details // for member accounts. // // OrganizationConformancePackName is a required field OrganizationConformancePackName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s GetOrganizationConformancePackDetailedStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetOrganizationConformancePackDetailedStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetOrganizationConformancePackDetailedStatusInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetOrganizationConformancePackDetailedStatusInput"} if s.OrganizationConformancePackName == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationConformancePackName")) } if s.OrganizationConformancePackName != nil && len(*s.OrganizationConformancePackName) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationConformancePackName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *GetOrganizationConformancePackDetailedStatusInput) SetFilters(v *OrganizationResourceDetailedStatusFilters) *GetOrganizationConformancePackDetailedStatusInput { s.Filters = v return s } // SetLimit sets the Limit field's value. func (s *GetOrganizationConformancePackDetailedStatusInput) SetLimit(v int64) *GetOrganizationConformancePackDetailedStatusInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetOrganizationConformancePackDetailedStatusInput) SetNextToken(v string) *GetOrganizationConformancePackDetailedStatusInput { s.NextToken = &v return s } // SetOrganizationConformancePackName sets the OrganizationConformancePackName field's value. func (s *GetOrganizationConformancePackDetailedStatusInput) SetOrganizationConformancePackName(v string) *GetOrganizationConformancePackDetailedStatusInput { s.OrganizationConformancePackName = &v return s } type GetOrganizationConformancePackDetailedStatusOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // A list of OrganizationConformancePackDetailedStatus objects. OrganizationConformancePackDetailedStatuses []*OrganizationConformancePackDetailedStatus `type:"list"` } // String returns the string representation func (s GetOrganizationConformancePackDetailedStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetOrganizationConformancePackDetailedStatusOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *GetOrganizationConformancePackDetailedStatusOutput) SetNextToken(v string) *GetOrganizationConformancePackDetailedStatusOutput { s.NextToken = &v return s } // SetOrganizationConformancePackDetailedStatuses sets the OrganizationConformancePackDetailedStatuses field's value. func (s *GetOrganizationConformancePackDetailedStatusOutput) SetOrganizationConformancePackDetailedStatuses(v []*OrganizationConformancePackDetailedStatus) *GetOrganizationConformancePackDetailedStatusOutput { s.OrganizationConformancePackDetailedStatuses = v return s } // The input for the GetResourceConfigHistory action. type GetResourceConfigHistoryInput struct { _ struct{} `type:"structure"` // The chronological order for configuration items listed. By default, the results // are listed in reverse chronological order. ChronologicalOrder *string `locationName:"chronologicalOrder" type:"string" enum:"ChronologicalOrder"` // The time stamp that indicates an earlier time. If not specified, the action // returns paginated results that contain configuration items that start when // the first configuration item was recorded. EarlierTime *time.Time `locationName:"earlierTime" type:"timestamp"` // The time stamp that indicates a later time. If not specified, current time // is taken. LaterTime *time.Time `locationName:"laterTime" type:"timestamp"` // The maximum number of configuration items returned on each page. The default // is 10. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `locationName:"limit" type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `locationName:"nextToken" type:"string"` // The ID of the resource (for example., sg-xxxxxx). // // ResourceId is a required field ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` // The resource type. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` } // String returns the string representation func (s GetResourceConfigHistoryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetResourceConfigHistoryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetResourceConfigHistoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetResourceConfigHistoryInput"} if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetChronologicalOrder sets the ChronologicalOrder field's value. func (s *GetResourceConfigHistoryInput) SetChronologicalOrder(v string) *GetResourceConfigHistoryInput { s.ChronologicalOrder = &v return s } // SetEarlierTime sets the EarlierTime field's value. func (s *GetResourceConfigHistoryInput) SetEarlierTime(v time.Time) *GetResourceConfigHistoryInput { s.EarlierTime = &v return s } // SetLaterTime sets the LaterTime field's value. func (s *GetResourceConfigHistoryInput) SetLaterTime(v time.Time) *GetResourceConfigHistoryInput { s.LaterTime = &v return s } // SetLimit sets the Limit field's value. func (s *GetResourceConfigHistoryInput) SetLimit(v int64) *GetResourceConfigHistoryInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetResourceConfigHistoryInput) SetNextToken(v string) *GetResourceConfigHistoryInput { s.NextToken = &v return s } // SetResourceId sets the ResourceId field's value. func (s *GetResourceConfigHistoryInput) SetResourceId(v string) *GetResourceConfigHistoryInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *GetResourceConfigHistoryInput) SetResourceType(v string) *GetResourceConfigHistoryInput { s.ResourceType = &v return s } // The output for the GetResourceConfigHistory action. type GetResourceConfigHistoryOutput struct { _ struct{} `type:"structure"` // A list that contains the configuration history of one or more resources. ConfigurationItems []*ConfigurationItem `locationName:"configurationItems" type:"list"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation func (s GetResourceConfigHistoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GetResourceConfigHistoryOutput) GoString() string { return s.String() } // SetConfigurationItems sets the ConfigurationItems field's value. func (s *GetResourceConfigHistoryOutput) SetConfigurationItems(v []*ConfigurationItem) *GetResourceConfigHistoryOutput { s.ConfigurationItems = v return s } // SetNextToken sets the NextToken field's value. func (s *GetResourceConfigHistoryOutput) SetNextToken(v string) *GetResourceConfigHistoryOutput { s.NextToken = &v return s } // The count of resources that are grouped by the group name. type GroupedResourceCount struct { _ struct{} `type:"structure"` // The name of the group that can be region, account ID, or resource type. For // example, region1, region2 if the region was chosen as GroupByKey. // // GroupName is a required field GroupName *string `min:"1" type:"string" required:"true"` // The number of resources in the group. // // ResourceCount is a required field ResourceCount *int64 `type:"long" required:"true"` } // String returns the string representation func (s GroupedResourceCount) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s GroupedResourceCount) GoString() string { return s.String() } // SetGroupName sets the GroupName field's value. func (s *GroupedResourceCount) SetGroupName(v string) *GroupedResourceCount { s.GroupName = &v return s } // SetResourceCount sets the ResourceCount field's value. func (s *GroupedResourceCount) SetResourceCount(v int64) *GroupedResourceCount { s.ResourceCount = &v return s } // Your Amazon S3 bucket policy does not permit AWS Config to write to it. type InsufficientDeliveryPolicyException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InsufficientDeliveryPolicyException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InsufficientDeliveryPolicyException) GoString() string { return s.String() } func newErrorInsufficientDeliveryPolicyException(v protocol.ResponseMetadata) error { return &InsufficientDeliveryPolicyException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InsufficientDeliveryPolicyException) Code() string { return "InsufficientDeliveryPolicyException" } // Message returns the exception's message. func (s *InsufficientDeliveryPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InsufficientDeliveryPolicyException) OrigErr() error { return nil } func (s *InsufficientDeliveryPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InsufficientDeliveryPolicyException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InsufficientDeliveryPolicyException) RequestID() string { return s.RespMetadata.RequestID } // Indicates one of the following errors: // // * For PutConfigRule, the rule cannot be created because the IAM role assigned // to AWS Config lacks permissions to perform the config:Put* action. // // * For PutConfigRule, the AWS Lambda function cannot be invoked. Check // the function ARN, and check the function's permissions. // // * For PutOrganizationConfigRule, organization config rule cannot be created // because you do not have permissions to call IAM GetRole action or create // a service linked role. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. type InsufficientPermissionsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InsufficientPermissionsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InsufficientPermissionsException) GoString() string { return s.String() } func newErrorInsufficientPermissionsException(v protocol.ResponseMetadata) error { return &InsufficientPermissionsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InsufficientPermissionsException) Code() string { return "InsufficientPermissionsException" } // Message returns the exception's message. func (s *InsufficientPermissionsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InsufficientPermissionsException) OrigErr() error { return nil } func (s *InsufficientPermissionsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InsufficientPermissionsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InsufficientPermissionsException) RequestID() string { return s.RespMetadata.RequestID } // You have provided a configuration recorder name that is not valid. type InvalidConfigurationRecorderNameException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidConfigurationRecorderNameException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidConfigurationRecorderNameException) GoString() string { return s.String() } func newErrorInvalidConfigurationRecorderNameException(v protocol.ResponseMetadata) error { return &InvalidConfigurationRecorderNameException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidConfigurationRecorderNameException) Code() string { return "InvalidConfigurationRecorderNameException" } // Message returns the exception's message. func (s *InvalidConfigurationRecorderNameException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidConfigurationRecorderNameException) OrigErr() error { return nil } func (s *InvalidConfigurationRecorderNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidConfigurationRecorderNameException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidConfigurationRecorderNameException) RequestID() string { return s.RespMetadata.RequestID } // The specified delivery channel name is not valid. type InvalidDeliveryChannelNameException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidDeliveryChannelNameException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidDeliveryChannelNameException) GoString() string { return s.String() } func newErrorInvalidDeliveryChannelNameException(v protocol.ResponseMetadata) error { return &InvalidDeliveryChannelNameException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDeliveryChannelNameException) Code() string { return "InvalidDeliveryChannelNameException" } // Message returns the exception's message. func (s *InvalidDeliveryChannelNameException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDeliveryChannelNameException) OrigErr() error { return nil } func (s *InvalidDeliveryChannelNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDeliveryChannelNameException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDeliveryChannelNameException) RequestID() string { return s.RespMetadata.RequestID } // The syntax of the query is incorrect. type InvalidExpressionException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidExpressionException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidExpressionException) GoString() string { return s.String() } func newErrorInvalidExpressionException(v protocol.ResponseMetadata) error { return &InvalidExpressionException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidExpressionException) Code() string { return "InvalidExpressionException" } // Message returns the exception's message. func (s *InvalidExpressionException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidExpressionException) OrigErr() error { return nil } func (s *InvalidExpressionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidExpressionException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidExpressionException) RequestID() string { return s.RespMetadata.RequestID } // The specified limit is outside the allowable range. type InvalidLimitException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidLimitException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidLimitException) GoString() string { return s.String() } func newErrorInvalidLimitException(v protocol.ResponseMetadata) error { return &InvalidLimitException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidLimitException) Code() string { return "InvalidLimitException" } // Message returns the exception's message. func (s *InvalidLimitException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidLimitException) OrigErr() error { return nil } func (s *InvalidLimitException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidLimitException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidLimitException) RequestID() string { return s.RespMetadata.RequestID } // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. type InvalidNextTokenException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidNextTokenException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidNextTokenException) GoString() string { return s.String() } func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidNextTokenException) OrigErr() error { return nil } func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidNextTokenException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidNextTokenException) RequestID() string { return s.RespMetadata.RequestID } // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. type InvalidParameterValueException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidParameterValueException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidParameterValueException) GoString() string { return s.String() } func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidParameterValueException) OrigErr() error { return nil } func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidParameterValueException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidParameterValueException) RequestID() string { return s.RespMetadata.RequestID } // AWS Config throws an exception if the recording group does not contain a // valid list of resource types. Invalid values might also be incorrectly formatted. type InvalidRecordingGroupException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidRecordingGroupException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidRecordingGroupException) GoString() string { return s.String() } func newErrorInvalidRecordingGroupException(v protocol.ResponseMetadata) error { return &InvalidRecordingGroupException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidRecordingGroupException) Code() string { return "InvalidRecordingGroupException" } // Message returns the exception's message. func (s *InvalidRecordingGroupException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidRecordingGroupException) OrigErr() error { return nil } func (s *InvalidRecordingGroupException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidRecordingGroupException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidRecordingGroupException) RequestID() string { return s.RespMetadata.RequestID } // The specified ResultToken is invalid. type InvalidResultTokenException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidResultTokenException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidResultTokenException) GoString() string { return s.String() } func newErrorInvalidResultTokenException(v protocol.ResponseMetadata) error { return &InvalidResultTokenException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidResultTokenException) Code() string { return "InvalidResultTokenException" } // Message returns the exception's message. func (s *InvalidResultTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidResultTokenException) OrigErr() error { return nil } func (s *InvalidResultTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidResultTokenException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidResultTokenException) RequestID() string { return s.RespMetadata.RequestID } // You have provided a null or empty role ARN. type InvalidRoleException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidRoleException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidRoleException) GoString() string { return s.String() } func newErrorInvalidRoleException(v protocol.ResponseMetadata) error { return &InvalidRoleException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidRoleException) Code() string { return "InvalidRoleException" } // Message returns the exception's message. func (s *InvalidRoleException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidRoleException) OrigErr() error { return nil } func (s *InvalidRoleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidRoleException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidRoleException) RequestID() string { return s.RespMetadata.RequestID } // The specified Amazon S3 key prefix is not valid. type InvalidS3KeyPrefixException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidS3KeyPrefixException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidS3KeyPrefixException) GoString() string { return s.String() } func newErrorInvalidS3KeyPrefixException(v protocol.ResponseMetadata) error { return &InvalidS3KeyPrefixException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidS3KeyPrefixException) Code() string { return "InvalidS3KeyPrefixException" } // Message returns the exception's message. func (s *InvalidS3KeyPrefixException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidS3KeyPrefixException) OrigErr() error { return nil } func (s *InvalidS3KeyPrefixException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidS3KeyPrefixException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidS3KeyPrefixException) RequestID() string { return s.RespMetadata.RequestID } // The specified Amazon SNS topic does not exist. type InvalidSNSTopicARNException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidSNSTopicARNException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidSNSTopicARNException) GoString() string { return s.String() } func newErrorInvalidSNSTopicARNException(v protocol.ResponseMetadata) error { return &InvalidSNSTopicARNException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidSNSTopicARNException) Code() string { return "InvalidSNSTopicARNException" } // Message returns the exception's message. func (s *InvalidSNSTopicARNException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidSNSTopicARNException) OrigErr() error { return nil } func (s *InvalidSNSTopicARNException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidSNSTopicARNException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidSNSTopicARNException) RequestID() string { return s.RespMetadata.RequestID } // The specified time range is not valid. The earlier time is not chronologically // before the later time. type InvalidTimeRangeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s InvalidTimeRangeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s InvalidTimeRangeException) GoString() string { return s.String() } func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error { return &InvalidTimeRangeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidTimeRangeException) Code() string { return "InvalidTimeRangeException" } // Message returns the exception's message. func (s *InvalidTimeRangeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidTimeRangeException) OrigErr() error { return nil } func (s *InvalidTimeRangeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidTimeRangeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidTimeRangeException) RequestID() string { return s.RespMetadata.RequestID } // You cannot delete the delivery channel you specified because the configuration // recorder is running. type LastDeliveryChannelDeleteFailedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s LastDeliveryChannelDeleteFailedException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s LastDeliveryChannelDeleteFailedException) GoString() string { return s.String() } func newErrorLastDeliveryChannelDeleteFailedException(v protocol.ResponseMetadata) error { return &LastDeliveryChannelDeleteFailedException{ RespMetadata: v, } } // Code returns the exception type name. func (s *LastDeliveryChannelDeleteFailedException) Code() string { return "LastDeliveryChannelDeleteFailedException" } // Message returns the exception's message. func (s *LastDeliveryChannelDeleteFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *LastDeliveryChannelDeleteFailedException) OrigErr() error { return nil } func (s *LastDeliveryChannelDeleteFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *LastDeliveryChannelDeleteFailedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *LastDeliveryChannelDeleteFailedException) RequestID() string { return s.RespMetadata.RequestID } // For StartConfigRulesEvaluation API, this exception is thrown if an evaluation // is in progress or if you call the StartConfigRulesEvaluation API more than // once per minute. // // For PutConfigurationAggregator API, this exception is thrown if the number // of accounts and aggregators exceeds the limit. type LimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s LimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s LimitExceededException) GoString() string { return s.String() } func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *LimitExceededException) OrigErr() error { return nil } func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *LimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *LimitExceededException) RequestID() string { return s.RespMetadata.RequestID } type ListAggregateDiscoveredResourcesInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // Filters the results based on the ResourceFilters object. Filters *ResourceFilters `type:"structure"` // The maximum number of resource identifiers returned on each page. The default // is 100. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The type of resources that you want AWS Config to list in the response. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceType"` } // String returns the string representation func (s ListAggregateDiscoveredResourcesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ListAggregateDiscoveredResourcesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListAggregateDiscoveredResourcesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListAggregateDiscoveredResourcesInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.Filters != nil { if err := s.Filters.Validate(); err != nil { invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *ListAggregateDiscoveredResourcesInput) SetConfigurationAggregatorName(v string) *ListAggregateDiscoveredResourcesInput { s.ConfigurationAggregatorName = &v return s } // SetFilters sets the Filters field's value. func (s *ListAggregateDiscoveredResourcesInput) SetFilters(v *ResourceFilters) *ListAggregateDiscoveredResourcesInput { s.Filters = v return s } // SetLimit sets the Limit field's value. func (s *ListAggregateDiscoveredResourcesInput) SetLimit(v int64) *ListAggregateDiscoveredResourcesInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListAggregateDiscoveredResourcesInput) SetNextToken(v string) *ListAggregateDiscoveredResourcesInput { s.NextToken = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ListAggregateDiscoveredResourcesInput) SetResourceType(v string) *ListAggregateDiscoveredResourcesInput { s.ResourceType = &v return s } type ListAggregateDiscoveredResourcesOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // Returns a list of ResourceIdentifiers objects. ResourceIdentifiers []*AggregateResourceIdentifier `type:"list"` } // String returns the string representation func (s ListAggregateDiscoveredResourcesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ListAggregateDiscoveredResourcesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListAggregateDiscoveredResourcesOutput) SetNextToken(v string) *ListAggregateDiscoveredResourcesOutput { s.NextToken = &v return s } // SetResourceIdentifiers sets the ResourceIdentifiers field's value. func (s *ListAggregateDiscoveredResourcesOutput) SetResourceIdentifiers(v []*AggregateResourceIdentifier) *ListAggregateDiscoveredResourcesOutput { s.ResourceIdentifiers = v return s } type ListDiscoveredResourcesInput struct { _ struct{} `type:"structure"` // Specifies whether AWS Config includes deleted resources in the results. By // default, deleted resources are not included. IncludeDeletedResources *bool `locationName:"includeDeletedResources" type:"boolean"` // The maximum number of resource identifiers returned on each page. The default // is 100. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `locationName:"limit" type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `locationName:"nextToken" type:"string"` // The IDs of only those resources that you want AWS Config to list in the response. // If you do not specify this parameter, AWS Config lists all resources of the // specified type that it has discovered. ResourceIds []*string `locationName:"resourceIds" type:"list"` // The custom name of only those resources that you want AWS Config to list // in the response. If you do not specify this parameter, AWS Config lists all // resources of the specified type that it has discovered. ResourceName *string `locationName:"resourceName" type:"string"` // The type of resources that you want AWS Config to list in the response. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` } // String returns the string representation func (s ListDiscoveredResourcesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ListDiscoveredResourcesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListDiscoveredResourcesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListDiscoveredResourcesInput"} if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIncludeDeletedResources sets the IncludeDeletedResources field's value. func (s *ListDiscoveredResourcesInput) SetIncludeDeletedResources(v bool) *ListDiscoveredResourcesInput { s.IncludeDeletedResources = &v return s } // SetLimit sets the Limit field's value. func (s *ListDiscoveredResourcesInput) SetLimit(v int64) *ListDiscoveredResourcesInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListDiscoveredResourcesInput) SetNextToken(v string) *ListDiscoveredResourcesInput { s.NextToken = &v return s } // SetResourceIds sets the ResourceIds field's value. func (s *ListDiscoveredResourcesInput) SetResourceIds(v []*string) *ListDiscoveredResourcesInput { s.ResourceIds = v return s } // SetResourceName sets the ResourceName field's value. func (s *ListDiscoveredResourcesInput) SetResourceName(v string) *ListDiscoveredResourcesInput { s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ListDiscoveredResourcesInput) SetResourceType(v string) *ListDiscoveredResourcesInput { s.ResourceType = &v return s } type ListDiscoveredResourcesOutput struct { _ struct{} `type:"structure"` // The string that you use in a subsequent request to get the next page of results // in a paginated response. NextToken *string `locationName:"nextToken" type:"string"` // The details that identify a resource that is discovered by AWS Config, including // the resource type, ID, and (if available) the custom resource name. ResourceIdentifiers []*ResourceIdentifier `locationName:"resourceIdentifiers" type:"list"` } // String returns the string representation func (s ListDiscoveredResourcesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ListDiscoveredResourcesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListDiscoveredResourcesOutput) SetNextToken(v string) *ListDiscoveredResourcesOutput { s.NextToken = &v return s } // SetResourceIdentifiers sets the ResourceIdentifiers field's value. func (s *ListDiscoveredResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *ListDiscoveredResourcesOutput { s.ResourceIdentifiers = v return s } type ListTagsForResourceInput struct { _ struct{} `type:"structure"` // The maximum number of tags returned on each page. The limit maximum is 50. // You cannot specify a number greater than 50. If you specify 0, AWS Config // uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The Amazon Resource Name (ARN) that identifies the resource for which to // list the tags. Currently, the supported resources are ConfigRule, ConfigurationAggregator // and AggregatorAuthorization. // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s ListTagsForResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ListTagsForResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListTagsForResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetLimit sets the Limit field's value. func (s *ListTagsForResourceInput) SetLimit(v int64) *ListTagsForResourceInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { s.NextToken = &v return s } // SetResourceArn sets the ResourceArn field's value. func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { s.ResourceArn = &v return s } type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` // The tags for the resource. Tags []*Tag `min:"1" type:"list"` } // String returns the string representation func (s ListTagsForResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ListTagsForResourceOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { s.NextToken = &v return s } // SetTags sets the Tags field's value. func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { s.Tags = v return s } // You have reached the limit (100,000) of active custom resource types in your // account. Delete unused resources using DeleteResourceConfig. type MaxActiveResourcesExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxActiveResourcesExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxActiveResourcesExceededException) GoString() string { return s.String() } func newErrorMaxActiveResourcesExceededException(v protocol.ResponseMetadata) error { return &MaxActiveResourcesExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxActiveResourcesExceededException) Code() string { return "MaxActiveResourcesExceededException" } // Message returns the exception's message. func (s *MaxActiveResourcesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxActiveResourcesExceededException) OrigErr() error { return nil } func (s *MaxActiveResourcesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxActiveResourcesExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxActiveResourcesExceededException) RequestID() string { return s.RespMetadata.RequestID } // Failed to add the AWS Config rule because the account already contains the // maximum number of 150 rules. Consider deleting any deactivated rules before // you add new rules. type MaxNumberOfConfigRulesExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxNumberOfConfigRulesExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxNumberOfConfigRulesExceededException) GoString() string { return s.String() } func newErrorMaxNumberOfConfigRulesExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfConfigRulesExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxNumberOfConfigRulesExceededException) Code() string { return "MaxNumberOfConfigRulesExceededException" } // Message returns the exception's message. func (s *MaxNumberOfConfigRulesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxNumberOfConfigRulesExceededException) OrigErr() error { return nil } func (s *MaxNumberOfConfigRulesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxNumberOfConfigRulesExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxNumberOfConfigRulesExceededException) RequestID() string { return s.RespMetadata.RequestID } // You have reached the limit of the number of recorders you can create. type MaxNumberOfConfigurationRecordersExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxNumberOfConfigurationRecordersExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxNumberOfConfigurationRecordersExceededException) GoString() string { return s.String() } func newErrorMaxNumberOfConfigurationRecordersExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfConfigurationRecordersExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxNumberOfConfigurationRecordersExceededException) Code() string { return "MaxNumberOfConfigurationRecordersExceededException" } // Message returns the exception's message. func (s *MaxNumberOfConfigurationRecordersExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxNumberOfConfigurationRecordersExceededException) OrigErr() error { return nil } func (s *MaxNumberOfConfigurationRecordersExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxNumberOfConfigurationRecordersExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxNumberOfConfigurationRecordersExceededException) RequestID() string { return s.RespMetadata.RequestID } // You have reached the limit (6) of the number of conformance packs in an account // (6 conformance pack with 25 AWS Config rules per pack). type MaxNumberOfConformancePacksExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxNumberOfConformancePacksExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxNumberOfConformancePacksExceededException) GoString() string { return s.String() } func newErrorMaxNumberOfConformancePacksExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfConformancePacksExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxNumberOfConformancePacksExceededException) Code() string { return "MaxNumberOfConformancePacksExceededException" } // Message returns the exception's message. func (s *MaxNumberOfConformancePacksExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxNumberOfConformancePacksExceededException) OrigErr() error { return nil } func (s *MaxNumberOfConformancePacksExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxNumberOfConformancePacksExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxNumberOfConformancePacksExceededException) RequestID() string { return s.RespMetadata.RequestID } // You have reached the limit of the number of delivery channels you can create. type MaxNumberOfDeliveryChannelsExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxNumberOfDeliveryChannelsExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxNumberOfDeliveryChannelsExceededException) GoString() string { return s.String() } func newErrorMaxNumberOfDeliveryChannelsExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfDeliveryChannelsExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxNumberOfDeliveryChannelsExceededException) Code() string { return "MaxNumberOfDeliveryChannelsExceededException" } // Message returns the exception's message. func (s *MaxNumberOfDeliveryChannelsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxNumberOfDeliveryChannelsExceededException) OrigErr() error { return nil } func (s *MaxNumberOfDeliveryChannelsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxNumberOfDeliveryChannelsExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxNumberOfDeliveryChannelsExceededException) RequestID() string { return s.RespMetadata.RequestID } // You have reached the limit of the number of organization config rules you // can create. type MaxNumberOfOrganizationConfigRulesExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxNumberOfOrganizationConfigRulesExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxNumberOfOrganizationConfigRulesExceededException) GoString() string { return s.String() } func newErrorMaxNumberOfOrganizationConfigRulesExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfOrganizationConfigRulesExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxNumberOfOrganizationConfigRulesExceededException) Code() string { return "MaxNumberOfOrganizationConfigRulesExceededException" } // Message returns the exception's message. func (s *MaxNumberOfOrganizationConfigRulesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxNumberOfOrganizationConfigRulesExceededException) OrigErr() error { return nil } func (s *MaxNumberOfOrganizationConfigRulesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxNumberOfOrganizationConfigRulesExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxNumberOfOrganizationConfigRulesExceededException) RequestID() string { return s.RespMetadata.RequestID } // You have reached the limit (6) of the number of organization conformance // packs in an account (6 conformance pack with 25 AWS Config rules per pack // per account). type MaxNumberOfOrganizationConformancePacksExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxNumberOfOrganizationConformancePacksExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxNumberOfOrganizationConformancePacksExceededException) GoString() string { return s.String() } func newErrorMaxNumberOfOrganizationConformancePacksExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfOrganizationConformancePacksExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxNumberOfOrganizationConformancePacksExceededException) Code() string { return "MaxNumberOfOrganizationConformancePacksExceededException" } // Message returns the exception's message. func (s *MaxNumberOfOrganizationConformancePacksExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxNumberOfOrganizationConformancePacksExceededException) OrigErr() error { return nil } func (s *MaxNumberOfOrganizationConformancePacksExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxNumberOfOrganizationConformancePacksExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxNumberOfOrganizationConformancePacksExceededException) RequestID() string { return s.RespMetadata.RequestID } // Failed to add the retention configuration because a retention configuration // with that name already exists. type MaxNumberOfRetentionConfigurationsExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s MaxNumberOfRetentionConfigurationsExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MaxNumberOfRetentionConfigurationsExceededException) GoString() string { return s.String() } func newErrorMaxNumberOfRetentionConfigurationsExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfRetentionConfigurationsExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxNumberOfRetentionConfigurationsExceededException) Code() string { return "MaxNumberOfRetentionConfigurationsExceededException" } // Message returns the exception's message. func (s *MaxNumberOfRetentionConfigurationsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxNumberOfRetentionConfigurationsExceededException) OrigErr() error { return nil } func (s *MaxNumberOfRetentionConfigurationsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxNumberOfRetentionConfigurationsExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxNumberOfRetentionConfigurationsExceededException) RequestID() string { return s.RespMetadata.RequestID } // Organization config rule creation or deletion status in each member account. // This includes the name of the rule, the status, error code and error message // when the rule creation or deletion failed. type MemberAccountStatus struct { _ struct{} `type:"structure"` // The 12-digit account ID of a member account. // // AccountId is a required field AccountId *string `type:"string" required:"true"` // The name of config rule deployed in the member account. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // An error code that is returned when config rule creation or deletion failed // in the member account. ErrorCode *string `type:"string"` // An error message indicating that config rule account creation or deletion // has failed due to an error in the member account. ErrorMessage *string `type:"string"` // The timestamp of the last status update. LastUpdateTime *time.Time `type:"timestamp"` // Indicates deployment status for config rule in the member account. When master // account calls PutOrganizationConfigRule action for the first time, config // rule status is created in the member account. When master account calls PutOrganizationConfigRule // action for the second time, config rule status is updated in the member account. // Config rule status is deleted when the master account deletes OrganizationConfigRule // and disables service access for config-multiaccountsetup.amazonaws.com. // // AWS Config sets the state of the rule to: // // * CREATE_SUCCESSFUL when config rule has been created in the member account. // // * CREATE_IN_PROGRESS when config rule is being created in the member account. // // * CREATE_FAILED when config rule creation has failed in the member account. // // * DELETE_FAILED when config rule deletion has failed in the member account. // // * DELETE_IN_PROGRESS when config rule is being deleted in the member account. // // * DELETE_SUCCESSFUL when config rule has been deleted in the member account. // // * UPDATE_SUCCESSFUL when config rule has been updated in the member account. // // * UPDATE_IN_PROGRESS when config rule is being updated in the member account. // // * UPDATE_FAILED when config rule deletion has failed in the member account. // // MemberAccountRuleStatus is a required field MemberAccountRuleStatus *string `type:"string" required:"true" enum:"MemberAccountRuleStatus"` } // String returns the string representation func (s MemberAccountStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s MemberAccountStatus) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *MemberAccountStatus) SetAccountId(v string) *MemberAccountStatus { s.AccountId = &v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *MemberAccountStatus) SetConfigRuleName(v string) *MemberAccountStatus { s.ConfigRuleName = &v return s } // SetErrorCode sets the ErrorCode field's value. func (s *MemberAccountStatus) SetErrorCode(v string) *MemberAccountStatus { s.ErrorCode = &v return s } // SetErrorMessage sets the ErrorMessage field's value. func (s *MemberAccountStatus) SetErrorMessage(v string) *MemberAccountStatus { s.ErrorMessage = &v return s } // SetLastUpdateTime sets the LastUpdateTime field's value. func (s *MemberAccountStatus) SetLastUpdateTime(v time.Time) *MemberAccountStatus { s.LastUpdateTime = &v return s } // SetMemberAccountRuleStatus sets the MemberAccountRuleStatus field's value. func (s *MemberAccountStatus) SetMemberAccountRuleStatus(v string) *MemberAccountStatus { s.MemberAccountRuleStatus = &v return s } // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. type NoAvailableConfigurationRecorderException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoAvailableConfigurationRecorderException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoAvailableConfigurationRecorderException) GoString() string { return s.String() } func newErrorNoAvailableConfigurationRecorderException(v protocol.ResponseMetadata) error { return &NoAvailableConfigurationRecorderException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoAvailableConfigurationRecorderException) Code() string { return "NoAvailableConfigurationRecorderException" } // Message returns the exception's message. func (s *NoAvailableConfigurationRecorderException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoAvailableConfigurationRecorderException) OrigErr() error { return nil } func (s *NoAvailableConfigurationRecorderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoAvailableConfigurationRecorderException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoAvailableConfigurationRecorderException) RequestID() string { return s.RespMetadata.RequestID } // There is no delivery channel available to record configurations. type NoAvailableDeliveryChannelException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoAvailableDeliveryChannelException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoAvailableDeliveryChannelException) GoString() string { return s.String() } func newErrorNoAvailableDeliveryChannelException(v protocol.ResponseMetadata) error { return &NoAvailableDeliveryChannelException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoAvailableDeliveryChannelException) Code() string { return "NoAvailableDeliveryChannelException" } // Message returns the exception's message. func (s *NoAvailableDeliveryChannelException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoAvailableDeliveryChannelException) OrigErr() error { return nil } func (s *NoAvailableDeliveryChannelException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoAvailableDeliveryChannelException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoAvailableDeliveryChannelException) RequestID() string { return s.RespMetadata.RequestID } // Organization is no longer available. type NoAvailableOrganizationException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoAvailableOrganizationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoAvailableOrganizationException) GoString() string { return s.String() } func newErrorNoAvailableOrganizationException(v protocol.ResponseMetadata) error { return &NoAvailableOrganizationException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoAvailableOrganizationException) Code() string { return "NoAvailableOrganizationException" } // Message returns the exception's message. func (s *NoAvailableOrganizationException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoAvailableOrganizationException) OrigErr() error { return nil } func (s *NoAvailableOrganizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoAvailableOrganizationException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoAvailableOrganizationException) RequestID() string { return s.RespMetadata.RequestID } // There is no configuration recorder running. type NoRunningConfigurationRecorderException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoRunningConfigurationRecorderException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoRunningConfigurationRecorderException) GoString() string { return s.String() } func newErrorNoRunningConfigurationRecorderException(v protocol.ResponseMetadata) error { return &NoRunningConfigurationRecorderException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoRunningConfigurationRecorderException) Code() string { return "NoRunningConfigurationRecorderException" } // Message returns the exception's message. func (s *NoRunningConfigurationRecorderException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoRunningConfigurationRecorderException) OrigErr() error { return nil } func (s *NoRunningConfigurationRecorderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoRunningConfigurationRecorderException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoRunningConfigurationRecorderException) RequestID() string { return s.RespMetadata.RequestID } // The specified Amazon S3 bucket does not exist. type NoSuchBucketException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchBucketException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchBucketException) GoString() string { return s.String() } func newErrorNoSuchBucketException(v protocol.ResponseMetadata) error { return &NoSuchBucketException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchBucketException) Code() string { return "NoSuchBucketException" } // Message returns the exception's message. func (s *NoSuchBucketException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchBucketException) OrigErr() error { return nil } func (s *NoSuchBucketException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchBucketException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchBucketException) RequestID() string { return s.RespMetadata.RequestID } // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. type NoSuchConfigRuleException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchConfigRuleException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchConfigRuleException) GoString() string { return s.String() } func newErrorNoSuchConfigRuleException(v protocol.ResponseMetadata) error { return &NoSuchConfigRuleException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchConfigRuleException) Code() string { return "NoSuchConfigRuleException" } // Message returns the exception's message. func (s *NoSuchConfigRuleException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchConfigRuleException) OrigErr() error { return nil } func (s *NoSuchConfigRuleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchConfigRuleException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchConfigRuleException) RequestID() string { return s.RespMetadata.RequestID } // AWS Config rule that you passed in the filter does not exist. type NoSuchConfigRuleInConformancePackException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchConfigRuleInConformancePackException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchConfigRuleInConformancePackException) GoString() string { return s.String() } func newErrorNoSuchConfigRuleInConformancePackException(v protocol.ResponseMetadata) error { return &NoSuchConfigRuleInConformancePackException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchConfigRuleInConformancePackException) Code() string { return "NoSuchConfigRuleInConformancePackException" } // Message returns the exception's message. func (s *NoSuchConfigRuleInConformancePackException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchConfigRuleInConformancePackException) OrigErr() error { return nil } func (s *NoSuchConfigRuleInConformancePackException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchConfigRuleInConformancePackException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchConfigRuleInConformancePackException) RequestID() string { return s.RespMetadata.RequestID } // You have specified a configuration aggregator that does not exist. type NoSuchConfigurationAggregatorException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchConfigurationAggregatorException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchConfigurationAggregatorException) GoString() string { return s.String() } func newErrorNoSuchConfigurationAggregatorException(v protocol.ResponseMetadata) error { return &NoSuchConfigurationAggregatorException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchConfigurationAggregatorException) Code() string { return "NoSuchConfigurationAggregatorException" } // Message returns the exception's message. func (s *NoSuchConfigurationAggregatorException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchConfigurationAggregatorException) OrigErr() error { return nil } func (s *NoSuchConfigurationAggregatorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchConfigurationAggregatorException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchConfigurationAggregatorException) RequestID() string { return s.RespMetadata.RequestID } // You have specified a configuration recorder that does not exist. type NoSuchConfigurationRecorderException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchConfigurationRecorderException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchConfigurationRecorderException) GoString() string { return s.String() } func newErrorNoSuchConfigurationRecorderException(v protocol.ResponseMetadata) error { return &NoSuchConfigurationRecorderException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchConfigurationRecorderException) Code() string { return "NoSuchConfigurationRecorderException" } // Message returns the exception's message. func (s *NoSuchConfigurationRecorderException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchConfigurationRecorderException) OrigErr() error { return nil } func (s *NoSuchConfigurationRecorderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchConfigurationRecorderException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchConfigurationRecorderException) RequestID() string { return s.RespMetadata.RequestID } // You specified one or more conformance packs that do not exist. type NoSuchConformancePackException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchConformancePackException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchConformancePackException) GoString() string { return s.String() } func newErrorNoSuchConformancePackException(v protocol.ResponseMetadata) error { return &NoSuchConformancePackException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchConformancePackException) Code() string { return "NoSuchConformancePackException" } // Message returns the exception's message. func (s *NoSuchConformancePackException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchConformancePackException) OrigErr() error { return nil } func (s *NoSuchConformancePackException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchConformancePackException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchConformancePackException) RequestID() string { return s.RespMetadata.RequestID } // You have specified a delivery channel that does not exist. type NoSuchDeliveryChannelException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchDeliveryChannelException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchDeliveryChannelException) GoString() string { return s.String() } func newErrorNoSuchDeliveryChannelException(v protocol.ResponseMetadata) error { return &NoSuchDeliveryChannelException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchDeliveryChannelException) Code() string { return "NoSuchDeliveryChannelException" } // Message returns the exception's message. func (s *NoSuchDeliveryChannelException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchDeliveryChannelException) OrigErr() error { return nil } func (s *NoSuchDeliveryChannelException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchDeliveryChannelException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchDeliveryChannelException) RequestID() string { return s.RespMetadata.RequestID } // You specified one or more organization config rules that do not exist. type NoSuchOrganizationConfigRuleException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchOrganizationConfigRuleException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchOrganizationConfigRuleException) GoString() string { return s.String() } func newErrorNoSuchOrganizationConfigRuleException(v protocol.ResponseMetadata) error { return &NoSuchOrganizationConfigRuleException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchOrganizationConfigRuleException) Code() string { return "NoSuchOrganizationConfigRuleException" } // Message returns the exception's message. func (s *NoSuchOrganizationConfigRuleException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchOrganizationConfigRuleException) OrigErr() error { return nil } func (s *NoSuchOrganizationConfigRuleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchOrganizationConfigRuleException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchOrganizationConfigRuleException) RequestID() string { return s.RespMetadata.RequestID } // AWS Config organization conformance pack that you passed in the filter does // not exist. // // For DeleteOrganizationConformancePack, you tried to delete an organization // conformance pack that does not exist. type NoSuchOrganizationConformancePackException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchOrganizationConformancePackException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchOrganizationConformancePackException) GoString() string { return s.String() } func newErrorNoSuchOrganizationConformancePackException(v protocol.ResponseMetadata) error { return &NoSuchOrganizationConformancePackException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchOrganizationConformancePackException) Code() string { return "NoSuchOrganizationConformancePackException" } // Message returns the exception's message. func (s *NoSuchOrganizationConformancePackException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchOrganizationConformancePackException) OrigErr() error { return nil } func (s *NoSuchOrganizationConformancePackException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchOrganizationConformancePackException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchOrganizationConformancePackException) RequestID() string { return s.RespMetadata.RequestID } // You specified an AWS Config rule without a remediation configuration. type NoSuchRemediationConfigurationException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchRemediationConfigurationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchRemediationConfigurationException) GoString() string { return s.String() } func newErrorNoSuchRemediationConfigurationException(v protocol.ResponseMetadata) error { return &NoSuchRemediationConfigurationException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchRemediationConfigurationException) Code() string { return "NoSuchRemediationConfigurationException" } // Message returns the exception's message. func (s *NoSuchRemediationConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchRemediationConfigurationException) OrigErr() error { return nil } func (s *NoSuchRemediationConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchRemediationConfigurationException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchRemediationConfigurationException) RequestID() string { return s.RespMetadata.RequestID } // You tried to delete a remediation exception that does not exist. type NoSuchRemediationExceptionException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchRemediationExceptionException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchRemediationExceptionException) GoString() string { return s.String() } func newErrorNoSuchRemediationExceptionException(v protocol.ResponseMetadata) error { return &NoSuchRemediationExceptionException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchRemediationExceptionException) Code() string { return "NoSuchRemediationExceptionException" } // Message returns the exception's message. func (s *NoSuchRemediationExceptionException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchRemediationExceptionException) OrigErr() error { return nil } func (s *NoSuchRemediationExceptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchRemediationExceptionException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchRemediationExceptionException) RequestID() string { return s.RespMetadata.RequestID } // You have specified a retention configuration that does not exist. type NoSuchRetentionConfigurationException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s NoSuchRetentionConfigurationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s NoSuchRetentionConfigurationException) GoString() string { return s.String() } func newErrorNoSuchRetentionConfigurationException(v protocol.ResponseMetadata) error { return &NoSuchRetentionConfigurationException{ RespMetadata: v, } } // Code returns the exception type name. func (s *NoSuchRetentionConfigurationException) Code() string { return "NoSuchRetentionConfigurationException" } // Message returns the exception's message. func (s *NoSuchRetentionConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *NoSuchRetentionConfigurationException) OrigErr() error { return nil } func (s *NoSuchRetentionConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *NoSuchRetentionConfigurationException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *NoSuchRetentionConfigurationException) RequestID() string { return s.RespMetadata.RequestID } // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess // API. // // For all OrganizationConfigRule and OrganizationConformancePack APIs, AWS // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. type OrganizationAccessDeniedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s OrganizationAccessDeniedException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationAccessDeniedException) GoString() string { return s.String() } func newErrorOrganizationAccessDeniedException(v protocol.ResponseMetadata) error { return &OrganizationAccessDeniedException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OrganizationAccessDeniedException) Code() string { return "OrganizationAccessDeniedException" } // Message returns the exception's message. func (s *OrganizationAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OrganizationAccessDeniedException) OrigErr() error { return nil } func (s *OrganizationAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OrganizationAccessDeniedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OrganizationAccessDeniedException) RequestID() string { return s.RespMetadata.RequestID } // This object contains regions to set up the aggregator and an IAM role to // retrieve organization details. type OrganizationAggregationSource struct { _ struct{} `type:"structure"` // If true, aggregate existing AWS Config regions and future regions. AllAwsRegions *bool `type:"boolean"` // The source regions being aggregated. AwsRegions []*string `min:"1" type:"list"` // ARN of the IAM role used to retrieve AWS Organization details associated // with the aggregator account. // // RoleArn is a required field RoleArn *string `type:"string" required:"true"` } // String returns the string representation func (s OrganizationAggregationSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationAggregationSource) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OrganizationAggregationSource) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OrganizationAggregationSource"} if s.AwsRegions != nil && len(s.AwsRegions) < 1 { invalidParams.Add(request.NewErrParamMinLen("AwsRegions", 1)) } if s.RoleArn == nil { invalidParams.Add(request.NewErrParamRequired("RoleArn")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAllAwsRegions sets the AllAwsRegions field's value. func (s *OrganizationAggregationSource) SetAllAwsRegions(v bool) *OrganizationAggregationSource { s.AllAwsRegions = &v return s } // SetAwsRegions sets the AwsRegions field's value. func (s *OrganizationAggregationSource) SetAwsRegions(v []*string) *OrganizationAggregationSource { s.AwsRegions = v return s } // SetRoleArn sets the RoleArn field's value. func (s *OrganizationAggregationSource) SetRoleArn(v string) *OrganizationAggregationSource { s.RoleArn = &v return s } // AWS Config resource cannot be created because your organization does not // have all features enabled. type OrganizationAllFeaturesNotEnabledException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s OrganizationAllFeaturesNotEnabledException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationAllFeaturesNotEnabledException) GoString() string { return s.String() } func newErrorOrganizationAllFeaturesNotEnabledException(v protocol.ResponseMetadata) error { return &OrganizationAllFeaturesNotEnabledException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OrganizationAllFeaturesNotEnabledException) Code() string { return "OrganizationAllFeaturesNotEnabledException" } // Message returns the exception's message. func (s *OrganizationAllFeaturesNotEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OrganizationAllFeaturesNotEnabledException) OrigErr() error { return nil } func (s *OrganizationAllFeaturesNotEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OrganizationAllFeaturesNotEnabledException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OrganizationAllFeaturesNotEnabledException) RequestID() string { return s.RespMetadata.RequestID } // An organization config rule that has information about config rules that // AWS Config creates in member accounts. type OrganizationConfigRule struct { _ struct{} `type:"structure"` // A comma-separated list of accounts excluded from organization config rule. ExcludedAccounts []*string `type:"list"` // The timestamp of the last update. LastUpdateTime *time.Time `type:"timestamp"` // Amazon Resource Name (ARN) of organization config rule. // // OrganizationConfigRuleArn is a required field OrganizationConfigRuleArn *string `min:"1" type:"string" required:"true"` // The name that you assign to organization config rule. // // OrganizationConfigRuleName is a required field OrganizationConfigRuleName *string `min:"1" type:"string" required:"true"` // An OrganizationCustomRuleMetadata object. OrganizationCustomRuleMetadata *OrganizationCustomRuleMetadata `type:"structure"` // An OrganizationManagedRuleMetadata object. OrganizationManagedRuleMetadata *OrganizationManagedRuleMetadata `type:"structure"` } // String returns the string representation func (s OrganizationConfigRule) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationConfigRule) GoString() string { return s.String() } // SetExcludedAccounts sets the ExcludedAccounts field's value. func (s *OrganizationConfigRule) SetExcludedAccounts(v []*string) *OrganizationConfigRule { s.ExcludedAccounts = v return s } // SetLastUpdateTime sets the LastUpdateTime field's value. func (s *OrganizationConfigRule) SetLastUpdateTime(v time.Time) *OrganizationConfigRule { s.LastUpdateTime = &v return s } // SetOrganizationConfigRuleArn sets the OrganizationConfigRuleArn field's value. func (s *OrganizationConfigRule) SetOrganizationConfigRuleArn(v string) *OrganizationConfigRule { s.OrganizationConfigRuleArn = &v return s } // SetOrganizationConfigRuleName sets the OrganizationConfigRuleName field's value. func (s *OrganizationConfigRule) SetOrganizationConfigRuleName(v string) *OrganizationConfigRule { s.OrganizationConfigRuleName = &v return s } // SetOrganizationCustomRuleMetadata sets the OrganizationCustomRuleMetadata field's value. func (s *OrganizationConfigRule) SetOrganizationCustomRuleMetadata(v *OrganizationCustomRuleMetadata) *OrganizationConfigRule { s.OrganizationCustomRuleMetadata = v return s } // SetOrganizationManagedRuleMetadata sets the OrganizationManagedRuleMetadata field's value. func (s *OrganizationConfigRule) SetOrganizationManagedRuleMetadata(v *OrganizationManagedRuleMetadata) *OrganizationConfigRule { s.OrganizationManagedRuleMetadata = v return s } // Returns the status for an organization config rule in an organization. type OrganizationConfigRuleStatus struct { _ struct{} `type:"structure"` // An error code that is returned when organization config rule creation or // deletion has failed. ErrorCode *string `type:"string"` // An error message indicating that organization config rule creation or deletion // failed due to an error. ErrorMessage *string `type:"string"` // The timestamp of the last update. LastUpdateTime *time.Time `type:"timestamp"` // The name that you assign to organization config rule. // // OrganizationConfigRuleName is a required field OrganizationConfigRuleName *string `min:"1" type:"string" required:"true"` // Indicates deployment status of an organization config rule. When master account // calls PutOrganizationConfigRule action for the first time, config rule status // is created in all the member accounts. When master account calls PutOrganizationConfigRule // action for the second time, config rule status is updated in all the member // accounts. Additionally, config rule status is updated when one or more member // accounts join or leave an organization. Config rule status is deleted when // the master account deletes OrganizationConfigRule in all the member accounts // and disables service access for config-multiaccountsetup.amazonaws.com. // // AWS Config sets the state of the rule to: // // * CREATE_SUCCESSFUL when an organization config rule has been successfully // created in all the member accounts. // // * CREATE_IN_PROGRESS when an organization config rule creation is in progress. // // * CREATE_FAILED when an organization config rule creation failed in one // or more member accounts within that organization. // // * DELETE_FAILED when an organization config rule deletion failed in one // or more member accounts within that organization. // // * DELETE_IN_PROGRESS when an organization config rule deletion is in progress. // // * DELETE_SUCCESSFUL when an organization config rule has been successfully // deleted from all the member accounts. // // * UPDATE_SUCCESSFUL when an organization config rule has been successfully // updated in all the member accounts. // // * UPDATE_IN_PROGRESS when an organization config rule update is in progress. // // * UPDATE_FAILED when an organization config rule update failed in one // or more member accounts within that organization. // // OrganizationRuleStatus is a required field OrganizationRuleStatus *string `type:"string" required:"true" enum:"OrganizationRuleStatus"` } // String returns the string representation func (s OrganizationConfigRuleStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationConfigRuleStatus) GoString() string { return s.String() } // SetErrorCode sets the ErrorCode field's value. func (s *OrganizationConfigRuleStatus) SetErrorCode(v string) *OrganizationConfigRuleStatus { s.ErrorCode = &v return s } // SetErrorMessage sets the ErrorMessage field's value. func (s *OrganizationConfigRuleStatus) SetErrorMessage(v string) *OrganizationConfigRuleStatus { s.ErrorMessage = &v return s } // SetLastUpdateTime sets the LastUpdateTime field's value. func (s *OrganizationConfigRuleStatus) SetLastUpdateTime(v time.Time) *OrganizationConfigRuleStatus { s.LastUpdateTime = &v return s } // SetOrganizationConfigRuleName sets the OrganizationConfigRuleName field's value. func (s *OrganizationConfigRuleStatus) SetOrganizationConfigRuleName(v string) *OrganizationConfigRuleStatus { s.OrganizationConfigRuleName = &v return s } // SetOrganizationRuleStatus sets the OrganizationRuleStatus field's value. func (s *OrganizationConfigRuleStatus) SetOrganizationRuleStatus(v string) *OrganizationConfigRuleStatus { s.OrganizationRuleStatus = &v return s } // An organization conformance pack that has information about conformance packs // that AWS Config creates in member accounts. type OrganizationConformancePack struct { _ struct{} `type:"structure"` // A list of ConformancePackInputParameter objects. ConformancePackInputParameters []*ConformancePackInputParameter `type:"list"` // Location of an Amazon S3 bucket where AWS Config can deliver evaluation results // and conformance pack template that is used to create a pack. // // DeliveryS3Bucket is a required field DeliveryS3Bucket *string `min:"3" type:"string" required:"true"` // Any folder structure you want to add to an Amazon S3 bucket. DeliveryS3KeyPrefix *string `min:"1" type:"string"` // A comma-separated list of accounts excluded from organization conformance // pack. ExcludedAccounts []*string `type:"list"` // Last time when organization conformation pack was updated. // // LastUpdateTime is a required field LastUpdateTime *time.Time `type:"timestamp" required:"true"` // Amazon Resource Name (ARN) of organization conformance pack. // // OrganizationConformancePackArn is a required field OrganizationConformancePackArn *string `min:"1" type:"string" required:"true"` // The name you assign to an organization conformance pack. // // OrganizationConformancePackName is a required field OrganizationConformancePackName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s OrganizationConformancePack) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationConformancePack) GoString() string { return s.String() } // SetConformancePackInputParameters sets the ConformancePackInputParameters field's value. func (s *OrganizationConformancePack) SetConformancePackInputParameters(v []*ConformancePackInputParameter) *OrganizationConformancePack { s.ConformancePackInputParameters = v return s } // SetDeliveryS3Bucket sets the DeliveryS3Bucket field's value. func (s *OrganizationConformancePack) SetDeliveryS3Bucket(v string) *OrganizationConformancePack { s.DeliveryS3Bucket = &v return s } // SetDeliveryS3KeyPrefix sets the DeliveryS3KeyPrefix field's value. func (s *OrganizationConformancePack) SetDeliveryS3KeyPrefix(v string) *OrganizationConformancePack { s.DeliveryS3KeyPrefix = &v return s } // SetExcludedAccounts sets the ExcludedAccounts field's value. func (s *OrganizationConformancePack) SetExcludedAccounts(v []*string) *OrganizationConformancePack { s.ExcludedAccounts = v return s } // SetLastUpdateTime sets the LastUpdateTime field's value. func (s *OrganizationConformancePack) SetLastUpdateTime(v time.Time) *OrganizationConformancePack { s.LastUpdateTime = &v return s } // SetOrganizationConformancePackArn sets the OrganizationConformancePackArn field's value. func (s *OrganizationConformancePack) SetOrganizationConformancePackArn(v string) *OrganizationConformancePack { s.OrganizationConformancePackArn = &v return s } // SetOrganizationConformancePackName sets the OrganizationConformancePackName field's value. func (s *OrganizationConformancePack) SetOrganizationConformancePackName(v string) *OrganizationConformancePack { s.OrganizationConformancePackName = &v return s } // Organization conformance pack creation or deletion status in each member // account. This includes the name of the conformance pack, the status, error // code and error message when the conformance pack creation or deletion failed. type OrganizationConformancePackDetailedStatus struct { _ struct{} `type:"structure"` // The 12-digit account ID of a member account. // // AccountId is a required field AccountId *string `type:"string" required:"true"` // The name of conformance pack deployed in the member account. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // An error code that is returned when conformance pack creation or deletion // failed in the member account. ErrorCode *string `type:"string"` // An error message indicating that conformance pack account creation or deletion // has failed due to an error in the member account. ErrorMessage *string `type:"string"` // The timestamp of the last status update. LastUpdateTime *time.Time `type:"timestamp"` // Indicates deployment status for conformance pack in a member account. When // master account calls PutOrganizationConformancePack action for the first // time, conformance pack status is created in the member account. When master // account calls PutOrganizationConformancePack action for the second time, // conformance pack status is updated in the member account. Conformance pack // status is deleted when the master account deletes OrganizationConformancePack // and disables service access for config-multiaccountsetup.amazonaws.com. // // AWS Config sets the state of the conformance pack to: // // * CREATE_SUCCESSFUL when conformance pack has been created in the member // account. // // * CREATE_IN_PROGRESS when conformance pack is being created in the member // account. // // * CREATE_FAILED when conformance pack creation has failed in the member // account. // // * DELETE_FAILED when conformance pack deletion has failed in the member // account. // // * DELETE_IN_PROGRESS when conformance pack is being deleted in the member // account. // // * DELETE_SUCCESSFUL when conformance pack has been deleted in the member // account. // // * UPDATE_SUCCESSFUL when conformance pack has been updated in the member // account. // // * UPDATE_IN_PROGRESS when conformance pack is being updated in the member // account. // // * UPDATE_FAILED when conformance pack deletion has failed in the member // account. // // Status is a required field Status *string `type:"string" required:"true" enum:"OrganizationResourceDetailedStatus"` } // String returns the string representation func (s OrganizationConformancePackDetailedStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationConformancePackDetailedStatus) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *OrganizationConformancePackDetailedStatus) SetAccountId(v string) *OrganizationConformancePackDetailedStatus { s.AccountId = &v return s } // SetConformancePackName sets the ConformancePackName field's value. func (s *OrganizationConformancePackDetailedStatus) SetConformancePackName(v string) *OrganizationConformancePackDetailedStatus { s.ConformancePackName = &v return s } // SetErrorCode sets the ErrorCode field's value. func (s *OrganizationConformancePackDetailedStatus) SetErrorCode(v string) *OrganizationConformancePackDetailedStatus { s.ErrorCode = &v return s } // SetErrorMessage sets the ErrorMessage field's value. func (s *OrganizationConformancePackDetailedStatus) SetErrorMessage(v string) *OrganizationConformancePackDetailedStatus { s.ErrorMessage = &v return s } // SetLastUpdateTime sets the LastUpdateTime field's value. func (s *OrganizationConformancePackDetailedStatus) SetLastUpdateTime(v time.Time) *OrganizationConformancePackDetailedStatus { s.LastUpdateTime = &v return s } // SetStatus sets the Status field's value. func (s *OrganizationConformancePackDetailedStatus) SetStatus(v string) *OrganizationConformancePackDetailedStatus { s.Status = &v return s } // Returns the status for an organization conformance pack in an organization. type OrganizationConformancePackStatus struct { _ struct{} `type:"structure"` // An error code that is returned when organization conformance pack creation // or deletion has failed in a member account. ErrorCode *string `type:"string"` // An error message indicating that organization conformance pack creation or // deletion failed due to an error. ErrorMessage *string `type:"string"` // The timestamp of the last update. LastUpdateTime *time.Time `type:"timestamp"` // The name that you assign to organization conformance pack. // // OrganizationConformancePackName is a required field OrganizationConformancePackName *string `min:"1" type:"string" required:"true"` // Indicates deployment status of an organization conformance pack. When master // account calls PutOrganizationConformancePack for the first time, conformance // pack status is created in all the member accounts. When master account calls // PutOrganizationConformancePack for the second time, conformance pack status // is updated in all the member accounts. Additionally, conformance pack status // is updated when one or more member accounts join or leave an organization. // Conformance pack status is deleted when the master account deletes OrganizationConformancePack // in all the member accounts and disables service access for config-multiaccountsetup.amazonaws.com. // // AWS Config sets the state of the conformance pack to: // // * CREATE_SUCCESSFUL when an organization conformance pack has been successfully // created in all the member accounts. // // * CREATE_IN_PROGRESS when an organization conformance pack creation is // in progress. // // * CREATE_FAILED when an organization conformance pack creation failed // in one or more member accounts within that organization. // // * DELETE_FAILED when an organization conformance pack deletion failed // in one or more member accounts within that organization. // // * DELETE_IN_PROGRESS when an organization conformance pack deletion is // in progress. // // * DELETE_SUCCESSFUL when an organization conformance pack has been successfully // deleted from all the member accounts. // // * UPDATE_SUCCESSFUL when an organization conformance pack has been successfully // updated in all the member accounts. // // * UPDATE_IN_PROGRESS when an organization conformance pack update is in // progress. // // * UPDATE_FAILED when an organization conformance pack update failed in // one or more member accounts within that organization. // // Status is a required field Status *string `type:"string" required:"true" enum:"OrganizationResourceStatus"` } // String returns the string representation func (s OrganizationConformancePackStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationConformancePackStatus) GoString() string { return s.String() } // SetErrorCode sets the ErrorCode field's value. func (s *OrganizationConformancePackStatus) SetErrorCode(v string) *OrganizationConformancePackStatus { s.ErrorCode = &v return s } // SetErrorMessage sets the ErrorMessage field's value. func (s *OrganizationConformancePackStatus) SetErrorMessage(v string) *OrganizationConformancePackStatus { s.ErrorMessage = &v return s } // SetLastUpdateTime sets the LastUpdateTime field's value. func (s *OrganizationConformancePackStatus) SetLastUpdateTime(v time.Time) *OrganizationConformancePackStatus { s.LastUpdateTime = &v return s } // SetOrganizationConformancePackName sets the OrganizationConformancePackName field's value. func (s *OrganizationConformancePackStatus) SetOrganizationConformancePackName(v string) *OrganizationConformancePackStatus { s.OrganizationConformancePackName = &v return s } // SetStatus sets the Status field's value. func (s *OrganizationConformancePackStatus) SetStatus(v string) *OrganizationConformancePackStatus { s.Status = &v return s } // You have specified a template that is not valid or supported. type OrganizationConformancePackTemplateValidationException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s OrganizationConformancePackTemplateValidationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationConformancePackTemplateValidationException) GoString() string { return s.String() } func newErrorOrganizationConformancePackTemplateValidationException(v protocol.ResponseMetadata) error { return &OrganizationConformancePackTemplateValidationException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OrganizationConformancePackTemplateValidationException) Code() string { return "OrganizationConformancePackTemplateValidationException" } // Message returns the exception's message. func (s *OrganizationConformancePackTemplateValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OrganizationConformancePackTemplateValidationException) OrigErr() error { return nil } func (s *OrganizationConformancePackTemplateValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OrganizationConformancePackTemplateValidationException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OrganizationConformancePackTemplateValidationException) RequestID() string { return s.RespMetadata.RequestID } // An object that specifies organization custom rule metadata such as resource // type, resource ID of AWS resource, Lamdba function ARN, and organization // trigger types that trigger AWS Config to evaluate your AWS resources against // a rule. It also provides the frequency with which you want AWS Config to // run evaluations for the rule if the trigger type is periodic. type OrganizationCustomRuleMetadata struct { _ struct{} `type:"structure"` // The description that you provide for organization config rule. Description *string `type:"string"` // A string, in JSON format, that is passed to organization config rule Lambda // function. InputParameters *string `min:"1" type:"string"` // The lambda function ARN. // // LambdaFunctionArn is a required field LambdaFunctionArn *string `min:"1" type:"string" required:"true"` // The maximum frequency with which AWS Config runs evaluations for a rule. // Your custom rule is triggered when AWS Config delivers the configuration // snapshot. For more information, see ConfigSnapshotDeliveryProperties. // // By default, rules with a periodic trigger are evaluated every 24 hours. To // change the frequency, specify a valid value for the MaximumExecutionFrequency // parameter. MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` // The type of notification that triggers AWS Config to run an evaluation for // a rule. You can specify the following notification types: // // * ConfigurationItemChangeNotification - Triggers an evaluation when AWS // Config delivers a configuration item as a result of a resource change. // // * OversizedConfigurationItemChangeNotification - Triggers an evaluation // when AWS Config delivers an oversized configuration item. AWS Config may // generate this notification type when a resource changes and the notification // exceeds the maximum size allowed by Amazon SNS. // // * ScheduledNotification - Triggers a periodic evaluation at the frequency // specified for MaximumExecutionFrequency. // // OrganizationConfigRuleTriggerTypes is a required field OrganizationConfigRuleTriggerTypes []*string `type:"list" required:"true"` // The ID of the AWS resource that was evaluated. ResourceIdScope *string `min:"1" type:"string"` // The type of the AWS resource that was evaluated. ResourceTypesScope []*string `type:"list"` // One part of a key-value pair that make up a tag. A key is a general label // that acts like a category for more specific tag values. TagKeyScope *string `min:"1" type:"string"` // The optional part of a key-value pair that make up a tag. A value acts as // a descriptor within a tag category (key). TagValueScope *string `min:"1" type:"string"` } // String returns the string representation func (s OrganizationCustomRuleMetadata) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationCustomRuleMetadata) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OrganizationCustomRuleMetadata) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OrganizationCustomRuleMetadata"} if s.InputParameters != nil && len(*s.InputParameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("InputParameters", 1)) } if s.LambdaFunctionArn == nil { invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn")) } if s.LambdaFunctionArn != nil && len(*s.LambdaFunctionArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("LambdaFunctionArn", 1)) } if s.OrganizationConfigRuleTriggerTypes == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationConfigRuleTriggerTypes")) } if s.ResourceIdScope != nil && len(*s.ResourceIdScope) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceIdScope", 1)) } if s.TagKeyScope != nil && len(*s.TagKeyScope) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagKeyScope", 1)) } if s.TagValueScope != nil && len(*s.TagValueScope) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagValueScope", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDescription sets the Description field's value. func (s *OrganizationCustomRuleMetadata) SetDescription(v string) *OrganizationCustomRuleMetadata { s.Description = &v return s } // SetInputParameters sets the InputParameters field's value. func (s *OrganizationCustomRuleMetadata) SetInputParameters(v string) *OrganizationCustomRuleMetadata { s.InputParameters = &v return s } // SetLambdaFunctionArn sets the LambdaFunctionArn field's value. func (s *OrganizationCustomRuleMetadata) SetLambdaFunctionArn(v string) *OrganizationCustomRuleMetadata { s.LambdaFunctionArn = &v return s } // SetMaximumExecutionFrequency sets the MaximumExecutionFrequency field's value. func (s *OrganizationCustomRuleMetadata) SetMaximumExecutionFrequency(v string) *OrganizationCustomRuleMetadata { s.MaximumExecutionFrequency = &v return s } // SetOrganizationConfigRuleTriggerTypes sets the OrganizationConfigRuleTriggerTypes field's value. func (s *OrganizationCustomRuleMetadata) SetOrganizationConfigRuleTriggerTypes(v []*string) *OrganizationCustomRuleMetadata { s.OrganizationConfigRuleTriggerTypes = v return s } // SetResourceIdScope sets the ResourceIdScope field's value. func (s *OrganizationCustomRuleMetadata) SetResourceIdScope(v string) *OrganizationCustomRuleMetadata { s.ResourceIdScope = &v return s } // SetResourceTypesScope sets the ResourceTypesScope field's value. func (s *OrganizationCustomRuleMetadata) SetResourceTypesScope(v []*string) *OrganizationCustomRuleMetadata { s.ResourceTypesScope = v return s } // SetTagKeyScope sets the TagKeyScope field's value. func (s *OrganizationCustomRuleMetadata) SetTagKeyScope(v string) *OrganizationCustomRuleMetadata { s.TagKeyScope = &v return s } // SetTagValueScope sets the TagValueScope field's value. func (s *OrganizationCustomRuleMetadata) SetTagValueScope(v string) *OrganizationCustomRuleMetadata { s.TagValueScope = &v return s } // An object that specifies organization managed rule metadata such as resource // type and ID of AWS resource along with the rule identifier. It also provides // the frequency with which you want AWS Config to run evaluations for the rule // if the trigger type is periodic. type OrganizationManagedRuleMetadata struct { _ struct{} `type:"structure"` // The description that you provide for organization config rule. Description *string `type:"string"` // A string, in JSON format, that is passed to organization config rule Lambda // function. InputParameters *string `min:"1" type:"string"` // The maximum frequency with which AWS Config runs evaluations for a rule. // You are using an AWS managed rule that is triggered at a periodic frequency. // // By default, rules with a periodic trigger are evaluated every 24 hours. To // change the frequency, specify a valid value for the MaximumExecutionFrequency // parameter. MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` // The ID of the AWS resource that was evaluated. ResourceIdScope *string `min:"1" type:"string"` // The type of the AWS resource that was evaluated. ResourceTypesScope []*string `type:"list"` // For organization config managed rules, a predefined identifier from a list. // For example, IAM_PASSWORD_POLICY is a managed rule. To reference a managed // rule, see Using AWS Managed Config Rules (https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html). // // RuleIdentifier is a required field RuleIdentifier *string `min:"1" type:"string" required:"true"` // One part of a key-value pair that make up a tag. A key is a general label // that acts like a category for more specific tag values. TagKeyScope *string `min:"1" type:"string"` // The optional part of a key-value pair that make up a tag. A value acts as // a descriptor within a tag category (key). TagValueScope *string `min:"1" type:"string"` } // String returns the string representation func (s OrganizationManagedRuleMetadata) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationManagedRuleMetadata) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OrganizationManagedRuleMetadata) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OrganizationManagedRuleMetadata"} if s.InputParameters != nil && len(*s.InputParameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("InputParameters", 1)) } if s.ResourceIdScope != nil && len(*s.ResourceIdScope) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceIdScope", 1)) } if s.RuleIdentifier == nil { invalidParams.Add(request.NewErrParamRequired("RuleIdentifier")) } if s.RuleIdentifier != nil && len(*s.RuleIdentifier) < 1 { invalidParams.Add(request.NewErrParamMinLen("RuleIdentifier", 1)) } if s.TagKeyScope != nil && len(*s.TagKeyScope) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagKeyScope", 1)) } if s.TagValueScope != nil && len(*s.TagValueScope) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagValueScope", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDescription sets the Description field's value. func (s *OrganizationManagedRuleMetadata) SetDescription(v string) *OrganizationManagedRuleMetadata { s.Description = &v return s } // SetInputParameters sets the InputParameters field's value. func (s *OrganizationManagedRuleMetadata) SetInputParameters(v string) *OrganizationManagedRuleMetadata { s.InputParameters = &v return s } // SetMaximumExecutionFrequency sets the MaximumExecutionFrequency field's value. func (s *OrganizationManagedRuleMetadata) SetMaximumExecutionFrequency(v string) *OrganizationManagedRuleMetadata { s.MaximumExecutionFrequency = &v return s } // SetResourceIdScope sets the ResourceIdScope field's value. func (s *OrganizationManagedRuleMetadata) SetResourceIdScope(v string) *OrganizationManagedRuleMetadata { s.ResourceIdScope = &v return s } // SetResourceTypesScope sets the ResourceTypesScope field's value. func (s *OrganizationManagedRuleMetadata) SetResourceTypesScope(v []*string) *OrganizationManagedRuleMetadata { s.ResourceTypesScope = v return s } // SetRuleIdentifier sets the RuleIdentifier field's value. func (s *OrganizationManagedRuleMetadata) SetRuleIdentifier(v string) *OrganizationManagedRuleMetadata { s.RuleIdentifier = &v return s } // SetTagKeyScope sets the TagKeyScope field's value. func (s *OrganizationManagedRuleMetadata) SetTagKeyScope(v string) *OrganizationManagedRuleMetadata { s.TagKeyScope = &v return s } // SetTagValueScope sets the TagValueScope field's value. func (s *OrganizationManagedRuleMetadata) SetTagValueScope(v string) *OrganizationManagedRuleMetadata { s.TagValueScope = &v return s } // Status filter object to filter results based on specific member account ID // or status type for an organization conformance pack. type OrganizationResourceDetailedStatusFilters struct { _ struct{} `type:"structure"` // The 12-digit account ID of the member account within an organization. AccountId *string `type:"string"` // Indicates deployment status for conformance pack in a member account. When // master account calls PutOrganizationConformancePack action for the first // time, conformance pack status is created in the member account. When master // account calls PutOrganizationConformancePack action for the second time, // conformance pack status is updated in the member account. Conformance pack // status is deleted when the master account deletes OrganizationConformancePack // and disables service access for config-multiaccountsetup.amazonaws.com. // // AWS Config sets the state of the conformance pack to: // // * CREATE_SUCCESSFUL when conformance pack has been created in the member // account. // // * CREATE_IN_PROGRESS when conformance pack is being created in the member // account. // // * CREATE_FAILED when conformance pack creation has failed in the member // account. // // * DELETE_FAILED when conformance pack deletion has failed in the member // account. // // * DELETE_IN_PROGRESS when conformance pack is being deleted in the member // account. // // * DELETE_SUCCESSFUL when conformance pack has been deleted in the member // account. // // * UPDATE_SUCCESSFUL when conformance pack has been updated in the member // account. // // * UPDATE_IN_PROGRESS when conformance pack is being updated in the member // account. // // * UPDATE_FAILED when conformance pack deletion has failed in the member // account. Status *string `type:"string" enum:"OrganizationResourceDetailedStatus"` } // String returns the string representation func (s OrganizationResourceDetailedStatusFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OrganizationResourceDetailedStatusFilters) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *OrganizationResourceDetailedStatusFilters) SetAccountId(v string) *OrganizationResourceDetailedStatusFilters { s.AccountId = &v return s } // SetStatus sets the Status field's value. func (s *OrganizationResourceDetailedStatusFilters) SetStatus(v string) *OrganizationResourceDetailedStatusFilters { s.Status = &v return s } // The configuration item size is outside the allowable range. type OversizedConfigurationItemException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s OversizedConfigurationItemException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s OversizedConfigurationItemException) GoString() string { return s.String() } func newErrorOversizedConfigurationItemException(v protocol.ResponseMetadata) error { return &OversizedConfigurationItemException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OversizedConfigurationItemException) Code() string { return "OversizedConfigurationItemException" } // Message returns the exception's message. func (s *OversizedConfigurationItemException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OversizedConfigurationItemException) OrigErr() error { return nil } func (s *OversizedConfigurationItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OversizedConfigurationItemException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OversizedConfigurationItemException) RequestID() string { return s.RespMetadata.RequestID } // An object that represents the account ID and region of an aggregator account // that is requesting authorization but is not yet authorized. type PendingAggregationRequest struct { _ struct{} `type:"structure"` // The 12-digit account ID of the account requesting to aggregate data. RequesterAccountId *string `type:"string"` // The region requesting to aggregate data. RequesterAwsRegion *string `min:"1" type:"string"` } // String returns the string representation func (s PendingAggregationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PendingAggregationRequest) GoString() string { return s.String() } // SetRequesterAccountId sets the RequesterAccountId field's value. func (s *PendingAggregationRequest) SetRequesterAccountId(v string) *PendingAggregationRequest { s.RequesterAccountId = &v return s } // SetRequesterAwsRegion sets the RequesterAwsRegion field's value. func (s *PendingAggregationRequest) SetRequesterAwsRegion(v string) *PendingAggregationRequest { s.RequesterAwsRegion = &v return s } type PutAggregationAuthorizationInput struct { _ struct{} `type:"structure"` // The 12-digit account ID of the account authorized to aggregate data. // // AuthorizedAccountId is a required field AuthorizedAccountId *string `type:"string" required:"true"` // The region authorized to collect aggregated data. // // AuthorizedAwsRegion is a required field AuthorizedAwsRegion *string `min:"1" type:"string" required:"true"` // An array of tag object. Tags []*Tag `type:"list"` } // String returns the string representation func (s PutAggregationAuthorizationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutAggregationAuthorizationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutAggregationAuthorizationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutAggregationAuthorizationInput"} if s.AuthorizedAccountId == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizedAccountId")) } if s.AuthorizedAwsRegion == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizedAwsRegion")) } if s.AuthorizedAwsRegion != nil && len(*s.AuthorizedAwsRegion) < 1 { invalidParams.Add(request.NewErrParamMinLen("AuthorizedAwsRegion", 1)) } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAuthorizedAccountId sets the AuthorizedAccountId field's value. func (s *PutAggregationAuthorizationInput) SetAuthorizedAccountId(v string) *PutAggregationAuthorizationInput { s.AuthorizedAccountId = &v return s } // SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. func (s *PutAggregationAuthorizationInput) SetAuthorizedAwsRegion(v string) *PutAggregationAuthorizationInput { s.AuthorizedAwsRegion = &v return s } // SetTags sets the Tags field's value. func (s *PutAggregationAuthorizationInput) SetTags(v []*Tag) *PutAggregationAuthorizationInput { s.Tags = v return s } type PutAggregationAuthorizationOutput struct { _ struct{} `type:"structure"` // Returns an AggregationAuthorization object. AggregationAuthorization *AggregationAuthorization `type:"structure"` } // String returns the string representation func (s PutAggregationAuthorizationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutAggregationAuthorizationOutput) GoString() string { return s.String() } // SetAggregationAuthorization sets the AggregationAuthorization field's value. func (s *PutAggregationAuthorizationOutput) SetAggregationAuthorization(v *AggregationAuthorization) *PutAggregationAuthorizationOutput { s.AggregationAuthorization = v return s } type PutConfigRuleInput struct { _ struct{} `type:"structure"` // The rule that you want to add to your account. // // ConfigRule is a required field ConfigRule *ConfigRule `type:"structure" required:"true"` // An array of tag object. Tags []*Tag `type:"list"` } // String returns the string representation func (s PutConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConfigRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutConfigRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutConfigRuleInput"} if s.ConfigRule == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRule")) } if s.ConfigRule != nil { if err := s.ConfigRule.Validate(); err != nil { invalidParams.AddNested("ConfigRule", err.(request.ErrInvalidParams)) } } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRule sets the ConfigRule field's value. func (s *PutConfigRuleInput) SetConfigRule(v *ConfigRule) *PutConfigRuleInput { s.ConfigRule = v return s } // SetTags sets the Tags field's value. func (s *PutConfigRuleInput) SetTags(v []*Tag) *PutConfigRuleInput { s.Tags = v return s } type PutConfigRuleOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s PutConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConfigRuleOutput) GoString() string { return s.String() } type PutConfigurationAggregatorInput struct { _ struct{} `type:"structure"` // A list of AccountAggregationSource object. AccountAggregationSources []*AccountAggregationSource `type:"list"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // An OrganizationAggregationSource object. OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` // An array of tag object. Tags []*Tag `type:"list"` } // String returns the string representation func (s PutConfigurationAggregatorInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConfigurationAggregatorInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutConfigurationAggregatorInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutConfigurationAggregatorInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.AccountAggregationSources != nil { for i, v := range s.AccountAggregationSources { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccountAggregationSources", i), err.(request.ErrInvalidParams)) } } } if s.OrganizationAggregationSource != nil { if err := s.OrganizationAggregationSource.Validate(); err != nil { invalidParams.AddNested("OrganizationAggregationSource", err.(request.ErrInvalidParams)) } } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountAggregationSources sets the AccountAggregationSources field's value. func (s *PutConfigurationAggregatorInput) SetAccountAggregationSources(v []*AccountAggregationSource) *PutConfigurationAggregatorInput { s.AccountAggregationSources = v return s } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *PutConfigurationAggregatorInput) SetConfigurationAggregatorName(v string) *PutConfigurationAggregatorInput { s.ConfigurationAggregatorName = &v return s } // SetOrganizationAggregationSource sets the OrganizationAggregationSource field's value. func (s *PutConfigurationAggregatorInput) SetOrganizationAggregationSource(v *OrganizationAggregationSource) *PutConfigurationAggregatorInput { s.OrganizationAggregationSource = v return s } // SetTags sets the Tags field's value. func (s *PutConfigurationAggregatorInput) SetTags(v []*Tag) *PutConfigurationAggregatorInput { s.Tags = v return s } type PutConfigurationAggregatorOutput struct { _ struct{} `type:"structure"` // Returns a ConfigurationAggregator object. ConfigurationAggregator *ConfigurationAggregator `type:"structure"` } // String returns the string representation func (s PutConfigurationAggregatorOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConfigurationAggregatorOutput) GoString() string { return s.String() } // SetConfigurationAggregator sets the ConfigurationAggregator field's value. func (s *PutConfigurationAggregatorOutput) SetConfigurationAggregator(v *ConfigurationAggregator) *PutConfigurationAggregatorOutput { s.ConfigurationAggregator = v return s } // The input for the PutConfigurationRecorder action. type PutConfigurationRecorderInput struct { _ struct{} `type:"structure"` // The configuration recorder object that records each configuration change // made to the resources. // // ConfigurationRecorder is a required field ConfigurationRecorder *ConfigurationRecorder `type:"structure" required:"true"` } // String returns the string representation func (s PutConfigurationRecorderInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConfigurationRecorderInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutConfigurationRecorderInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutConfigurationRecorderInput"} if s.ConfigurationRecorder == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorder")) } if s.ConfigurationRecorder != nil { if err := s.ConfigurationRecorder.Validate(); err != nil { invalidParams.AddNested("ConfigurationRecorder", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationRecorder sets the ConfigurationRecorder field's value. func (s *PutConfigurationRecorderInput) SetConfigurationRecorder(v *ConfigurationRecorder) *PutConfigurationRecorderInput { s.ConfigurationRecorder = v return s } type PutConfigurationRecorderOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s PutConfigurationRecorderOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConfigurationRecorderOutput) GoString() string { return s.String() } type PutConformancePackInput struct { _ struct{} `type:"structure"` // A list of ConformancePackInputParameter objects. ConformancePackInputParameters []*ConformancePackInputParameter `type:"list"` // Name of the conformance pack you want to create. // // ConformancePackName is a required field ConformancePackName *string `min:"1" type:"string" required:"true"` // AWS Config stores intermediate files while processing conformance pack template. // // DeliveryS3Bucket is a required field DeliveryS3Bucket *string `min:"3" type:"string" required:"true"` // The prefix for the Amazon S3 bucket. DeliveryS3KeyPrefix *string `min:"1" type:"string"` // A string containing full conformance pack template body. Structure containing // the template body with a minimum length of 1 byte and a maximum length of // 51,200 bytes. // // You can only use a YAML template with one resource type, that is, config // rule and a remediation action. TemplateBody *string `min:"1" type:"string"` // Location of file containing the template body (s3://bucketname/prefix). The // uri must point to the conformance pack template (max size: 300 KB) that is // located in an Amazon S3 bucket in the same region as the conformance pack. // // You must have access to read Amazon S3 bucket. TemplateS3Uri *string `min:"1" type:"string"` } // String returns the string representation func (s PutConformancePackInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConformancePackInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutConformancePackInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutConformancePackInput"} if s.ConformancePackName == nil { invalidParams.Add(request.NewErrParamRequired("ConformancePackName")) } if s.ConformancePackName != nil && len(*s.ConformancePackName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConformancePackName", 1)) } if s.DeliveryS3Bucket == nil { invalidParams.Add(request.NewErrParamRequired("DeliveryS3Bucket")) } if s.DeliveryS3Bucket != nil && len(*s.DeliveryS3Bucket) < 3 { invalidParams.Add(request.NewErrParamMinLen("DeliveryS3Bucket", 3)) } if s.DeliveryS3KeyPrefix != nil && len(*s.DeliveryS3KeyPrefix) < 1 { invalidParams.Add(request.NewErrParamMinLen("DeliveryS3KeyPrefix", 1)) } if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) } if s.TemplateS3Uri != nil && len(*s.TemplateS3Uri) < 1 { invalidParams.Add(request.NewErrParamMinLen("TemplateS3Uri", 1)) } if s.ConformancePackInputParameters != nil { for i, v := range s.ConformancePackInputParameters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ConformancePackInputParameters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConformancePackInputParameters sets the ConformancePackInputParameters field's value. func (s *PutConformancePackInput) SetConformancePackInputParameters(v []*ConformancePackInputParameter) *PutConformancePackInput { s.ConformancePackInputParameters = v return s } // SetConformancePackName sets the ConformancePackName field's value. func (s *PutConformancePackInput) SetConformancePackName(v string) *PutConformancePackInput { s.ConformancePackName = &v return s } // SetDeliveryS3Bucket sets the DeliveryS3Bucket field's value. func (s *PutConformancePackInput) SetDeliveryS3Bucket(v string) *PutConformancePackInput { s.DeliveryS3Bucket = &v return s } // SetDeliveryS3KeyPrefix sets the DeliveryS3KeyPrefix field's value. func (s *PutConformancePackInput) SetDeliveryS3KeyPrefix(v string) *PutConformancePackInput { s.DeliveryS3KeyPrefix = &v return s } // SetTemplateBody sets the TemplateBody field's value. func (s *PutConformancePackInput) SetTemplateBody(v string) *PutConformancePackInput { s.TemplateBody = &v return s } // SetTemplateS3Uri sets the TemplateS3Uri field's value. func (s *PutConformancePackInput) SetTemplateS3Uri(v string) *PutConformancePackInput { s.TemplateS3Uri = &v return s } type PutConformancePackOutput struct { _ struct{} `type:"structure"` // ARN of the conformance pack. ConformancePackArn *string `min:"1" type:"string"` } // String returns the string representation func (s PutConformancePackOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutConformancePackOutput) GoString() string { return s.String() } // SetConformancePackArn sets the ConformancePackArn field's value. func (s *PutConformancePackOutput) SetConformancePackArn(v string) *PutConformancePackOutput { s.ConformancePackArn = &v return s } // The input for the PutDeliveryChannel action. type PutDeliveryChannelInput struct { _ struct{} `type:"structure"` // The configuration delivery channel object that delivers the configuration // information to an Amazon S3 bucket and to an Amazon SNS topic. // // DeliveryChannel is a required field DeliveryChannel *DeliveryChannel `type:"structure" required:"true"` } // String returns the string representation func (s PutDeliveryChannelInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutDeliveryChannelInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutDeliveryChannelInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutDeliveryChannelInput"} if s.DeliveryChannel == nil { invalidParams.Add(request.NewErrParamRequired("DeliveryChannel")) } if s.DeliveryChannel != nil { if err := s.DeliveryChannel.Validate(); err != nil { invalidParams.AddNested("DeliveryChannel", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDeliveryChannel sets the DeliveryChannel field's value. func (s *PutDeliveryChannelInput) SetDeliveryChannel(v *DeliveryChannel) *PutDeliveryChannelInput { s.DeliveryChannel = v return s } type PutDeliveryChannelOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s PutDeliveryChannelOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutDeliveryChannelOutput) GoString() string { return s.String() } type PutEvaluationsInput struct { _ struct{} `type:"structure"` // The assessments that the AWS Lambda function performs. Each evaluation identifies // an AWS resource and indicates whether it complies with the AWS Config rule // that invokes the AWS Lambda function. Evaluations []*Evaluation `type:"list"` // An encrypted token that associates an evaluation with an AWS Config rule. // Identifies the rule and the event that triggered the evaluation. // // ResultToken is a required field ResultToken *string `type:"string" required:"true"` // Use this parameter to specify a test run for PutEvaluations. You can verify // whether your AWS Lambda function will deliver evaluation results to AWS Config. // No updates occur to your existing evaluations, and evaluation results are // not sent to AWS Config. // // When TestMode is true, PutEvaluations doesn't require a valid value for the // ResultToken parameter, but the value cannot be null. TestMode *bool `type:"boolean"` } // String returns the string representation func (s PutEvaluationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutEvaluationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutEvaluationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutEvaluationsInput"} if s.ResultToken == nil { invalidParams.Add(request.NewErrParamRequired("ResultToken")) } if s.Evaluations != nil { for i, v := range s.Evaluations { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Evaluations", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetEvaluations sets the Evaluations field's value. func (s *PutEvaluationsInput) SetEvaluations(v []*Evaluation) *PutEvaluationsInput { s.Evaluations = v return s } // SetResultToken sets the ResultToken field's value. func (s *PutEvaluationsInput) SetResultToken(v string) *PutEvaluationsInput { s.ResultToken = &v return s } // SetTestMode sets the TestMode field's value. func (s *PutEvaluationsInput) SetTestMode(v bool) *PutEvaluationsInput { s.TestMode = &v return s } type PutEvaluationsOutput struct { _ struct{} `type:"structure"` // Requests that failed because of a client or server error. FailedEvaluations []*Evaluation `type:"list"` } // String returns the string representation func (s PutEvaluationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutEvaluationsOutput) GoString() string { return s.String() } // SetFailedEvaluations sets the FailedEvaluations field's value. func (s *PutEvaluationsOutput) SetFailedEvaluations(v []*Evaluation) *PutEvaluationsOutput { s.FailedEvaluations = v return s } type PutOrganizationConfigRuleInput struct { _ struct{} `type:"structure"` // A comma-separated list of accounts that you want to exclude from an organization // config rule. ExcludedAccounts []*string `type:"list"` // The name that you assign to an organization config rule. // // OrganizationConfigRuleName is a required field OrganizationConfigRuleName *string `min:"1" type:"string" required:"true"` // An OrganizationCustomRuleMetadata object. OrganizationCustomRuleMetadata *OrganizationCustomRuleMetadata `type:"structure"` // An OrganizationManagedRuleMetadata object. OrganizationManagedRuleMetadata *OrganizationManagedRuleMetadata `type:"structure"` } // String returns the string representation func (s PutOrganizationConfigRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutOrganizationConfigRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutOrganizationConfigRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutOrganizationConfigRuleInput"} if s.OrganizationConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationConfigRuleName")) } if s.OrganizationConfigRuleName != nil && len(*s.OrganizationConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationConfigRuleName", 1)) } if s.OrganizationCustomRuleMetadata != nil { if err := s.OrganizationCustomRuleMetadata.Validate(); err != nil { invalidParams.AddNested("OrganizationCustomRuleMetadata", err.(request.ErrInvalidParams)) } } if s.OrganizationManagedRuleMetadata != nil { if err := s.OrganizationManagedRuleMetadata.Validate(); err != nil { invalidParams.AddNested("OrganizationManagedRuleMetadata", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetExcludedAccounts sets the ExcludedAccounts field's value. func (s *PutOrganizationConfigRuleInput) SetExcludedAccounts(v []*string) *PutOrganizationConfigRuleInput { s.ExcludedAccounts = v return s } // SetOrganizationConfigRuleName sets the OrganizationConfigRuleName field's value. func (s *PutOrganizationConfigRuleInput) SetOrganizationConfigRuleName(v string) *PutOrganizationConfigRuleInput { s.OrganizationConfigRuleName = &v return s } // SetOrganizationCustomRuleMetadata sets the OrganizationCustomRuleMetadata field's value. func (s *PutOrganizationConfigRuleInput) SetOrganizationCustomRuleMetadata(v *OrganizationCustomRuleMetadata) *PutOrganizationConfigRuleInput { s.OrganizationCustomRuleMetadata = v return s } // SetOrganizationManagedRuleMetadata sets the OrganizationManagedRuleMetadata field's value. func (s *PutOrganizationConfigRuleInput) SetOrganizationManagedRuleMetadata(v *OrganizationManagedRuleMetadata) *PutOrganizationConfigRuleInput { s.OrganizationManagedRuleMetadata = v return s } type PutOrganizationConfigRuleOutput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of an organization config rule. OrganizationConfigRuleArn *string `min:"1" type:"string"` } // String returns the string representation func (s PutOrganizationConfigRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutOrganizationConfigRuleOutput) GoString() string { return s.String() } // SetOrganizationConfigRuleArn sets the OrganizationConfigRuleArn field's value. func (s *PutOrganizationConfigRuleOutput) SetOrganizationConfigRuleArn(v string) *PutOrganizationConfigRuleOutput { s.OrganizationConfigRuleArn = &v return s } type PutOrganizationConformancePackInput struct { _ struct{} `type:"structure"` // A list of ConformancePackInputParameter objects. ConformancePackInputParameters []*ConformancePackInputParameter `type:"list"` // Location of an Amazon S3 bucket where AWS Config can deliver evaluation results. // AWS Config stores intermediate files while processing conformance pack template. // // The delivery bucket name should start with awsconfigconforms. For example: // "Resource": "arn:aws:s3:::your_bucket_name/*". For more information, see // Permissions for cross account bucket access (https://docs.aws.amazon.com/config/latest/developerguide/conformance-pack-organization-apis.html). // // DeliveryS3Bucket is a required field DeliveryS3Bucket *string `min:"3" type:"string" required:"true"` // The prefix for the Amazon S3 bucket. DeliveryS3KeyPrefix *string `min:"1" type:"string"` // A list of AWS accounts to be excluded from an organization conformance pack // while deploying a conformance pack. ExcludedAccounts []*string `type:"list"` // Name of the organization conformance pack you want to create. // // OrganizationConformancePackName is a required field OrganizationConformancePackName *string `min:"1" type:"string" required:"true"` // A string containing full conformance pack template body. Structure containing // the template body with a minimum length of 1 byte and a maximum length of // 51,200 bytes. TemplateBody *string `min:"1" type:"string"` // Location of file containing the template body. The uri must point to the // conformance pack template (max size: 300 KB). // // You must have access to read Amazon S3 bucket. TemplateS3Uri *string `min:"1" type:"string"` } // String returns the string representation func (s PutOrganizationConformancePackInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutOrganizationConformancePackInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutOrganizationConformancePackInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutOrganizationConformancePackInput"} if s.DeliveryS3Bucket == nil { invalidParams.Add(request.NewErrParamRequired("DeliveryS3Bucket")) } if s.DeliveryS3Bucket != nil && len(*s.DeliveryS3Bucket) < 3 { invalidParams.Add(request.NewErrParamMinLen("DeliveryS3Bucket", 3)) } if s.DeliveryS3KeyPrefix != nil && len(*s.DeliveryS3KeyPrefix) < 1 { invalidParams.Add(request.NewErrParamMinLen("DeliveryS3KeyPrefix", 1)) } if s.OrganizationConformancePackName == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationConformancePackName")) } if s.OrganizationConformancePackName != nil && len(*s.OrganizationConformancePackName) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationConformancePackName", 1)) } if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) } if s.TemplateS3Uri != nil && len(*s.TemplateS3Uri) < 1 { invalidParams.Add(request.NewErrParamMinLen("TemplateS3Uri", 1)) } if s.ConformancePackInputParameters != nil { for i, v := range s.ConformancePackInputParameters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ConformancePackInputParameters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConformancePackInputParameters sets the ConformancePackInputParameters field's value. func (s *PutOrganizationConformancePackInput) SetConformancePackInputParameters(v []*ConformancePackInputParameter) *PutOrganizationConformancePackInput { s.ConformancePackInputParameters = v return s } // SetDeliveryS3Bucket sets the DeliveryS3Bucket field's value. func (s *PutOrganizationConformancePackInput) SetDeliveryS3Bucket(v string) *PutOrganizationConformancePackInput { s.DeliveryS3Bucket = &v return s } // SetDeliveryS3KeyPrefix sets the DeliveryS3KeyPrefix field's value. func (s *PutOrganizationConformancePackInput) SetDeliveryS3KeyPrefix(v string) *PutOrganizationConformancePackInput { s.DeliveryS3KeyPrefix = &v return s } // SetExcludedAccounts sets the ExcludedAccounts field's value. func (s *PutOrganizationConformancePackInput) SetExcludedAccounts(v []*string) *PutOrganizationConformancePackInput { s.ExcludedAccounts = v return s } // SetOrganizationConformancePackName sets the OrganizationConformancePackName field's value. func (s *PutOrganizationConformancePackInput) SetOrganizationConformancePackName(v string) *PutOrganizationConformancePackInput { s.OrganizationConformancePackName = &v return s } // SetTemplateBody sets the TemplateBody field's value. func (s *PutOrganizationConformancePackInput) SetTemplateBody(v string) *PutOrganizationConformancePackInput { s.TemplateBody = &v return s } // SetTemplateS3Uri sets the TemplateS3Uri field's value. func (s *PutOrganizationConformancePackInput) SetTemplateS3Uri(v string) *PutOrganizationConformancePackInput { s.TemplateS3Uri = &v return s } type PutOrganizationConformancePackOutput struct { _ struct{} `type:"structure"` // ARN of the organization conformance pack. OrganizationConformancePackArn *string `min:"1" type:"string"` } // String returns the string representation func (s PutOrganizationConformancePackOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutOrganizationConformancePackOutput) GoString() string { return s.String() } // SetOrganizationConformancePackArn sets the OrganizationConformancePackArn field's value. func (s *PutOrganizationConformancePackOutput) SetOrganizationConformancePackArn(v string) *PutOrganizationConformancePackOutput { s.OrganizationConformancePackArn = &v return s } type PutRemediationConfigurationsInput struct { _ struct{} `type:"structure"` // A list of remediation configuration objects. // // RemediationConfigurations is a required field RemediationConfigurations []*RemediationConfiguration `type:"list" required:"true"` } // String returns the string representation func (s PutRemediationConfigurationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutRemediationConfigurationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutRemediationConfigurationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutRemediationConfigurationsInput"} if s.RemediationConfigurations == nil { invalidParams.Add(request.NewErrParamRequired("RemediationConfigurations")) } if s.RemediationConfigurations != nil { for i, v := range s.RemediationConfigurations { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RemediationConfigurations", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRemediationConfigurations sets the RemediationConfigurations field's value. func (s *PutRemediationConfigurationsInput) SetRemediationConfigurations(v []*RemediationConfiguration) *PutRemediationConfigurationsInput { s.RemediationConfigurations = v return s } type PutRemediationConfigurationsOutput struct { _ struct{} `type:"structure"` // Returns a list of failed remediation batch objects. FailedBatches []*FailedRemediationBatch `type:"list"` } // String returns the string representation func (s PutRemediationConfigurationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutRemediationConfigurationsOutput) GoString() string { return s.String() } // SetFailedBatches sets the FailedBatches field's value. func (s *PutRemediationConfigurationsOutput) SetFailedBatches(v []*FailedRemediationBatch) *PutRemediationConfigurationsOutput { s.FailedBatches = v return s } type PutRemediationExceptionsInput struct { _ struct{} `type:"structure"` // The name of the AWS Config rule for which you want to create remediation // exception. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // The exception is automatically deleted after the expiration date. ExpirationTime *time.Time `type:"timestamp"` // The message contains an explanation of the exception. Message *string `min:"1" type:"string"` // An exception list of resource exception keys to be processed with the current // request. AWS Config adds exception for each resource key. For example, AWS // Config adds 3 exceptions for 3 resource keys. // // ResourceKeys is a required field ResourceKeys []*RemediationExceptionResourceKey `min:"1" type:"list" required:"true"` } // String returns the string representation func (s PutRemediationExceptionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutRemediationExceptionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutRemediationExceptionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutRemediationExceptionsInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.Message != nil && len(*s.Message) < 1 { invalidParams.Add(request.NewErrParamMinLen("Message", 1)) } if s.ResourceKeys == nil { invalidParams.Add(request.NewErrParamRequired("ResourceKeys")) } if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) } if s.ResourceKeys != nil { for i, v := range s.ResourceKeys { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *PutRemediationExceptionsInput) SetConfigRuleName(v string) *PutRemediationExceptionsInput { s.ConfigRuleName = &v return s } // SetExpirationTime sets the ExpirationTime field's value. func (s *PutRemediationExceptionsInput) SetExpirationTime(v time.Time) *PutRemediationExceptionsInput { s.ExpirationTime = &v return s } // SetMessage sets the Message field's value. func (s *PutRemediationExceptionsInput) SetMessage(v string) *PutRemediationExceptionsInput { s.Message = &v return s } // SetResourceKeys sets the ResourceKeys field's value. func (s *PutRemediationExceptionsInput) SetResourceKeys(v []*RemediationExceptionResourceKey) *PutRemediationExceptionsInput { s.ResourceKeys = v return s } type PutRemediationExceptionsOutput struct { _ struct{} `type:"structure"` // Returns a list of failed remediation exceptions batch objects. Each object // in the batch consists of a list of failed items and failure messages. FailedBatches []*FailedRemediationExceptionBatch `type:"list"` } // String returns the string representation func (s PutRemediationExceptionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutRemediationExceptionsOutput) GoString() string { return s.String() } // SetFailedBatches sets the FailedBatches field's value. func (s *PutRemediationExceptionsOutput) SetFailedBatches(v []*FailedRemediationExceptionBatch) *PutRemediationExceptionsOutput { s.FailedBatches = v return s } type PutResourceConfigInput struct { _ struct{} `type:"structure"` // The configuration object of the resource in valid JSON format. It must match // the schema registered with AWS CloudFormation. // // The configuration JSON must not exceed 64 KB. // // Configuration is a required field Configuration *string `type:"string" required:"true"` // Unique identifier of the resource. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // Name of the resource. ResourceName *string `type:"string"` // The type of the resource. The custom resource type must be registered with // AWS CloudFormation. // // You cannot use the organization names “aws”, “amzn”, “amazon”, // “alexa”, “custom” with custom resource types. It is the first part // of the ResourceType up to the first ::. // // ResourceType is a required field ResourceType *string `min:"1" type:"string" required:"true"` // Version of the schema registered for the ResourceType in AWS CloudFormation. // // SchemaVersionId is a required field SchemaVersionId *string `min:"1" type:"string" required:"true"` // Tags associated with the resource. Tags map[string]*string `type:"map"` } // String returns the string representation func (s PutResourceConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutResourceConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutResourceConfigInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutResourceConfigInput"} if s.Configuration == nil { invalidParams.Add(request.NewErrParamRequired("Configuration")) } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.ResourceType != nil && len(*s.ResourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) } if s.SchemaVersionId == nil { invalidParams.Add(request.NewErrParamRequired("SchemaVersionId")) } if s.SchemaVersionId != nil && len(*s.SchemaVersionId) < 1 { invalidParams.Add(request.NewErrParamMinLen("SchemaVersionId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfiguration sets the Configuration field's value. func (s *PutResourceConfigInput) SetConfiguration(v string) *PutResourceConfigInput { s.Configuration = &v return s } // SetResourceId sets the ResourceId field's value. func (s *PutResourceConfigInput) SetResourceId(v string) *PutResourceConfigInput { s.ResourceId = &v return s } // SetResourceName sets the ResourceName field's value. func (s *PutResourceConfigInput) SetResourceName(v string) *PutResourceConfigInput { s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *PutResourceConfigInput) SetResourceType(v string) *PutResourceConfigInput { s.ResourceType = &v return s } // SetSchemaVersionId sets the SchemaVersionId field's value. func (s *PutResourceConfigInput) SetSchemaVersionId(v string) *PutResourceConfigInput { s.SchemaVersionId = &v return s } // SetTags sets the Tags field's value. func (s *PutResourceConfigInput) SetTags(v map[string]*string) *PutResourceConfigInput { s.Tags = v return s } type PutResourceConfigOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s PutResourceConfigOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutResourceConfigOutput) GoString() string { return s.String() } type PutRetentionConfigurationInput struct { _ struct{} `type:"structure"` // Number of days AWS Config stores your historical information. // // Currently, only applicable to the configuration item history. // // RetentionPeriodInDays is a required field RetentionPeriodInDays *int64 `min:"30" type:"integer" required:"true"` } // String returns the string representation func (s PutRetentionConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutRetentionConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutRetentionConfigurationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutRetentionConfigurationInput"} if s.RetentionPeriodInDays == nil { invalidParams.Add(request.NewErrParamRequired("RetentionPeriodInDays")) } if s.RetentionPeriodInDays != nil && *s.RetentionPeriodInDays < 30 { invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodInDays", 30)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRetentionPeriodInDays sets the RetentionPeriodInDays field's value. func (s *PutRetentionConfigurationInput) SetRetentionPeriodInDays(v int64) *PutRetentionConfigurationInput { s.RetentionPeriodInDays = &v return s } type PutRetentionConfigurationOutput struct { _ struct{} `type:"structure"` // Returns a retention configuration object. RetentionConfiguration *RetentionConfiguration `type:"structure"` } // String returns the string representation func (s PutRetentionConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s PutRetentionConfigurationOutput) GoString() string { return s.String() } // SetRetentionConfiguration sets the RetentionConfiguration field's value. func (s *PutRetentionConfigurationOutput) SetRetentionConfiguration(v *RetentionConfiguration) *PutRetentionConfigurationOutput { s.RetentionConfiguration = v return s } // Details about the query. type QueryInfo struct { _ struct{} `type:"structure"` // Returns a FieldInfo object. SelectFields []*FieldInfo `type:"list"` } // String returns the string representation func (s QueryInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s QueryInfo) GoString() string { return s.String() } // SetSelectFields sets the SelectFields field's value. func (s *QueryInfo) SetSelectFields(v []*FieldInfo) *QueryInfo { s.SelectFields = v return s } // Specifies the types of AWS resource for which AWS Config records configuration // changes. // // In the recording group, you specify whether all supported types or specific // types of resources are recorded. // // By default, AWS Config records configuration changes for all supported types // of regional resources that AWS Config discovers in the region in which it // is running. Regional resources are tied to a region and can be used only // in that region. Examples of regional resources are EC2 instances and EBS // volumes. // // You can also have AWS Config record configuration changes for supported types // of global resources (for example, IAM resources). Global resources are not // tied to an individual region and can be used in all regions. // // The configuration details for any global resource are the same in all regions. // If you customize AWS Config in multiple regions to record global resources, // it will create multiple configuration items each time a global resource changes: // one configuration item for each region. These configuration items will contain // identical data. To prevent duplicate configuration items, you should consider // customizing AWS Config in only one region to record global resources, unless // you want the configuration items to be available in multiple regions. // // If you don't want AWS Config to record all resources, you can specify which // types of resources it will record with the resourceTypes parameter. // // For a list of supported resource types, see Supported Resource Types (https://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). // // For more information, see Selecting Which Resources AWS Config Records (https://docs.aws.amazon.com/config/latest/developerguide/select-resources.html). type RecordingGroup struct { _ struct{} `type:"structure"` // Specifies whether AWS Config records configuration changes for every supported // type of regional resource. // // If you set this option to true, when AWS Config adds support for a new type // of regional resource, it starts recording resources of that type automatically. // // If you set this option to true, you cannot enumerate a list of resourceTypes. AllSupported *bool `locationName:"allSupported" type:"boolean"` // Specifies whether AWS Config includes all supported types of global resources // (for example, IAM resources) with the resources that it records. // // Before you can set this option to true, you must set the allSupported option // to true. // // If you set this option to true, when AWS Config adds support for a new type // of global resource, it starts recording resources of that type automatically. // // The configuration details for any global resource are the same in all regions. // To prevent duplicate configuration items, you should consider customizing // AWS Config in only one region to record global resources. IncludeGlobalResourceTypes *bool `locationName:"includeGlobalResourceTypes" type:"boolean"` // A comma-separated list that specifies the types of AWS resources for which // AWS Config records configuration changes (for example, AWS::EC2::Instance // or AWS::CloudTrail::Trail). // // Before you can set this option to true, you must set the allSupported option // to false. // // If you set this option to true, when AWS Config adds support for a new type // of resource, it will not record resources of that type unless you manually // add that type to your recording group. // // For a list of valid resourceTypes values, see the resourceType Value column // in Supported AWS Resource Types (https://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). ResourceTypes []*string `locationName:"resourceTypes" type:"list"` } // String returns the string representation func (s RecordingGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RecordingGroup) GoString() string { return s.String() } // SetAllSupported sets the AllSupported field's value. func (s *RecordingGroup) SetAllSupported(v bool) *RecordingGroup { s.AllSupported = &v return s } // SetIncludeGlobalResourceTypes sets the IncludeGlobalResourceTypes field's value. func (s *RecordingGroup) SetIncludeGlobalResourceTypes(v bool) *RecordingGroup { s.IncludeGlobalResourceTypes = &v return s } // SetResourceTypes sets the ResourceTypes field's value. func (s *RecordingGroup) SetResourceTypes(v []*string) *RecordingGroup { s.ResourceTypes = v return s } // The relationship of the related resource to the main resource. type Relationship struct { _ struct{} `type:"structure"` // The type of relationship with the related resource. RelationshipName *string `locationName:"relationshipName" type:"string"` // The ID of the related resource (for example, sg-xxxxxx). ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the related resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` // The resource type of the related resource. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` } // String returns the string representation func (s Relationship) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Relationship) GoString() string { return s.String() } // SetRelationshipName sets the RelationshipName field's value. func (s *Relationship) SetRelationshipName(v string) *Relationship { s.RelationshipName = &v return s } // SetResourceId sets the ResourceId field's value. func (s *Relationship) SetResourceId(v string) *Relationship { s.ResourceId = &v return s } // SetResourceName sets the ResourceName field's value. func (s *Relationship) SetResourceName(v string) *Relationship { s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *Relationship) SetResourceType(v string) *Relationship { s.ResourceType = &v return s } // An object that represents the details about the remediation configuration // that includes the remediation action, parameters, and data to execute the // action. type RemediationConfiguration struct { _ struct{} `type:"structure"` // Amazon Resource Name (ARN) of remediation configuration. Arn *string `min:"1" type:"string"` // The remediation is triggered automatically. Automatic *bool `type:"boolean"` // The name of the AWS Config rule. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // Name of the service that owns the service linked rule, if applicable. CreatedByService *string `min:"1" type:"string"` // An ExecutionControls object. ExecutionControls *ExecutionControls `type:"structure"` // The maximum number of failed attempts for auto-remediation. If you do not // select a number, the default is 5. // // For example, if you specify MaximumAutomaticAttempts as 5 with RetryAttemptsSeconds // as 50 seconds, AWS Config throws an exception after the 5th failed attempt // within 50 seconds. MaximumAutomaticAttempts *int64 `min:"1" type:"integer"` // An object of the RemediationParameterValue. Parameters map[string]*RemediationParameterValue `type:"map"` // The type of a resource. ResourceType *string `type:"string"` // Maximum time in seconds that AWS Config runs auto-remediation. If you do // not select a number, the default is 60 seconds. // // For example, if you specify RetryAttemptsSeconds as 50 seconds and MaximumAutomaticAttempts // as 5, AWS Config will run auto-remediations 5 times within 50 seconds before // throwing an exception. RetryAttemptSeconds *int64 `min:"1" type:"long"` // Target ID is the name of the public document. // // TargetId is a required field TargetId *string `min:"1" type:"string" required:"true"` // The type of the target. Target executes remediation. For example, SSM document. // // TargetType is a required field TargetType *string `type:"string" required:"true" enum:"RemediationTargetType"` // Version of the target. For example, version of the SSM document. TargetVersion *string `type:"string"` } // String returns the string representation func (s RemediationConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RemediationConfiguration) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RemediationConfiguration) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RemediationConfiguration"} if s.Arn != nil && len(*s.Arn) < 1 { invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) } if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.CreatedByService != nil && len(*s.CreatedByService) < 1 { invalidParams.Add(request.NewErrParamMinLen("CreatedByService", 1)) } if s.MaximumAutomaticAttempts != nil && *s.MaximumAutomaticAttempts < 1 { invalidParams.Add(request.NewErrParamMinValue("MaximumAutomaticAttempts", 1)) } if s.RetryAttemptSeconds != nil && *s.RetryAttemptSeconds < 1 { invalidParams.Add(request.NewErrParamMinValue("RetryAttemptSeconds", 1)) } if s.TargetId == nil { invalidParams.Add(request.NewErrParamRequired("TargetId")) } if s.TargetId != nil && len(*s.TargetId) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetId", 1)) } if s.TargetType == nil { invalidParams.Add(request.NewErrParamRequired("TargetType")) } if s.ExecutionControls != nil { if err := s.ExecutionControls.Validate(); err != nil { invalidParams.AddNested("ExecutionControls", err.(request.ErrInvalidParams)) } } if s.Parameters != nil { for i, v := range s.Parameters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Parameters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetArn sets the Arn field's value. func (s *RemediationConfiguration) SetArn(v string) *RemediationConfiguration { s.Arn = &v return s } // SetAutomatic sets the Automatic field's value. func (s *RemediationConfiguration) SetAutomatic(v bool) *RemediationConfiguration { s.Automatic = &v return s } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *RemediationConfiguration) SetConfigRuleName(v string) *RemediationConfiguration { s.ConfigRuleName = &v return s } // SetCreatedByService sets the CreatedByService field's value. func (s *RemediationConfiguration) SetCreatedByService(v string) *RemediationConfiguration { s.CreatedByService = &v return s } // SetExecutionControls sets the ExecutionControls field's value. func (s *RemediationConfiguration) SetExecutionControls(v *ExecutionControls) *RemediationConfiguration { s.ExecutionControls = v return s } // SetMaximumAutomaticAttempts sets the MaximumAutomaticAttempts field's value. func (s *RemediationConfiguration) SetMaximumAutomaticAttempts(v int64) *RemediationConfiguration { s.MaximumAutomaticAttempts = &v return s } // SetParameters sets the Parameters field's value. func (s *RemediationConfiguration) SetParameters(v map[string]*RemediationParameterValue) *RemediationConfiguration { s.Parameters = v return s } // SetResourceType sets the ResourceType field's value. func (s *RemediationConfiguration) SetResourceType(v string) *RemediationConfiguration { s.ResourceType = &v return s } // SetRetryAttemptSeconds sets the RetryAttemptSeconds field's value. func (s *RemediationConfiguration) SetRetryAttemptSeconds(v int64) *RemediationConfiguration { s.RetryAttemptSeconds = &v return s } // SetTargetId sets the TargetId field's value. func (s *RemediationConfiguration) SetTargetId(v string) *RemediationConfiguration { s.TargetId = &v return s } // SetTargetType sets the TargetType field's value. func (s *RemediationConfiguration) SetTargetType(v string) *RemediationConfiguration { s.TargetType = &v return s } // SetTargetVersion sets the TargetVersion field's value. func (s *RemediationConfiguration) SetTargetVersion(v string) *RemediationConfiguration { s.TargetVersion = &v return s } // An object that represents the details about the remediation exception. The // details include the rule name, an explanation of an exception, the time when // the exception will be deleted, the resource ID, and resource type. type RemediationException struct { _ struct{} `type:"structure"` // The name of the AWS Config rule. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // The time when the remediation exception will be deleted. ExpirationTime *time.Time `type:"timestamp"` // An explanation of an remediation exception. Message *string `min:"1" type:"string"` // The ID of the resource (for example., sg-xxxxxx). // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // The type of a resource. // // ResourceType is a required field ResourceType *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s RemediationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RemediationException) GoString() string { return s.String() } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *RemediationException) SetConfigRuleName(v string) *RemediationException { s.ConfigRuleName = &v return s } // SetExpirationTime sets the ExpirationTime field's value. func (s *RemediationException) SetExpirationTime(v time.Time) *RemediationException { s.ExpirationTime = &v return s } // SetMessage sets the Message field's value. func (s *RemediationException) SetMessage(v string) *RemediationException { s.Message = &v return s } // SetResourceId sets the ResourceId field's value. func (s *RemediationException) SetResourceId(v string) *RemediationException { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *RemediationException) SetResourceType(v string) *RemediationException { s.ResourceType = &v return s } // The details that identify a resource within AWS Config, including the resource // type and resource ID. type RemediationExceptionResourceKey struct { _ struct{} `type:"structure"` // The ID of the resource (for example., sg-xxxxxx). ResourceId *string `min:"1" type:"string"` // The type of a resource. ResourceType *string `min:"1" type:"string"` } // String returns the string representation func (s RemediationExceptionResourceKey) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RemediationExceptionResourceKey) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RemediationExceptionResourceKey) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RemediationExceptionResourceKey"} if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType != nil && len(*s.ResourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceId sets the ResourceId field's value. func (s *RemediationExceptionResourceKey) SetResourceId(v string) *RemediationExceptionResourceKey { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *RemediationExceptionResourceKey) SetResourceType(v string) *RemediationExceptionResourceKey { s.ResourceType = &v return s } // Provides details of the current status of the invoked remediation action // for that resource. type RemediationExecutionStatus struct { _ struct{} `type:"structure"` // Start time when the remediation was executed. InvocationTime *time.Time `type:"timestamp"` // The time when the remediation execution was last updated. LastUpdatedTime *time.Time `type:"timestamp"` // The details that identify a resource within AWS Config, including the resource // type and resource ID. ResourceKey *ResourceKey `type:"structure"` // ENUM of the values. State *string `type:"string" enum:"RemediationExecutionState"` // Details of every step. StepDetails []*RemediationExecutionStep `type:"list"` } // String returns the string representation func (s RemediationExecutionStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RemediationExecutionStatus) GoString() string { return s.String() } // SetInvocationTime sets the InvocationTime field's value. func (s *RemediationExecutionStatus) SetInvocationTime(v time.Time) *RemediationExecutionStatus { s.InvocationTime = &v return s } // SetLastUpdatedTime sets the LastUpdatedTime field's value. func (s *RemediationExecutionStatus) SetLastUpdatedTime(v time.Time) *RemediationExecutionStatus { s.LastUpdatedTime = &v return s } // SetResourceKey sets the ResourceKey field's value. func (s *RemediationExecutionStatus) SetResourceKey(v *ResourceKey) *RemediationExecutionStatus { s.ResourceKey = v return s } // SetState sets the State field's value. func (s *RemediationExecutionStatus) SetState(v string) *RemediationExecutionStatus { s.State = &v return s } // SetStepDetails sets the StepDetails field's value. func (s *RemediationExecutionStatus) SetStepDetails(v []*RemediationExecutionStep) *RemediationExecutionStatus { s.StepDetails = v return s } // Name of the step from the SSM document. type RemediationExecutionStep struct { _ struct{} `type:"structure"` // An error message if the step was interrupted during execution. ErrorMessage *string `type:"string"` // The details of the step. Name *string `type:"string"` // The time when the step started. StartTime *time.Time `type:"timestamp"` // The valid status of the step. State *string `type:"string" enum:"RemediationExecutionStepState"` // The time when the step stopped. StopTime *time.Time `type:"timestamp"` } // String returns the string representation func (s RemediationExecutionStep) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RemediationExecutionStep) GoString() string { return s.String() } // SetErrorMessage sets the ErrorMessage field's value. func (s *RemediationExecutionStep) SetErrorMessage(v string) *RemediationExecutionStep { s.ErrorMessage = &v return s } // SetName sets the Name field's value. func (s *RemediationExecutionStep) SetName(v string) *RemediationExecutionStep { s.Name = &v return s } // SetStartTime sets the StartTime field's value. func (s *RemediationExecutionStep) SetStartTime(v time.Time) *RemediationExecutionStep { s.StartTime = &v return s } // SetState sets the State field's value. func (s *RemediationExecutionStep) SetState(v string) *RemediationExecutionStep { s.State = &v return s } // SetStopTime sets the StopTime field's value. func (s *RemediationExecutionStep) SetStopTime(v time.Time) *RemediationExecutionStep { s.StopTime = &v return s } // Remediation action is in progress. You can either cancel execution in AWS // Systems Manager or wait and try again later. type RemediationInProgressException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s RemediationInProgressException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RemediationInProgressException) GoString() string { return s.String() } func newErrorRemediationInProgressException(v protocol.ResponseMetadata) error { return &RemediationInProgressException{ RespMetadata: v, } } // Code returns the exception type name. func (s *RemediationInProgressException) Code() string { return "RemediationInProgressException" } // Message returns the exception's message. func (s *RemediationInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *RemediationInProgressException) OrigErr() error { return nil } func (s *RemediationInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *RemediationInProgressException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *RemediationInProgressException) RequestID() string { return s.RespMetadata.RequestID } // The value is either a dynamic (resource) value or a static value. You must // select either a dynamic value or a static value. type RemediationParameterValue struct { _ struct{} `type:"structure"` // The value is dynamic and changes at run-time. ResourceValue *ResourceValue `type:"structure"` // The value is static and does not change at run-time. StaticValue *StaticValue `type:"structure"` } // String returns the string representation func (s RemediationParameterValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RemediationParameterValue) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RemediationParameterValue) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RemediationParameterValue"} if s.ResourceValue != nil { if err := s.ResourceValue.Validate(); err != nil { invalidParams.AddNested("ResourceValue", err.(request.ErrInvalidParams)) } } if s.StaticValue != nil { if err := s.StaticValue.Validate(); err != nil { invalidParams.AddNested("StaticValue", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceValue sets the ResourceValue field's value. func (s *RemediationParameterValue) SetResourceValue(v *ResourceValue) *RemediationParameterValue { s.ResourceValue = v return s } // SetStaticValue sets the StaticValue field's value. func (s *RemediationParameterValue) SetStaticValue(v *StaticValue) *RemediationParameterValue { s.StaticValue = v return s } // An object that contains the resource type and the number of resources. type ResourceCount struct { _ struct{} `type:"structure"` // The number of resources. Count *int64 `locationName:"count" type:"long"` // The resource type (for example, "AWS::EC2::Instance"). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` } // String returns the string representation func (s ResourceCount) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceCount) GoString() string { return s.String() } // SetCount sets the Count field's value. func (s *ResourceCount) SetCount(v int64) *ResourceCount { s.Count = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ResourceCount) SetResourceType(v string) *ResourceCount { s.ResourceType = &v return s } // Filters the resource count based on account ID, region, and resource type. type ResourceCountFilters struct { _ struct{} `type:"structure"` // The 12-digit ID of the account. AccountId *string `type:"string"` // The region where the account is located. Region *string `min:"1" type:"string"` // The type of the AWS resource. ResourceType *string `type:"string" enum:"ResourceType"` } // String returns the string representation func (s ResourceCountFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceCountFilters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceCountFilters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceCountFilters"} if s.Region != nil && len(*s.Region) < 1 { invalidParams.Add(request.NewErrParamMinLen("Region", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountId sets the AccountId field's value. func (s *ResourceCountFilters) SetAccountId(v string) *ResourceCountFilters { s.AccountId = &v return s } // SetRegion sets the Region field's value. func (s *ResourceCountFilters) SetRegion(v string) *ResourceCountFilters { s.Region = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ResourceCountFilters) SetResourceType(v string) *ResourceCountFilters { s.ResourceType = &v return s } // Filters the results by resource account ID, region, resource ID, and resource // name. type ResourceFilters struct { _ struct{} `type:"structure"` // The 12-digit source account ID. AccountId *string `type:"string"` // The source region. Region *string `min:"1" type:"string"` // The ID of the resource. ResourceId *string `min:"1" type:"string"` // The name of the resource. ResourceName *string `type:"string"` } // String returns the string representation func (s ResourceFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceFilters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceFilters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceFilters"} if s.Region != nil && len(*s.Region) < 1 { invalidParams.Add(request.NewErrParamMinLen("Region", 1)) } if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountId sets the AccountId field's value. func (s *ResourceFilters) SetAccountId(v string) *ResourceFilters { s.AccountId = &v return s } // SetRegion sets the Region field's value. func (s *ResourceFilters) SetRegion(v string) *ResourceFilters { s.Region = &v return s } // SetResourceId sets the ResourceId field's value. func (s *ResourceFilters) SetResourceId(v string) *ResourceFilters { s.ResourceId = &v return s } // SetResourceName sets the ResourceName field's value. func (s *ResourceFilters) SetResourceName(v string) *ResourceFilters { s.ResourceName = &v return s } // The details that identify a resource that is discovered by AWS Config, including // the resource type, ID, and (if available) the custom resource name. type ResourceIdentifier struct { _ struct{} `type:"structure"` // The time that the resource was deleted. ResourceDeletionTime *time.Time `locationName:"resourceDeletionTime" type:"timestamp"` // The ID of the resource (for example, sg-xxxxxx). ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource (if available). ResourceName *string `locationName:"resourceName" type:"string"` // The type of resource. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` } // String returns the string representation func (s ResourceIdentifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceIdentifier) GoString() string { return s.String() } // SetResourceDeletionTime sets the ResourceDeletionTime field's value. func (s *ResourceIdentifier) SetResourceDeletionTime(v time.Time) *ResourceIdentifier { s.ResourceDeletionTime = &v return s } // SetResourceId sets the ResourceId field's value. func (s *ResourceIdentifier) SetResourceId(v string) *ResourceIdentifier { s.ResourceId = &v return s } // SetResourceName sets the ResourceName field's value. func (s *ResourceIdentifier) SetResourceName(v string) *ResourceIdentifier { s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier { s.ResourceType = &v return s } // You see this exception in the following cases: // // * For DeleteConfigRule, AWS Config is deleting this rule. Try your request // again later. // // * For DeleteConfigRule, the rule is deleting your evaluation results. // Try your request again later. // // * For DeleteConfigRule, a remediation action is associated with the rule // and AWS Config cannot delete this rule. Delete the remediation action // associated with the rule before deleting the rule and try your request // again later. // // * For PutConfigOrganizationRule, organization config rule deletion is // in progress. Try your request again later. // // * For DeleteOrganizationConfigRule, organization config rule creation // is in progress. Try your request again later. // // * For PutConformancePack and PutOrganizationConformancePack, a conformance // pack creation, update, and deletion is in progress. Try your request again // later. // // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. type ResourceInUseException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s ResourceInUseException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceInUseException) GoString() string { return s.String() } func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceInUseException) OrigErr() error { return nil } func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceInUseException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceInUseException) RequestID() string { return s.RespMetadata.RequestID } // The details that identify a resource within AWS Config, including the resource // type and resource ID. type ResourceKey struct { _ struct{} `type:"structure"` // The ID of the resource (for example., sg-xxxxxx). // // ResourceId is a required field ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` // The resource type. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` } // String returns the string representation func (s ResourceKey) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceKey) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceKey) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceKey"} if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceId sets the ResourceId field's value. func (s *ResourceKey) SetResourceId(v string) *ResourceKey { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ResourceKey) SetResourceType(v string) *ResourceKey { s.ResourceType = &v return s } // You have specified a resource that is either unknown or has not been discovered. type ResourceNotDiscoveredException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s ResourceNotDiscoveredException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceNotDiscoveredException) GoString() string { return s.String() } func newErrorResourceNotDiscoveredException(v protocol.ResponseMetadata) error { return &ResourceNotDiscoveredException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceNotDiscoveredException) Code() string { return "ResourceNotDiscoveredException" } // Message returns the exception's message. func (s *ResourceNotDiscoveredException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceNotDiscoveredException) OrigErr() error { return nil } func (s *ResourceNotDiscoveredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceNotDiscoveredException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceNotDiscoveredException) RequestID() string { return s.RespMetadata.RequestID } // You have specified a resource that does not exist. type ResourceNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s ResourceNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceNotFoundException) GoString() string { return s.String() } func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceNotFoundException) OrigErr() error { return nil } func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // The dynamic value of the resource. type ResourceValue struct { _ struct{} `type:"structure"` // The value is a resource ID. // // Value is a required field Value *string `type:"string" required:"true" enum:"ResourceValueType"` } // String returns the string representation func (s ResourceValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ResourceValue) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceValue) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceValue"} if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetValue sets the Value field's value. func (s *ResourceValue) SetValue(v string) *ResourceValue { s.Value = &v return s } // An object with the name of the retention configuration and the retention // period in days. The object stores the configuration for data retention in // AWS Config. type RetentionConfiguration struct { _ struct{} `type:"structure"` // The name of the retention configuration object. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Number of days AWS Config stores your historical information. // // Currently, only applicable to the configuration item history. // // RetentionPeriodInDays is a required field RetentionPeriodInDays *int64 `min:"30" type:"integer" required:"true"` } // String returns the string representation func (s RetentionConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s RetentionConfiguration) GoString() string { return s.String() } // SetName sets the Name field's value. func (s *RetentionConfiguration) SetName(v string) *RetentionConfiguration { s.Name = &v return s } // SetRetentionPeriodInDays sets the RetentionPeriodInDays field's value. func (s *RetentionConfiguration) SetRetentionPeriodInDays(v int64) *RetentionConfiguration { s.RetentionPeriodInDays = &v return s } // Defines which resources trigger an evaluation for an AWS Config rule. The // scope can include one or more resource types, a combination of a tag key // and value, or a combination of one resource type and one resource ID. Specify // a scope to constrain which resources trigger an evaluation for a rule. Otherwise, // evaluations for the rule are triggered when any resource in your recording // group changes in configuration. type Scope struct { _ struct{} `type:"structure"` // The ID of the only AWS resource that you want to trigger an evaluation for // the rule. If you specify a resource ID, you must specify one resource type // for ComplianceResourceTypes. ComplianceResourceId *string `min:"1" type:"string"` // The resource types of only those AWS resources that you want to trigger an // evaluation for the rule. You can only specify one type if you also specify // a resource ID for ComplianceResourceId. ComplianceResourceTypes []*string `type:"list"` // The tag key that is applied to only those AWS resources that you want to // trigger an evaluation for the rule. TagKey *string `min:"1" type:"string"` // The tag value applied to only those AWS resources that you want to trigger // an evaluation for the rule. If you specify a value for TagValue, you must // also specify a value for TagKey. TagValue *string `min:"1" type:"string"` } // String returns the string representation func (s Scope) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Scope) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Scope) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Scope"} if s.ComplianceResourceId != nil && len(*s.ComplianceResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ComplianceResourceId", 1)) } if s.TagKey != nil && len(*s.TagKey) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagKey", 1)) } if s.TagValue != nil && len(*s.TagValue) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagValue", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetComplianceResourceId sets the ComplianceResourceId field's value. func (s *Scope) SetComplianceResourceId(v string) *Scope { s.ComplianceResourceId = &v return s } // SetComplianceResourceTypes sets the ComplianceResourceTypes field's value. func (s *Scope) SetComplianceResourceTypes(v []*string) *Scope { s.ComplianceResourceTypes = v return s } // SetTagKey sets the TagKey field's value. func (s *Scope) SetTagKey(v string) *Scope { s.TagKey = &v return s } // SetTagValue sets the TagValue field's value. func (s *Scope) SetTagValue(v string) *Scope { s.TagValue = &v return s } type SelectAggregateResourceConfigInput struct { _ struct{} `type:"structure"` // The name of the configuration aggregator. // // ConfigurationAggregatorName is a required field ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` // The SQL query SELECT command. // // Expression is a required field Expression *string `min:"1" type:"string" required:"true"` // The maximum number of query results returned on each page. Limit *int64 `type:"integer"` MaxResults *int64 `type:"integer"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s SelectAggregateResourceConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s SelectAggregateResourceConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *SelectAggregateResourceConfigInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SelectAggregateResourceConfigInput"} if s.ConfigurationAggregatorName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) } if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) } if s.Expression == nil { invalidParams.Add(request.NewErrParamRequired("Expression")) } if s.Expression != nil && len(*s.Expression) < 1 { invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. func (s *SelectAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *SelectAggregateResourceConfigInput { s.ConfigurationAggregatorName = &v return s } // SetExpression sets the Expression field's value. func (s *SelectAggregateResourceConfigInput) SetExpression(v string) *SelectAggregateResourceConfigInput { s.Expression = &v return s } // SetLimit sets the Limit field's value. func (s *SelectAggregateResourceConfigInput) SetLimit(v int64) *SelectAggregateResourceConfigInput { s.Limit = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *SelectAggregateResourceConfigInput) SetMaxResults(v int64) *SelectAggregateResourceConfigInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *SelectAggregateResourceConfigInput) SetNextToken(v string) *SelectAggregateResourceConfigInput { s.NextToken = &v return s } type SelectAggregateResourceConfigOutput struct { _ struct{} `type:"structure"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` // Details about the query. QueryInfo *QueryInfo `type:"structure"` // Returns the results for the SQL query. Results []*string `type:"list"` } // String returns the string representation func (s SelectAggregateResourceConfigOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s SelectAggregateResourceConfigOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *SelectAggregateResourceConfigOutput) SetNextToken(v string) *SelectAggregateResourceConfigOutput { s.NextToken = &v return s } // SetQueryInfo sets the QueryInfo field's value. func (s *SelectAggregateResourceConfigOutput) SetQueryInfo(v *QueryInfo) *SelectAggregateResourceConfigOutput { s.QueryInfo = v return s } // SetResults sets the Results field's value. func (s *SelectAggregateResourceConfigOutput) SetResults(v []*string) *SelectAggregateResourceConfigOutput { s.Results = v return s } type SelectResourceConfigInput struct { _ struct{} `type:"structure"` // The SQL query SELECT command. // // Expression is a required field Expression *string `min:"1" type:"string" required:"true"` // The maximum number of query results returned on each page. Limit *int64 `type:"integer"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation func (s SelectResourceConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s SelectResourceConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *SelectResourceConfigInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SelectResourceConfigInput"} if s.Expression == nil { invalidParams.Add(request.NewErrParamRequired("Expression")) } if s.Expression != nil && len(*s.Expression) < 1 { invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetExpression sets the Expression field's value. func (s *SelectResourceConfigInput) SetExpression(v string) *SelectResourceConfigInput { s.Expression = &v return s } // SetLimit sets the Limit field's value. func (s *SelectResourceConfigInput) SetLimit(v int64) *SelectResourceConfigInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *SelectResourceConfigInput) SetNextToken(v string) *SelectResourceConfigInput { s.NextToken = &v return s } type SelectResourceConfigOutput struct { _ struct{} `type:"structure"` // The nextToken string returned in a previous request that you use to request // the next page of results in a paginated response. NextToken *string `type:"string"` // Returns the QueryInfo object. QueryInfo *QueryInfo `type:"structure"` // Returns the results for the SQL query. Results []*string `type:"list"` } // String returns the string representation func (s SelectResourceConfigOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s SelectResourceConfigOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *SelectResourceConfigOutput) SetNextToken(v string) *SelectResourceConfigOutput { s.NextToken = &v return s } // SetQueryInfo sets the QueryInfo field's value. func (s *SelectResourceConfigOutput) SetQueryInfo(v *QueryInfo) *SelectResourceConfigOutput { s.QueryInfo = v return s } // SetResults sets the Results field's value. func (s *SelectResourceConfigOutput) SetResults(v []*string) *SelectResourceConfigOutput { s.Results = v return s } // Provides the AWS Config rule owner (AWS or customer), the rule identifier, // and the events that trigger the evaluation of your AWS resources. type Source struct { _ struct{} `type:"structure"` // Indicates whether AWS or the customer owns and manages the AWS Config rule. // // Owner is a required field Owner *string `type:"string" required:"true" enum:"Owner"` // Provides the source and type of the event that causes AWS Config to evaluate // your AWS resources. SourceDetails []*SourceDetail `type:"list"` // For AWS Config managed rules, a predefined identifier from a list. For example, // IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, see Using // AWS Managed Config Rules (https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html). // // For custom rules, the identifier is the Amazon Resource Name (ARN) of the // rule's AWS Lambda function, such as arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name. // // SourceIdentifier is a required field SourceIdentifier *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s Source) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Source) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Source) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Source"} if s.Owner == nil { invalidParams.Add(request.NewErrParamRequired("Owner")) } if s.SourceIdentifier == nil { invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) } if s.SourceIdentifier != nil && len(*s.SourceIdentifier) < 1 { invalidParams.Add(request.NewErrParamMinLen("SourceIdentifier", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOwner sets the Owner field's value. func (s *Source) SetOwner(v string) *Source { s.Owner = &v return s } // SetSourceDetails sets the SourceDetails field's value. func (s *Source) SetSourceDetails(v []*SourceDetail) *Source { s.SourceDetails = v return s } // SetSourceIdentifier sets the SourceIdentifier field's value. func (s *Source) SetSourceIdentifier(v string) *Source { s.SourceIdentifier = &v return s } // Provides the source and the message types that trigger AWS Config to evaluate // your AWS resources against a rule. It also provides the frequency with which // you want AWS Config to run evaluations for the rule if the trigger type is // periodic. You can specify the parameter values for SourceDetail only for // custom rules. type SourceDetail struct { _ struct{} `type:"structure"` // The source of the event, such as an AWS service, that triggers AWS Config // to evaluate your AWS resources. EventSource *string `type:"string" enum:"EventSource"` // The frequency at which you want AWS Config to run evaluations for a custom // rule with a periodic trigger. If you specify a value for MaximumExecutionFrequency, // then MessageType must use the ScheduledNotification value. // // By default, rules with a periodic trigger are evaluated every 24 hours. To // change the frequency, specify a valid value for the MaximumExecutionFrequency // parameter. // // Based on the valid value you choose, AWS Config runs evaluations once for // each valid value. For example, if you choose Three_Hours, AWS Config runs // evaluations once every three hours. In this case, Three_Hours is the frequency // of this rule. MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` // The type of notification that triggers AWS Config to run an evaluation for // a rule. You can specify the following notification types: // // * ConfigurationItemChangeNotification - Triggers an evaluation when AWS // Config delivers a configuration item as a result of a resource change. // // * OversizedConfigurationItemChangeNotification - Triggers an evaluation // when AWS Config delivers an oversized configuration item. AWS Config may // generate this notification type when a resource changes and the notification // exceeds the maximum size allowed by Amazon SNS. // // * ScheduledNotification - Triggers a periodic evaluation at the frequency // specified for MaximumExecutionFrequency. // // * ConfigurationSnapshotDeliveryCompleted - Triggers a periodic evaluation // when AWS Config delivers a configuration snapshot. // // If you want your custom rule to be triggered by configuration changes, specify // two SourceDetail objects, one for ConfigurationItemChangeNotification and // one for OversizedConfigurationItemChangeNotification. MessageType *string `type:"string" enum:"MessageType"` } // String returns the string representation func (s SourceDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s SourceDetail) GoString() string { return s.String() } // SetEventSource sets the EventSource field's value. func (s *SourceDetail) SetEventSource(v string) *SourceDetail { s.EventSource = &v return s } // SetMaximumExecutionFrequency sets the MaximumExecutionFrequency field's value. func (s *SourceDetail) SetMaximumExecutionFrequency(v string) *SourceDetail { s.MaximumExecutionFrequency = &v return s } // SetMessageType sets the MessageType field's value. func (s *SourceDetail) SetMessageType(v string) *SourceDetail { s.MessageType = &v return s } // AWS Systems Manager (SSM) specific remediation controls. type SsmControls struct { _ struct{} `type:"structure"` // The maximum percentage of remediation actions allowed to run in parallel // on the non-compliant resources for that specific rule. You can specify a // percentage, such as 10%. The default value is 10. ConcurrentExecutionRatePercentage *int64 `min:"1" type:"integer"` // The percentage of errors that are allowed before SSM stops running automations // on non-compliant resources for that specific rule. You can specify a percentage // of errors, for example 10%. If you do not specifiy a percentage, the default // is 50%. For example, if you set the ErrorPercentage to 40% for 10 non-compliant // resources, then SSM stops running the automations when the fifth error is // received. ErrorPercentage *int64 `min:"1" type:"integer"` } // String returns the string representation func (s SsmControls) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s SsmControls) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *SsmControls) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SsmControls"} if s.ConcurrentExecutionRatePercentage != nil && *s.ConcurrentExecutionRatePercentage < 1 { invalidParams.Add(request.NewErrParamMinValue("ConcurrentExecutionRatePercentage", 1)) } if s.ErrorPercentage != nil && *s.ErrorPercentage < 1 { invalidParams.Add(request.NewErrParamMinValue("ErrorPercentage", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConcurrentExecutionRatePercentage sets the ConcurrentExecutionRatePercentage field's value. func (s *SsmControls) SetConcurrentExecutionRatePercentage(v int64) *SsmControls { s.ConcurrentExecutionRatePercentage = &v return s } // SetErrorPercentage sets the ErrorPercentage field's value. func (s *SsmControls) SetErrorPercentage(v int64) *SsmControls { s.ErrorPercentage = &v return s } type StartConfigRulesEvaluationInput struct { _ struct{} `type:"structure"` // The list of names of AWS Config rules that you want to run evaluations for. ConfigRuleNames []*string `min:"1" type:"list"` } // String returns the string representation func (s StartConfigRulesEvaluationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StartConfigRulesEvaluationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartConfigRulesEvaluationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartConfigRulesEvaluationInput"} if s.ConfigRuleNames != nil && len(s.ConfigRuleNames) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleNames", 1)) } if invalidParams.Len() > 0 { return invalidPa
etConfigRuleNames sets the ConfigRuleNames field's value. func (s *StartConfigRulesEvaluationInput) SetConfigRuleNames(v []*string) *StartConfigRulesEvaluationInput { s.ConfigRuleNames = v return s } // The output when you start the evaluation for the specified AWS Config rule. type StartConfigRulesEvaluationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s StartConfigRulesEvaluationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StartConfigRulesEvaluationOutput) GoString() string { return s.String() } // The input for the StartConfigurationRecorder action. type StartConfigurationRecorderInput struct { _ struct{} `type:"structure"` // The name of the recorder object that records each configuration change made // to the resources. // // ConfigurationRecorderName is a required field ConfigurationRecorderName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s StartConfigurationRecorderInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StartConfigurationRecorderInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartConfigurationRecorderInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartConfigurationRecorderInput"} if s.ConfigurationRecorderName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorderName")) } if s.ConfigurationRecorderName != nil && len(*s.ConfigurationRecorderName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationRecorderName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationRecorderName sets the ConfigurationRecorderName field's value. func (s *StartConfigurationRecorderInput) SetConfigurationRecorderName(v string) *StartConfigurationRecorderInput { s.ConfigurationRecorderName = &v return s } type StartConfigurationRecorderOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s StartConfigurationRecorderOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StartConfigurationRecorderOutput) GoString() string { return s.String() } type StartRemediationExecutionInput struct { _ struct{} `type:"structure"` // The list of names of AWS Config rules that you want to run remediation execution // for. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` // A list of resource keys to be processed with the current request. Each element // in the list consists of the resource type and resource ID. // // ResourceKeys is a required field ResourceKeys []*ResourceKey `min:"1" type:"list" required:"true"` } // String returns the string representation func (s StartRemediationExecutionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StartRemediationExecutionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartRemediationExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartRemediationExecutionInput"} if s.ConfigRuleName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } if s.ResourceKeys == nil { invalidParams.Add(request.NewErrParamRequired("ResourceKeys")) } if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) } if s.ResourceKeys != nil { for i, v := range s.ResourceKeys { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigRuleName sets the ConfigRuleName field's value. func (s *StartRemediationExecutionInput) SetConfigRuleName(v string) *StartRemediationExecutionInput { s.ConfigRuleName = &v return s } // SetResourceKeys sets the ResourceKeys field's value. func (s *StartRemediationExecutionInput) SetResourceKeys(v []*ResourceKey) *StartRemediationExecutionInput { s.ResourceKeys = v return s } type StartRemediationExecutionOutput struct { _ struct{} `type:"structure"` // For resources that have failed to start execution, the API returns a resource // key object. FailedItems []*ResourceKey `min:"1" type:"list"` // Returns a failure message. For example, the resource is already compliant. FailureMessage *string `type:"string"` } // String returns the string representation func (s StartRemediationExecutionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StartRemediationExecutionOutput) GoString() string { return s.String() } // SetFailedItems sets the FailedItems field's value. func (s *StartRemediationExecutionOutput) SetFailedItems(v []*ResourceKey) *StartRemediationExecutionOutput { s.FailedItems = v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *StartRemediationExecutionOutput) SetFailureMessage(v string) *StartRemediationExecutionOutput { s.FailureMessage = &v return s } // The static value of the resource. type StaticValue struct { _ struct{} `type:"structure"` // A list of values. For example, the ARN of the assumed role. // // Values is a required field Values []*string `type:"list" required:"true"` } // String returns the string representation func (s StaticValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StaticValue) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StaticValue) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StaticValue"} if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetValues sets the Values field's value. func (s *StaticValue) SetValues(v []*string) *StaticValue { s.Values = v return s } // Status filter object to filter results based on specific member account ID // or status type for an organization config rule. type StatusDetailFilters struct { _ struct{} `type:"structure"` // The 12-digit account ID of the member account within an organization. AccountId *string `type:"string"` // Indicates deployment status for config rule in the member account. When master // account calls PutOrganizationConfigRule action for the first time, config // rule status is created in the member account. When master account calls PutOrganizationConfigRule // action for the second time, config rule status is updated in the member account. // Config rule status is deleted when the master account deletes OrganizationConfigRule // and disables service access for config-multiaccountsetup.amazonaws.com. // // AWS Config sets the state of the rule to: // // * CREATE_SUCCESSFUL when config rule has been created in the member account. // // * CREATE_IN_PROGRESS when config rule is being created in the member account. // // * CREATE_FAILED when config rule creation has failed in the member account. // // * DELETE_FAILED when config rule deletion has failed in the member account. // // * DELETE_IN_PROGRESS when config rule is being deleted in the member account. // // * DELETE_SUCCESSFUL when config rule has been deleted in the member account. // // * UPDATE_SUCCESSFUL when config rule has been updated in the member account. // // * UPDATE_IN_PROGRESS when config rule is being updated in the member account. // // * UPDATE_FAILED when config rule deletion has failed in the member account. MemberAccountRuleStatus *string `type:"string" enum:"MemberAccountRuleStatus"` } // String returns the string representation func (s StatusDetailFilters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StatusDetailFilters) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *StatusDetailFilters) SetAccountId(v string) *StatusDetailFilters { s.AccountId = &v return s } // SetMemberAccountRuleStatus sets the MemberAccountRuleStatus field's value. func (s *StatusDetailFilters) SetMemberAccountRuleStatus(v string) *StatusDetailFilters { s.MemberAccountRuleStatus = &v return s } // The input for the StopConfigurationRecorder action. type StopConfigurationRecorderInput struct { _ struct{} `type:"structure"` // The name of the recorder object that records each configuration change made // to the resources. // // ConfigurationRecorderName is a required field ConfigurationRecorderName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s StopConfigurationRecorderInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StopConfigurationRecorderInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StopConfigurationRecorderInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StopConfigurationRecorderInput"} if s.ConfigurationRecorderName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorderName")) } if s.ConfigurationRecorderName != nil && len(*s.ConfigurationRecorderName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigurationRecorderName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfigurationRecorderName sets the ConfigurationRecorderName field's value. func (s *StopConfigurationRecorderInput) SetConfigurationRecorderName(v string) *StopConfigurationRecorderInput { s.ConfigurationRecorderName = &v return s } type StopConfigurationRecorderOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s StopConfigurationRecorderOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s StopConfigurationRecorderOutput) GoString() string { return s.String() } // The tags for the resource. The metadata that you apply to a resource to help // you categorize and organize them. Each tag consists of a key and an optional // value, both of which you define. Tag keys can have a maximum character length // of 128 characters, and tag values can have a maximum length of 256 characters. type Tag struct { _ struct{} `type:"structure"` // One part of a key-value pair that make up a tag. A key is a general label // that acts like a category for more specific tag values. Key *string `min:"1" type:"string"` // The optional part of a key-value pair that make up a tag. A value acts as // a descriptor within a tag category (key). Value *string `type:"string"` } // String returns the string representation func (s Tag) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Tag) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Tag) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Tag"} if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *Tag) SetKey(v string) *Tag { s.Key = &v return s } // SetValue sets the Value field's value. func (s *Tag) SetValue(v string) *Tag { s.Value = &v return s } type TagResourceInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) that identifies the resource for which to // list the tags. Currently, the supported resources are ConfigRule, ConfigurationAggregator // and AggregatorAuthorization. // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` // An array of tag object. // // Tags is a required field Tags []*Tag `min:"1" type:"list" required:"true"` } // String returns the string representation func (s TagResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s TagResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *TagResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) } if s.Tags == nil { invalidParams.Add(request.NewErrParamRequired("Tags")) } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceArn sets the ResourceArn field's value. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { s.ResourceArn = &v return s } // SetTags sets the Tags field's value. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { s.Tags = v return s } type TagResourceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s TagResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s TagResourceOutput) GoString() string { return s.String() } // You have reached the limit of the number of tags you can use. You have more // than 50 tags. type TooManyTagsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s TooManyTagsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s TooManyTagsException) GoString() string { return s.String() } func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TooManyTagsException) OrigErr() error { return nil } func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TooManyTagsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TooManyTagsException) RequestID() string { return s.RespMetadata.RequestID } type UntagResourceInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) that identifies the resource for which to // list the tags. Currently, the supported resources are ConfigRule, ConfigurationAggregator // and AggregatorAuthorization. // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` // The keys of the tags to be removed. // // TagKeys is a required field TagKeys []*string `min:"1" type:"list" required:"true"` } // String returns the string representation func (s UntagResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s UntagResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UntagResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) } if s.TagKeys == nil { invalidParams.Add(request.NewErrParamRequired("TagKeys")) } if s.TagKeys != nil && len(s.TagKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceArn sets the ResourceArn field's value. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { s.ResourceArn = &v return s } // SetTagKeys sets the TagKeys field's value. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { s.TagKeys = v return s } type UntagResourceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s UntagResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s UntagResourceOutput) GoString() string { return s.String() } // The requested action is not valid. type ValidationException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation func (s ValidationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ValidationException) GoString() string { return s.String() } func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ValidationException) OrigErr() error { return nil } func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ValidationException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ValidationException) RequestID() string { return s.RespMetadata.RequestID } const ( // AggregatedSourceStatusTypeFailed is a AggregatedSourceStatusType enum value AggregatedSourceStatusTypeFailed = "FAILED" // AggregatedSourceStatusTypeSucceeded is a AggregatedSourceStatusType enum value AggregatedSourceStatusTypeSucceeded = "SUCCEEDED" // AggregatedSourceStatusTypeOutdated is a AggregatedSourceStatusType enum value AggregatedSourceStatusTypeOutdated = "OUTDATED" ) const ( // AggregatedSourceTypeAccount is a AggregatedSourceType enum value AggregatedSourceTypeAccount = "ACCOUNT" // AggregatedSourceTypeOrganization is a AggregatedSourceType enum value AggregatedSourceTypeOrganization = "ORGANIZATION" ) const ( // ChronologicalOrderReverse is a ChronologicalOrder enum value ChronologicalOrderReverse = "Reverse" // ChronologicalOrderForward is a ChronologicalOrder enum value ChronologicalOrderForward = "Forward" ) const ( // ComplianceTypeCompliant is a ComplianceType enum value ComplianceTypeCompliant = "COMPLIANT" // ComplianceTypeNonCompliant is a ComplianceType enum value ComplianceTypeNonCompliant = "NON_COMPLIANT" // ComplianceTypeNotApplicable is a ComplianceType enum value ComplianceTypeNotApplicable = "NOT_APPLICABLE" // ComplianceTypeInsufficientData is a ComplianceType enum value ComplianceTypeInsufficientData = "INSUFFICIENT_DATA" ) const ( // ConfigRuleComplianceSummaryGroupKeyAccountId is a ConfigRuleComplianceSummaryGroupKey enum value ConfigRuleComplianceSummaryGroupKeyAccountId = "ACCOUNT_ID" // ConfigRuleComplianceSummaryGroupKeyAwsRegion is a ConfigRuleComplianceSummaryGroupKey enum value ConfigRuleComplianceSummaryGroupKeyAwsRegion = "AWS_REGION" ) const ( // ConfigRuleStateActive is a ConfigRuleState enum value ConfigRuleStateActive = "ACTIVE" // ConfigRuleStateDeleting is a ConfigRuleState enum value ConfigRuleStateDeleting = "DELETING" // ConfigRuleStateDeletingResults is a ConfigRuleState enum value ConfigRuleStateDeletingResults = "DELETING_RESULTS" // ConfigRuleStateEvaluating is a ConfigRuleState enum value ConfigRuleStateEvaluating = "EVALUATING" ) const ( // ConfigurationItemStatusOk is a ConfigurationItemStatus enum value ConfigurationItemStatusOk = "OK" // ConfigurationItemStatusResourceDiscovered is a ConfigurationItemStatus enum value ConfigurationItemStatusResourceDiscovered = "ResourceDiscovered" // ConfigurationItemStatusResourceNotRecorded is a ConfigurationItemStatus enum value ConfigurationItemStatusResourceNotRecorded = "ResourceNotRecorded" // ConfigurationItemStatusResourceDeleted is a ConfigurationItemStatus enum value ConfigurationItemStatusResourceDeleted = "ResourceDeleted" // ConfigurationItemStatusResourceDeletedNotRecorded is a ConfigurationItemStatus enum value ConfigurationItemStatusResourceDeletedNotRecorded = "ResourceDeletedNotRecorded" ) const ( // ConformancePackComplianceTypeCompliant is a ConformancePackComplianceType enum value ConformancePackComplianceTypeCompliant = "COMPLIANT" // ConformancePackComplianceTypeNonCompliant is a ConformancePackComplianceType enum value ConformancePackComplianceTypeNonCompliant = "NON_COMPLIANT" ) const ( // ConformancePackStateCreateInProgress is a ConformancePackState enum value ConformancePackStateCreateInProgress = "CREATE_IN_PROGRESS" // ConformancePackStateCreateComplete is a ConformancePackState enum value ConformancePackStateCreateComplete = "CREATE_COMPLETE" // ConformancePackStateCreateFailed is a ConformancePackState enum value ConformancePackStateCreateFailed = "CREATE_FAILED" // ConformancePackStateDeleteInProgress is a ConformancePackState enum value ConformancePackStateDeleteInProgress = "DELETE_IN_PROGRESS" // ConformancePackStateDeleteFailed is a ConformancePackState enum value ConformancePackStateDeleteFailed = "DELETE_FAILED" ) const ( // DeliveryStatusSuccess is a DeliveryStatus enum value DeliveryStatusSuccess = "Success" // DeliveryStatusFailure is a DeliveryStatus enum value DeliveryStatusFailure = "Failure" // DeliveryStatusNotApplicable is a DeliveryStatus enum value DeliveryStatusNotApplicable = "Not_Applicable" ) const ( // EventSourceAwsConfig is a EventSource enum value EventSourceAwsConfig = "aws.config" ) const ( // MaximumExecutionFrequencyOneHour is a MaximumExecutionFrequency enum value MaximumExecutionFrequencyOneHour = "One_Hour" // MaximumExecutionFrequencyThreeHours is a MaximumExecutionFrequency enum value MaximumExecutionFrequencyThreeHours = "Three_Hours" // MaximumExecutionFrequencySixHours is a MaximumExecutionFrequency enum value MaximumExecutionFrequencySixHours = "Six_Hours" // MaximumExecutionFrequencyTwelveHours is a MaximumExecutionFrequency enum value MaximumExecutionFrequencyTwelveHours = "Twelve_Hours" // MaximumExecutionFrequencyTwentyFourHours is a MaximumExecutionFrequency enum value MaximumExecutionFrequencyTwentyFourHours = "TwentyFour_Hours" ) const ( // MemberAccountRuleStatusCreateSuccessful is a MemberAccountRuleStatus enum value MemberAccountRuleStatusCreateSuccessful = "CREATE_SUCCESSFUL" // MemberAccountRuleStatusCreateInProgress is a MemberAccountRuleStatus enum value MemberAccountRuleStatusCreateInProgress = "CREATE_IN_PROGRESS" // MemberAccountRuleStatusCreateFailed is a MemberAccountRuleStatus enum value MemberAccountRuleStatusCreateFailed = "CREATE_FAILED" // MemberAccountRuleStatusDeleteSuccessful is a MemberAccountRuleStatus enum value MemberAccountRuleStatusDeleteSuccessful = "DELETE_SUCCESSFUL" // MemberAccountRuleStatusDeleteFailed is a MemberAccountRuleStatus enum value MemberAccountRuleStatusDeleteFailed = "DELETE_FAILED" // MemberAccountRuleStatusDeleteInProgress is a MemberAccountRuleStatus enum value MemberAccountRuleStatusDeleteInProgress = "DELETE_IN_PROGRESS" // MemberAccountRuleStatusUpdateSuccessful is a MemberAccountRuleStatus enum value MemberAccountRuleStatusUpdateSuccessful = "UPDATE_SUCCESSFUL" // MemberAccountRuleStatusUpdateInProgress is a MemberAccountRuleStatus enum value MemberAccountRuleStatusUpdateInProgress = "UPDATE_IN_PROGRESS" // MemberAccountRuleStatusUpdateFailed is a MemberAccountRuleStatus enum value MemberAccountRuleStatusUpdateFailed = "UPDATE_FAILED" ) const ( // MessageTypeConfigurationItemChangeNotification is a MessageType enum value MessageTypeConfigurationItemChangeNotification = "ConfigurationItemChangeNotification" // MessageTypeConfigurationSnapshotDeliveryCompleted is a MessageType enum value MessageTypeConfigurationSnapshotDeliveryCompleted = "ConfigurationSnapshotDeliveryCompleted" // MessageTypeScheduledNotification is a MessageType enum value MessageTypeScheduledNotification = "ScheduledNotification" // MessageTypeOversizedConfigurationItemChangeNotification is a MessageType enum value MessageTypeOversizedConfigurationItemChangeNotification = "OversizedConfigurationItemChangeNotification" ) const ( // OrganizationConfigRuleTriggerTypeConfigurationItemChangeNotification is a OrganizationConfigRuleTriggerType enum value OrganizationConfigRuleTriggerTypeConfigurationItemChangeNotification = "ConfigurationItemChangeNotification" // OrganizationConfigRuleTriggerTypeOversizedConfigurationItemChangeNotification is a OrganizationConfigRuleTriggerType enum value OrganizationConfigRuleTriggerTypeOversizedConfigurationItemChangeNotification = "OversizedConfigurationItemChangeNotification" // OrganizationConfigRuleTriggerTypeScheduledNotification is a OrganizationConfigRuleTriggerType enum value OrganizationConfigRuleTriggerTypeScheduledNotification = "ScheduledNotification" ) const ( // OrganizationResourceDetailedStatusCreateSuccessful is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusCreateSuccessful = "CREATE_SUCCESSFUL" // OrganizationResourceDetailedStatusCreateInProgress is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusCreateInProgress = "CREATE_IN_PROGRESS" // OrganizationResourceDetailedStatusCreateFailed is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusCreateFailed = "CREATE_FAILED" // OrganizationResourceDetailedStatusDeleteSuccessful is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusDeleteSuccessful = "DELETE_SUCCESSFUL" // OrganizationResourceDetailedStatusDeleteFailed is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusDeleteFailed = "DELETE_FAILED" // OrganizationResourceDetailedStatusDeleteInProgress is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusDeleteInProgress = "DELETE_IN_PROGRESS" // OrganizationResourceDetailedStatusUpdateSuccessful is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusUpdateSuccessful = "UPDATE_SUCCESSFUL" // OrganizationResourceDetailedStatusUpdateInProgress is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusUpdateInProgress = "UPDATE_IN_PROGRESS" // OrganizationResourceDetailedStatusUpdateFailed is a OrganizationResourceDetailedStatus enum value OrganizationResourceDetailedStatusUpdateFailed = "UPDATE_FAILED" ) const ( // OrganizationResourceStatusCreateSuccessful is a OrganizationResourceStatus enum value OrganizationResourceStatusCreateSuccessful = "CREATE_SUCCESSFUL" // OrganizationResourceStatusCreateInProgress is a OrganizationResourceStatus enum value OrganizationResourceStatusCreateInProgress = "CREATE_IN_PROGRESS" // OrganizationResourceStatusCreateFailed is a OrganizationResourceStatus enum value OrganizationResourceStatusCreateFailed = "CREATE_FAILED" // OrganizationResourceStatusDeleteSuccessful is a OrganizationResourceStatus enum value OrganizationResourceStatusDeleteSuccessful = "DELETE_SUCCESSFUL" // OrganizationResourceStatusDeleteFailed is a OrganizationResourceStatus enum value OrganizationResourceStatusDeleteFailed = "DELETE_FAILED" // OrganizationResourceStatusDeleteInProgress is a OrganizationResourceStatus enum value OrganizationResourceStatusDeleteInProgress = "DELETE_IN_PROGRESS" // OrganizationResourceStatusUpdateSuccessful is a OrganizationResourceStatus enum value OrganizationResourceStatusUpdateSuccessful = "UPDATE_SUCCESSFUL" // OrganizationResourceStatusUpdateInProgress is a OrganizationResourceStatus enum value OrganizationResourceStatusUpdateInProgress = "UPDATE_IN_PROGRESS" // OrganizationResourceStatusUpdateFailed is a OrganizationResourceStatus enum value OrganizationResourceStatusUpdateFailed = "UPDATE_FAILED" ) const ( // OrganizationRuleStatusCreateSuccessful is a OrganizationRuleStatus enum value OrganizationRuleStatusCreateSuccessful = "CREATE_SUCCESSFUL" // OrganizationRuleStatusCreateInProgress is a OrganizationRuleStatus enum value OrganizationRuleStatusCreateInProgress = "CREATE_IN_PROGRESS" // OrganizationRuleStatusCreateFailed is a OrganizationRuleStatus enum value OrganizationRuleStatusCreateFailed = "CREATE_FAILED" // OrganizationRuleStatusDeleteSuccessful is a OrganizationRuleStatus enum value OrganizationRuleStatusDeleteSuccessful = "DELETE_SUCCESSFUL" // OrganizationRuleStatusDeleteFailed is a OrganizationRuleStatus enum value OrganizationRuleStatusDeleteFailed = "DELETE_FAILED" // OrganizationRuleStatusDeleteInProgress is a OrganizationRuleStatus enum value OrganizationRuleStatusDeleteInProgress = "DELETE_IN_PROGRESS" // OrganizationRuleStatusUpdateSuccessful is a OrganizationRuleStatus enum value OrganizationRuleStatusUpdateSuccessful = "UPDATE_SUCCESSFUL" // OrganizationRuleStatusUpdateInProgress is a OrganizationRuleStatus enum value OrganizationRuleStatusUpdateInProgress = "UPDATE_IN_PROGRESS" // OrganizationRuleStatusUpdateFailed is a OrganizationRuleStatus enum value OrganizationRuleStatusUpdateFailed = "UPDATE_FAILED" ) const ( // OwnerCustomLambda is a Owner enum value OwnerCustomLambda = "CUSTOM_LAMBDA" // OwnerAws is a Owner enum value OwnerAws = "AWS" ) const ( // RecorderStatusPending is a RecorderStatus enum value RecorderStatusPending = "Pending" // RecorderStatusSuccess is a RecorderStatus enum value RecorderStatusSuccess = "Success" // RecorderStatusFailure is a RecorderStatus enum value RecorderStatusFailure = "Failure" ) const ( // RemediationExecutionStateQueued is a RemediationExecutionState enum value RemediationExecutionStateQueued = "QUEUED" // RemediationExecutionStateInProgress is a RemediationExecutionState enum value RemediationExecutionStateInProgress = "IN_PROGRESS" // RemediationExecutionStateSucceeded is a RemediationExecutionState enum value RemediationExecutionStateSucceeded = "SUCCEEDED" // RemediationExecutionStateFailed is a RemediationExecutionState enum value RemediationExecutionStateFailed = "FAILED" ) const ( // RemediationExecutionStepStateSucceeded is a RemediationExecutionStepState enum value RemediationExecutionStepStateSucceeded = "SUCCEEDED" // RemediationExecutionStepStatePending is a RemediationExecutionStepState enum value RemediationExecutionStepStatePending = "PENDING" // RemediationExecutionStepStateFailed is a RemediationExecutionStepState enum value RemediationExecutionStepStateFailed = "FAILED" ) const ( // RemediationTargetTypeSsmDocument is a RemediationTargetType enum value RemediationTargetTypeSsmDocument = "SSM_DOCUMENT" ) const ( // ResourceCountGroupKeyResourceType is a ResourceCountGroupKey enum value ResourceCountGroupKeyResourceType = "RESOURCE_TYPE" // ResourceCountGroupKeyAccountId is a ResourceCountGroupKey enum value ResourceCountGroupKeyAccountId = "ACCOUNT_ID" // ResourceCountGroupKeyAwsRegion is a ResourceCountGroupKey enum value ResourceCountGroupKeyAwsRegion = "AWS_REGION" ) const ( // ResourceTypeAwsEc2CustomerGateway is a ResourceType enum value ResourceTypeAwsEc2CustomerGateway = "AWS::EC2::CustomerGateway" // ResourceTypeAwsEc2Eip is a ResourceType enum value ResourceTypeAwsEc2Eip = "AWS::EC2::EIP" // ResourceTypeAwsEc2Host is a ResourceType enum value ResourceTypeAwsEc2Host = "AWS::EC2::Host" // ResourceTypeAwsEc2Instance is a ResourceType enum value ResourceTypeAwsEc2Instance = "AWS::EC2::Instance" // ResourceTypeAwsEc2InternetGateway is a ResourceType enum value ResourceTypeAwsEc2InternetGateway = "AWS::EC2::InternetGateway" // ResourceTypeAwsEc2NetworkAcl is a ResourceType enum value ResourceTypeAwsEc2NetworkAcl = "AWS::EC2::NetworkAcl" // ResourceTypeAwsEc2NetworkInterface is a ResourceType enum value ResourceTypeAwsEc2NetworkInterface = "AWS::EC2::NetworkInterface" // ResourceTypeAwsEc2RouteTable is a ResourceType enum value ResourceTypeAwsEc2RouteTable = "AWS::EC2::RouteTable" // ResourceTypeAwsEc2SecurityGroup is a ResourceType enum value ResourceTypeAwsEc2SecurityGroup = "AWS::EC2::SecurityGroup" // ResourceTypeAwsEc2Subnet is a ResourceType enum value ResourceTypeAwsEc2Subnet = "AWS::EC2::Subnet" // ResourceTypeAwsCloudTrailTrail is a ResourceType enum value ResourceTypeAwsCloudTrailTrail = "AWS::CloudTrail::Trail" // ResourceTypeAwsEc2Volume is a ResourceType enum value ResourceTypeAwsEc2Volume = "AWS::EC2::Volume" // ResourceTypeAwsEc2Vpc is a ResourceType enum value ResourceTypeAwsEc2Vpc = "AWS::EC2::VPC" // ResourceTypeAwsEc2Vpnconnection is a ResourceType enum value ResourceTypeAwsEc2Vpnconnection = "AWS::EC2::VPNConnection" // ResourceTypeAwsEc2Vpngateway is a ResourceType enum value ResourceTypeAwsEc2Vpngateway = "AWS::EC2::VPNGateway" // ResourceTypeAwsEc2RegisteredHainstance is a ResourceType enum value ResourceTypeAwsEc2RegisteredHainstance = "AWS::EC2::RegisteredHAInstance" // ResourceTypeAwsEc2NatGateway is a ResourceType enum value ResourceTypeAwsEc2NatGateway = "AWS::EC2::NatGateway" // ResourceTypeAwsEc2EgressOnlyInternetGateway is a ResourceType enum value ResourceTypeAwsEc2EgressOnlyInternetGateway = "AWS::EC2::EgressOnlyInternetGateway" // ResourceTypeAwsEc2Vpcendpoint is a ResourceType enum value ResourceTypeAwsEc2Vpcendpoint = "AWS::EC2::VPCEndpoint" // ResourceTypeAwsEc2VpcendpointService is a ResourceType enum value ResourceTypeAwsEc2VpcendpointService = "AWS::EC2::VPCEndpointService" // ResourceTypeAwsEc2FlowLog is a ResourceType enum value ResourceTypeAwsEc2FlowLog = "AWS::EC2::FlowLog" // ResourceTypeAwsEc2VpcpeeringConnection is a ResourceType enum value ResourceTypeAwsEc2VpcpeeringConnection = "AWS::EC2::VPCPeeringConnection" // ResourceTypeAwsElasticsearchDomain is a ResourceType enum value ResourceTypeAwsElasticsearchDomain = "AWS::Elasticsearch::Domain" // ResourceTypeAwsIamGroup is a ResourceType enum value ResourceTypeAwsIamGroup = "AWS::IAM::Group" // ResourceTypeAwsIamPolicy is a ResourceType enum value ResourceTypeAwsIamPolicy = "AWS::IAM::Policy" // ResourceTypeAwsIamRole is a ResourceType enum value ResourceTypeAwsIamRole = "AWS::IAM::Role" // ResourceTypeAwsIamUser is a ResourceType enum value ResourceTypeAwsIamUser = "AWS::IAM::User" // ResourceTypeAwsElasticLoadBalancingV2LoadBalancer is a ResourceType enum value ResourceTypeAwsElasticLoadBalancingV2LoadBalancer = "AWS::ElasticLoadBalancingV2::LoadBalancer" // ResourceTypeAwsAcmCertificate is a ResourceType enum value ResourceTypeAwsAcmCertificate = "AWS::ACM::Certificate" // ResourceTypeAwsRdsDbinstance is a ResourceType enum value ResourceTypeAwsRdsDbinstance = "AWS::RDS::DBInstance" // ResourceTypeAwsRdsDbsubnetGroup is a ResourceType enum value ResourceTypeAwsRdsDbsubnetGroup = "AWS::RDS::DBSubnetGroup" // ResourceTypeAwsRdsDbsecurityGroup is a ResourceType enum value ResourceTypeAwsRdsDbsecurityGroup = "AWS::RDS::DBSecurityGroup" // ResourceTypeAwsRdsDbsnapshot is a ResourceType enum value ResourceTypeAwsRdsDbsnapshot = "AWS::RDS::DBSnapshot" // ResourceTypeAwsRdsDbcluster is a ResourceType enum value ResourceTypeAwsRdsDbcluster = "AWS::RDS::DBCluster" // ResourceTypeAwsRdsDbclusterSnapshot is a ResourceType enum value ResourceTypeAwsRdsDbclusterSnapshot = "AWS::RDS::DBClusterSnapshot" // ResourceTypeAwsRdsEventSubscription is a ResourceType enum value ResourceTypeAwsRdsEventSubscription = "AWS::RDS::EventSubscription" // ResourceTypeAwsS3Bucket is a ResourceType enum value ResourceTypeAwsS3Bucket = "AWS::S3::Bucket" // ResourceTypeAwsS3AccountPublicAccessBlock is a ResourceType enum value ResourceTypeAwsS3AccountPublicAccessBlock = "AWS::S3::AccountPublicAccessBlock" // ResourceTypeAwsRedshiftCluster is a ResourceType enum value ResourceTypeAwsRedshiftCluster = "AWS::Redshift::Cluster" // ResourceTypeAwsRedshiftClusterSnapshot is a ResourceType enum value ResourceTypeAwsRedshiftClusterSnapshot = "AWS::Redshift::ClusterSnapshot" // ResourceTypeAwsRedshiftClusterParameterGroup is a ResourceType enum value ResourceTypeAwsRedshiftClusterParameterGroup = "AWS::Redshift::ClusterParameterGroup" // ResourceTypeAwsRedshiftClusterSecurityGroup is a ResourceType enum value ResourceTypeAwsRedshiftClusterSecurityGroup = "AWS::Redshift::ClusterSecurityGroup" // ResourceTypeAwsRedshiftClusterSubnetGroup is a ResourceType enum value ResourceTypeAwsRedshiftClusterSubnetGroup = "AWS::Redshift::ClusterSubnetGroup" // ResourceTypeAwsRedshiftEventSubscription is a ResourceType enum value ResourceTypeAwsRedshiftEventSubscription = "AWS::Redshift::EventSubscription" // ResourceTypeAwsSsmManagedInstanceInventory is a ResourceType enum value ResourceTypeAwsSsmManagedInstanceInventory = "AWS::SSM::ManagedInstanceInventory" // ResourceTypeAwsCloudWatchAlarm is a ResourceType enum value ResourceTypeAwsCloudWatchAlarm = "AWS::CloudWatch::Alarm" // ResourceTypeAwsCloudFormationStack is a ResourceType enum value ResourceTypeAwsCloudFormationStack = "AWS::CloudFormation::Stack" // ResourceTypeAwsElasticLoadBalancingLoadBalancer is a ResourceType enum value ResourceTypeAwsElasticLoadBalancingLoadBalancer = "AWS::ElasticLoadBalancing::LoadBalancer" // ResourceTypeAwsAutoScalingAutoScalingGroup is a ResourceType enum value ResourceTypeAwsAutoScalingAutoScalingGroup = "AWS::AutoScaling::AutoScalingGroup" // ResourceTypeAwsAutoScalingLaunchConfiguration is a ResourceType enum value ResourceTypeAwsAutoScalingLaunchConfiguration = "AWS::AutoScaling::LaunchConfiguration" // ResourceTypeAwsAutoScalingScalingPolicy is a ResourceType enum value ResourceTypeAwsAutoScalingScalingPolicy = "AWS::AutoScaling::ScalingPolicy" // ResourceTypeAwsAutoScalingScheduledAction is a ResourceType enum value ResourceTypeAwsAutoScalingScheduledAction = "AWS::AutoScaling::ScheduledAction" // ResourceTypeAwsDynamoDbTable is a ResourceType enum value ResourceTypeAwsDynamoDbTable = "AWS::DynamoDB::Table" // ResourceTypeAwsCodeBuildProject is a ResourceType enum value ResourceTypeAwsCodeBuildProject = "AWS::CodeBuild::Project" // ResourceTypeAwsWafRateBasedRule is a ResourceType enum value ResourceTypeAwsWafRateBasedRule = "AWS::WAF::RateBasedRule" // ResourceTypeAwsWafRule is a ResourceType enum value ResourceTypeAwsWafRule = "AWS::WAF::Rule" // ResourceTypeAwsWafRuleGroup is a ResourceType enum value ResourceTypeAwsWafRuleGroup = "AWS::WAF::RuleGroup" // ResourceTypeAwsWafWebAcl is a ResourceType enum value ResourceTypeAwsWafWebAcl = "AWS::WAF::WebACL" // ResourceTypeAwsWafregionalRateBasedRule is a ResourceType enum value ResourceTypeAwsWafregionalRateBasedRule = "AWS::WAFRegional::RateBasedRule" // ResourceTypeAwsWafregionalRule is a ResourceType enum value ResourceTypeAwsWafregionalRule = "AWS::WAFRegional::Rule" // ResourceTypeAwsWafregionalRuleGroup is a ResourceType enum value ResourceTypeAwsWafregionalRuleGroup = "AWS::WAFRegional::RuleGroup" // ResourceTypeAwsWafregionalWebAcl is a ResourceType enum value ResourceTypeAwsWafregionalWebAcl = "AWS::WAFRegional::WebACL" // ResourceTypeAwsCloudFrontDistribution is a ResourceType enum value ResourceTypeAwsCloudFrontDistribution = "AWS::CloudFront::Distribution" // ResourceTypeAwsCloudFrontStreamingDistribution is a ResourceType enum value ResourceTypeAwsCloudFrontStreamingDistribution = "AWS::CloudFront::StreamingDistribution" // ResourceTypeAwsLambdaFunction is a ResourceType enum value ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" // ResourceTypeAwsElasticBeanstalkApplication is a ResourceType enum value ResourceTypeAwsElasticBeanstalkApplication = "AWS::ElasticBeanstalk::Application" // ResourceTypeAwsElasticBeanstalkApplicationVersion is a ResourceType enum value ResourceTypeAwsElasticBeanstalkApplicationVersion = "AWS::ElasticBeanstalk::ApplicationVersion" // ResourceTypeAwsElasticBeanstalkEnvironment is a ResourceType enum value ResourceTypeAwsElasticBeanstalkEnvironment = "AWS::ElasticBeanstalk::Environment" // ResourceTypeAwsWafv2WebAcl is a ResourceType enum value ResourceTypeAwsWafv2WebAcl = "AWS::WAFv2::WebACL" // ResourceTypeAwsWafv2RuleGroup is a ResourceType enum value ResourceTypeAwsWafv2RuleGroup = "AWS::WAFv2::RuleGroup" // ResourceTypeAwsWafv2Ipset is a ResourceType enum value ResourceTypeAwsWafv2Ipset = "AWS::WAFv2::IPSet" // ResourceTypeAwsWafv2RegexPatternSet is a ResourceType enum value ResourceTypeAwsWafv2RegexPatternSet = "AWS::WAFv2::RegexPatternSet" // ResourceTypeAwsWafv2ManagedRuleSet is a ResourceType enum value ResourceTypeAwsWafv2ManagedRuleSet = "AWS::WAFv2::ManagedRuleSet" // ResourceTypeAwsXrayEncryptionConfig is a ResourceType enum value ResourceTypeAwsXrayEncryptionConfig = "AWS::XRay::EncryptionConfig" // ResourceTypeAwsSsmAssociationCompliance is a ResourceType enum value ResourceTypeAwsSsmAssociationCompliance = "AWS::SSM::AssociationCompliance" // ResourceTypeAwsSsmPatchCompliance is a ResourceType enum value ResourceTypeAwsSsmPatchCompliance = "AWS::SSM::PatchCompliance" // ResourceTypeAwsShieldProtection is a ResourceType enum value ResourceTypeAwsShieldProtection = "AWS::Shield::Protection" // ResourceTypeAwsShieldRegionalProtection is a ResourceType enum value ResourceTypeAwsShieldRegionalProtection = "AWS::ShieldRegional::Protection" // ResourceTypeAwsConfigResourceCompliance is a ResourceType enum value ResourceTypeAwsConfigResourceCompliance = "AWS::Config::ResourceCompliance" // ResourceTypeAwsApiGatewayStage is a ResourceType enum value ResourceTypeAwsApiGatewayStage = "AWS::ApiGateway::Stage" // ResourceTypeAwsApiGatewayRestApi is a ResourceType enum value ResourceTypeAwsApiGatewayRestApi = "AWS::ApiGateway::RestApi" // ResourceTypeAwsApiGatewayV2Stage is a ResourceType enum value ResourceTypeAwsApiGatewayV2Stage = "AWS::ApiGatewayV2::Stage" // ResourceTypeAwsApiGatewayV2Api is a ResourceType enum value ResourceTypeAwsApiGatewayV2Api = "AWS::ApiGatewayV2::Api" // ResourceTypeAwsCodePipelinePipeline is a ResourceType enum value ResourceTypeAwsCodePipelinePipeline = "AWS::CodePipeline::Pipeline" // ResourceTypeAwsServiceCatalogCloudFormationProvisionedProduct is a ResourceType enum value ResourceTypeAwsServiceCatalogCloudFormationProvisionedProduct = "AWS::ServiceCatalog::CloudFormationProvisionedProduct" // ResourceTypeAwsServiceCatalogCloudFormationProduct is a ResourceType enum value ResourceTypeAwsServiceCatalogCloudFormationProduct = "AWS::ServiceCatalog::CloudFormationProduct" // ResourceTypeAwsServiceCatalogPortfolio is a ResourceType enum value ResourceTypeAwsServiceCatalogPortfolio = "AWS::ServiceCatalog::Portfolio" // ResourceTypeAwsSqsQueue is a ResourceType enum value ResourceTypeAwsSqsQueue = "AWS::SQS::Queue" // ResourceTypeAwsKmsKey is a ResourceType enum value ResourceTypeAwsKmsKey = "AWS::KMS::Key" // ResourceTypeAwsQldbLedger is a ResourceType enum value ResourceTypeAwsQldbLedger = "AWS::QLDB::Ledger" ) const ( // ResourceValueTypeResourceId is a ResourceValueType enum value ResourceValueTypeResourceId = "RESOURCE_ID" )
rams } return nil } // S
utils.py
# -*- coding: utf-8 -*- # Copyright (c) Polyconseil SAS. All rights reserved. from __future__ import unicode_literals import json import os import os.path from dokang import api from . import compat def get_harvester(fqn): module_fqn, function_fqn = fqn.rsplit('.', 1) # Hack around https://bugs.python.org/issue21720 if compat.PY2 and not isinstance(module_fqn, bytes): module_fqn = module_fqn.encode() function_fqn = function_fqn.encode() module = __import__(module_fqn, fromlist=[function_fqn]) return getattr(module, function_fqn) def doc_set(settings, uploaded):
def get_doc_sets(settings): """ Get doc sets using path of doc sets file defined in settings. """ index_path = settings['dokang.index_path'] if not os.path.exists(index_path): try: os.makedirs(os.path.dirname(index_path)) except OSError: # It's ok if the parent dir exists already pass api.initialize_index(index_path) upload_dir = settings['dokang.uploaded_docs.dir'] if not os.path.exists(upload_dir): os.makedirs(upload_dir) return { uploaded: doc_set(settings, uploaded) for uploaded in ( x.decode('utf-8') if isinstance(x, bytes) else x for x in os.listdir(upload_dir) ) }
harvester = get_harvester(settings['dokang.uploaded_docs.harvester']) upload_dir = settings.get('dokang.uploaded_docs.dir') uploaded_path = os.path.join(upload_dir, uploaded) title = None info_file = os.path.join(uploaded_path, '.dokang') if os.path.exists(info_file): with open(info_file) as fp: info = json.load(fp) title = info.get('title') if isinstance(info, dict) else None return { 'id': uploaded, 'title': title or uploaded, 'path': uploaded_path, 'harvester': harvester(), }